LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

PID controller

Hi,
I am trying to use the PID controller example to control the pressure for unit under test - valves, which has an open port blowing the air at the mean time. So what happens is, the actual pressure the valve gets is much less than what it should be, the PID controller VI didn't help at all. Also the output value is controlled by the high and low limit, not by the process variable and setpoint.

In my system, the AI channel is connected with pressure sensor indicating the pressure by voltage ( process variable of PID controller), the AO channel is connected with the electrical-pressure controller controlling the pressure to unit under test ( PID output), setpoint is set as the wanted voltage of pressure sensor. Is that correct? Why I am not getting th
e pressure I want from the output channel when the valve blows air?

Any help would be high appreciated!
0 Kudos
Message 1 of 11
(4,817 Views)
The PID control loop that ships with labView example does work as expected.
The set point is a calibrated value of the pressure transducer value (or what you expect what the pressure voltage of the sensor should be ) and the process variable is the pressure value (Calibrated) or (the pressure sensor voltage, if the set point is the expected voltage).
The PID controller output value is the voltage to the daq system that adjusts the controller. The PID vi will output a value in between the lower and upper limits. If for example, the controller max input voltage is 5 volt, then the upper limit should be set to 5.
You should be able to probe the voltage output of the PID vi and see if t is increasing/or decreasing. You have to adjust the P, I, and D values
Keep
the D Value first 0
adjust the P and I and probe the voltage.
Increasing the P/I will increase the voltage output, and you may have to adjust the valuesslowly to get the minimal over shoot, and propr rise time

If the output value reaches the upper limit and yet there is no pressure readout, then the controoler may not be functioning
0 Kudos
Message 2 of 11
(4,817 Views)
Dr.Imad,

Thanks a lot for your reply. It did make the concept clearer. And I think my external connection is correct, according to what you said above.
My situation is that, the output value always stays at the upper limit, never changes even though I keep on changing the process variable. It does output the related pressure at whatever the upper limit is set, if there is no air blowing out, but whenever I let the air blow, the actual pressure (on real pressure meter) will be much less than the output voltage which is indicated by PID output value.
So is there something other than P and I values impacting the output? Thank you in advance.

Rgds,
Jenna
0 Kudos
Message 3 of 11
(4,817 Views)
Do they checks

1) Bypass the PID controller, that is go to open loop mode, by manually setting the voltage output to the controller (0 to 5, or 0 to 10 V) and see if the controller responds. You can simply do that by a case stucture:
Closed Loop : PID Out
Open Loop : PID not used, voltage set by the operator

If the controller is responding and the analog input daq system reads the current pressure, then the connections are okay
Also in open loop mode, you should get an idea of how fast the system responds to a change in the setpoint voltage

2)"My situation is that, the output value always stays at the upper limit, never changes even though I keep on changing the process variable. "
The process variable cannot be changed, it is simp
ly the readout of the pressure meter, whatever it is. and this value may not be equal to the PID out voltage to the controller, depending on the system. The PID output value will be set so that the process variable value equals the set point

2)If the PID output voltage is 10 volts all the time(the upper limit), it means the meter readout is way less than the set point.

3) If the valve used (controller) is too slow, then, it could be the pressure value never went up, and the controller reacted to the delay by setting output value to the upper limit. In this case, reduce the P &I values to match the speed of the valve.
You should be able to see/probe the output voltage value slowly rising from 0 to whatever is needed
0 Kudos
Message 4 of 11
(4,816 Views)
I forgot to mention that
P I D values are positive for a reverse acting controler, meaning if the output signal to the controller increases, then the pressure readout increases. If it decreases, then pressure readout decreases.

If the system setup is the reverse of that, increasing out voltage value decreases pressure readout, the P I & D values are negative


Note, keep D=0, at first
0 Kudos
Message 5 of 11
(4,816 Views)
Dr.Imad,

I tried the PID controller, now I can set the P,I values (D seems only do bad things) to get the pressure I want. But the problem is, when I change to a new set point, seems that I have to change the P,I,D values again to match the new goal.

I am not sure if this is the way PID works. Do you have any trick about tuning the three values?

Thank you,
Jenna
0 Kudos
Message 6 of 11
(4,816 Views)
Hello Jenna,

as long as the controller is nearly linear, not showing dead bands in the middle of its operating range, you should be able to find values that will work across the workable range
1)
You probably have one paramter not set right. (Keep D=0 if it is simply a valve that is being controlled.)
The best thing is to start with small values of P, and I. Then you should be able to see the voltage rising slowly. If this is accepatable, then change to another set point and see the performance, increase/decrease one parameter at a time till you see the right performance.
Large values of P may cause overshoot/oscillation

From experience, if the system is slow but fast enough (depending on the application), one set of p
arametrs should work across whole range of set points

2)
you may want to look into purchasing the PID tool kit from national instruments, it has an auto tuning algorithm
0 Kudos
Message 7 of 11
(4,816 Views)
also,

set the P value to less than
transducer range/(controller range)

for instance, if the transducer goes to a max of 150 kPa at 10v, the max controller setting (upper limit=10, lower limit=0)
then set P to no more than (150/(10-0) = 15

hope this helps
0 Kudos
Message 8 of 11
(4,816 Views)
oops!

I meant the reciprocal of that

set the P value to less than
(controller range)/transducer range


for instance, if the transducer goes to a max of 150 kPa at 10v, the max controller setting (upper limit=10, lower limit=0)
then set P to no more than (10-0)/ 150 = 0.067
0 Kudos
Message 9 of 11
(4,816 Views)
Dr.Imad,

Firstly, thank you for all the ideas and suggestion.
Currently, I am struggling with the PID controller, I don't know why the full scale of set point (0~10), only covers the beginning of my pressure transducer voltage level(1~2Vdc), but actually the transducer is from 1 to 6V and it's proved pretty accurate by many experiments. I don't know how to correlate the set point and the real pressure transducer scale.

Also, if I leave the air open, it the actual pressure shows very different than when I block the air, and it doesn't try to go back to certain point which PID is set as, when I keep open and block the air.

I really appreciate your help.

Regards,
Jenna
0 Kudos
Message 10 of 11
(4,816 Views)