05-30-2019 05:05 AM
I'm working on a temperature controller for a heated stage in a vacuum system using the Labview PID toolkit and have a system that seems to work fine (with a bit of autotuning). In order to protect the system from an excessive rate of temperature rise causing outgassing, I've included the PID rate limiter control.
Is there a way of having different rate limits for rising and falling temperatures? The rate of temperature rise has to be limited to prevent outgassing, but we'd like the rate of temperature drop to be unlimited so we can study the effect of 'quenching' on our samples ?
Solved! Go to Solution.
05-31-2019 09:46 AM
Hi Dave_Langstaff,
I think that the PID Output Rate Limiter VI doesn't natively have the option to limit an increasing value only.
Perhaps you could check in every iteration if the difference between the current and previous value is positive or negative and use this with a case structure to decide when to apply a rate limitation.
Let me know if this is helpful.
Best,
Rob
06-04-2019 05:10 PM
I would suggest adding code to generate a ramp on your setpoint, rather than changing setpoint instantaneosly and then relying on the rate limiter to ramp the output. This will help avoid integrator windup in the PID VI. That's not to suggest that a rate limiter is a bad idea, but the point of the rate limiter is to prevent the output to your functional element (i.e. your heater) from changing too rapidly. This doesn't necessarily prevent your actual physical system (i.e. the temperature) from changing too rapidly, as that is dependent on the characteristics of the physical system (time constant, heat capacity, etc.). To do that, you need to keep it as responsive as possible, with an appropriately tuned PID which is not obfuscated by too-strong rate limiting downstream.
You can certainly code the rate limiter to act differently in different directions, by using the rate, reset and initial output terminals. Just examine how your process variable is changing and add cases accordingly, based on the value from the previous iteration or the trend over some number of samples. If you want a slower temperature rise than you get from a step change in the setpoint, however, you're better off to ramp up the setpoint at your target rate, than you are to make the step change with well tuned PID gains and then relying on downstream rate limiting to ramp it. With the latter strategy, the process variable may be no longer representative of what the PID is doing. Essentially, this allows for far more aggressive PID gains than are strictly appropriate, because the output from the PID could be saturated at 100%, and you'd just be waiting on the rate limiter to catch up. The purpose of a rate limiter is really to slow control action within the control element, so that you're not e.g. wearing out a proportional valve or creating high frequency noise in an electrical system unnecessarily. The rate limiter should not be used to compensate for a PID system that can not be properly tuned - at that point, you may as well just put on/off control in front of the rate limiter.
Temperature systems inherently have long time constants. In several temperature control loops that I have coded, I set both my target setpoint and a target ramp rate, and generate that setpoint profile to be fed to the PID. During the ramp, I disable the integral term in the input PID gains, setting it to zero to prevent any integrator windup as a result of a persistent lag between control and response. I only allow the integral term to become active once I have reached the target setpoint, and in high lag systems that integral period may be a matter of several minutes. I monitor the error growth during the ramp, and if the physical system can't keep up with the commanded ramp rate, I slow it down accordingly. I experimented with rate limiting downstream of the PID early on, but ended up disabling all of the rate limiters in my heater control systems. With solid state control elements (resistive heaters), there is no problem with permitting a rapid change to the correct commanded PID output. Sending the correct setpoint is key.
06-05-2019 03:42 AM - edited 06-05-2019 03:44 AM
Many thanks CFER_STS for your reply - that makes a lot of sense.
I was planning on having a preview phase in the system to allow the user to see a graphic representation of the ramp before pressing GO, so rate limiting/validity checking at that point would be very appropriate.
Thanks again
Dave