03-31-2009 01:26 PM
I am using Labview PID (with only PI terms, D = 0) to control a furnace temperature. I used my own and also autotune to get PID values (P = 4, i = 12). Initially the output saturates for a while (when requesting a big temperature change). To avoid overshoot (or avoid integral wind up?) the PID sets the error to zero (somehow internally!) when the temperature is still far from the setpint somehow internally and output drops to zero. This does not make sense because the error is still positive and thus k*error + k/T * integral(error) should still be positive. The output then goes through a series of oscillations (slowly damping). The results is that temperature of the furnace rises, plateaues, rises, plateaues and slowly works its way to the setpoint. How can I optimize this control better??
Best Regards,
Arman
04-01-2009 09:54 PM
Hi Arman:
Is your program based on one of the PID Toolkit examples or is this some code you wrote yourself? Without knowing exactly what you're doing it's hard to say what the issue is. If you post the code you're using, hopefully we can give you some advice.
04-01-2009 10:14 PM
04-01-2009 10:39 PM
This is a PID bug I have submitted once or twice, but apparently it has never been fixed. The windup correction is overkill, since it adjusts the integral term to prevent the sum from exceeding the limits.
I had to go into the toolkit and put in a different windup control algorithm. I decided to set a maximum limit on the integral term instead. Keeping it at 20% of the total range works pretty well for my applications. You can also set it at 80% for applications that need a large integral term.
Bruce
04-02-2009 02:17 PM
Alex, Bruce,
I am using the PID VI with autotuning option. The code is very simple: I feed my thermocouple readout (process variable) and the desired setpoint to the PID VI and take the output to the external power source which heats up the furnace. I can provide the code if you still wish, but there is really not much to it and yes it is similar to the examples provided in the toolkit.
I am attaching the data I get in my setup. You see initially the output of PID saturates (Figure 2), then PID output drops to zero - why? As Bruce has also observed, this is done internaly to avoid overshoot, but it is an overkill here. Bruce, could you provide more detail how you reduced this effect? I think it would be very useful if the PID VIs would provide the values of proportional, integral and derivative terms they calculate. The proportional term is easy, K*error and I get this when I use only the P term. However, i am not able to reproduce the P + I terms, i.e. what I calculate in spreadsheet is not what the PID VI outputs.
Best,
Arman
04-02-2009 07:25 PM
I would have to dig into the software to give you exact details.
I remember after the P and I terms are combined, the value is coerced to the limits. The new I value is calculated by subtracting the P value. Instead, I coerced the I value to a max of 20% of the range, then coerce the sum of P, I, and D terms to the limits.
Bruce