LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to find the P, I, and D values for a simple PID controller?

I'm using the simple PID demo that comes with LabVIEW 7.0 to keep a gas flow controller at a steady pressure. I want to sample the pressure every 20 seconds or so, and use the Simple PID to output the set point value that I choose. However, I don't know how to find the values needed for P, I, and D for the controller's transfer function. I've tried using various values, but the controller keeps outputting either the upper or lower limit, never the set point. The process variable will be the current dissolved gas concentration (90 microM to 1.3 mM), so the set point will be changed to a pressure once I have the calibration completed. Does anyone know what sort of values I would need for P, I, and D to accomplish this? Thank you!
0 Kudos
Message 1 of 6
(7,103 Views)
Here's a brief start:

http://digital.ni.com/public.nsf/allkb/6F1B2FC721FC62F986256CF4005D1A48

http://chem.engr.utc.edu/ENGR329/PID-loop-tuning-tips.pdf

It can be tricky, you do have to have some sort of feel how the process works and responds. I tune PID loops for servo motors, but with the advent of smart autotuner, they do 75% of the work. You may want to google more on "PID tuning" or related terms.
~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
Message 2 of 6
(7,092 Views)
I am assumuming the controller responds to an anolog output voltage of a daq card.
I am also assuming this behavior:
more voltage output (input to the controller) means more pressure,
and less voltage means less pressure
and a constant control voltage implies some pressure.

In a case like this a PI or a PID (with very small D) is needed.

Set the D to zero.
start with small values of P and I, increase each in small increments and watch the output control voltage. It should increase in small steps.

If the control voltage increases in large steps, then either P or I or both are large, and the pressure will swing to extremes. Reduce the increment (or P /I)

If the presure is dancing up/down, then most likey both, and in particular P are too high. reduce it

Hope this helps
Message 3 of 6
(7,082 Views)
We haven't connected to the pressure controller yet; right now, we're using a random number generator to determine how the PID controller works. But the signal that we're acquiring is a concentration, which has to be related to pressure. We're trying to keep the dissolved oxygen concentration constant by using a pressure controller to change the oxygen flow. For now, we're using the random number generator to determine if the PID controller does what we want. I will try increasing P & I in small changes and seeing what the output of the controller is. Thanks!
Message 4 of 6
(7,067 Views)
Will using a random generator even work? Can the PID get a random process 'under control' ? I'd be curious to know your results.
~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 5 of 6
(7,033 Views)
The PID seems to be working for the random number. The output that it's giving isn't exactly the set point that I gave it, but it's falling in a close range. Thanks, everybody, for the help!
0 Kudos
Message 6 of 6
(7,023 Views)