Is there something in the documentation that's unclear?
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.
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").
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
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.
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: