06-16-2011 12:44 AM
06-16-2011 07:34 PM
The PID algorithm is actually agnostic about the unit. If you have all percentage, then you will have percentage on the output. But you can use Engineering units and you should be able to obtain engineering units as output (the Proportional gain will try to compensate for this change).
If you use engineering units, don't forget to change the output limits accordingly since the output limits is set to +/- 100. For example, if your output is +/- 10 V, then you should change the lower limit to -10 and the upper limit to +10.
Hopefully this helps
06-19-2011 11:00 PM
06-20-2011 01:39 AM
Hi J3r3my,
If your heading range is 0-360 with output of -10 to 10V, if your setpoint is 10 degree, the steady state would be (10/360 * 20) + (-10) = -9.45 instead of at 0 V.
0V would be setpoint of 180 degree.
Hope this helps.
06-20-2011 02:09 AM
Thanks for the reply.
Sorry i don't really get you. What u did seems like a linear equation y = mx + c to compute the value.
Correct me if i'm wrong, the output is computed base on the error (setpoint - PV). In a perfect situtation, setpoint = PV. the output shouldn't output anything; in this case 0V.
I have gone through my exampls from the LV and NI website, but all seems too complex.
06-20-2011 03:13 AM
Hi J3r3my,
I am sorry for the confusion over the previous message. I was assuming that the voltage output were your set point instead of your heading. You are right that the output to control (Vout) the process should be minimal when it is close to setpoint.
When you set a setpoint of 10 degree and PID continues to go from extreme to extreme, it might be caused by untuned value of the PID. P&I value that is too big would cause the signal to overshoot over and undershoot the setpoint and unable to settle on the setpoint.
I was looking for a reference to assist you on this and actually wikipedia have quite a good explanation on PID. It shows graph on the effect of P values and I values and D value over the PV values.
Please let me know the result of trying to adjust the PID values.
06-20-2011 04:33 AM - edited 06-20-2011 04:37 AM
I attached a VI. I wonder if i'm at the right direction? I did try on various values for the PID gains. It seems that the it works if I & D gains are 0. Any comments are welcomed!! 😄
06-20-2011 12:54 PM
Can't open your VI - don't have LV 2010 available right now - but if it works with just Proportional control, then you're most of the way there. It's possible you do not need any Integral or Derivative control depending on your system and the desired response. If the proportional control gives you a stable output with a constant offset, then you need some Integral gain. It is important to understand that in the LabVIEW PID toolkit, the integral value is specified as a time in minutes, and that the shorter the time, the more integral response. You should therefore start with a large value for the integral time and slowly reduce it until you get the performance you want. Alternatively you can go through a standard tuning procedure such as Ziegler-Nichols to calculate good initial values, which you can then adjust slightly if necessary. Do not introduce derivative control unless you're certain you need it - it is mostly useful for speeding the response of slow systems that do not have much noise.
06-20-2011 10:25 PM
Hi J3r3my,
I don't have Labview 2010 now but sounds like that your adjustment to PID value works. As nathand mentioned, you are closing to the setting for your PID.
As mentioned, you may want to adjust the P&I values so that the control stabilizes on the PV without much noise (overshoot or undershoot).