LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Anyone revised the FPGA psuedo PID control to eliminate "...where the integer action calculated for each loop, before being added to the total integrator action, has values of only 0 or -1 for the entire range of errors." problem?

Anyone revised the FPGA psuedo PID control to eliminate "...where the integer action calculated for each loop, before being added to the total integrator action, has values of only 0 or -1 for the entire range of errors." problem?
0 Kudos
Message 1 of 4
(3,446 Views)
You can solve this problem by not scaling integrator action before adding it to the total, which also leaves the total integrator action unscaled. You can then apply scaling to the total integrator action to add it to the other actions (P and D). This only works if the P and I gains do not change. If this gains are expected to change then you can add some logic to the code to detect a change. You can handle a change in a variety of ways. For example, you may choose to reset the integral action on a change.

Joseph D.
National Instruments
0 Kudos
Message 2 of 4
(3,446 Views)
This doesn't solve the problem, I tried it. The X2^n function will still round to 0 or -1. The only way I've come up with to solve this is to remove the scaling function completely from the the P, I & D actions individually and apply it only at the control output, the cost is resolution.
0 Kudos
Message 3 of 4
(3,447 Views)
I've experienced a similar problem with the NI PID example.  I've since used a transfer function analysis VI to evaluate different designs.  I currently use the attached design.  Please post your code and I'll analyse.
0 Kudos
Message 4 of 4
(3,257 Views)