Modern control theoretical approach to temperature control - Page 1
Forum section: electronics / projects

author: ezalys
author_rank: Frequent Contributor
timestamp: March 10, 2023, 09:14:57 pm
content: Is there a better alternative to PID for temperature control (heater only) over a wide range? I have a stage that has to be controlled to within a few degrees or so and be free of overshoot from 40 C to 180 C. I know you can gain schedule and all that but is there something that’s shown to be better and just doesn’t involve PID at all.

author: ezalys
author_rank: Frequent Contributor
timestamp: March 10, 2023, 09:28:22 pm
content: Also I'm aware that there's also these things like LQR/LQG, but they basically reduce to PID in the end for a heater (I think?)I should also ask if there's anything to be gained by using analog control instead of PWM like Arroyo seems to do. My impression is that as long as the PWM period is faster than any other timescale there's basically nothing to be gained besides maybe lower noise.

author: RoGeorge
author_rank: Super Contributor
timestamp: March 10, 2023, 09:38:20 pm
content: It may depend what you power with the PWM.For example, if you power a Peltier element it will make a big difference. Peltier elements lose a lot of their efficiency when the voltage is pulsed, they need smooth DC to be efficient. For a resistive heater, it doesn't matter if it's PWM, PDM or DC, they'll heat the same.

author: ezalys
author_rank: Frequent Contributor
timestamp: March 10, 2023, 10:41:16 pm
content: Ahh ok. I’m only using a cartridge heater. Nothing exciting.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: March 11, 2023, 12:28:07 am
content: I mean, PID is equivalent to a 1st order analog control using lead-lag compensation. Assuming the sample rate is fast enough so the samples average out. If that's good enough for the system, it doesn't really matter which one you choose.If the system is mostly linear and has a couple well-defined time constants, the best you can do is a loop that nudges those poles into something approximating a desirable prototype e.g. Bessel. Which will get you the minimum settling time without overshoot.A higher order or nonlinear control can't really do better than this, because the plant response (poles above Fc) filters out any nonlinearities anyway (say you put a bunch of step pulses into it); or there are other practical considerations, like a maximum power limit so the control output saturates for a long while until the whole thing comes up near the setpoint temperature.And, if the plant is known perfectly (and is consistent), you can craft (open loop) a waveform to drive it perfectly from one setpoint to another, say as a series of square pulses, or a saturated pulse then some wobbly recovery, or whatever. But if it's not, if it varies with setpoint, or with other unrelated conditions (classic case being building thermostat during rush hour: more doors opening to the outside, and between areas; more warm bodies in rooms; etc.), you can't predict so easily what's going to happen and you must spend some time waiting for the control loop to sense what's going on and stabilize to it. With the consequence of higher output impedance (more change in output level for a given disturbance to it) and lower loop bandwidth, particularly if you must avoid overshoot (control must always approach the setpoint cautiously, to allow for such variances).For a thermostat, generally you have real poles, and a great many of them as diffusive transport dominates. This doesn't work well with a linear lumped-pole control, with which you tend to have a long-tail response; you could of course model the diffusion process and cancel it out more directly if you like (and, again, assuming you can make a reasonable assumption as to its value). The upside is, at least give or take real delay between heater and sensor -- the control can be painfully simple with little consequence e.g. hysteretic on/off / bang-bang control. Delay being important as far as overshoot, that is.Tim

author: totalnoob
author_rank: Regular Contributor
timestamp: March 11, 2023, 01:13:33 am
content: I forget which of the forums on here that it was, but there was a person who posted a way to control temperature on a homemade soldering station, I believe, that appeared to be a good alternative to PID control for simple heating/cooling. It was in a thread about 3 to 4 years ago, perhaps longer. I'm currently on the road or I'd try to search for it and link to that thread. If I get some time later, I might give it a try and update this post.Edit: Here it is:https://www.eevblog.com/forum/projects/yet-another-controller-for-jbc-t210t245/msg3009204/#msg3009204He calls it the "Take Back Half" method.