From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

PID Output Range

Solved!
Go to solution

Hi,

Can anyone please explain me how to use output range function in the PID.vi. 

I am very new to control system 

0 Kudos
Message 1 of 5
(8,137 Views)

Is there something in the documentation that's unclear?

http://zone.ni.com/reference/en-XX/help/371361L-01/lvpid/pid_vi/

 

You just set it to what you want the max and min you want from the output. Like, if you wired output to a typical AO, you'd put -10 and 10 in there because your analog output can't output more than ±10V.

0 Kudos
Message 2 of 5
(8,111 Views)
Solution
Accepted by topic author thendral123

It is important that the output range set within the PID block maps onto the range limits found in - a) any saturations in the software that may act on the output signal, b) the max / min signal range of the IO module the output passes to, c) the max/min range of the actuator in the control loop. It is needed since it prevents the integrating action of the controller taking its output beyond what the system can deliver - which if not prevented can give rise to instability in a control loop (called "integral windup").

Consultant Control Engineer
www-isc-ltd.com
Message 3 of 5
(8,105 Views)

Hi Andy,

Thanks for your time. I understood the effect of the output range.

 

Please check my overall understanding regarding PID and correct me if am wrong.

PID output u(t) is sum of  {\displaystyle u(t)=K_{\text{p}}e(t)+K_{\text{i}}\int _{0}^{t}e(t)\,dt+K_{\text{d}}{\frac {de(t)}{dt}},}

Let's say if I want to control motor speed using an analog output (0-10 Volts), I have to choose my P gain in such way that the control output is gain*error (which is my desire voltage value for speed)

 

Here I have the following doubts and my assumption. Correct me if am wrong.

1. What would be the PID input setpoint and process variable units? Is it speed in rpm or corresponding scaled voltage value?

I think the PID input is voltage value for setpoint and process variable so that I can limit the output range (say 0-10) and get the desired voltage value to maintain the speed.

2. How to choose the PID gain values without trial and error?

I believe PID Advanced Autotuning function (Used in RT platform) meant for that. But suggest an alternative method without the use of functional blocks.

 

Let me try to understand the effect of Integral and derivative in the meantime.

 

Thanks

Thendral

0 Kudos
Message 4 of 5
(8,097 Views)
Solution
Accepted by topic author thendral123

1. The input value units don't really matter - as long as you are consistent. If you have your error (=SP-PV) in rpm and your output signal is in volts, then proportional gain (Kp) has units volts per rpm. The range of your input and output signals are important to understand as that changes your process gain, which has to be reflected in the controller gain. Some controllers scale their inputs and outputs to 0-100%, so the controller gains are unit-less and closer to 1.

2. There are many ways to configure the controller gains (tuning), auto-tuning is one, and manual trial and error is another. Tuning requires some knowledge about how your systems responds dynamical and also what is an acceptable performance - response speed vs stability for example. There are methods that use knowledge of the dynamic response to derive the controller settings, but Ziegler-Nichols tuning provides a way of doing a simple test on your system (which essentially captures the dynamics) and calculating the gains from measurements you take from the response. There will be a lot of resources about Z-N tuning. Just be aware it tends to result in an aggressive controller and may need de-tuning, and also that the equations stated don't always state what type of PID control equation it applies to (parallel, academic, series are names LV uses)

 

Have a look at this:

http://www.ni.com/white-paper/6440/en/

 

Consultant Control Engineer
www-isc-ltd.com
Message 5 of 5
(8,088 Views)