Modeling of feedback networks in thermal control systems - Page 1
Forum section: electronics / projects

author: golf32
author_rank: Regular Contributor
timestamp: October 27, 2021, 05:16:36 am
content: Hi all, I've been working on a project where I have a voltage reference I want to keep at a precise temperature for stability. It doesn't have a built in oven, so I'm working on building my own (I know ovenized references exist, this is for learning and fun).My first iteration has some oscillation in the temperature, and I want to know how to model the feedback loop of the heater and temperature sensor for simulation and experimenting. I read a Jim Williams article titled "Take advantage of thermal effects to solve circuit-design problems" in which he says you can model the system as an RC low pass filter. By blowing on the temperature controlled assembly and watching how long it takes to recover I think I've found an RC time constant of about 80 seconds. Screenshot attached shows temperature sensor: TMP36G (10mv/K).What I want to fully capture is the noise and smaller oscillations. You can barely make it out on this capture, but at shorter timebases an oscillation with a period of about 10s is visible.The controller circuit in this case is just an analog voltage output temperature sensor connected to an opamp which drives a transistor.

author: Someone
author_rank: Super Contributor
timestamp: October 27, 2021, 10:14:23 am
content: https://en.wikipedia.org/wiki/Lumped-element_model#Thermal_systemsIts rather convenient if you're modelling an analogue controller. Getting suitably accurate models of the "plant" can be an art in its self.

author: Picuino
author_rank: Super Contributor
timestamp: October 27, 2021, 02:58:12 pm
content: I recommend you a feedforward control system.First of all you need to design an open-loop system with an ambient temperature sensor and a heater with a linear control. The colder the environment, the more it should heat.That should keep the system in a very small temperature range even if the ambient temperature changes.Once the open-loop system is working, add a closed-loop PI system to further reduce temperature error.The complete system will respond well to sudden changes in ambient temperature and will have very little error with little overshoot.

author: Terry Bites
author_rank: Super Contributor
timestamp: October 27, 2021, 05:41:47 pm
content: A PID is the best method but tricky to tune. Analog loops can drive you self harm. You need a solid logical procedure or 'tuning algorithm". Seehttps://en.wikipedia.org/wiki/PID_controllerThere is auto tuning code for arduinos.http://brettbeauregard.com/blog/2012/01/arduino-pid-autotune-library/Take the easy way out, always!

author: Picuino
author_rank: Super Contributor
timestamp: October 27, 2021, 08:02:09 pm
content: You can tune the PID closed loop control manually with the Ziegler-Nichols method. Easy and efficient.https://en.wikipedia.org/wiki/Ziegler%E2%80%93Nichols_methodThe PID is a good close-loop control method, but you can improve it a lot adding an open-loop control.Edit:There is little information on internet about Ziegler-Nichols method. I can help you to implementing it.I have published a explanation of the method and how to apply it, but in spanish.Other sources are:https://www.mstarlabs.com/control/znrule.htmlhttps://eng.libretexts.org/Bookshelves/Industrial_and_Systems_Engineering/Book%3A_Chemical_Process_Dynamics_and_Controls_(Woolf)/09%3A_Proportional-Integral-Derivative_(PID)_Control/9.03%3A_PID_Tuning_via_Classical_Methods

author: branadic
author_rank: Super Contributor
timestamp: October 27, 2021, 08:19:11 pm
content: You might want to have a read ofSetting up a SZA263-LTFLU voltage reference2?I described how to derive the oven response and how to simulate the complete control loop including the oven using LTspice.-branadic-

author: Picuino
author_rank: Super Contributor
timestamp: October 27, 2021, 09:27:27 pm
content: Another consideration to take care is the anti-windup method for the Integral part of the PID.With the anti-windup, Integral control only starts when the error is low, avoiding high overshoot.https://en.wikipedia.org/wiki/Integral_windup

author: golf32
author_rank: Regular Contributor
timestamp: October 27, 2021, 11:45:34 pm
content: Those modeling calculations are more or less exactly what I was looking for! Do you by chance have an English source for these sorts of calculations? What can I search for to find more?

author: AussieBruce
author_rank: Regular Contributor
timestamp: October 28, 2021, 12:52:27 pm
content: Just one thing to note if you implement PI or PID control digitally - make sure the calculations have adequate precision. Ideally use floating point, if you have to use integer arithmetic, 16 bits may be marginal, in a HLL best to use 32 bit (int or long int).. Also, having a loop sample rate that is too fast exacerbates the precision problem. For the response plot in the earlier post, a loop sample time of a few hundred mS should be more than adequate.Precision problems generally show as 'flat spots' in integral action, ie. it stops working before the error is driven to zero.For the loop you seem to have, I'd suggest starting with PI control only because (1) the algo is simpler, (2) derivative is troublesome of there's any noise on the measurement and (3) tuning derivative can be tricky even for experienced control engineers.I've found that doing these sorts of loops in analog is often quicker and easier, a good MOS input opamp such as the TLC2272 will do PI easily. The only challenge is to get long integral times, circuit layout becomes critical in order to avoid leakage problems. Also, caps for the integrator need to be very low leakage.Good luck, there's tons of info on Ziegler Nichols on the web.

author: AussieBruce
author_rank: Regular Contributor
timestamp: October 28, 2021, 01:16:30 pm
content: Sorry, one more thing. I omitted to mention that the precision requirements for the PID calcs don't need to apply to the input and output conversion. Typically you'll have maybe 10 or 12 bit ADC and DAC converters, you still need much higher precision in the control algo calcs.

author: Kleinstein
author_rank: Super Contributor
timestamp: October 29, 2021, 10:06:04 am
content: There are 2 versions of the Ziegler Nichols method: one is with steady state oscillation and one based on the step response. For the usually relatively slow thermal processes the step method is usually better suited - it is the faster way.The step method also shows which parameters are important for the oven design: the delay from the heater to the sensor should be low to allow easy regulation. With a well behaved system one can often get away with a PI regulator and make the tuning quite a bit simpler.A small and thus relatively fast oven can still use analog control. Even there it is worth doing the math to get the regulator right. Try and error is slow with a slow system. For a slow system with a time constant of more than some 20 seconds digital control my be easier.It helps to linearize the system. Otherwise something like a resistive heater has different gain at different power levels and thus get varying resuts as the regulator tuning depends on the power. For analog control it helps if the heater is linear, like using a transistor as a heater or PWM control.An advantage of a digital regulator is that anti-windup is easy to implement - this part is difficult analog. It mainly effects the start and not so much the staedy state, but it really help for the start.