Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Simple PID Lag

Does anyone have any idea why the Simple PID vi might start to lag after running for a time. I have the vi in a loop that is constantly adjusting the set point for ramping but after so long of holding my set point (temperature) for a while I try to change it and the vi does not react sometimes for up to a few minutes. Ill attach my app, but I warn yall its kinda crazy.
Thanks
Tim LeDoux
0 Kudos
Message 1 of 9
(4,417 Views)
The simple PID should work if tuned properly.
The issue may be due to how you are updating the set point.

Run the vi, and probe all the inputs to the PID and the output voltage value, see if they make sense and are what you expecting. Then you can pin point the erratic behavior.
0 Kudos
Message 2 of 9
(4,396 Views)
That is the thing, I admit my update method is rough but it does work. I probe the input to the PID and it can be twice the process variable and yet there is still no output if the VI has run for a while. I think the reason for this has something to do with how the Simple PID remebers what happend in the past. If I ramp my temperature to a certain value and then hold it there and then cool it back down and then want to ramp it up again the PID vi doesnt know what to do because looks back at everything that happend in the past and goes bonkers or something like that. It is like I need to reset it everytime I want to send the set point down and then back up after a time.
0 Kudos
Message 3 of 9
(4,385 Views)
<<.....yet there is still no output if the VI has run for a while.>>
what do you mean no output ? do you mean zero voltage ?

If the set point is set constant, does the software control as expected, and how long does it take to reach the set point?

Are you ramping faster than the control loop can update ?

Another question, how are you expecting the output voltage to behave ? What is it the output voltage controlling ? a water Valve ? if that is the case, then if tempertaure goes above the set point, you should cool the system by opening the valve more and more. In a case like this, this is not a typical revesre acting controller,and the P (of the PID) value should be negative.

As a side note, your code is hard to follow, use of local variables, and wires getting criss crossed, and wiring from right to left is against the rules that everybody (including LabVIEW prgoamming guides) recommends. This is not to be taken personally.
0 Kudos
Message 4 of 9
(4,379 Views)
Sorry the program is so rough. I have not had time to clean it up, I have been frantically trying to get things to work. What I am trying to do is a temperature ramp to a set point followed by cooling and then another ramp and so on. What happens is that after I ramp the temperature and hold it to say 150K, I adjust my set point to zero for cooling, but when I want to do another ramp inputing my set point value to say 160 nothing happens. The set point value goes in but there is no request by the PID for an output voltage value. It is as if the PID doesnt know what to do yet with the new set point. Thanks for the help.
Tim LeDoux
0 Kudos
Message 5 of 9
(4,361 Views)
If you manually adjust the control voltage (by putting a case strucrure around the PID vi), (Open loop (T) /closed loop (F), can you control the temperature ?

How does your controller work ? if the control voltage is increased, does it increase Temeparture or does it decrease it ? (.i.e. is this a reverse acting controller or not)

When you are ramping temperature from a low value to a higher value (say 150K), is this done with turning on a heater (ON/OFF) and setting the PID output to zero.

What are the P, I, D values you are using ?

Answer these questions first so one can understand what the problem is. Just trying to help
0 Kudos
Message 6 of 9
(4,357 Views)
I'm having the same issue with a program I've been using that incorporates SimplePID.vi. I'm ramping load using load cell values as the feedback for hydraulic controls through Simple PID.vi. If I adjust the rate the output seems fixed (it will not decrease if I want to decrease the load). I'm using the same values that are set in Simple PID.vi and wanted to get it working before tuning any of the parameters...is there a way to update this so that the output is not fixed if I want to decrease my load instead of increasing it?
0 Kudos
Message 7 of 9
(4,217 Views)
If you send a voltage directly to the controller (increasing it/decreasing it) , does it it respond accordingly ?
If yes, then it seems the tuning parameters are not set right.
use the default values (1, 0.01, 0). If they do not work,(you will have either ringing, or a voltage stuck at a the low end or the high end). Set Kc to 0.001, then increase it slowly and probe the output voltage,
Increasing Kc will increase output voltage. Large values of Kc will make the response oscillate.
0 Kudos
Message 8 of 9
(4,205 Views)
 
 
 
 
 
Proplem with internal integrator when input is outside upper or lower limit?
The solution?  the input signal limiting to the same limits?
Have program a realtime simulator for powerplants written in C++.I translates the RT sim to NI components and software (Labview).


My rt pxi turbine simulator for simulating grid incidents was succesfully used in a nuclear plant in 2006.

Look at http://sine.ni.com/cs/app/doc/p/id/cs-755
0 Kudos
Message 9 of 9
(4,139 Views)