I don't understand thermostats

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
Reply to
John Larkin
Loading thread data ...

It'd be nice if that were the case, but you CAN get thermal overshoot, just like an inductor, when your components achieve ignition temperature. Usually, there's only one such event, ash doesn't burn.

One expects any material substance to react to pressure by reduction in size. One is surprised, then, on examining the behavior of fulminate of mercury.

Reply to
whit3rd

Control theorists would call the behavior a "stable limit cycle". It's always moving around (that's the cycle), but the system exhibits bounded- input, bounded-output stability (that's the "stable"). There's just no way you can analyze the system behavior using a linear model, yet, it works pretty well.

You have no hope, even in theory, of settling on the One True Temperature, but if you'll always be within acceptable bounds and the temperature cycling isn't an issue, do you care?

--

Tim Wescott 
Wescott Design Services 
http://www.wescottdesign.com
Reply to
Tim Wescott

You need a deadbeat controller, long thermal time constants.

Cheer s

Reply to
Martin Riddle

All HVAC systems exhibit overshoot (well, face-bypass can control this but no one controls habitable space with such an inefficient approach!).

With oil/gas-fired hot water, the thermal mass of the heated water sitting in the radiators continues to warm the interior air long after the "fire" has been removed. Even if you turn off the circulating pump, the heated water in the pipes/radiators still radiates heat -- until it falls to room temperature (if you rely on the water jacket for DHW, then it probably *never* reaches room temperature!)

With gas fired forced air, the furnace "coasts" after the thermostat stops calling for heat (to remove the heat stored in the heat exchanger, ducts, etc.).

Note that in none of these systems do you have anything more than a bang-bang controller operating. I.e., you can't tell the furnace to produce "36% heat" -- it's on or off. All you can do is fiddle with hysteresis and *size* the plant to fit the load (e.g., too big and too small are both bad options)

You can, however, do some prediction to anticipate when the interior temperature will reach the desired setpoint and reduce the call for heat (cooling) before that time. This can reduce hysteresis at the expense of overall efficiency (tolerating a larger deadband gives you better efficiency)

Reply to
Don Y

But systems composed of heat sources and masses and thermal conductors don't ring or overshoot, whereas mechanical systems do ring and overshoot and oscillate. You have to add some non-thermal element, like electronics or some mechanical gidget, or gain somehow, to make a thermal system ring.

Maybe that makes thermostat systems so docile.

It does look like, for a nontrivial system, the p-p temperature excursion and frequency will be limited by the process, all the way down to zero hysteresis, which is equivalent to an ideal comparator. So it's kinda hard to get wrong.

--

John Larkin         Highland Technology, Inc 
picosecond timing   precision measurement  

jlarkin att highlandtechnology dott com 
http://www.highlandtechnology.com
Reply to
John Larkin

Seems to me that by limiting the system to "heat sources and masses and thermal conductors", you have eliminated any way for the temperature of the "downstream" parts of the system to affect the heat source. Hence, no feedback... and hence the classic conditions for oscillation cannot be met.

Or like a thermostat?

Put a "bang-bang" thermostat into the system to control the heat source, and you've introduced feedback... and at this point, the system sure-and-for-gosh is oscillating! It cycles above and below the setpoint temperature, at a rate set by the thermal mass of the system, the rate of loss-of-heat, and the rate-of-added-heat when the heater is on. Plot the temperature vs. time with the right axis scales, and you'll see something akin to a distorted sine or triangle or sawtooth wave.

That's really not very different from the oscillations you'd get in a mechanical system... like a ping-pong ball in a column, with a fixed-force air jet which is turned on every time the ball falls below a specific height.

FSVO "right" and "wrong".

If the thermometer has too much thermal mass of its own, or isn't tightly coupled to the air in the room, it'll be slow in sensing the increase (or decrease) in temperature in the process area, and you'll end up with loads of overshoot.

Household thermostats often have an "anticipator" built in, to limit this effect. It's a small heater, located near the sensing element, which goes on at the same time as the main house heater. This helps the thermostat "anticipate" the amount by which the main heater is probably warming the room air, and reduces the delay in shutting off when the right temperature is reached.

If this sounds a bit like slapping adding a few pF of capacitance across the feedback resistor in an op amp circuit, to cancel out the phase lag caused by stray capacitance at the inverting node... well, yeah!

Reply to
Dave Platt

A simple mechanical system, like a rod sticking out of the ground, or a solid sphere, can ring if you whack it. The three basic elements of the differential equation are there. An RLC will ring, ditto. Thermal systems can't ring, because the inductor equivalent doesn't exist. It's like making a circuit out of just resistors and capacitors.

Yup.

Sure. If you add a non-thermal component.

It cycles above and below

My model has several coupled lags, with the last one representing the sensor response. The loop regulates nicely.

In my circuit, that would be another resistor that leapfrogs several of the RCs. I'll try that.

--

John Larkin         Highland Technology, Inc 
picosecond timing   precision measurement  

jlarkin att highlandtechnology dott com 
http://www.highlandtechnology.com
Reply to
John Larkin

You need to provide a (D) factor for the PID..

As the Precess value reaches Set point value, the D factor will start to shut down the output to the rate of the clime. I've seen many PID controllers and it seems that not everyone is on the same page. They generally get the P correct but seem to have issues with (I) and (D), (D) being a real problem.

A good (D) response should actually attempt to lower output power if the rate of change is increasing too fast. And the same for the other way, if the rate of decrease is too fast it should actually increase power output.

Some systems are just Pulsed, so in such cases you simply generate what would looks like a slow PWM when (D) needs to do something or your PV is close to set point(SP)

(P) will dictate pulse rate to maintain setpoint.

If you're interested, there is an analog PID controller used mostly for dancer control but also can be applied for others.

Sim the circuit you would like but you'll see how the (lead)(D) function behaves and (Lag)(I) works. This method of control in my opinion is absolutely perfect. I have applied this method in software many times for PID control instead of using built in PID functions which vary all over the place from one device to another.

formatting link

In this case, the dancer input would be the PROCESS VALUE (Feed back) DANCER POS is SP (Set point). Gain is (P), Lag (I) and Lead(D).. The break options as you'll see also help to control the impact of the effect, something you don't get in most PID systems.

Jamie

Reply to
M Philbrook

But even circuits without L can ring if there is enough accumulated R-C phase shift?

piglet

Reply to
piglet

The anticipator in a mechanical thermostat actually acts as an inductor. Actually almost like a Schmitt trigger.

Reply to
jurb6006

All systems are nonlinear. Those rigidly physicsy ones sometimes hold out the longest, though.

E&M fields give way to photon doubling (and other multiplications) when a reaction mass is present (e.g., KDP crystal), or pair production at high enough frequencies (>511keV) or field intensities (emission from quantum foam, virtual particles made real). I don't know exactly what intensity this occurs at, but I think we're getting close, with the peak power, EUV+ range, and sharpening and focusing techniques we have these days.

Supposedly, thermal conductivity becomes interesting at relativistic energies. The rate of heat diffusion goes way up, and more heat is transferred at the head of the wave: a literal thermal shock wave.

As far as I know, we have no way of generating such an effect. It seems likely, on an unobservably small scale, with something like the LHC or Tevatron. No, not even fusion nukes or any proposed fusion reactors are hot enough to achieve this (~1-100MeV/particle is relativistic electron territory, but nuclei (> 1GeV) are just getting warmed up by then). Perhaps such an experiment could be realized by accelerating a macroscopic lump of matter (a few grams?) to a sizable fraction of the speed of light (so that its energy/particle is in the GeV... and its total energy somewhere in the "stop the orbit of the Moon in its tracks" range, I think?), and observing the process of emission as it tunnels into some hapless astronomical object riddled with sensors.

So to be strictly true, there are inductors in thermal systems. You just have to warp the fabric of space-time itself to find them. Very small value inductances, indeed.

Tim

--
Seven Transistor Labs, LLC 
Electrical Engineering Consultation and Contract Design 
Website: http://seventransistorlabs.com
Reply to
Tim Williams

The heater inside bimetal stats is for compensation of mechanical stat hysteresis, not anticipation of heating system overshoot.

NT

Reply to
tabbypurr

Not unless you build a feedback loop with gain, which you can't do with purely thermal stuff.

--

John Larkin         Highland Technology, Inc 
picosecond timing   laser drivers and controllers 

jlarkin att highlandtechnology dott com 
http://www.highlandtechnology.com
Reply to
John Larkin

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.)

With 3 RC's and enough gain you should be able to make it oscillate. (I always had to have at least three RC's to simulate thermal loops w/ spice...otherwise no oscillations.)

George H.

Reply to
George Herold

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.

It seems to always oscillate! That's the point of a thermostat. But the oscillation seems benign.

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
Reply to
John Larkin

r is

which spice line changes the amplitude.)

Seems most of the time a hysteretic temperature controller regulates the te mperature 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 excursi ons of the critical element of the system.

Reply to
bloggs.fredbloggs.fred

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
Reply to
John Larkin

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.

Reply to
Habib Bouaziz-Viallet

The Spice model defaults to the Schmitt threshold, 0.5 volts.

--

John Larkin         Highland Technology, Inc 
picosecond timing   laser drivers and controllers 

jlarkin att highlandtechnology dott com 
http://www.highlandtechnology.com
Reply to
John Larkin

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.