Electronics-Related.com
Forums

I don't understand thermostats

Started by John Larkin July 14, 2015
On 15/07/2015 18:50, John Larkin wrote:
> On Wed, 15 Jul 2015 18:25:22 +0200, Habib Bouaziz-Viallet > <habib@nowhere.com> wrote: > >> On 14/07/2015 22:29, John Larkin wrote: >>> Version 4 >>> SHEET 1 880 680 >>> WIRE 0 0 -288 0 >>> WIRE 528 0 80 0 >>> WIRE -288 160 -288 0 >>> WIRE -224 160 -288 160 >>> WIRE -96 160 -144 160 >>> WIRE -16 160 -96 160 >>> WIRE 96 160 64 160 >>> WIRE 192 160 96 160 >>> WIRE 304 160 272 160 >>> WIRE 416 160 304 160 >>> WIRE 528 160 528 0 >>> WIRE 528 160 480 160 >>> WIRE -288 224 -288 160 >>> WIRE -96 224 -96 160 >>> WIRE 96 224 96 160 >>> WIRE 304 224 304 160 >>> WIRE -288 336 -288 288 >>> WIRE -96 336 -96 288 >>> WIRE 96 336 96 288 >>> WIRE 304 336 304 288 >>> FLAG -288 336 0 >>> FLAG -96 336 0 >>> FLAG 96 336 0 >>> FLAG 304 336 0 >>> SYMBOL Digital\\schmtinv 416 96 R0 >>> WINDOW 0 2 -10 Left 2 >>> WINDOW 3 -30 23 Left 2 >>> SYMATTR InstName A1 >>> SYMATTR Value Vh=0.002 >>> SYMBOL cap 80 224 R0 >>> WINDOW 0 67 13 Left 2 >>> WINDOW 3 64 44 Left 2 >>> SYMATTR InstName C1 >>> SYMATTR Value 1m >>> SYMBOL cap -112 224 R0 >>> WINDOW 0 63 18 Left 2 >>> WINDOW 3 64 53 Left 2 >>> SYMATTR InstName C2 >>> SYMATTR Value 5m >>> SYMBOL cap -304 224 R0 >>> WINDOW 0 60 22 Left 2 >>> WINDOW 3 66 53 Left 2 >>> SYMATTR InstName C3 >>> SYMATTR Value 1m >>> SYMBOL res -128 144 R90 >>> WINDOW 0 0 56 VBottom 2 >>> WINDOW 3 32 56 VTop 2 >>> SYMATTR InstName R1 >>> SYMATTR Value 1K >>> SYMBOL res 80 144 R90 >>> WINDOW 0 0 56 VBottom 2 >>> WINDOW 3 32 56 VTop 2 >>> SYMATTR InstName R2 >>> SYMATTR Value 1K >>> SYMBOL res 96 -16 R90 >>> WINDOW 0 0 56 VBottom 2 >>> WINDOW 3 32 56 VTop 2 >>> SYMATTR InstName R3 >>> SYMATTR Value 1K >>> SYMBOL cap 288 224 R0 >>> WINDOW 0 67 13 Left 2 >>> WINDOW 3 64 44 Left 2 >>> SYMATTR InstName C4 >>> SYMATTR Value 1m >>> SYMBOL res 288 144 R90 >>> WINDOW 0 0 56 VBottom 2 >>> WINDOW 3 32 56 VTop 2 >>> SYMATTR InstName R4 >>> SYMATTR Value 1K >>> TEXT -208 -56 Left 2 !.tran 50 uic >>> TEXT 192 -88 Left 2 ;THERMOSTAT >>> TEXT 192 -48 Left 2 ;JL July 14, 2015 >>> TEXT -72 80 Left 2 ;===== thermal lags ===== >> >> John, >> >> where is the setpoint on your looped system ? a PID corrector should >> theoretically help to reach the plant output to the assigned setpoint >> with an optimum time (without ringing behavior ...). >> >> Habib. >> > > The Spice model defaults to the Schmitt threshold, 0.5 volts. > >
I had suspected one of the two thresholds acts as the system setpoint. If your system is fully characterized as a first order model and if you did not need some optimum response then the system should work fine ... As i understand your needs you have no need to implement a PID (or a PD) corrector ; or i missed something (always my English understanding ... :( ) BTW : What is R3/C3 ? did not understand the reference of this RC model Habib.
On Wednesday, July 15, 2015 at 12:20:52 PM UTC-4, John Larkin wrote:
> On Wed, 15 Jul 2015 09:04:45 -0700 (PDT), > bloggs.fredbloggs.fred@gmail.com wrote: > > >On Wednesday, July 15, 2015 at 11:56:59 AM UTC-4, John Larkin wrote: > >> On Wed, 15 Jul 2015 08:33:49 -0700 (PDT), George Herold > >> <gherold@teachspin.com> wrote: > >> > >> >On Tuesday, July 14, 2015 at 4:29:26 PM UTC-4, John Larkin wrote: > >> >> Imagine a mass that we want to heat with some closed-loop controller. > >> >> It's C2 below. Voltage represents temperature. Thermal systems are > >> >> diffusive, which we represent as a bunch of RC lags. Assume the > >> >> voltage at C4 is the temperature sensor. > >> >> > >> >> If I were to design a PID controller, I'd have to really think about > >> >> it, or fiddle some, to keep it stable. But if I do a dumb on/off > >> >> thermostat, it seems to always work. I can tweak the hysteresis and > >> >> vary the p-p temperature excursions and the switching frequency, but > >> >> it's always stable. Or maybe it's always unstable. But it works. > >> >> > >> >> As Vh gets smaller, the oscillation frequency converges to some > >> >> limiting value, which is I guess the ultimate performance of a > >> >> thermostat for this physics. To get any less temperature excursion, I > >> >> guess I'd have to do a real PID loop. Curious. > >> >> > >> >> This may have something to do with the fact that there is no thermal > >> >> equivalent to an inductor. > >> >> > >> >> Version 4 > >> >> SHEET 1 880 680 > >> >> WIRE 0 0 -288 0 > >> >> WIRE 528 0 80 0 > >> >> WIRE -288 160 -288 0 > >> >> WIRE -224 160 -288 160 > >> >> WIRE -96 160 -144 160 > >> >> WIRE -16 160 -96 160 > >> >> WIRE 96 160 64 160 > >> >> WIRE 192 160 96 160 > >> >> WIRE 304 160 272 160 > >> >> WIRE 416 160 304 160 > >> >> WIRE 528 160 528 0 > >> >> WIRE 528 160 480 160 > >> >> WIRE -288 224 -288 160 > >> >> WIRE -96 224 -96 160 > >> >> WIRE 96 224 96 160 > >> >> WIRE 304 224 304 160 > >> >> WIRE -288 336 -288 288 > >> >> WIRE -96 336 -96 288 > >> >> WIRE 96 336 96 288 > >> >> WIRE 304 336 304 288 > >> >> FLAG -288 336 0 > >> >> FLAG -96 336 0 > >> >> FLAG 96 336 0 > >> >> FLAG 304 336 0 > >> >> SYMBOL Digital\\schmtinv 416 96 R0 > >> >> WINDOW 0 2 -10 Left 2 > >> >> WINDOW 3 -30 23 Left 2 > >> >> SYMATTR InstName A1 > >> >> SYMATTR Value Vh=0.002 > >> >> SYMBOL cap 80 224 R0 > >> >> WINDOW 0 67 13 Left 2 > >> >> WINDOW 3 64 44 Left 2 > >> >> SYMATTR InstName C1 > >> >> SYMATTR Value 1m > >> >> SYMBOL cap -112 224 R0 > >> >> WINDOW 0 63 18 Left 2 > >> >> WINDOW 3 64 53 Left 2 > >> >> SYMATTR InstName C2 > >> >> SYMATTR Value 5m > >> >> SYMBOL cap -304 224 R0 > >> >> WINDOW 0 60 22 Left 2 > >> >> WINDOW 3 66 53 Left 2 > >> >> SYMATTR InstName C3 > >> >> SYMATTR Value 1m > >> >> SYMBOL res -128 144 R90 > >> >> WINDOW 0 0 56 VBottom 2 > >> >> WINDOW 3 32 56 VTop 2 > >> >> SYMATTR InstName R1 > >> >> SYMATTR Value 1K > >> >> SYMBOL res 80 144 R90 > >> >> WINDOW 0 0 56 VBottom 2 > >> >> WINDOW 3 32 56 VTop 2 > >> >> SYMATTR InstName R2 > >> >> SYMATTR Value 1K > >> >> SYMBOL res 96 -16 R90 > >> >> WINDOW 0 0 56 VBottom 2 > >> >> WINDOW 3 32 56 VTop 2 > >> >> SYMATTR InstName R3 > >> >> SYMATTR Value 1K > >> >> SYMBOL cap 288 224 R0 > >> >> WINDOW 0 67 13 Left 2 > >> >> WINDOW 3 64 44 Left 2 > >> >> SYMATTR InstName C4 > >> >> SYMATTR Value 1m > >> >> SYMBOL res 288 144 R90 > >> >> WINDOW 0 0 56 VBottom 2 > >> >> WINDOW 3 32 56 VTop 2 > >> >> SYMATTR InstName R4 > >> >> SYMATTR Value 1K > >> >> TEXT -208 -56 Left 2 !.tran 50 uic > >> >> TEXT 192 -88 Left 2 ;THERMOSTAT > >> >> TEXT 192 -48 Left 2 ;JL July 14, 2015 > >> >> TEXT -72 80 Left 2 ;===== thermal lags ===== > >> >> > >> >> > >> >> > >> >> > >> >> -- > >> >> > >> >> John Larkin Highland Technology, Inc > >> >> picosecond timing precision measurement > >> >> > >> >> jlarkin att highlandtechnology dott com > >> >> http://www.highlandtechnology.com > >> > > >> >Hmm it seems to me you have a gain knob in there too. Whatever the power is > >> >coming out when the thermostat is on. (1V in this case... I don't know which spice line changes the amplitude.) > >> > >> It's all normalized to 1 volt, which I could arbitrarily call 100 > >> degrees C or something. The gain is 1/Vh (well, 0.5/Vh the way LT > >> Spice defines hysteresis) so if I set Vh =0 the schmitt becomes an > >> infinite gain, which actually doesn't change things much. > >> > >> > >> > > >> >With 3 RC's and enough gain you should be able to make it oscillate. > >> > >> It seems to always oscillate! That's the point of a thermostat. But > >> the oscillation seems benign. > >> > >> >(I always had to have at least three RC's to simulate thermal loops > >> >w/ spice...otherwise no oscillations.) > >> > >> With hysteresis set nonzero, a single RC oscillates. That's the > >> classic triangle wave generator. > >> > >> I need to build two temperature controllers, on opposite sides of a > >> round PC board about 1" in diameter, around the electro-optical > >> gadgets. The thermostat approach is appealing... very simple and the > >> amplifier won't fry like a linear controller would. Similar to your > >> recent situation, where PWM would be nice but has side effects, the > >> side effect in my case being parts count and loop stability. A > >> bang-bang loop, maybe with zero hysteresis, would sure be easy, but > >> the temperature excursions would be dominated by the thermal > >> properties (masses, conductivities) of the "process", which is hard to > >> model. The controllers on either side of the board will interact too, > >> more fun. > >> > >> My customer insists on two controllers, but maybe I can talk him into > >> one, with lots of thermal vias side to side. > >> > >> Electronic design seems to be 50% thermal design and 50% packaging, > >> with about zero time spent scribbling schematics. > >> > >> > >> -- > >> > >> John Larkin Highland Technology, Inc > >> picosecond timing laser drivers and controllers > >> > >> jlarkin att highlandtechnology dott com > >> http://www.highlandtechnology.com > > > >Seems most of the time a hysteretic temperature controller regulates the temperature of a mass coupled to the thermodynamics of the configuration but with much less heat capacity than the mass to be temperature regulated. The heat capacity is used as the low pass filtering of the temperature excursions of the critical element of the system. > > It could be that my heater (actually a bunch of surfmount resistors > surrounding the optical widgets) will have more thermal mass than the > gadgets being heated. I'm trying to get a mockup to test. Even when I > have one, figuring out the equivalent circuit will be a chore. > Electronics is so easy to drive and probe; mechanical and thermal > systems aren't. Imagine designing a racing car engine, and wondering > what the temperatures and flows are like inside; we sure have it easy. > > It is tempting to control the temperature of the heater, and not the > object to be heated. Much better dynamics, almost first order. > > > > > > -- > > John Larkin Highland Technology, Inc > picosecond timing laser drivers and controllers > > jlarkin att highlandtechnology dott com > http://www.highlandtechnology.com
One thing for certain is that no one uses SPICE for this. Maybe you can get a free eval copy of something like this: http://www.mentor.com/products/mechanical/flotherm/flotherm-xt/ They /should/ enable a time varying control input, if not at least a steady state, but like I've said in the past, if engineers have any say in the architecture, it will be lacking. It's always a 3D simulation. One big problem is the requirement for input data you may not have, that's why your best hope is to get a system specific to electronics. Google "thermal modeling for electronics cad' for others.
On Wednesday, July 15, 2015 at 1:10:42 PM UTC-4, Habib Bouaziz-Viallet wrote:
<gibberish>

Go back to selling women's shoes.
On Wed, 15 Jul 2015 09:20:47 -0700, John Larkin wrote:

<clip> 
> It could be that my heater (actually a bunch of surfmount resistors > surrounding the optical widgets) will have more thermal mass than the > gadgets being heated. I'm trying to get a mockup to test. Even when I > have one, figuring out the equivalent circuit will be a chore. > Electronics is so easy to drive and probe; mechanical and thermal > systems aren't. Imagine designing a racing car engine, and wondering > what the temperatures and flows are like inside; we sure have it easy. > > It is tempting to control the temperature of the heater, and not the > object to be heated. Much better dynamics, almost first order.
Or you could control both; an inner loop controlling heater temperature and an outer loop controlling the heated object temperature (the output of which is the setpoint for the inner heater temperature controller). This should give you the better dynamics without any loss of accuracy. Not really pertinent to your control system, actually responding to another comment about optimal control with PID, but I do not think PID can ever achieve optimal transient response in a temperature controller (or pretty much any other controller, possibly excepting some which need to be too fast for digital control). PID can be tuned for the best response possible from a system with a PID controller; fastest response with specified (possibly zero) overshoot. But some sort of model reference control system can always do better, at the cost of additional complexity. For a temperature controller you would create a math model of the thermal system which will accurately model the temperature at the sensor as a function of heat load or ambient temperature, heater power input, possibly other variables influencing the system, and time. If the system has significant nonlinearities they should be included in the model. The model parameters can be determined from measured response to a step or other stimulus. Then when you have a transient to respond to the controller calculates how many watt-seconds of energy are needed to reach the set point and turns the heater on or off fully for the calculated time, then backs off to the calculated steady state power. The error signal is not the difference between set point and measured temperature, it is the difference between measured temperature and model predicted measured temperature, and this error signal can be used to adjust heater on/off time or power level and also to adjust the model for more accurate response on the next transient, which I have seen referred to as adaptive model reference control. While not too many heaters need this level of optimization, there are situations where the improvement is worth the effort, and it can be a lot more fun than boring old PID <yawn> or bang-bang <double-yawn>.
On Wednesday, July 15, 2015 at 11:56:59 AM UTC-4, John Larkin wrote:
> On Wed, 15 Jul 2015 08:33:49 -0700 (PDT), George Herold > <gherold@teachspin.com> wrote: > > >On Tuesday, July 14, 2015 at 4:29:26 PM UTC-4, John Larkin wrote: > >> Imagine a mass that we want to heat with some closed-loop controller. > >> It's C2 below. Voltage represents temperature. Thermal systems are > >> diffusive, which we represent as a bunch of RC lags. Assume the > >> voltage at C4 is the temperature sensor. > >> > >> If I were to design a PID controller, I'd have to really think about > >> it, or fiddle some, to keep it stable. But if I do a dumb on/off > >> thermostat, it seems to always work. I can tweak the hysteresis and > >> vary the p-p temperature excursions and the switching frequency, but > >> it's always stable. Or maybe it's always unstable. But it works. > >> > >> As Vh gets smaller, the oscillation frequency converges to some > >> limiting value, which is I guess the ultimate performance of a > >> thermostat for this physics. To get any less temperature excursion, I > >> guess I'd have to do a real PID loop. Curious. > >> > >> This may have something to do with the fact that there is no thermal > >> equivalent to an inductor. > >> > >> Version 4 > >> SHEET 1 880 680 > >> WIRE 0 0 -288 0 > >> WIRE 528 0 80 0 > >> WIRE -288 160 -288 0 > >> WIRE -224 160 -288 160 > >> WIRE -96 160 -144 160 > >> WIRE -16 160 -96 160 > >> WIRE 96 160 64 160 > >> WIRE 192 160 96 160 > >> WIRE 304 160 272 160 > >> WIRE 416 160 304 160 > >> WIRE 528 160 528 0 > >> WIRE 528 160 480 160 > >> WIRE -288 224 -288 160 > >> WIRE -96 224 -96 160 > >> WIRE 96 224 96 160 > >> WIRE 304 224 304 160 > >> WIRE -288 336 -288 288 > >> WIRE -96 336 -96 288 > >> WIRE 96 336 96 288 > >> WIRE 304 336 304 288 > >> FLAG -288 336 0 > >> FLAG -96 336 0 > >> FLAG 96 336 0 > >> FLAG 304 336 0 > >> SYMBOL Digital\\schmtinv 416 96 R0 > >> WINDOW 0 2 -10 Left 2 > >> WINDOW 3 -30 23 Left 2 > >> SYMATTR InstName A1 > >> SYMATTR Value Vh=0.002 > >> SYMBOL cap 80 224 R0 > >> WINDOW 0 67 13 Left 2 > >> WINDOW 3 64 44 Left 2 > >> SYMATTR InstName C1 > >> SYMATTR Value 1m > >> SYMBOL cap -112 224 R0 > >> WINDOW 0 63 18 Left 2 > >> WINDOW 3 64 53 Left 2 > >> SYMATTR InstName C2 > >> SYMATTR Value 5m > >> SYMBOL cap -304 224 R0 > >> WINDOW 0 60 22 Left 2 > >> WINDOW 3 66 53 Left 2 > >> SYMATTR InstName C3 > >> SYMATTR Value 1m > >> SYMBOL res -128 144 R90 > >> WINDOW 0 0 56 VBottom 2 > >> WINDOW 3 32 56 VTop 2 > >> SYMATTR InstName R1 > >> SYMATTR Value 1K > >> SYMBOL res 80 144 R90 > >> WINDOW 0 0 56 VBottom 2 > >> WINDOW 3 32 56 VTop 2 > >> SYMATTR InstName R2 > >> SYMATTR Value 1K > >> SYMBOL res 96 -16 R90 > >> WINDOW 0 0 56 VBottom 2 > >> WINDOW 3 32 56 VTop 2 > >> SYMATTR InstName R3 > >> SYMATTR Value 1K > >> SYMBOL cap 288 224 R0 > >> WINDOW 0 67 13 Left 2 > >> WINDOW 3 64 44 Left 2 > >> SYMATTR InstName C4 > >> SYMATTR Value 1m > >> SYMBOL res 288 144 R90 > >> WINDOW 0 0 56 VBottom 2 > >> WINDOW 3 32 56 VTop 2 > >> SYMATTR InstName R4 > >> SYMATTR Value 1K > >> TEXT -208 -56 Left 2 !.tran 50 uic > >> TEXT 192 -88 Left 2 ;THERMOSTAT > >> TEXT 192 -48 Left 2 ;JL July 14, 2015 > >> TEXT -72 80 Left 2 ;===== thermal lags ===== > >> > >> > >> > >> > >> -- > >> > >> John Larkin Highland Technology, Inc > >> picosecond timing precision measurement > >> > >> jlarkin att highlandtechnology dott com > >> http://www.highlandtechnology.com > > > >Hmm it seems to me you have a gain knob in there too. Whatever the power is > >coming out when the thermostat is on. (1V in this case... I don't know which spice line changes the amplitude.) > > It's all normalized to 1 volt, which I could arbitrarily call 100 > degrees C or something. The gain is 1/Vh (well, 0.5/Vh the way LT > Spice defines hysteresis) so if I set Vh =0 the schmitt becomes an > infinite gain, which actually doesn't change things much.
Calling the hysteresis the gain is a bit funny, though I understand what you mean. In theory smaller hysteresis leads to a smaller excursion of the temperature from the set point. At some point I don't think smaller hysteresis will do anything you'll be stuck with what ever time delay is in the loop. (I set you R3 to 1 and C3 to 1p, and lower hysteresis does nothing.)
> > > > > >With 3 RC's and enough gain you should be able to make it oscillate. > > It seems to always oscillate! That's the point of a thermostat. But > the oscillation seems benign.
Sure.. It's a bang-bang oscillator vs. one with too much gain and phase shift. I guess I was thinking about the oscillations you get with a P-only controller when you crank the gain up too high.
> > >(I always had to have at least three RC's to simulate thermal loops > >w/ spice...otherwise no oscillations.) > > With hysteresis set nonzero, a single RC oscillates. That's the > classic triangle wave generator. > > I need to build two temperature controllers, on opposite sides of a > round PC board about 1" in diameter, around the electro-optical > gadgets. The thermostat approach is appealing... very simple and the > amplifier won't fry like a linear controller would. Similar to your > recent situation, where PWM would be nice but has side effects, the > side effect in my case being parts count and loop stability. A > bang-bang loop, maybe with zero hysteresis, would sure be easy, but > the temperature excursions would be dominated by the thermal > properties (masses, conductivities) of the "process", which is hard to > model. The controllers on either side of the board will interact too, > more fun.
I'm sorry to say that besides the thermostat in my house, I don't know much about them for thermal control. If your set point was higher, so that the heater had to be on for a longer fraction of the time it seems like there might be larger temperature excursions. So picking the power level so that it's on about 1/2 the time might be optimal. (But again I'm totally guessing)
> > My customer insists on two controllers, but maybe I can talk him into > one, with lots of thermal vias side to side.
Why two? (at only 1" apart?) Are they worried about thermal gradients? It's usually worth while to spend some time thinking about how the heat will flow and putting the heaters and sensors in the "right" places. George H.
> > Electronic design seems to be 50% thermal design and 50% packaging, > with about zero time spent scribbling schematics. > > > -- > > John Larkin Highland Technology, Inc > picosecond timing laser drivers and controllers > > jlarkin att highlandtechnology dott com > http://www.highlandtechnology.com
On Wed, 15 Jul 2015 19:10:32 +0200, Habib Bouaziz-Viallet
<habib@nowhere.com> wrote:

>On 15/07/2015 18:50, John Larkin wrote: >> On Wed, 15 Jul 2015 18:25:22 +0200, Habib Bouaziz-Viallet >> <habib@nowhere.com> wrote:
>>> John, >>> >>> where is the setpoint on your looped system ? a PID corrector should >>> theoretically help to reach the plant output to the assigned setpoint >>> with an optimum time (without ringing behavior ...). >>> >>> Habib. >>> >> >> The Spice model defaults to the Schmitt threshold, 0.5 volts. >> >> >I had suspected one of the two thresholds acts as the system setpoint.
An LT Spice default Schmitt has trip points + and - Vh from 0.5 volts.
>If your system is fully characterized as a first order model and if you >did not need some optimum response then the system should work fine ... >As i understand your needs you have no need to implement a PID (or a PD) >corrector ; or i missed something (always my English understanding ... :( )
Your English is fine, about as good as mine. A PID controller takes more parts and has power dissipation in the amp and the square-law problem, or needs PWM drive. A PID might need big capacitors in the integral and would need tuning, too.
> >BTW : What is R3/C3 ? did not understand the reference of this RC model > >Habib.
I was just playing with a system that has multiple thermal masses and thermal conductivities. The conductivities are actually diffusive, so an RC is only an approximation. Well, the masses are diffusive, too. C3 could be the heater mass and the big one, C2, the thing to be heated. I used lots of RC delays to see what the dumb thermostat loop would do. I can probably get by with three thermal masses (three caps) corresponding to heater, gadget, and sensor, connected by thermal conductivities/resistors. The heater mass might exceed the gadget mass. What's interesting is that the bang-bang loop works pretty well, even with zero hysteresis. Saves parts. I'd just never thought about thermostats much before. Now I need to try to characterize the physics of the actual setup, including losses to ambient everywhere. I need numbers, of course. The thing below might be better. It has a current/heat source dumping into the heater mass, no R3 that you asked about. Incidentally, this is pretty close for simulation: 1 farad == 1 gram aluminum 1 amp == 1 watt of heat 1 volt == 1 deg C 1 ohm == 1 degC/watt 1 second == 1 second Version 4 SHEET 1 880 680 WIRE -320 -80 -368 -80 WIRE -272 -80 -320 -80 WIRE -272 -48 -272 -80 WIRE -368 -16 -368 -80 WIRE -320 0 -320 -80 WIRE 496 48 -320 48 WIRE -368 160 -368 64 WIRE -256 160 -368 160 WIRE -96 160 -176 160 WIRE 64 160 -96 160 WIRE 144 160 64 160 WIRE 320 160 224 160 WIRE 384 160 320 160 WIRE 496 160 496 48 WIRE 496 160 448 160 WIRE -96 208 -96 160 WIRE -368 224 -368 160 WIRE 64 224 64 160 WIRE 320 224 320 160 WIRE -368 336 -368 288 WIRE -96 336 -96 288 WIRE 64 336 64 288 WIRE 320 336 320 288 FLAG -368 336 0 FLAG 64 336 0 FLAG 320 336 0 FLAG -272 -48 0 FLAG -96 336 0 SYMBOL Digital\\schmtinv 384 96 R0 WINDOW 0 -6 -11 Left 2 WINDOW 3 -26 23 Left 2 SYMATTR InstName A1 SYMATTR Value Vh=5m SYMBOL cap 304 224 R0 WINDOW 0 67 13 Left 2 WINDOW 3 61 47 Left 2 SYMATTR InstName C1 SYMATTR Value 100&#4294967295; SYMBOL cap 48 224 R0 WINDOW 0 66 13 Left 2 WINDOW 3 66 45 Left 2 SYMATTR InstName C2 SYMATTR Value 5m SYMBOL cap -384 224 R0 WINDOW 0 69 15 Left 2 WINDOW 3 68 46 Left 2 SYMATTR InstName C3 SYMATTR Value 5m SYMBOL res -160 144 R90 WINDOW 0 -40 52 VBottom 2 WINDOW 3 -36 53 VTop 2 SYMATTR InstName R1 SYMATTR Value 2K SYMBOL res 240 144 R90 WINDOW 0 -45 55 VBottom 2 WINDOW 3 -39 53 VTop 2 SYMATTR InstName R2 SYMATTR Value 10K SYMBOL g -368 80 R180 WINDOW 0 -53 4 Left 2 WINDOW 3 -68 -24 Left 2 SYMATTR InstName G1 SYMATTR Value 100&#4294967295; SYMBOL res -112 192 R0 WINDOW 0 54 44 Left 2 WINDOW 3 48 74 Left 2 SYMATTR InstName R3 SYMATTR Value 10K TEXT -24 0 Left 2 !.tran 200 uic TEXT -48 -80 Left 2 ;THERMOSTAT TEXT -56 -40 Left 2 ;JL July 15, 2015 TEXT -344 312 Left 2 ;heater mass TEXT 96 312 Left 2 ;gadget mass TEXT 336 312 Left 2 ;sensor mass TEXT -72 312 Left 2 ;heat loss -- John Larkin Highland Technology, Inc picosecond timing precision measurement jlarkin att highlandtechnology dott com http://www.highlandtechnology.com
On Wednesday, July 15, 2015 at 2:31:31 PM UTC-4, John Larkin wrote:
> On Wed, 15 Jul 2015 19:10:32 +0200, Habib Bouaziz-Viallet > <habib@nowhere.com> wrote: > > >On 15/07/2015 18:50, John Larkin wrote: > >> On Wed, 15 Jul 2015 18:25:22 +0200, Habib Bouaziz-Viallet > >> <habib@nowhere.com> wrote: > > > >>> John, > >>> > >>> where is the setpoint on your looped system ? a PID corrector should > >>> theoretically help to reach the plant output to the assigned setpoint > >>> with an optimum time (without ringing behavior ...). > >>> > >>> Habib. > >>> > >> > >> The Spice model defaults to the Schmitt threshold, 0.5 volts. > >> > >> > >I had suspected one of the two thresholds acts as the system setpoint. > > An LT Spice default Schmitt has trip points + and - Vh from 0.5 volts. > > >If your system is fully characterized as a first order model and if you > >did not need some optimum response then the system should work fine ... > >As i understand your needs you have no need to implement a PID (or a PD) > >corrector ; or i missed something (always my English understanding ... :( ) > > Your English is fine, about as good as mine. A PID controller takes > more parts and has power dissipation in the amp and the square-law > problem, or needs PWM drive. A PID might need big capacitors in the > integral and would need tuning, too. > > > > > >BTW : What is R3/C3 ? did not understand the reference of this RC model > > > >Habib. > > I was just playing with a system that has multiple thermal masses and > thermal conductivities. The conductivities are actually diffusive, so > an RC is only an approximation. Well, the masses are diffusive, too. > C3 could be the heater mass and the big one, C2, the thing to be > heated. I used lots of RC delays to see what the dumb thermostat loop > would do. > > I can probably get by with three thermal masses (three caps) > corresponding to heater, gadget, and sensor, connected by thermal > conductivities/resistors. The heater mass might exceed the gadget > mass. What's interesting is that the bang-bang loop works pretty well, > even with zero hysteresis. Saves parts. > > I'd just never thought about thermostats much before. Now I need to > try to characterize the physics of the actual setup, including losses > to ambient everywhere. I need numbers, of course. > > The thing below might be better. It has a current/heat source dumping > into the heater mass, no R3 that you asked about. > > Incidentally, this is pretty close for simulation: > > 1 farad == 1 gram aluminum > > 1 amp == 1 watt of heat > > 1 volt == 1 deg C > > 1 ohm == 1 degC/watt > > 1 second == 1 second > > > > Version 4 > SHEET 1 880 680 > WIRE -320 -80 -368 -80 > WIRE -272 -80 -320 -80 > WIRE -272 -48 -272 -80 > WIRE -368 -16 -368 -80 > WIRE -320 0 -320 -80 > WIRE 496 48 -320 48 > WIRE -368 160 -368 64 > WIRE -256 160 -368 160 > WIRE -96 160 -176 160 > WIRE 64 160 -96 160 > WIRE 144 160 64 160 > WIRE 320 160 224 160 > WIRE 384 160 320 160 > WIRE 496 160 496 48 > WIRE 496 160 448 160 > WIRE -96 208 -96 160 > WIRE -368 224 -368 160 > WIRE 64 224 64 160 > WIRE 320 224 320 160 > WIRE -368 336 -368 288 > WIRE -96 336 -96 288 > WIRE 64 336 64 288 > WIRE 320 336 320 288 > FLAG -368 336 0 > FLAG 64 336 0 > FLAG 320 336 0 > FLAG -272 -48 0 > FLAG -96 336 0 > SYMBOL Digital\\schmtinv 384 96 R0 > WINDOW 0 -6 -11 Left 2 > WINDOW 3 -26 23 Left 2 > SYMATTR InstName A1 > SYMATTR Value Vh=5m > SYMBOL cap 304 224 R0 > WINDOW 0 67 13 Left 2 > WINDOW 3 61 47 Left 2 > SYMATTR InstName C1 > SYMATTR Value 100&#4294967295; > SYMBOL cap 48 224 R0 > WINDOW 0 66 13 Left 2 > WINDOW 3 66 45 Left 2 > SYMATTR InstName C2 > SYMATTR Value 5m > SYMBOL cap -384 224 R0 > WINDOW 0 69 15 Left 2 > WINDOW 3 68 46 Left 2 > SYMATTR InstName C3 > SYMATTR Value 5m > SYMBOL res -160 144 R90 > WINDOW 0 -40 52 VBottom 2 > WINDOW 3 -36 53 VTop 2 > SYMATTR InstName R1 > SYMATTR Value 2K > SYMBOL res 240 144 R90 > WINDOW 0 -45 55 VBottom 2 > WINDOW 3 -39 53 VTop 2 > SYMATTR InstName R2 > SYMATTR Value 10K > SYMBOL g -368 80 R180 > WINDOW 0 -53 4 Left 2 > WINDOW 3 -68 -24 Left 2 > SYMATTR InstName G1 > SYMATTR Value 100&#4294967295; > SYMBOL res -112 192 R0 > WINDOW 0 54 44 Left 2 > WINDOW 3 48 74 Left 2 > SYMATTR InstName R3 > SYMATTR Value 10K > TEXT -24 0 Left 2 !.tran 200 uic > TEXT -48 -80 Left 2 ;THERMOSTAT > TEXT -56 -40 Left 2 ;JL July 15, 2015 > TEXT -344 312 Left 2 ;heater mass > TEXT 96 312 Left 2 ;gadget mass > TEXT 336 312 Left 2 ;sensor mass > TEXT -72 312 Left 2 ;heat loss > > > > -- > > John Larkin Highland Technology, Inc > picosecond timing precision measurement > > jlarkin att highlandtechnology dott com > http://www.highlandtechnology.com
Do you have any idea of how much heat you will need? 1 watt, 10, 100? I did a P-only control loop, where things were fairly tightly coupled. (heater, thing, sensor) and that worked fine. (Fet as heater, constant voltage, control current.) There's a little gain dependent offset, but not too bad, and I cared more about stability than any exact temperature. George H.
On Wed, 15 Jul 2015 11:25:51 -0700 (PDT),
bloggs.fredbloggs.fred@gmail.com wrote:

>On Wednesday, July 15, 2015 at 12:20:52 PM UTC-4, John Larkin wrote: >> On Wed, 15 Jul 2015 09:04:45 -0700 (PDT), >> bloggs.fredbloggs.fred@gmail.com wrote: >> >> >On Wednesday, July 15, 2015 at 11:56:59 AM UTC-4, John Larkin wrote: >> >> On Wed, 15 Jul 2015 08:33:49 -0700 (PDT), George Herold >> >> <gherold@teachspin.com> wrote: >> >> >> >> >On Tuesday, July 14, 2015 at 4:29:26 PM UTC-4, John Larkin wrote: >> >> >> Imagine a mass that we want to heat with some closed-loop controller. >> >> >> It's C2 below. Voltage represents temperature. Thermal systems are >> >> >> diffusive, which we represent as a bunch of RC lags. Assume the >> >> >> voltage at C4 is the temperature sensor. >> >> >> >> >> >> If I were to design a PID controller, I'd have to really think about >> >> >> it, or fiddle some, to keep it stable. But if I do a dumb on/off >> >> >> thermostat, it seems to always work. I can tweak the hysteresis and >> >> >> vary the p-p temperature excursions and the switching frequency, but >> >> >> it's always stable. Or maybe it's always unstable. But it works. >> >> >> >> >> >> As Vh gets smaller, the oscillation frequency converges to some >> >> >> limiting value, which is I guess the ultimate performance of a >> >> >> thermostat for this physics. To get any less temperature excursion, I >> >> >> guess I'd have to do a real PID loop. Curious. >> >> >> >> >> >> This may have something to do with the fact that there is no thermal >> >> >> equivalent to an inductor. >> >> >> >> >> >> Version 4 >> >> >> SHEET 1 880 680 >> >> >> WIRE 0 0 -288 0 >> >> >> WIRE 528 0 80 0 >> >> >> WIRE -288 160 -288 0 >> >> >> WIRE -224 160 -288 160 >> >> >> WIRE -96 160 -144 160 >> >> >> WIRE -16 160 -96 160 >> >> >> WIRE 96 160 64 160 >> >> >> WIRE 192 160 96 160 >> >> >> WIRE 304 160 272 160 >> >> >> WIRE 416 160 304 160 >> >> >> WIRE 528 160 528 0 >> >> >> WIRE 528 160 480 160 >> >> >> WIRE -288 224 -288 160 >> >> >> WIRE -96 224 -96 160 >> >> >> WIRE 96 224 96 160 >> >> >> WIRE 304 224 304 160 >> >> >> WIRE -288 336 -288 288 >> >> >> WIRE -96 336 -96 288 >> >> >> WIRE 96 336 96 288 >> >> >> WIRE 304 336 304 288 >> >> >> FLAG -288 336 0 >> >> >> FLAG -96 336 0 >> >> >> FLAG 96 336 0 >> >> >> FLAG 304 336 0 >> >> >> SYMBOL Digital\\schmtinv 416 96 R0 >> >> >> WINDOW 0 2 -10 Left 2 >> >> >> WINDOW 3 -30 23 Left 2 >> >> >> SYMATTR InstName A1 >> >> >> SYMATTR Value Vh=0.002 >> >> >> SYMBOL cap 80 224 R0 >> >> >> WINDOW 0 67 13 Left 2 >> >> >> WINDOW 3 64 44 Left 2 >> >> >> SYMATTR InstName C1 >> >> >> SYMATTR Value 1m >> >> >> SYMBOL cap -112 224 R0 >> >> >> WINDOW 0 63 18 Left 2 >> >> >> WINDOW 3 64 53 Left 2 >> >> >> SYMATTR InstName C2 >> >> >> SYMATTR Value 5m >> >> >> SYMBOL cap -304 224 R0 >> >> >> WINDOW 0 60 22 Left 2 >> >> >> WINDOW 3 66 53 Left 2 >> >> >> SYMATTR InstName C3 >> >> >> SYMATTR Value 1m >> >> >> SYMBOL res -128 144 R90 >> >> >> WINDOW 0 0 56 VBottom 2 >> >> >> WINDOW 3 32 56 VTop 2 >> >> >> SYMATTR InstName R1 >> >> >> SYMATTR Value 1K >> >> >> SYMBOL res 80 144 R90 >> >> >> WINDOW 0 0 56 VBottom 2 >> >> >> WINDOW 3 32 56 VTop 2 >> >> >> SYMATTR InstName R2 >> >> >> SYMATTR Value 1K >> >> >> SYMBOL res 96 -16 R90 >> >> >> WINDOW 0 0 56 VBottom 2 >> >> >> WINDOW 3 32 56 VTop 2 >> >> >> SYMATTR InstName R3 >> >> >> SYMATTR Value 1K >> >> >> SYMBOL cap 288 224 R0 >> >> >> WINDOW 0 67 13 Left 2 >> >> >> WINDOW 3 64 44 Left 2 >> >> >> SYMATTR InstName C4 >> >> >> SYMATTR Value 1m >> >> >> SYMBOL res 288 144 R90 >> >> >> WINDOW 0 0 56 VBottom 2 >> >> >> WINDOW 3 32 56 VTop 2 >> >> >> SYMATTR InstName R4 >> >> >> SYMATTR Value 1K >> >> >> TEXT -208 -56 Left 2 !.tran 50 uic >> >> >> TEXT 192 -88 Left 2 ;THERMOSTAT >> >> >> TEXT 192 -48 Left 2 ;JL July 14, 2015 >> >> >> TEXT -72 80 Left 2 ;===== thermal lags ===== >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> -- >> >> >> >> >> >> John Larkin Highland Technology, Inc >> >> >> picosecond timing precision measurement >> >> >> >> >> >> jlarkin att highlandtechnology dott com >> >> >> http://www.highlandtechnology.com >> >> > >> >> >Hmm it seems to me you have a gain knob in there too. Whatever the power is >> >> >coming out when the thermostat is on. (1V in this case... I don't know which spice line changes the amplitude.) >> >> >> >> It's all normalized to 1 volt, which I could arbitrarily call 100 >> >> degrees C or something. The gain is 1/Vh (well, 0.5/Vh the way LT >> >> Spice defines hysteresis) so if I set Vh =0 the schmitt becomes an >> >> infinite gain, which actually doesn't change things much. >> >> >> >> >> >> > >> >> >With 3 RC's and enough gain you should be able to make it oscillate. >> >> >> >> It seems to always oscillate! That's the point of a thermostat. But >> >> the oscillation seems benign. >> >> >> >> >(I always had to have at least three RC's to simulate thermal loops >> >> >w/ spice...otherwise no oscillations.) >> >> >> >> With hysteresis set nonzero, a single RC oscillates. That's the >> >> classic triangle wave generator. >> >> >> >> I need to build two temperature controllers, on opposite sides of a >> >> round PC board about 1" in diameter, around the electro-optical >> >> gadgets. The thermostat approach is appealing... very simple and the >> >> amplifier won't fry like a linear controller would. Similar to your >> >> recent situation, where PWM would be nice but has side effects, the >> >> side effect in my case being parts count and loop stability. A >> >> bang-bang loop, maybe with zero hysteresis, would sure be easy, but >> >> the temperature excursions would be dominated by the thermal >> >> properties (masses, conductivities) of the "process", which is hard to >> >> model. The controllers on either side of the board will interact too, >> >> more fun. >> >> >> >> My customer insists on two controllers, but maybe I can talk him into >> >> one, with lots of thermal vias side to side. >> >> >> >> Electronic design seems to be 50% thermal design and 50% packaging, >> >> with about zero time spent scribbling schematics. >> >> >> >> >> >> -- >> >> >> >> John Larkin Highland Technology, Inc >> >> picosecond timing laser drivers and controllers >> >> >> >> jlarkin att highlandtechnology dott com >> >> http://www.highlandtechnology.com >> > >> >Seems most of the time a hysteretic temperature controller regulates the temperature of a mass coupled to the thermodynamics of the configuration but with much less heat capacity than the mass to be temperature regulated. The heat capacity is used as the low pass filtering of the temperature excursions of the critical element of the system. >> >> It could be that my heater (actually a bunch of surfmount resistors >> surrounding the optical widgets) will have more thermal mass than the >> gadgets being heated. I'm trying to get a mockup to test. Even when I >> have one, figuring out the equivalent circuit will be a chore. >> Electronics is so easy to drive and probe; mechanical and thermal >> systems aren't. Imagine designing a racing car engine, and wondering >> what the temperatures and flows are like inside; we sure have it easy. >> >> It is tempting to control the temperature of the heater, and not the >> object to be heated. Much better dynamics, almost first order. >> >> >> >> >> >> -- >> >> John Larkin Highland Technology, Inc >> picosecond timing laser drivers and controllers >> >> jlarkin att highlandtechnology dott com >> http://www.highlandtechnology.com > >One thing for certain is that no one uses SPICE for this.
I do. It works fine, once I get the numbers, the thermal masses and losses and conductivities. Maybe you can get a free eval copy of something like this:
>http://www.mentor.com/products/mechanical/flotherm/flotherm-xt/
Will that simultaneously simulate my electronics? Something has to do both.
> >They /should/ enable a time varying control input, if not at least a steady state, but like I've said in the past, if engineers have any say in the architecture, it will be lacking.
Try living in a world without engineers. -- John Larkin Highland Technology, Inc picosecond timing precision measurement jlarkin att highlandtechnology dott com http://www.highlandtechnology.com
On 15 Jul 2015 18:27:31 GMT, Glen Walpert <nospam@null.void> wrote:

>On Wed, 15 Jul 2015 09:20:47 -0700, John Larkin wrote: > ><clip> >> It could be that my heater (actually a bunch of surfmount resistors >> surrounding the optical widgets) will have more thermal mass than the >> gadgets being heated. I'm trying to get a mockup to test. Even when I >> have one, figuring out the equivalent circuit will be a chore. >> Electronics is so easy to drive and probe; mechanical and thermal >> systems aren't. Imagine designing a racing car engine, and wondering >> what the temperatures and flows are like inside; we sure have it easy. >> >> It is tempting to control the temperature of the heater, and not the >> object to be heated. Much better dynamics, almost first order. > >Or you could control both; an inner loop controlling heater temperature >and an outer loop controlling the heated object temperature (the output >of which is the setpoint for the inner heater temperature controller). >This should give you the better dynamics without any loss of accuracy. > >Not really pertinent to your control system, actually responding to >another comment about optimal control with PID, but I do not think PID >can ever achieve optimal transient response in a temperature controller >(or pretty much any other controller, possibly excepting some which need >to be too fast for digital control). PID can be tuned for the best >response possible from a system with a PID controller; fastest response >with specified (possibly zero) overshoot. But some sort of model >reference control system can always do better, at the cost of additional >complexity.
PID isn't optimum, but "optimum" is hard to quantify anyhow. In my current situation, I don't care much about overshoot or transient response.
> >For a temperature controller you would create a math model of the thermal >system which will accurately model the temperature at the sensor as a >function of heat load or ambient temperature, heater power input, >possibly other variables influencing the system, and time. If the system >has significant nonlinearities they should be included in the model.
Mechanical/thermal systems are essentially linear. A resistive heater is a square-law device, like the problem George posted about. PWM or bang-bang eliminate that nonlinearity. The
>model parameters can be determined from measured response to a step or >other stimulus. Then when you have a transient to respond to the >controller calculates how many watt-seconds of energy are needed to reach >the set point and turns the heater on or off fully for the calculated >time, then backs off to the calculated steady state power.
Yeah, the nuisance is to quantify the physics, ideally at the design level. A thermal breadboard might be pragmatic; I could probably do that in a fraction of the time I could learn and run thermal modeling software. The error
>signal is not the difference between set point and measured temperature, >it is the difference between measured temperature and model predicted >measured temperature, and this error signal can be used to adjust heater >on/off time or power level and also to adjust the model for more accurate >response on the next transient, which I have seen referred to as adaptive >model reference control. > >While not too many heaters need this level of optimization, there are >situations where the improvement is worth the effort, and it can be a lot >more fun than boring old PID <yawn> or bang-bang <double-yawn>.
A little boredom is fine if I can get it done quick. It's pretty much a charity job. I prefer systems that respond in picoseconds to those that settle in minutes. -- John Larkin Highland Technology, Inc picosecond timing precision measurement jlarkin att highlandtechnology dott com http://www.highlandtechnology.com
On Wed, 15 Jul 2015 11:30:15 -0700 (PDT), George Herold
<gherold@teachspin.com> wrote:

>On Wednesday, July 15, 2015 at 11:56:59 AM UTC-4, John Larkin wrote: >> On Wed, 15 Jul 2015 08:33:49 -0700 (PDT), George Herold >> <gherold@teachspin.com> wrote: >> >> >On Tuesday, July 14, 2015 at 4:29:26 PM UTC-4, John Larkin wrote: >> >> Imagine a mass that we want to heat with some closed-loop controller. >> >> It's C2 below. Voltage represents temperature. Thermal systems are >> >> diffusive, which we represent as a bunch of RC lags. Assume the >> >> voltage at C4 is the temperature sensor. >> >> >> >> If I were to design a PID controller, I'd have to really think about >> >> it, or fiddle some, to keep it stable. But if I do a dumb on/off >> >> thermostat, it seems to always work. I can tweak the hysteresis and >> >> vary the p-p temperature excursions and the switching frequency, but >> >> it's always stable. Or maybe it's always unstable. But it works. >> >> >> >> As Vh gets smaller, the oscillation frequency converges to some >> >> limiting value, which is I guess the ultimate performance of a >> >> thermostat for this physics. To get any less temperature excursion, I >> >> guess I'd have to do a real PID loop. Curious. >> >> >> >> This may have something to do with the fact that there is no thermal >> >> equivalent to an inductor. >> >> >> >> Version 4 >> >> SHEET 1 880 680 >> >> WIRE 0 0 -288 0 >> >> WIRE 528 0 80 0 >> >> WIRE -288 160 -288 0 >> >> WIRE -224 160 -288 160 >> >> WIRE -96 160 -144 160 >> >> WIRE -16 160 -96 160 >> >> WIRE 96 160 64 160 >> >> WIRE 192 160 96 160 >> >> WIRE 304 160 272 160 >> >> WIRE 416 160 304 160 >> >> WIRE 528 160 528 0 >> >> WIRE 528 160 480 160 >> >> WIRE -288 224 -288 160 >> >> WIRE -96 224 -96 160 >> >> WIRE 96 224 96 160 >> >> WIRE 304 224 304 160 >> >> WIRE -288 336 -288 288 >> >> WIRE -96 336 -96 288 >> >> WIRE 96 336 96 288 >> >> WIRE 304 336 304 288 >> >> FLAG -288 336 0 >> >> FLAG -96 336 0 >> >> FLAG 96 336 0 >> >> FLAG 304 336 0 >> >> SYMBOL Digital\\schmtinv 416 96 R0 >> >> WINDOW 0 2 -10 Left 2 >> >> WINDOW 3 -30 23 Left 2 >> >> SYMATTR InstName A1 >> >> SYMATTR Value Vh=0.002 >> >> SYMBOL cap 80 224 R0 >> >> WINDOW 0 67 13 Left 2 >> >> WINDOW 3 64 44 Left 2 >> >> SYMATTR InstName C1 >> >> SYMATTR Value 1m >> >> SYMBOL cap -112 224 R0 >> >> WINDOW 0 63 18 Left 2 >> >> WINDOW 3 64 53 Left 2 >> >> SYMATTR InstName C2 >> >> SYMATTR Value 5m >> >> SYMBOL cap -304 224 R0 >> >> WINDOW 0 60 22 Left 2 >> >> WINDOW 3 66 53 Left 2 >> >> SYMATTR InstName C3 >> >> SYMATTR Value 1m >> >> SYMBOL res -128 144 R90 >> >> WINDOW 0 0 56 VBottom 2 >> >> WINDOW 3 32 56 VTop 2 >> >> SYMATTR InstName R1 >> >> SYMATTR Value 1K >> >> SYMBOL res 80 144 R90 >> >> WINDOW 0 0 56 VBottom 2 >> >> WINDOW 3 32 56 VTop 2 >> >> SYMATTR InstName R2 >> >> SYMATTR Value 1K >> >> SYMBOL res 96 -16 R90 >> >> WINDOW 0 0 56 VBottom 2 >> >> WINDOW 3 32 56 VTop 2 >> >> SYMATTR InstName R3 >> >> SYMATTR Value 1K >> >> SYMBOL cap 288 224 R0 >> >> WINDOW 0 67 13 Left 2 >> >> WINDOW 3 64 44 Left 2 >> >> SYMATTR InstName C4 >> >> SYMATTR Value 1m >> >> SYMBOL res 288 144 R90 >> >> WINDOW 0 0 56 VBottom 2 >> >> WINDOW 3 32 56 VTop 2 >> >> SYMATTR InstName R4 >> >> SYMATTR Value 1K >> >> TEXT -208 -56 Left 2 !.tran 50 uic >> >> TEXT 192 -88 Left 2 ;THERMOSTAT >> >> TEXT 192 -48 Left 2 ;JL July 14, 2015 >> >> TEXT -72 80 Left 2 ;===== thermal lags ===== >> >> >> >> >> >> >> >> >> >> -- >> >> >> >> John Larkin Highland Technology, Inc >> >> picosecond timing precision measurement >> >> >> >> jlarkin att highlandtechnology dott com >> >> http://www.highlandtechnology.com >> > >> >Hmm it seems to me you have a gain knob in there too. Whatever the power is >> >coming out when the thermostat is on. (1V in this case... I don't know which spice line changes the amplitude.) >> >> It's all normalized to 1 volt, which I could arbitrarily call 100 >> degrees C or something. The gain is 1/Vh (well, 0.5/Vh the way LT >> Spice defines hysteresis) so if I set Vh =0 the schmitt becomes an >> infinite gain, which actually doesn't change things much. > >Calling the hysteresis the gain is a bit funny, though I understand what you mean. >In theory smaller hysteresis leads to a smaller excursion of the temperature >from the set point. At some point I don't think smaller hysteresis will do anything >you'll be stuck with what ever time delay is in the loop. >(I set you R3 to 1 and C3 to 1p, and lower hysteresis does nothing.)
Yup, low hysteresis corresponds to high gain, ultimately a pure comparator with no hysteresis. Thst seems to work, with the p-p temp excursions depending on the thermal geometry.
> >> >> >> > >> >With 3 RC's and enough gain you should be able to make it oscillate. >> >> It seems to always oscillate! That's the point of a thermostat. But >> the oscillation seems benign. > >Sure.. It's a bang-bang oscillator vs. one with too much gain and phase shift. >I guess I was thinking about the oscillations you get >with a P-only controller when you crank the gain up too high.
The bang-bang always oscillates, so you don't worry about it! But unlike a PID, the temperature excursion magnitude is limited, whereas a PID might bang the process rail-to-rail if it's tuned wrong.
> >> >> >(I always had to have at least three RC's to simulate thermal loops >> >w/ spice...otherwise no oscillations.) >> >> With hysteresis set nonzero, a single RC oscillates. That's the >> classic triangle wave generator. >> >> I need to build two temperature controllers, on opposite sides of a >> round PC board about 1" in diameter, around the electro-optical >> gadgets. The thermostat approach is appealing... very simple and the >> amplifier won't fry like a linear controller would. Similar to your >> recent situation, where PWM would be nice but has side effects, the >> side effect in my case being parts count and loop stability. A >> bang-bang loop, maybe with zero hysteresis, would sure be easy, but >> the temperature excursions would be dominated by the thermal >> properties (masses, conductivities) of the "process", which is hard to >> model. The controllers on either side of the board will interact too, >> more fun. > >I'm sorry to say that besides the thermostat in my house, I don't know much >about them for thermal control. If your set point was higher, so that the >heater had to be on for a longer fraction of the time it seems like there >might be larger temperature excursions. So picking the power level so >that it's on about 1/2 the time might be optimal. >(But again I'm totally guessing) > >> >> My customer insists on two controllers, but maybe I can talk him into >> one, with lots of thermal vias side to side. > >Why two? (at only 1" apart?) Are they worried about thermal gradients? >It's usually worth while to spend some time thinking about how the heat >will flow and putting the heaters and sensors in the "right" places.
No rational reason. I plan to talk him out of it. -- John Larkin Highland Technology, Inc picosecond timing precision measurement jlarkin att highlandtechnology dott com http://www.highlandtechnology.com