Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > sci.electronics.design > #386164 > unrolled thread
| Started by | rickman <gnuarm@gmail.com> |
|---|---|
| First post | 2015-11-22 14:33 -0500 |
| Last post | 2015-11-23 18:21 -0800 |
| Articles | 20 on this page of 48 — 14 participants |
Back to article view | Back to sci.electronics.design
PID Heater Control rickman <gnuarm@gmail.com> - 2015-11-22 14:33 -0500
Re: PID Heater Control Tim Wescott <tim@seemywebsite.com> - 2015-11-22 15:11 -0600
Re: PID Heater Control rickman <gnuarm@gmail.com> - 2015-11-22 16:55 -0500
Re: PID Heater Control Tim Wescott <seemywebsite@myfooter.really> - 2015-11-23 00:15 -0600
Re: PID Heater Control rickman <gnuarm@gmail.com> - 2015-11-23 01:24 -0500
Re: PID Heater Control Tim Wescott <tim@seemywebsite.com> - 2015-11-23 10:39 -0600
Re: PID Heater Control rickman <gnuarm@gmail.com> - 2015-11-23 13:24 -0500
Re: PID Heater Control Tim Wescott <seemywebsite@myfooter.really> - 2015-11-23 13:14 -0600
Re: PID Heater Control rickman <gnuarm@gmail.com> - 2015-11-23 14:42 -0500
Re: PID Heater Control Joe Hey <joehey@mailinator.com> - 2015-11-23 16:21 +0000
Re: PID Heater Control Spehro Pefhany <speffSNIP@interlogDOTyou.knowwhat> - 2015-11-22 18:13 -0500
Re: PID Heater Control rickman <gnuarm@gmail.com> - 2015-11-22 19:44 -0500
Re: PID Heater Control Bill Sloman <bill.sloman@gmail.com> - 2015-11-22 16:55 -0800
Re: PID Heater Control whit3rd <whit3rd@gmail.com> - 2015-11-22 17:44 -0800
Re: PID Heater Control rickman <gnuarm@gmail.com> - 2015-11-23 01:32 -0500
Re: PID Heater Control Spehro Pefhany <speffSNIP@interlogDOTyou.knowwhat> - 2015-11-23 01:54 -0500
Re: PID Heater Control rickman <gnuarm@gmail.com> - 2015-11-23 02:12 -0500
Re: PID Heater Control Spehro Pefhany <speffSNIP@interlogDOTyou.knowwhat> - 2015-11-23 02:34 -0500
Re: PID Heater Control rickman <gnuarm@gmail.com> - 2015-11-23 03:33 -0500
Re: PID Heater Control Joe Hey <joehey@mailinator.com> - 2015-11-23 15:58 +0000
Re: PID Heater Control Joe Hey <joehey@mailinator.com> - 2015-11-23 15:55 +0000
Re: PID Heater Control Spehro Pefhany <speffSNIP@interlogDOTyou.knowwhat> - 2015-11-23 01:26 -0500
Re: PID Heater Control rickman <gnuarm@gmail.com> - 2015-11-23 02:20 -0500
Re: PID Heater Control Joe Hey <joehey@mailinator.com> - 2015-11-23 15:49 +0000
Re: PID Heater Control Tim Wescott <seemywebsite@myfooter.really> - 2015-11-23 12:07 -0600
Re: PID Heater Control rickman <gnuarm@gmail.com> - 2015-11-23 13:43 -0500
Re: PID Heater Control Tim Wescott <seemywebsite@myfooter.really> - 2015-11-23 13:17 -0600
Re: PID Heater Control rickman <gnuarm@gmail.com> - 2015-11-23 14:48 -0500
Re: PID Heater Control Tim Wescott <seemywebsite@myfooter.really> - 2015-11-23 14:07 -0600
Re: PID Heater Control George Herold <gherold@teachspin.com> - 2015-11-23 13:11 -0800
Re: PID Heater Control rickman <gnuarm@gmail.com> - 2015-11-23 17:08 -0500
Re: PID Heater Control Lasse Langwadt Christensen <langwadt@fonz.dk> - 2015-11-23 14:22 -0800
Re: PID Heater Control Cydrome Leader <presence@MUNGEpanix.com> - 2015-11-23 23:02 +0000
Re: PID Heater Control Phil Hobbs <pcdhSpamMeSenseless@electrooptical.net> - 2015-11-23 18:09 -0500
Re: PID Heater Control Tim Wescott <seemywebsite@myfooter.really> - 2015-11-23 17:28 -0600
Re: PID Heater Control George Herold <gherold@teachspin.com> - 2015-11-23 17:36 -0800
Re: PID Heater Control M Philbrook <jamie_ka1lpa@charter.net> - 2015-11-23 18:47 -0500
Re: PID Heater Control Tim Wescott <seemywebsite@myfooter.really> - 2015-11-23 18:08 -0600
Re: PID Heater Control Tim Wescott <seemywebsite@myfooter.really> - 2015-11-23 18:06 -0600
Re: PID Heater Control rickman <gnuarm@gmail.com> - 2015-11-23 22:04 -0500
Re: PID Heater Control Tim Wescott <seemywebsite@myfooter.really> - 2015-11-23 21:44 -0600
Re: PID Heater Control George Herold <gherold@teachspin.com> - 2015-11-23 17:24 -0800
Re: PID Heater Control rickman <gnuarm@gmail.com> - 2015-11-24 00:20 -0500
Re: PID Heater Control makolber@yahoo.com - 2015-11-24 06:05 -0800
Re: PID Heater Control whit3rd <whit3rd@gmail.com> - 2015-11-24 12:58 -0800
Re: PID Heater Control dplatt@coop.radagast.org (Dave Platt) - 2015-11-24 15:31 -0800
Re: PID Heater Control Tim Wescott <seemywebsite@myfooter.really> - 2015-11-23 17:24 -0600
Re: PID Heater Control George Herold <gherold@teachspin.com> - 2015-11-23 18:21 -0800
Page 2 of 3 — ← Prev page 1 [2] 3 Next page →
| From | Joe Hey <joehey@mailinator.com> |
|---|---|
| Date | 2015-11-23 15:55 +0000 |
| Message-ID | <20151123155557.7b2664c9.joehey@mailinator.com> |
| In reply to | #386204 |
On Sun, 22 Nov 2015 17:44:09 -0800 (PST) whit3rd <whit3rd@gmail.com> wrote: > On Sunday, November 22, 2015 at 4:44:37 PM UTC-8, rickman wrote: > > On 11/22/2015 6:13 PM, Spehro Pefhany wrote: > > > On Sun, 22 Nov 2015 14:33:55 -0500, the renowned rickman > > > <gnuarm@gmail.com> wrote: > > > >> Will running the PID loop faster than the temperature measurement > > >> improve anything? > > > > > > Certainly not. There's no new information. > > Moreover, it takes two or more measurements of temperature to update > a 'D' (differential) value. It's unclear whether this is about a > time-sampled temperature measurement (with discrete approximations of > integral, proportional, and derivative terms), or an analog > measurement of temperature with analog differentiation and > integration elements. > > > >> How would a PID control be an improvement over a simple > > >> temperature comparison with or without an anticipator? > > This is confusing; the 'D' term, in PID, is an anticipator. Maybe someone meant 'feed forward control'? https://en.wikipedia.org/wiki/Feed_forward_%28control%29 If (just for example) the water heater is an electric shower, the feed forward signal would be proportional to the flow of water and subtracted from the proportional negative feedback term. joe > > Someone in another group seems to be saying his PID loop running at > > 10x the temperature measurement rate gives him this fine on/off > > control. > > If he is computing a new proportional term (or integral, or > derivative), it means he has an extrapolation of his temperature > measurements, and is applying that extrapolation to compute the PID > response. The issue then becomes the accuracy of the extrapolation > (which depends on the system and the extrapolation scheme). > If he's not computing a new term, his 'PID' latches a heat setting > until the next temperature update.
[toc] | [prev] | [next] | [standalone]
| From | Spehro Pefhany <speffSNIP@interlogDOTyou.knowwhat> |
|---|---|
| Date | 2015-11-23 01:26 -0500 |
| Message-ID | <31b55ble1sb497k8jdcflglhgmepi49br1@4ax.com> |
| In reply to | #386196 |
On Sun, 22 Nov 2015 19:44:25 -0500, the renowned rickman <gnuarm@gmail.com> wrote: >On 11/22/2015 6:13 PM, Spehro Pefhany wrote: >> On Sun, 22 Nov 2015 14:33:55 -0500, the renowned rickman >> <gnuarm@gmail.com> wrote: >> >>> If a heater is controlled by turning it on and off, does a PID algorithm >>> help in more closely controlling the temperature? >> >> It can help. You turn the heater on and off fast enough that it is >> effectively an analog output. It's called 'time proportioning' in the >> industry. > >How does the PID loop turn the heater on and off any faster than a >simple set point? Add an anticipator and overshoot is minimized. The PID output feeds into a modulator with an independent time base that is much shorter than the dominant lag of the system. Say we have a proportional cycle time of 2 seconds. With a PID output of 0.5 you have the output on for 1 second and off for 1 second. With the PID output of 0.1 on for 200ms and off for 1.8 seconds. >>> Will running the PID loop faster than the temperature measurement >>> improve anything? >> >> Certainly not. There's no new information. >> >>> How would a PID control be an improvement over a simple temperature >>> comparison with or without an anticipator? >> >> With an anticipator it might be fairly similar. Comparison normally >> needs some deadband so you would tend to get higher temperature ripple >> with comparison that with a time-proportioning PID. The output will >> turn off earlier in the latter case, as it needs no information from >> the sensor to do so (it can turn on and off many times per temperature >> measurement if you want, but it's commonly not done that way). > >When you say "time-proportioning PID", you mean an output that is not >just on or off, but a number that is used to control PWM? That would be >above and beyond just PID. Yes, it is. But it's still called a PID controller (by everyone). >Someone in another group seems to be saying his PID loop running at 10x >the temperature measurement rate gives him this fine on/off control. >But his temperature measurements have lots of variation. Well, by >"lots" I mean a lot more than I expect could be done easily by just >setting a temperature and turning the heat on and off possibly with an >anticipator. He is getting maybe ±1 C°. Well, in a simple thermal system with a fast temperature sensor (one and only one dominant lag) you may be able to turn the gain of a proportional controller up as far as you like and get pretty good control. At infinite gain, it's just a comparison. If you have a sensor or an actuator that responds relatively slowly, however, you will not get as good control. So it's dependent on the sensor and the rest of the system. But suppose you are using a typical industrial mica-insulated band heater- the internal parts get much hotter than the shell when it is on, so when you turn the heat off the heater surface temperature continues to rise for a while. Similarly, a sensor, especially an air sensor or a sensor in a protective housing, will lag behind the actual process variable. So when you turn the heat off the temperature reading continues to rise. Think of an amplifier with negative feedback that has phase shifts in each element. A PID controller can be tuned (or many can self-tune) to give acceptable control even with a less ideal system. Like most other things (amplifiers and negative feedback, for example) it's best to make the system as good as you can make it before trying to add complexity such as PID. >My house thermostat keeps the >temperature within 1 F° and it is not really trying. He doesn't really >want to discuss it. I would like to understand the reality. Room air temperature as read with a fast air sensor normally varies a bit more than that, though the *average* should be stable. You can't cycle forced air central heating fast enough to maintain the air temperature quite that constant- it's a limitation of the actuator in that case- so you get a ripple on top of a stable average. The anticipator in an old-style bimetallic thermostat is sort of a D function, but not quite since it's an on-off controller. It's also sort of a time proportioning modulator. BTW, modern thermostats have a setting that's something like cycles per hour rather than an anticipator. --sp -- Best regards, Spehro Pefhany Amazon link for AoE 3rd Edition: http://tinyurl.com/ntrpwu8 Microchip link for 2015 Masters in Phoenix: http://tinyurl.com/l7g2k48
[toc] | [prev] | [next] | [standalone]
| From | rickman <gnuarm@gmail.com> |
|---|---|
| Date | 2015-11-23 02:20 -0500 |
| Message-ID | <n2uek4$dt8$1@dont-email.me> |
| In reply to | #386216 |
On 11/23/2015 1:26 AM, Spehro Pefhany wrote: > On Sun, 22 Nov 2015 19:44:25 -0500, the renowned rickman > <gnuarm@gmail.com> wrote: > >> On 11/22/2015 6:13 PM, Spehro Pefhany wrote: >>> On Sun, 22 Nov 2015 14:33:55 -0500, the renowned rickman >>> <gnuarm@gmail.com> wrote: >>> >>>> If a heater is controlled by turning it on and off, does a PID algorithm >>>> help in more closely controlling the temperature? >>> >>> It can help. You turn the heater on and off fast enough that it is >>> effectively an analog output. It's called 'time proportioning' in the >>> industry. >> >> How does the PID loop turn the heater on and off any faster than a >> simple set point? Add an anticipator and overshoot is minimized. > > The PID output feeds into a modulator with an independent time base > that is much shorter than the dominant lag of the system. Ok, now you are adding a unit to take the range of values output by the PID controller and generate a pulse train from that. That is not the design I was asking about. I was discussing direct, on/off control from the output of the PID. > Say we have a proportional cycle time of 2 seconds. With a PID output > of 0.5 you have the output on for 1 second and off for 1 second. With > the PID output of 0.1 on for 200ms and off for 1.8 seconds. > > >>>> Will running the PID loop faster than the temperature measurement >>>> improve anything? >>> >>> Certainly not. There's no new information. >>> >>>> How would a PID control be an improvement over a simple temperature >>>> comparison with or without an anticipator? >>> >>> With an anticipator it might be fairly similar. Comparison normally >>> needs some deadband so you would tend to get higher temperature ripple >>> with comparison that with a time-proportioning PID. The output will >>> turn off earlier in the latter case, as it needs no information from >>> the sensor to do so (it can turn on and off many times per temperature >>> measurement if you want, but it's commonly not done that way). >> >> When you say "time-proportioning PID", you mean an output that is not >> just on or off, but a number that is used to control PWM? That would be >> above and beyond just PID. > > Yes, it is. But it's still called a PID controller (by everyone). Fine, but that is not what the design in question is using. >> Someone in another group seems to be saying his PID loop running at 10x >> the temperature measurement rate gives him this fine on/off control. >> But his temperature measurements have lots of variation. Well, by >> "lots" I mean a lot more than I expect could be done easily by just >> setting a temperature and turning the heat on and off possibly with an >> anticipator. He is getting maybe ±1 C°. > > Well, in a simple thermal system with a fast temperature sensor (one > and only one dominant lag) you may be able to turn the gain of a > proportional controller up as far as you like and get pretty good > control. At infinite gain, it's just a comparison. If you have a > sensor or an actuator that responds relatively slowly, however, you > will not get as good control. This is the issue I want to discuss. In this system a thermocouple will respond much faster than the heating element. > So it's dependent on the sensor and the > rest of the system. But suppose you are using a typical industrial > mica-insulated band heater- the internal parts get much hotter than > the shell when it is on, so when you turn the heat off the heater > surface temperature continues to rise for a while. Similarly, a > sensor, especially an air sensor or a sensor in a protective housing, > will lag behind the actual process variable. So when you turn the heat > off the temperature reading continues to rise. Even if the heater doesn't have the "shell", it will remain hotter than it's surroundings for some time. The heat in the element has to dissipate into the oven. > Think of an amplifier with negative feedback that has phase shifts in > each element. > > A PID controller can be tuned (or many can self-tune) to give > acceptable control even with a less ideal system. Like most other > things (amplifiers and negative feedback, for example) it's best to > make the system as good as you can make it before trying to add > complexity such as PID. > >> My house thermostat keeps the >> temperature within 1 F° and it is not really trying. He doesn't really >> want to discuss it. I would like to understand the reality. > > Room air temperature as read with a fast air sensor normally varies a > bit more than that, though the *average* should be stable. You can't > cycle forced air central heating fast enough to maintain the air > temperature quite that constant- it's a limitation of the actuator in > that case- so you get a ripple on top of a stable average. I have taken measurements of the air temperature with a thermocouple and found it to be very stable. I'm not sure what you are talking about. > The anticipator in an old-style bimetallic thermostat is sort of a D > function, but not quite since it's an on-off controller. It's also > sort of a time proportioning modulator. BTW, modern thermostats have a > setting that's something like cycles per hour rather than an > anticipator. The anticipator is nothing like a D function. It doesn't react to the temperature at *all*. It simply models the temperature of the heating element to help prevent overshoot at the end of a heating cycle. -- Rick
[toc] | [prev] | [next] | [standalone]
| From | Joe Hey <joehey@mailinator.com> |
|---|---|
| Date | 2015-11-23 15:49 +0000 |
| Message-ID | <20151123154928.43c519c5.joehey@mailinator.com> |
| In reply to | #386164 |
On Sun, 22 Nov 2015 14:33:55 -0500 rickman <gnuarm@gmail.com> wrote: > If a heater is controlled by turning it on and off, does a PID > algorithm help in more closely controlling the temperature? > > Will running the PID loop faster than the temperature measurement > improve anything? > > How would a PID control be an improvement over a simple temperature > comparison with or without an anticipator? > I don't know the nature of your heater (system), but if the transfer function is linear then I think it can be approached as a discrete-data control system. The Laplace representation of the heater's system you can be transformed into the Z-domain. Then you can design something like a dead-beat controller for it. That might be the fastest you can get. http://www.facstaff.bucknell.edu/mastascu/eControlHTML/Sampled/Sampled1.html A good book would be the one by Benjamin C. Kuo: "Digital Control Systems" if you had the time. joe
[toc] | [prev] | [next] | [standalone]
| From | Tim Wescott <seemywebsite@myfooter.really> |
|---|---|
| Date | 2015-11-23 12:07 -0600 |
| Message-ID | <7bidncTsYPZ1yM7LnZ2dnUU7-SWdnZ2d@giganews.com> |
| In reply to | #386164 |
On Sun, 22 Nov 2015 14:33:55 -0500, rickman wrote:
> If a heater is controlled by turning it on and off, does a PID algorithm
> help in more closely controlling the temperature?
>
> Will running the PID loop faster than the temperature measurement
> improve anything?
>
> How would a PID control be an improvement over a simple temperature
> comparison with or without an anticipator?
On a totally different line of thought than my previous response:
A traditional thermostat/anticipator acts, more or less, like a
proportional-derivative controller with a relay output ("relay" is just
control systems jargon for an on-off switch). There's usually hysteresis
in the switch, but that's not uncommon with relay-output controllers, and
it's the anticipator that -- more or less -- provides the derivative
action.
(Note the "more or less" -- "sorta-kinda" might be better. At any rate,
don't get wrapped around the axle if it's not exactly the same -- because
it isn't.)
Such a system will still show some sensitivity of the long-term average
controlled temperature to ambient conditions -- your plant (or house,
whatever) will be a bit colder on average when ambient is colder, and
warmer on average when ambient is warmer.
Putting a bit of integrator action into a controller like that will,
perforce, guarantee that the average temperature of the plant is as close
to correct as can be achieved with available sensors. It won't prevent
the heat from cycling up and down, however -- that's a consequence of
turning the heat on and off close to, or slower than, the thermal time
constant of the plant.
Whether the benefit from integral action in the controller is worth the
effort in such a circumstance is going to depend on the individual
cases. I suspect that in general it won't, but I'm sure there are edge
cases where it'll be all that's needed.
--
Tim Wescott
Wescott Design Services
http://www.wescottdesign.com
[toc] | [prev] | [next] | [standalone]
| From | rickman <gnuarm@gmail.com> |
|---|---|
| Date | 2015-11-23 13:43 -0500 |
| Message-ID | <n2vmk6$ceg$1@dont-email.me> |
| In reply to | #386312 |
On 11/23/2015 1:07 PM, Tim Wescott wrote:
> On Sun, 22 Nov 2015 14:33:55 -0500, rickman wrote:
>
>> If a heater is controlled by turning it on and off, does a PID algorithm
>> help in more closely controlling the temperature?
>>
>> Will running the PID loop faster than the temperature measurement
>> improve anything?
>>
>> How would a PID control be an improvement over a simple temperature
>> comparison with or without an anticipator?
>
> On a totally different line of thought than my previous response:
>
> A traditional thermostat/anticipator acts, more or less, like a
> proportional-derivative controller with a relay output ("relay" is just
> control systems jargon for an on-off switch). There's usually hysteresis
> in the switch, but that's not uncommon with relay-output controllers, and
> it's the anticipator that -- more or less -- provides the derivative
> action.
>
> (Note the "more or less" -- "sorta-kinda" might be better. At any rate,
> don't get wrapped around the axle if it's not exactly the same -- because
> it isn't.)
>
> Such a system will still show some sensitivity of the long-term average
> controlled temperature to ambient conditions -- your plant (or house,
> whatever) will be a bit colder on average when ambient is colder, and
> warmer on average when ambient is warmer.
>
> Putting a bit of integrator action into a controller like that will,
> perforce, guarantee that the average temperature of the plant is as close
> to correct as can be achieved with available sensors. It won't prevent
> the heat from cycling up and down, however -- that's a consequence of
> turning the heat on and off close to, or slower than, the thermal time
> constant of the plant.
>
> Whether the benefit from integral action in the controller is worth the
> effort in such a circumstance is going to depend on the individual
> cases. I suspect that in general it won't, but I'm sure there are edge
> cases where it'll be all that's needed.
It is not clear to me that your assumptions are correct. For example,
ignoring the issue of the anticipator, the idea that without an integral
term in the control loop, the average temperature will be sensitive to
the ambient isn't clear to me. Consider the controlled temperature as a
function of time in two cases. In one case the heat leaking from the
chamber is 1/10 the rate at which the heating element adds heat and in
the other case heat leaks at 1/2 the rate of the heater. The control
loop is a simple temperature set point with a fixed amount of plus and
minus hysteresis. In the 1/10 rate case the heat will be on 1/10 of the
time. The graph will be a saw tooth with the warming slope being 1/9th
the width of the cooling slope. The average temperature will be the set
point. The 1/2 cooling rate will give a sawtooth graph with equal
heating and cooling periods... and again the average temperature will be
the set point.
What periods of heating and cooling would you expect a PID controller
could provide if it is not using PWM modulation of the heating, but
rather the PID loop directly turns the heat on or off?
If heating a house, the furnace should not be cycled too often, so there
is no opportunity to modulate the heat cycle over short periods.
However, the system is question is an electric oven so such modulation
would be possible, but only by adding another layer of complexity to the
code which is not what is being discussed.
--
Rick
[toc] | [prev] | [next] | [standalone]
| From | Tim Wescott <seemywebsite@myfooter.really> |
|---|---|
| Date | 2015-11-23 13:17 -0600 |
| Message-ID | <7bidncHsYPbb-87LnZ2dnUU7-SWdnZ2d@giganews.com> |
| In reply to | #386322 |
On Mon, 23 Nov 2015 13:43:30 -0500, rickman wrote:
> On 11/23/2015 1:07 PM, Tim Wescott wrote:
>> On Sun, 22 Nov 2015 14:33:55 -0500, rickman wrote:
>>
>>> If a heater is controlled by turning it on and off, does a PID
>>> algorithm help in more closely controlling the temperature?
>>>
>>> Will running the PID loop faster than the temperature measurement
>>> improve anything?
>>>
>>> How would a PID control be an improvement over a simple temperature
>>> comparison with or without an anticipator?
>>
>> On a totally different line of thought than my previous response:
>>
>> A traditional thermostat/anticipator acts, more or less, like a
>> proportional-derivative controller with a relay output ("relay" is just
>> control systems jargon for an on-off switch). There's usually
>> hysteresis in the switch, but that's not uncommon with relay-output
>> controllers, and it's the anticipator that -- more or less -- provides
>> the derivative action.
>>
>> (Note the "more or less" -- "sorta-kinda" might be better. At any
>> rate, don't get wrapped around the axle if it's not exactly the same --
>> because it isn't.)
>>
>> Such a system will still show some sensitivity of the long-term average
>> controlled temperature to ambient conditions -- your plant (or house,
>> whatever) will be a bit colder on average when ambient is colder, and
>> warmer on average when ambient is warmer.
>>
>> Putting a bit of integrator action into a controller like that will,
>> perforce, guarantee that the average temperature of the plant is as
>> close to correct as can be achieved with available sensors. It won't
>> prevent the heat from cycling up and down, however -- that's a
>> consequence of turning the heat on and off close to, or slower than,
>> the thermal time constant of the plant.
>>
>> Whether the benefit from integral action in the controller is worth the
>> effort in such a circumstance is going to depend on the individual
>> cases. I suspect that in general it won't, but I'm sure there are edge
>> cases where it'll be all that's needed.
>
> It is not clear to me that your assumptions are correct. For example,
> ignoring the issue of the anticipator, the idea that without an integral
> term in the control loop, the average temperature will be sensitive to
> the ambient isn't clear to me. Consider the controlled temperature as a
> function of time in two cases. In one case the heat leaking from the
> chamber is 1/10 the rate at which the heating element adds heat and in
> the other case heat leaks at 1/2 the rate of the heater. The control
> loop is a simple temperature set point with a fixed amount of plus and
> minus hysteresis. In the 1/10 rate case the heat will be on 1/10 of the
> time. The graph will be a saw tooth with the warming slope being 1/9th
> the width of the cooling slope. The average temperature will be the set
> point. The 1/2 cooling rate will give a sawtooth graph with equal
> heating and cooling periods... and again the average temperature will be
> the set point.
>
> What periods of heating and cooling would you expect a PID controller
> could provide if it is not using PWM modulation of the heating, but
> rather the PID loop directly turns the heat on or off?
>
> If heating a house, the furnace should not be cycled too often, so there
> is no opportunity to modulate the heat cycle over short periods.
> However, the system is question is an electric oven so such modulation
> would be possible, but only by adding another layer of complexity to the
> code which is not what is being discussed.
I'm not going to spend my free time simulating your system for you.
That's what you're paid to do. So why don't you spend your free -- or
paid -- time simulating your system for you?
I've done this stuff before, it's too long for me to remember the
detailed answer, but I do remember that when you actually take the
trouble to simulate the system, or calculate it's behavior
mathematically, you find a dependency on average temperature with ambient.
--
Tim Wescott
Wescott Design Services
http://www.wescottdesign.com
[toc] | [prev] | [next] | [standalone]
| From | rickman <gnuarm@gmail.com> |
|---|---|
| Date | 2015-11-23 14:48 -0500 |
| Message-ID | <n2vqdj$s3d$1@dont-email.me> |
| In reply to | #386328 |
On 11/23/2015 2:17 PM, Tim Wescott wrote:
> On Mon, 23 Nov 2015 13:43:30 -0500, rickman wrote:
>
>> On 11/23/2015 1:07 PM, Tim Wescott wrote:
>>> On Sun, 22 Nov 2015 14:33:55 -0500, rickman wrote:
>>>
>>>> If a heater is controlled by turning it on and off, does a PID
>>>> algorithm help in more closely controlling the temperature?
>>>>
>>>> Will running the PID loop faster than the temperature measurement
>>>> improve anything?
>>>>
>>>> How would a PID control be an improvement over a simple temperature
>>>> comparison with or without an anticipator?
>>>
>>> On a totally different line of thought than my previous response:
>>>
>>> A traditional thermostat/anticipator acts, more or less, like a
>>> proportional-derivative controller with a relay output ("relay" is just
>>> control systems jargon for an on-off switch). There's usually
>>> hysteresis in the switch, but that's not uncommon with relay-output
>>> controllers, and it's the anticipator that -- more or less -- provides
>>> the derivative action.
>>>
>>> (Note the "more or less" -- "sorta-kinda" might be better. At any
>>> rate, don't get wrapped around the axle if it's not exactly the same --
>>> because it isn't.)
>>>
>>> Such a system will still show some sensitivity of the long-term average
>>> controlled temperature to ambient conditions -- your plant (or house,
>>> whatever) will be a bit colder on average when ambient is colder, and
>>> warmer on average when ambient is warmer.
>>>
>>> Putting a bit of integrator action into a controller like that will,
>>> perforce, guarantee that the average temperature of the plant is as
>>> close to correct as can be achieved with available sensors. It won't
>>> prevent the heat from cycling up and down, however -- that's a
>>> consequence of turning the heat on and off close to, or slower than,
>>> the thermal time constant of the plant.
>>>
>>> Whether the benefit from integral action in the controller is worth the
>>> effort in such a circumstance is going to depend on the individual
>>> cases. I suspect that in general it won't, but I'm sure there are edge
>>> cases where it'll be all that's needed.
>>
>> It is not clear to me that your assumptions are correct. For example,
>> ignoring the issue of the anticipator, the idea that without an integral
>> term in the control loop, the average temperature will be sensitive to
>> the ambient isn't clear to me. Consider the controlled temperature as a
>> function of time in two cases. In one case the heat leaking from the
>> chamber is 1/10 the rate at which the heating element adds heat and in
>> the other case heat leaks at 1/2 the rate of the heater. The control
>> loop is a simple temperature set point with a fixed amount of plus and
>> minus hysteresis. In the 1/10 rate case the heat will be on 1/10 of the
>> time. The graph will be a saw tooth with the warming slope being 1/9th
>> the width of the cooling slope. The average temperature will be the set
>> point. The 1/2 cooling rate will give a sawtooth graph with equal
>> heating and cooling periods... and again the average temperature will be
>> the set point.
>>
>> What periods of heating and cooling would you expect a PID controller
>> could provide if it is not using PWM modulation of the heating, but
>> rather the PID loop directly turns the heat on or off?
>>
>> If heating a house, the furnace should not be cycled too often, so there
>> is no opportunity to modulate the heat cycle over short periods.
>> However, the system is question is an electric oven so such modulation
>> would be possible, but only by adding another layer of complexity to the
>> code which is not what is being discussed.
>
> I'm not going to spend my free time simulating your system for you.
> That's what you're paid to do. So why don't you spend your free -- or
> paid -- time simulating your system for you?
>
> I've done this stuff before, it's too long for me to remember the
> detailed answer, but I do remember that when you actually take the
> trouble to simulate the system, or calculate it's behavior
> mathematically, you find a dependency on average temperature with ambient.
I'm not asking you to simulate anything. I just described a system
simple enough to be simulated in your head and gave you the result. It
may be somewhat unrealistic given the vagaries of real world situations,
but it is clear enough to show a set point controller maintains an
average temperature controlled by the set point when the cooling losses
are constant, at least to a first order approximation.
--
Rick
[toc] | [prev] | [next] | [standalone]
| From | Tim Wescott <seemywebsite@myfooter.really> |
|---|---|
| Date | 2015-11-23 14:07 -0600 |
| Message-ID | <7bidncDsYPaH787LnZ2dnUU7-SWdnZ2d@giganews.com> |
| In reply to | #386336 |
On Mon, 23 Nov 2015 14:48:16 -0500, rickman wrote:
> On 11/23/2015 2:17 PM, Tim Wescott wrote:
>> On Mon, 23 Nov 2015 13:43:30 -0500, rickman wrote:
>>
>>> On 11/23/2015 1:07 PM, Tim Wescott wrote:
>>>> On Sun, 22 Nov 2015 14:33:55 -0500, rickman wrote:
>>>>
>>>>> If a heater is controlled by turning it on and off, does a PID
>>>>> algorithm help in more closely controlling the temperature?
>>>>>
>>>>> Will running the PID loop faster than the temperature measurement
>>>>> improve anything?
>>>>>
>>>>> How would a PID control be an improvement over a simple temperature
>>>>> comparison with or without an anticipator?
>>>>
>>>> On a totally different line of thought than my previous response:
>>>>
>>>> A traditional thermostat/anticipator acts, more or less, like a
>>>> proportional-derivative controller with a relay output ("relay" is
>>>> just control systems jargon for an on-off switch). There's usually
>>>> hysteresis in the switch, but that's not uncommon with relay-output
>>>> controllers, and it's the anticipator that -- more or less --
>>>> provides the derivative action.
>>>>
>>>> (Note the "more or less" -- "sorta-kinda" might be better. At any
>>>> rate, don't get wrapped around the axle if it's not exactly the same
>>>> --
>>>> because it isn't.)
>>>>
>>>> Such a system will still show some sensitivity of the long-term
>>>> average controlled temperature to ambient conditions -- your plant
>>>> (or house, whatever) will be a bit colder on average when ambient is
>>>> colder, and warmer on average when ambient is warmer.
>>>>
>>>> Putting a bit of integrator action into a controller like that will,
>>>> perforce, guarantee that the average temperature of the plant is as
>>>> close to correct as can be achieved with available sensors. It won't
>>>> prevent the heat from cycling up and down, however -- that's a
>>>> consequence of turning the heat on and off close to, or slower than,
>>>> the thermal time constant of the plant.
>>>>
>>>> Whether the benefit from integral action in the controller is worth
>>>> the effort in such a circumstance is going to depend on the
>>>> individual cases. I suspect that in general it won't, but I'm sure
>>>> there are edge cases where it'll be all that's needed.
>>>
>>> It is not clear to me that your assumptions are correct. For example,
>>> ignoring the issue of the anticipator, the idea that without an
>>> integral term in the control loop, the average temperature will be
>>> sensitive to the ambient isn't clear to me. Consider the controlled
>>> temperature as a function of time in two cases. In one case the heat
>>> leaking from the chamber is 1/10 the rate at which the heating element
>>> adds heat and in the other case heat leaks at 1/2 the rate of the
>>> heater. The control loop is a simple temperature set point with a
>>> fixed amount of plus and minus hysteresis. In the 1/10 rate case the
>>> heat will be on 1/10 of the time. The graph will be a saw tooth with
>>> the warming slope being 1/9th the width of the cooling slope. The
>>> average temperature will be the set point. The 1/2 cooling rate will
>>> give a sawtooth graph with equal heating and cooling periods... and
>>> again the average temperature will be the set point.
>>>
>>> What periods of heating and cooling would you expect a PID controller
>>> could provide if it is not using PWM modulation of the heating, but
>>> rather the PID loop directly turns the heat on or off?
>>>
>>> If heating a house, the furnace should not be cycled too often, so
>>> there is no opportunity to modulate the heat cycle over short periods.
>>> However, the system is question is an electric oven so such modulation
>>> would be possible, but only by adding another layer of complexity to
>>> the code which is not what is being discussed.
>>
>> I'm not going to spend my free time simulating your system for you.
>> That's what you're paid to do. So why don't you spend your free -- or
>> paid -- time simulating your system for you?
>>
>> I've done this stuff before, it's too long for me to remember the
>> detailed answer, but I do remember that when you actually take the
>> trouble to simulate the system, or calculate it's behavior
>> mathematically, you find a dependency on average temperature with
>> ambient.
>
> I'm not asking you to simulate anything. I just described a system
> simple enough to be simulated in your head and gave you the result. It
> may be somewhat unrealistic given the vagaries of real world situations,
> but it is clear enough to show a set point controller maintains an
> average temperature controlled by the set point when the cooling losses
> are constant, at least to a first order approximation.
Well, there you go. You're smarter than the resident control expert.
Have fun!
--
Tim Wescott
Wescott Design Services
http://www.wescottdesign.com
[toc] | [prev] | [next] | [standalone]
| From | George Herold <gherold@teachspin.com> |
|---|---|
| Date | 2015-11-23 13:11 -0800 |
| Message-ID | <ac61bcc0-1cf8-4e13-8435-e6bb49298d76@googlegroups.com> |
| In reply to | #386340 |
On Monday, November 23, 2015 at 3:07:59 PM UTC-5, Tim Wescott wrote:
> On Mon, 23 Nov 2015 14:48:16 -0500, rickman wrote:
>
> > On 11/23/2015 2:17 PM, Tim Wescott wrote:
> >> On Mon, 23 Nov 2015 13:43:30 -0500, rickman wrote:
> >>
> >>> On 11/23/2015 1:07 PM, Tim Wescott wrote:
> >>>> On Sun, 22 Nov 2015 14:33:55 -0500, rickman wrote:
> >>>>
> >>>>> If a heater is controlled by turning it on and off, does a PID
> >>>>> algorithm help in more closely controlling the temperature?
> >>>>>
> >>>>> Will running the PID loop faster than the temperature measurement
> >>>>> improve anything?
> >>>>>
> >>>>> How would a PID control be an improvement over a simple temperature
> >>>>> comparison with or without an anticipator?
> >>>>
> >>>> On a totally different line of thought than my previous response:
> >>>>
> >>>> A traditional thermostat/anticipator acts, more or less, like a
> >>>> proportional-derivative controller with a relay output ("relay" is
> >>>> just control systems jargon for an on-off switch). There's usually
> >>>> hysteresis in the switch, but that's not uncommon with relay-output
> >>>> controllers, and it's the anticipator that -- more or less --
> >>>> provides the derivative action.
> >>>>
> >>>> (Note the "more or less" -- "sorta-kinda" might be better. At any
> >>>> rate, don't get wrapped around the axle if it's not exactly the same
> >>>> --
> >>>> because it isn't.)
> >>>>
> >>>> Such a system will still show some sensitivity of the long-term
> >>>> average controlled temperature to ambient conditions -- your plant
> >>>> (or house, whatever) will be a bit colder on average when ambient is
> >>>> colder, and warmer on average when ambient is warmer.
> >>>>
> >>>> Putting a bit of integrator action into a controller like that will,
> >>>> perforce, guarantee that the average temperature of the plant is as
> >>>> close to correct as can be achieved with available sensors. It won't
> >>>> prevent the heat from cycling up and down, however -- that's a
> >>>> consequence of turning the heat on and off close to, or slower than,
> >>>> the thermal time constant of the plant.
> >>>>
> >>>> Whether the benefit from integral action in the controller is worth
> >>>> the effort in such a circumstance is going to depend on the
> >>>> individual cases. I suspect that in general it won't, but I'm sure
> >>>> there are edge cases where it'll be all that's needed.
> >>>
> >>> It is not clear to me that your assumptions are correct. For example,
> >>> ignoring the issue of the anticipator, the idea that without an
> >>> integral term in the control loop, the average temperature will be
> >>> sensitive to the ambient isn't clear to me. Consider the controlled
> >>> temperature as a function of time in two cases. In one case the heat
> >>> leaking from the chamber is 1/10 the rate at which the heating element
> >>> adds heat and in the other case heat leaks at 1/2 the rate of the
> >>> heater. The control loop is a simple temperature set point with a
> >>> fixed amount of plus and minus hysteresis. In the 1/10 rate case the
> >>> heat will be on 1/10 of the time. The graph will be a saw tooth with
> >>> the warming slope being 1/9th the width of the cooling slope. The
> >>> average temperature will be the set point. The 1/2 cooling rate will
> >>> give a sawtooth graph with equal heating and cooling periods... and
> >>> again the average temperature will be the set point.
> >>>
> >>> What periods of heating and cooling would you expect a PID controller
> >>> could provide if it is not using PWM modulation of the heating, but
> >>> rather the PID loop directly turns the heat on or off?
> >>>
> >>> If heating a house, the furnace should not be cycled too often, so
> >>> there is no opportunity to modulate the heat cycle over short periods.
> >>> However, the system is question is an electric oven so such modulation
> >>> would be possible, but only by adding another layer of complexity to
> >>> the code which is not what is being discussed.
> >>
> >> I'm not going to spend my free time simulating your system for you.
> >> That's what you're paid to do. So why don't you spend your free -- or
> >> paid -- time simulating your system for you?
> >>
> >> I've done this stuff before, it's too long for me to remember the
> >> detailed answer, but I do remember that when you actually take the
> >> trouble to simulate the system, or calculate it's behavior
> >> mathematically, you find a dependency on average temperature with
> >> ambient.
> >
> > I'm not asking you to simulate anything. I just described a system
> > simple enough to be simulated in your head and gave you the result. It
> > may be somewhat unrealistic given the vagaries of real world situations,
> > but it is clear enough to show a set point controller maintains an
> > average temperature controlled by the set point when the cooling losses
> > are constant, at least to a first order approximation.
>
> Well, there you go. You're smarter than the resident control expert.
>
> Have fun!
Rick may not want to be "prickly", but he often comes across that way.
I'll take him at his word though. No insult intended Rick, but smart
people sometimes are less adept at the social graces.
Besides driving the error signal to zero, doesn't a PI controller also
have a faster response, compared to just P? Instead of a flat gain,
you get more gain at lower frequencies. (That might not be right..
I'm far from a control expert :^)
George H.
>
> --
>
> Tim Wescott
> Wescott Design Services
> http://www.wescottdesign.com
[toc] | [prev] | [next] | [standalone]
| From | rickman <gnuarm@gmail.com> |
|---|---|
| Date | 2015-11-23 17:08 -0500 |
| Message-ID | <n302kj$u4t$1@dont-email.me> |
| In reply to | #386345 |
On 11/23/2015 4:11 PM, George Herold wrote:
> On Monday, November 23, 2015 at 3:07:59 PM UTC-5, Tim Wescott wrote:
>> On Mon, 23 Nov 2015 14:48:16 -0500, rickman wrote:
>>
>>> On 11/23/2015 2:17 PM, Tim Wescott wrote:
>>>> On Mon, 23 Nov 2015 13:43:30 -0500, rickman wrote:
>>>>
>>>>> On 11/23/2015 1:07 PM, Tim Wescott wrote:
>>>>>> On Sun, 22 Nov 2015 14:33:55 -0500, rickman wrote:
>>>>>>
>>>>>>> If a heater is controlled by turning it on and off, does a PID
>>>>>>> algorithm help in more closely controlling the temperature?
>>>>>>>
>>>>>>> Will running the PID loop faster than the temperature measurement
>>>>>>> improve anything?
>>>>>>>
>>>>>>> How would a PID control be an improvement over a simple temperature
>>>>>>> comparison with or without an anticipator?
>>>>>>
>>>>>> On a totally different line of thought than my previous response:
>>>>>>
>>>>>> A traditional thermostat/anticipator acts, more or less, like a
>>>>>> proportional-derivative controller with a relay output ("relay" is
>>>>>> just control systems jargon for an on-off switch). There's usually
>>>>>> hysteresis in the switch, but that's not uncommon with relay-output
>>>>>> controllers, and it's the anticipator that -- more or less --
>>>>>> provides the derivative action.
>>>>>>
>>>>>> (Note the "more or less" -- "sorta-kinda" might be better. At any
>>>>>> rate, don't get wrapped around the axle if it's not exactly the same
>>>>>> --
>>>>>> because it isn't.)
>>>>>>
>>>>>> Such a system will still show some sensitivity of the long-term
>>>>>> average controlled temperature to ambient conditions -- your plant
>>>>>> (or house, whatever) will be a bit colder on average when ambient is
>>>>>> colder, and warmer on average when ambient is warmer.
>>>>>>
>>>>>> Putting a bit of integrator action into a controller like that will,
>>>>>> perforce, guarantee that the average temperature of the plant is as
>>>>>> close to correct as can be achieved with available sensors. It won't
>>>>>> prevent the heat from cycling up and down, however -- that's a
>>>>>> consequence of turning the heat on and off close to, or slower than,
>>>>>> the thermal time constant of the plant.
>>>>>>
>>>>>> Whether the benefit from integral action in the controller is worth
>>>>>> the effort in such a circumstance is going to depend on the
>>>>>> individual cases. I suspect that in general it won't, but I'm sure
>>>>>> there are edge cases where it'll be all that's needed.
>>>>>
>>>>> It is not clear to me that your assumptions are correct. For example,
>>>>> ignoring the issue of the anticipator, the idea that without an
>>>>> integral term in the control loop, the average temperature will be
>>>>> sensitive to the ambient isn't clear to me. Consider the controlled
>>>>> temperature as a function of time in two cases. In one case the heat
>>>>> leaking from the chamber is 1/10 the rate at which the heating element
>>>>> adds heat and in the other case heat leaks at 1/2 the rate of the
>>>>> heater. The control loop is a simple temperature set point with a
>>>>> fixed amount of plus and minus hysteresis. In the 1/10 rate case the
>>>>> heat will be on 1/10 of the time. The graph will be a saw tooth with
>>>>> the warming slope being 1/9th the width of the cooling slope. The
>>>>> average temperature will be the set point. The 1/2 cooling rate will
>>>>> give a sawtooth graph with equal heating and cooling periods... and
>>>>> again the average temperature will be the set point.
>>>>>
>>>>> What periods of heating and cooling would you expect a PID controller
>>>>> could provide if it is not using PWM modulation of the heating, but
>>>>> rather the PID loop directly turns the heat on or off?
>>>>>
>>>>> If heating a house, the furnace should not be cycled too often, so
>>>>> there is no opportunity to modulate the heat cycle over short periods.
>>>>> However, the system is question is an electric oven so such modulation
>>>>> would be possible, but only by adding another layer of complexity to
>>>>> the code which is not what is being discussed.
>>>>
>>>> I'm not going to spend my free time simulating your system for you.
>>>> That's what you're paid to do. So why don't you spend your free -- or
>>>> paid -- time simulating your system for you?
>>>>
>>>> I've done this stuff before, it's too long for me to remember the
>>>> detailed answer, but I do remember that when you actually take the
>>>> trouble to simulate the system, or calculate it's behavior
>>>> mathematically, you find a dependency on average temperature with
>>>> ambient.
>>>
>>> I'm not asking you to simulate anything. I just described a system
>>> simple enough to be simulated in your head and gave you the result. It
>>> may be somewhat unrealistic given the vagaries of real world situations,
>>> but it is clear enough to show a set point controller maintains an
>>> average temperature controlled by the set point when the cooling losses
>>> are constant, at least to a first order approximation.
>>
>> Well, there you go. You're smarter than the resident control expert.
>>
>> Have fun!
>
> Rick may not want to be "prickly", but he often comes across that way.
> I'll take him at his word though. No insult intended Rick, but smart
> people sometimes are less adept at the social graces.
Certainly there is no intent to tick people off. I guess it just comes
naturally... ?? I consider it to be a shortcoming of the medium. I
write with a deadpan emotional intent, most of the time, but I guess it
must be read as though I am trying to offend.
I really don't know what Tim is ticked off about. I give a *very*
simple example that can be considered entirely in your mind and describe
the results. Tim seems to think it requires simulation and gets mad
about it when I point out how simple it is. Or maybe I'm not
understanding what he is upset about. Don't know.
> Besides driving the error signal to zero, doesn't a PI controller also
> have a faster response, compared to just P? Instead of a flat gain,
> you get more gain at lower frequencies. (That might not be right..
> I'm far from a control expert :^)
Ok, but your model assumes there is some variability to the control I
think. If the control consists of deciding on each cycle of the PID
loop whether to turn the heater on or off, how does a PID controller
improve response? If the desire is to turn the heater on at a smaller
deviation from the set point, the hysteresis can be set closer to the
set point, no? To be honest, if you don't care how often the heat is
turned on, why would you even need hysteresis? Just turn on the heat
when the temperature is below the set point and off again when the set
point is reached. Then the only issue is the overshoot from the thermal
mass of the heating element. An anticipator can help with that.
The other point was that running the PID loop faster than the
temperature is updated seems pointless. The person who has designed
this approach creates a process for each part of the algorithm, one for
measuring the temperature, one for running the PID and others. I'm not
clear at all why he thinks the PID is usefully run faster than the
temperature is updated. I can't get anything out of him other than
because "it's fun". I'm just trying to understand how a PID controller
can work better than the set point controller when there is no
proportional control over the heat, just on and off.
The only thing I can think is that the PID, when properly designed, will
inherently consider the thermal mass of the heating element while with
the set point controller it has to be accounted for by an anticipator.
Even so, I don't see the two as much similar, is that wrong?
BTW, who is "the resident control expert"?
--
Rick
[toc] | [prev] | [next] | [standalone]
| From | Lasse Langwadt Christensen <langwadt@fonz.dk> |
|---|---|
| Date | 2015-11-23 14:22 -0800 |
| Message-ID | <4d9a2577-89bb-41be-bac6-c24b448bae80@googlegroups.com> |
| In reply to | #386355 |
Den mandag den 23. november 2015 kl. 23.08.39 UTC+1 skrev rickman:
> On 11/23/2015 4:11 PM, George Herold wrote:
> > On Monday, November 23, 2015 at 3:07:59 PM UTC-5, Tim Wescott wrote:
> >> On Mon, 23 Nov 2015 14:48:16 -0500, rickman wrote:
> >>
> >>> On 11/23/2015 2:17 PM, Tim Wescott wrote:
> >>>> On Mon, 23 Nov 2015 13:43:30 -0500, rickman wrote:
> >>>>
> >>>>> On 11/23/2015 1:07 PM, Tim Wescott wrote:
> >>>>>> On Sun, 22 Nov 2015 14:33:55 -0500, rickman wrote:
> >>>>>>
> >>>>>>> If a heater is controlled by turning it on and off, does a PID
> >>>>>>> algorithm help in more closely controlling the temperature?
> >>>>>>>
> >>>>>>> Will running the PID loop faster than the temperature measurement
> >>>>>>> improve anything?
> >>>>>>>
> >>>>>>> How would a PID control be an improvement over a simple temperature
> >>>>>>> comparison with or without an anticipator?
> >>>>>>
> >>>>>> On a totally different line of thought than my previous response:
> >>>>>>
> >>>>>> A traditional thermostat/anticipator acts, more or less, like a
> >>>>>> proportional-derivative controller with a relay output ("relay" is
> >>>>>> just control systems jargon for an on-off switch). There's usually
> >>>>>> hysteresis in the switch, but that's not uncommon with relay-output
> >>>>>> controllers, and it's the anticipator that -- more or less --
> >>>>>> provides the derivative action.
> >>>>>>
> >>>>>> (Note the "more or less" -- "sorta-kinda" might be better. At any
> >>>>>> rate, don't get wrapped around the axle if it's not exactly the same
> >>>>>> --
> >>>>>> because it isn't.)
> >>>>>>
> >>>>>> Such a system will still show some sensitivity of the long-term
> >>>>>> average controlled temperature to ambient conditions -- your plant
> >>>>>> (or house, whatever) will be a bit colder on average when ambient is
> >>>>>> colder, and warmer on average when ambient is warmer.
> >>>>>>
> >>>>>> Putting a bit of integrator action into a controller like that will,
> >>>>>> perforce, guarantee that the average temperature of the plant is as
> >>>>>> close to correct as can be achieved with available sensors. It won't
> >>>>>> prevent the heat from cycling up and down, however -- that's a
> >>>>>> consequence of turning the heat on and off close to, or slower than,
> >>>>>> the thermal time constant of the plant.
> >>>>>>
> >>>>>> Whether the benefit from integral action in the controller is worth
> >>>>>> the effort in such a circumstance is going to depend on the
> >>>>>> individual cases. I suspect that in general it won't, but I'm sure
> >>>>>> there are edge cases where it'll be all that's needed.
> >>>>>
> >>>>> It is not clear to me that your assumptions are correct. For example,
> >>>>> ignoring the issue of the anticipator, the idea that without an
> >>>>> integral term in the control loop, the average temperature will be
> >>>>> sensitive to the ambient isn't clear to me. Consider the controlled
> >>>>> temperature as a function of time in two cases. In one case the heat
> >>>>> leaking from the chamber is 1/10 the rate at which the heating element
> >>>>> adds heat and in the other case heat leaks at 1/2 the rate of the
> >>>>> heater. The control loop is a simple temperature set point with a
> >>>>> fixed amount of plus and minus hysteresis. In the 1/10 rate case the
> >>>>> heat will be on 1/10 of the time. The graph will be a saw tooth with
> >>>>> the warming slope being 1/9th the width of the cooling slope. The
> >>>>> average temperature will be the set point. The 1/2 cooling rate will
> >>>>> give a sawtooth graph with equal heating and cooling periods... and
> >>>>> again the average temperature will be the set point.
> >>>>>
> >>>>> What periods of heating and cooling would you expect a PID controller
> >>>>> could provide if it is not using PWM modulation of the heating, but
> >>>>> rather the PID loop directly turns the heat on or off?
> >>>>>
> >>>>> If heating a house, the furnace should not be cycled too often, so
> >>>>> there is no opportunity to modulate the heat cycle over short periods.
> >>>>> However, the system is question is an electric oven so such modulation
> >>>>> would be possible, but only by adding another layer of complexity to
> >>>>> the code which is not what is being discussed.
> >>>>
> >>>> I'm not going to spend my free time simulating your system for you.
> >>>> That's what you're paid to do. So why don't you spend your free -- or
> >>>> paid -- time simulating your system for you?
> >>>>
> >>>> I've done this stuff before, it's too long for me to remember the
> >>>> detailed answer, but I do remember that when you actually take the
> >>>> trouble to simulate the system, or calculate it's behavior
> >>>> mathematically, you find a dependency on average temperature with
> >>>> ambient.
> >>>
> >>> I'm not asking you to simulate anything. I just described a system
> >>> simple enough to be simulated in your head and gave you the result. It
> >>> may be somewhat unrealistic given the vagaries of real world situations,
> >>> but it is clear enough to show a set point controller maintains an
> >>> average temperature controlled by the set point when the cooling losses
> >>> are constant, at least to a first order approximation.
> >>
> >> Well, there you go. You're smarter than the resident control expert.
> >>
> >> Have fun!
> >
> > Rick may not want to be "prickly", but he often comes across that way.
> > I'll take him at his word though. No insult intended Rick, but smart
> > people sometimes are less adept at the social graces.
>
> Certainly there is no intent to tick people off. I guess it just comes
> naturally... ?? I consider it to be a shortcoming of the medium. I
> write with a deadpan emotional intent, most of the time, but I guess it
> must be read as though I am trying to offend.
>
> I really don't know what Tim is ticked off about. I give a *very*
> simple example that can be considered entirely in your mind and describe
> the results. Tim seems to think it requires simulation and gets mad
> about it when I point out how simple it is. Or maybe I'm not
> understanding what he is upset about. Don't know.
>
>
> > Besides driving the error signal to zero, doesn't a PI controller also
> > have a faster response, compared to just P? Instead of a flat gain,
> > you get more gain at lower frequencies. (That might not be right..
> > I'm far from a control expert :^)
>
> Ok, but your model assumes there is some variability to the control I
> think. If the control consists of deciding on each cycle of the PID
> loop whether to turn the heater on or off, how does a PID controller
> improve response? If the desire is to turn the heater on at a smaller
> deviation from the set point, the hysteresis can be set closer to the
> set point, no? To be honest, if you don't care how often the heat is
> turned on, why would you even need hysteresis? Just turn on the heat
> when the temperature is below the set point and off again when the set
> point is reached. Then the only issue is the overshoot from the thermal
> mass of the heating element. An anticipator can help with that.
>
> The other point was that running the PID loop faster than the
> temperature is updated seems pointless. The person who has designed
> this approach creates a process for each part of the algorithm, one for
> measuring the temperature, one for running the PID and others. I'm not
> clear at all why he thinks the PID is usefully run faster than the
> temperature is updated. I can't get anything out of him other than
> because "it's fun". I'm just trying to understand how a PID controller
> can work better than the set point controller when there is no
> proportional control over the heat, just on and off.
>
> The only thing I can think is that the PID, when properly designed, will
> inherently consider the thermal mass of the heating element while with
> the set point controller it has to be accounted for by an anticipator.
> Even so, I don't see the two as much similar, is that wrong?
>
> BTW, who is "the resident control expert"?
>
http://www.amazon.com/Applied-Control-Embedded-Systems-Technology/dp/0750678399
-Lasse
[toc] | [prev] | [next] | [standalone]
| From | Cydrome Leader <presence@MUNGEpanix.com> |
|---|---|
| Date | 2015-11-23 23:02 +0000 |
| Message-ID | <n305tq$qur$1@reader1.panix.com> |
| In reply to | #386358 |
Lasse Langwadt Christensen <langwadt@fonz.dk> wrote:
> Den mandag den 23. november 2015 kl. 23.08.39 UTC+1 skrev rickman:
>> On 11/23/2015 4:11 PM, George Herold wrote:
>> > On Monday, November 23, 2015 at 3:07:59 PM UTC-5, Tim Wescott wrote:
>> >> On Mon, 23 Nov 2015 14:48:16 -0500, rickman wrote:
>> >>
>> >>> On 11/23/2015 2:17 PM, Tim Wescott wrote:
>> >>>> On Mon, 23 Nov 2015 13:43:30 -0500, rickman wrote:
>> >>>>
>> >>>>> On 11/23/2015 1:07 PM, Tim Wescott wrote:
>> >>>>>> On Sun, 22 Nov 2015 14:33:55 -0500, rickman wrote:
>> >>>>>>
>> >>>>>>> If a heater is controlled by turning it on and off, does a PID
>> >>>>>>> algorithm help in more closely controlling the temperature?
>> >>>>>>>
>> >>>>>>> Will running the PID loop faster than the temperature measurement
>> >>>>>>> improve anything?
>> >>>>>>>
>> >>>>>>> How would a PID control be an improvement over a simple temperature
>> >>>>>>> comparison with or without an anticipator?
>> >>>>>>
>> >>>>>> On a totally different line of thought than my previous response:
>> >>>>>>
>> >>>>>> A traditional thermostat/anticipator acts, more or less, like a
>> >>>>>> proportional-derivative controller with a relay output ("relay" is
>> >>>>>> just control systems jargon for an on-off switch). There's usually
>> >>>>>> hysteresis in the switch, but that's not uncommon with relay-output
>> >>>>>> controllers, and it's the anticipator that -- more or less --
>> >>>>>> provides the derivative action.
>> >>>>>>
>> >>>>>> (Note the "more or less" -- "sorta-kinda" might be better. At any
>> >>>>>> rate, don't get wrapped around the axle if it's not exactly the same
>> >>>>>> --
>> >>>>>> because it isn't.)
>> >>>>>>
>> >>>>>> Such a system will still show some sensitivity of the long-term
>> >>>>>> average controlled temperature to ambient conditions -- your plant
>> >>>>>> (or house, whatever) will be a bit colder on average when ambient is
>> >>>>>> colder, and warmer on average when ambient is warmer.
>> >>>>>>
>> >>>>>> Putting a bit of integrator action into a controller like that will,
>> >>>>>> perforce, guarantee that the average temperature of the plant is as
>> >>>>>> close to correct as can be achieved with available sensors. It won't
>> >>>>>> prevent the heat from cycling up and down, however -- that's a
>> >>>>>> consequence of turning the heat on and off close to, or slower than,
>> >>>>>> the thermal time constant of the plant.
>> >>>>>>
>> >>>>>> Whether the benefit from integral action in the controller is worth
>> >>>>>> the effort in such a circumstance is going to depend on the
>> >>>>>> individual cases. I suspect that in general it won't, but I'm sure
>> >>>>>> there are edge cases where it'll be all that's needed.
>> >>>>>
>> >>>>> It is not clear to me that your assumptions are correct. For example,
>> >>>>> ignoring the issue of the anticipator, the idea that without an
>> >>>>> integral term in the control loop, the average temperature will be
>> >>>>> sensitive to the ambient isn't clear to me. Consider the controlled
>> >>>>> temperature as a function of time in two cases. In one case the heat
>> >>>>> leaking from the chamber is 1/10 the rate at which the heating element
>> >>>>> adds heat and in the other case heat leaks at 1/2 the rate of the
>> >>>>> heater. The control loop is a simple temperature set point with a
>> >>>>> fixed amount of plus and minus hysteresis. In the 1/10 rate case the
>> >>>>> heat will be on 1/10 of the time. The graph will be a saw tooth with
>> >>>>> the warming slope being 1/9th the width of the cooling slope. The
>> >>>>> average temperature will be the set point. The 1/2 cooling rate will
>> >>>>> give a sawtooth graph with equal heating and cooling periods... and
>> >>>>> again the average temperature will be the set point.
>> >>>>>
>> >>>>> What periods of heating and cooling would you expect a PID controller
>> >>>>> could provide if it is not using PWM modulation of the heating, but
>> >>>>> rather the PID loop directly turns the heat on or off?
>> >>>>>
>> >>>>> If heating a house, the furnace should not be cycled too often, so
>> >>>>> there is no opportunity to modulate the heat cycle over short periods.
>> >>>>> However, the system is question is an electric oven so such modulation
>> >>>>> would be possible, but only by adding another layer of complexity to
>> >>>>> the code which is not what is being discussed.
>> >>>>
>> >>>> I'm not going to spend my free time simulating your system for you.
>> >>>> That's what you're paid to do. So why don't you spend your free -- or
>> >>>> paid -- time simulating your system for you?
>> >>>>
>> >>>> I've done this stuff before, it's too long for me to remember the
>> >>>> detailed answer, but I do remember that when you actually take the
>> >>>> trouble to simulate the system, or calculate it's behavior
>> >>>> mathematically, you find a dependency on average temperature with
>> >>>> ambient.
>> >>>
>> >>> I'm not asking you to simulate anything. I just described a system
>> >>> simple enough to be simulated in your head and gave you the result. It
>> >>> may be somewhat unrealistic given the vagaries of real world situations,
>> >>> but it is clear enough to show a set point controller maintains an
>> >>> average temperature controlled by the set point when the cooling losses
>> >>> are constant, at least to a first order approximation.
>> >>
>> >> Well, there you go. You're smarter than the resident control expert.
>> >>
>> >> Have fun!
>> >
>> > Rick may not want to be "prickly", but he often comes across that way.
>> > I'll take him at his word though. No insult intended Rick, but smart
>> > people sometimes are less adept at the social graces.
>>
>> Certainly there is no intent to tick people off. I guess it just comes
>> naturally... ?? I consider it to be a shortcoming of the medium. I
>> write with a deadpan emotional intent, most of the time, but I guess it
>> must be read as though I am trying to offend.
>>
>> I really don't know what Tim is ticked off about. I give a *very*
>> simple example that can be considered entirely in your mind and describe
>> the results. Tim seems to think it requires simulation and gets mad
>> about it when I point out how simple it is. Or maybe I'm not
>> understanding what he is upset about. Don't know.
>>
>>
>> > Besides driving the error signal to zero, doesn't a PI controller also
>> > have a faster response, compared to just P? Instead of a flat gain,
>> > you get more gain at lower frequencies. (That might not be right..
>> > I'm far from a control expert :^)
>>
>> Ok, but your model assumes there is some variability to the control I
>> think. If the control consists of deciding on each cycle of the PID
>> loop whether to turn the heater on or off, how does a PID controller
>> improve response? If the desire is to turn the heater on at a smaller
>> deviation from the set point, the hysteresis can be set closer to the
>> set point, no? To be honest, if you don't care how often the heat is
>> turned on, why would you even need hysteresis? Just turn on the heat
>> when the temperature is below the set point and off again when the set
>> point is reached. Then the only issue is the overshoot from the thermal
>> mass of the heating element. An anticipator can help with that.
>>
>> The other point was that running the PID loop faster than the
>> temperature is updated seems pointless. The person who has designed
>> this approach creates a process for each part of the algorithm, one for
>> measuring the temperature, one for running the PID and others. I'm not
>> clear at all why he thinks the PID is usefully run faster than the
>> temperature is updated. I can't get anything out of him other than
>> because "it's fun". I'm just trying to understand how a PID controller
>> can work better than the set point controller when there is no
>> proportional control over the heat, just on and off.
>>
>> The only thing I can think is that the PID, when properly designed, will
>> inherently consider the thermal mass of the heating element while with
>> the set point controller it has to be accounted for by an anticipator.
>> Even so, I don't see the two as much similar, is that wrong?
>>
>> BTW, who is "the resident control expert"?
>>
>
> http://www.amazon.com/Applied-Control-Embedded-Systems-Technology/dp/0750678399
Ha!
[toc] | [prev] | [next] | [standalone]
| From | Phil Hobbs <pcdhSpamMeSenseless@electrooptical.net> |
|---|---|
| Date | 2015-11-23 18:09 -0500 |
| Message-ID | <i4ednfbAYeMjAc7LnZ2dnUU7-KOdnZ2d@supernews.com> |
| In reply to | #386364 |
On 11/23/2015 06:02 PM, Cydrome Leader wrote:
> Lasse Langwadt Christensen <langwadt@fonz.dk> wrote:
>> Den mandag den 23. november 2015 kl. 23.08.39 UTC+1 skrev rickman:
>>> On 11/23/2015 4:11 PM, George Herold wrote:
>>>> On Monday, November 23, 2015 at 3:07:59 PM UTC-5, Tim Wescott wrote:
>>>>> On Mon, 23 Nov 2015 14:48:16 -0500, rickman wrote:
>>>>>
>>>>>> On 11/23/2015 2:17 PM, Tim Wescott wrote:
>>>>>>> On Mon, 23 Nov 2015 13:43:30 -0500, rickman wrote:
>>>>>>>
>>>>>>>> On 11/23/2015 1:07 PM, Tim Wescott wrote:
>>>>>>>>> On Sun, 22 Nov 2015 14:33:55 -0500, rickman wrote:
>>>>>>>>>
>>>>>>>>>> If a heater is controlled by turning it on and off, does a PID
>>>>>>>>>> algorithm help in more closely controlling the temperature?
>>>>>>>>>>
>>>>>>>>>> Will running the PID loop faster than the temperature measurement
>>>>>>>>>> improve anything?
>>>>>>>>>>
>>>>>>>>>> How would a PID control be an improvement over a simple temperature
>>>>>>>>>> comparison with or without an anticipator?
>>>>>>>>>
>>>>>>>>> On a totally different line of thought than my previous response:
>>>>>>>>>
>>>>>>>>> A traditional thermostat/anticipator acts, more or less, like a
>>>>>>>>> proportional-derivative controller with a relay output ("relay" is
>>>>>>>>> just control systems jargon for an on-off switch). There's usually
>>>>>>>>> hysteresis in the switch, but that's not uncommon with relay-output
>>>>>>>>> controllers, and it's the anticipator that -- more or less --
>>>>>>>>> provides the derivative action.
>>>>>>>>>
>>>>>>>>> (Note the "more or less" -- "sorta-kinda" might be better. At any
>>>>>>>>> rate, don't get wrapped around the axle if it's not exactly the same
>>>>>>>>> --
>>>>>>>>> because it isn't.)
>>>>>>>>>
>>>>>>>>> Such a system will still show some sensitivity of the long-term
>>>>>>>>> average controlled temperature to ambient conditions -- your plant
>>>>>>>>> (or house, whatever) will be a bit colder on average when ambient is
>>>>>>>>> colder, and warmer on average when ambient is warmer.
>>>>>>>>>
>>>>>>>>> Putting a bit of integrator action into a controller like that will,
>>>>>>>>> perforce, guarantee that the average temperature of the plant is as
>>>>>>>>> close to correct as can be achieved with available sensors. It won't
>>>>>>>>> prevent the heat from cycling up and down, however -- that's a
>>>>>>>>> consequence of turning the heat on and off close to, or slower than,
>>>>>>>>> the thermal time constant of the plant.
>>>>>>>>>
>>>>>>>>> Whether the benefit from integral action in the controller is worth
>>>>>>>>> the effort in such a circumstance is going to depend on the
>>>>>>>>> individual cases. I suspect that in general it won't, but I'm sure
>>>>>>>>> there are edge cases where it'll be all that's needed.
>>>>>>>>
>>>>>>>> It is not clear to me that your assumptions are correct. For example,
>>>>>>>> ignoring the issue of the anticipator, the idea that without an
>>>>>>>> integral term in the control loop, the average temperature will be
>>>>>>>> sensitive to the ambient isn't clear to me. Consider the controlled
>>>>>>>> temperature as a function of time in two cases. In one case the heat
>>>>>>>> leaking from the chamber is 1/10 the rate at which the heating element
>>>>>>>> adds heat and in the other case heat leaks at 1/2 the rate of the
>>>>>>>> heater. The control loop is a simple temperature set point with a
>>>>>>>> fixed amount of plus and minus hysteresis. In the 1/10 rate case the
>>>>>>>> heat will be on 1/10 of the time. The graph will be a saw tooth with
>>>>>>>> the warming slope being 1/9th the width of the cooling slope. The
>>>>>>>> average temperature will be the set point. The 1/2 cooling rate will
>>>>>>>> give a sawtooth graph with equal heating and cooling periods... and
>>>>>>>> again the average temperature will be the set point.
>>>>>>>>
>>>>>>>> What periods of heating and cooling would you expect a PID controller
>>>>>>>> could provide if it is not using PWM modulation of the heating, but
>>>>>>>> rather the PID loop directly turns the heat on or off?
>>>>>>>>
>>>>>>>> If heating a house, the furnace should not be cycled too often, so
>>>>>>>> there is no opportunity to modulate the heat cycle over short periods.
>>>>>>>> However, the system is question is an electric oven so such modulation
>>>>>>>> would be possible, but only by adding another layer of complexity to
>>>>>>>> the code which is not what is being discussed.
>>>>>>>
>>>>>>> I'm not going to spend my free time simulating your system for you.
>>>>>>> That's what you're paid to do. So why don't you spend your free -- or
>>>>>>> paid -- time simulating your system for you?
>>>>>>>
>>>>>>> I've done this stuff before, it's too long for me to remember the
>>>>>>> detailed answer, but I do remember that when you actually take the
>>>>>>> trouble to simulate the system, or calculate it's behavior
>>>>>>> mathematically, you find a dependency on average temperature with
>>>>>>> ambient.
>>>>>>
>>>>>> I'm not asking you to simulate anything. I just described a system
>>>>>> simple enough to be simulated in your head and gave you the result. It
>>>>>> may be somewhat unrealistic given the vagaries of real world situations,
>>>>>> but it is clear enough to show a set point controller maintains an
>>>>>> average temperature controlled by the set point when the cooling losses
>>>>>> are constant, at least to a first order approximation.
>>>>>
>>>>> Well, there you go. You're smarter than the resident control expert.
>>>>>
>>>>> Have fun!
>>>>
>>>> Rick may not want to be "prickly", but he often comes across that way.
>>>> I'll take him at his word though. No insult intended Rick, but smart
>>>> people sometimes are less adept at the social graces.
>>>
>>> Certainly there is no intent to tick people off. I guess it just comes
>>> naturally... ?? I consider it to be a shortcoming of the medium. I
>>> write with a deadpan emotional intent, most of the time, but I guess it
>>> must be read as though I am trying to offend.
>>>
>>> I really don't know what Tim is ticked off about. I give a *very*
>>> simple example that can be considered entirely in your mind and describe
>>> the results. Tim seems to think it requires simulation and gets mad
>>> about it when I point out how simple it is. Or maybe I'm not
>>> understanding what he is upset about. Don't know.
>>>
>>>
>>>> Besides driving the error signal to zero, doesn't a PI controller also
>>>> have a faster response, compared to just P? Instead of a flat gain,
>>>> you get more gain at lower frequencies. (That might not be right..
>>>> I'm far from a control expert :^)
>>>
>>> Ok, but your model assumes there is some variability to the control I
>>> think. If the control consists of deciding on each cycle of the PID
>>> loop whether to turn the heater on or off, how does a PID controller
>>> improve response? If the desire is to turn the heater on at a smaller
>>> deviation from the set point, the hysteresis can be set closer to the
>>> set point, no? To be honest, if you don't care how often the heat is
>>> turned on, why would you even need hysteresis? Just turn on the heat
>>> when the temperature is below the set point and off again when the set
>>> point is reached. Then the only issue is the overshoot from the thermal
>>> mass of the heating element. An anticipator can help with that.
>>>
>>> The other point was that running the PID loop faster than the
>>> temperature is updated seems pointless. The person who has designed
>>> this approach creates a process for each part of the algorithm, one for
>>> measuring the temperature, one for running the PID and others. I'm not
>>> clear at all why he thinks the PID is usefully run faster than the
>>> temperature is updated. I can't get anything out of him other than
>>> because "it's fun". I'm just trying to understand how a PID controller
>>> can work better than the set point controller when there is no
>>> proportional control over the heat, just on and off.
>>>
>>> The only thing I can think is that the PID, when properly designed, will
>>> inherently consider the thermal mass of the heating element while with
>>> the set point controller it has to be accounted for by an anticipator.
>>> Even so, I don't see the two as much similar, is that wrong?
>>>
>>> BTW, who is "the resident control expert"?
>>>
>>
>> http://www.amazon.com/Applied-Control-Embedded-Systems-Technology/dp/0750678399
>
> Ha!
>
I have a copy. It's a pretty good book, though I'm really not a control
guy myself, so it may be better than that.
Cheers
Phil Hobbs
--
Dr Philip C D Hobbs
Principal Consultant
ElectroOptical Innovations LLC
Optics, Electro-optics, Photonics, Analog Electronics
160 North State Road #203
Briarcliff Manor NY 10510
hobbs at electrooptical dot net
http://electrooptical.net
[toc] | [prev] | [next] | [standalone]
| From | Tim Wescott <seemywebsite@myfooter.really> |
|---|---|
| Date | 2015-11-23 17:28 -0600 |
| Message-ID | <7bidnfzsYPaZPM7LnZ2dnUU7-SWdnZ2d@giganews.com> |
| In reply to | #386365 |
On Mon, 23 Nov 2015 18:09:44 -0500, Phil Hobbs wrote:
> On 11/23/2015 06:02 PM, Cydrome Leader wrote:
>> Lasse Langwadt Christensen <langwadt@fonz.dk> wrote:
>>> Den mandag den 23. november 2015 kl. 23.08.39 UTC+1 skrev rickman:
>>>> On 11/23/2015 4:11 PM, George Herold wrote:
>>>>> On Monday, November 23, 2015 at 3:07:59 PM UTC-5, Tim Wescott wrote:
>>>>>> On Mon, 23 Nov 2015 14:48:16 -0500, rickman wrote:
>>>>>>
>>>>>>> On 11/23/2015 2:17 PM, Tim Wescott wrote:
>>>>>>>> On Mon, 23 Nov 2015 13:43:30 -0500, rickman wrote:
>>>>>>>>
>>>>>>>>> On 11/23/2015 1:07 PM, Tim Wescott wrote:
>>>>>>>>>> On Sun, 22 Nov 2015 14:33:55 -0500, rickman wrote:
>>>>>>>>>>
>>>>>>>>>>> If a heater is controlled by turning it on and off, does a PID
>>>>>>>>>>> algorithm help in more closely controlling the temperature?
>>>>>>>>>>>
>>>>>>>>>>> Will running the PID loop faster than the temperature
>>>>>>>>>>> measurement improve anything?
>>>>>>>>>>>
>>>>>>>>>>> How would a PID control be an improvement over a simple
>>>>>>>>>>> temperature comparison with or without an anticipator?
>>>>>>>>>>
>>>>>>>>>> On a totally different line of thought than my previous
>>>>>>>>>> response:
>>>>>>>>>>
>>>>>>>>>> A traditional thermostat/anticipator acts, more or less, like a
>>>>>>>>>> proportional-derivative controller with a relay output ("relay"
>>>>>>>>>> is just control systems jargon for an on-off switch). There's
>>>>>>>>>> usually hysteresis in the switch, but that's not uncommon with
>>>>>>>>>> relay-output controllers, and it's the anticipator that -- more
>>>>>>>>>> or less -- provides the derivative action.
>>>>>>>>>>
>>>>>>>>>> (Note the "more or less" -- "sorta-kinda" might be better. At
>>>>>>>>>> any rate, don't get wrapped around the axle if it's not exactly
>>>>>>>>>> the same --
>>>>>>>>>> because it isn't.)
>>>>>>>>>>
>>>>>>>>>> Such a system will still show some sensitivity of the long-term
>>>>>>>>>> average controlled temperature to ambient conditions -- your
>>>>>>>>>> plant (or house, whatever) will be a bit colder on average when
>>>>>>>>>> ambient is colder, and warmer on average when ambient is
>>>>>>>>>> warmer.
>>>>>>>>>>
>>>>>>>>>> Putting a bit of integrator action into a controller like that
>>>>>>>>>> will, perforce, guarantee that the average temperature of the
>>>>>>>>>> plant is as close to correct as can be achieved with available
>>>>>>>>>> sensors. It won't prevent the heat from cycling up and down,
>>>>>>>>>> however -- that's a consequence of turning the heat on and off
>>>>>>>>>> close to, or slower than, the thermal time constant of the
>>>>>>>>>> plant.
>>>>>>>>>>
>>>>>>>>>> Whether the benefit from integral action in the controller is
>>>>>>>>>> worth the effort in such a circumstance is going to depend on
>>>>>>>>>> the individual cases. I suspect that in general it won't, but
>>>>>>>>>> I'm sure there are edge cases where it'll be all that's needed.
>>>>>>>>>
>>>>>>>>> It is not clear to me that your assumptions are correct. For
>>>>>>>>> example,
>>>>>>>>> ignoring the issue of the anticipator, the idea that without an
>>>>>>>>> integral term in the control loop, the average temperature will
>>>>>>>>> be sensitive to the ambient isn't clear to me. Consider the
>>>>>>>>> controlled temperature as a function of time in two cases. In
>>>>>>>>> one case the heat leaking from the chamber is 1/10 the rate at
>>>>>>>>> which the heating element adds heat and in the other case heat
>>>>>>>>> leaks at 1/2 the rate of the heater. The control loop is a
>>>>>>>>> simple temperature set point with a fixed amount of plus and
>>>>>>>>> minus hysteresis. In the 1/10 rate case the heat will be on
>>>>>>>>> 1/10 of the time. The graph will be a saw tooth with the
>>>>>>>>> warming slope being 1/9th the width of the cooling slope. The
>>>>>>>>> average temperature will be the set point. The 1/2 cooling rate
>>>>>>>>> will give a sawtooth graph with equal heating and cooling
>>>>>>>>> periods... and again the average temperature will be the set
>>>>>>>>> point.
>>>>>>>>>
>>>>>>>>> What periods of heating and cooling would you expect a PID
>>>>>>>>> controller could provide if it is not using PWM modulation of
>>>>>>>>> the heating, but rather the PID loop directly turns the heat on
>>>>>>>>> or off?
>>>>>>>>>
>>>>>>>>> If heating a house, the furnace should not be cycled too often,
>>>>>>>>> so there is no opportunity to modulate the heat cycle over short
>>>>>>>>> periods.
>>>>>>>>> However, the system is question is an electric oven so such
>>>>>>>>> modulation would be possible, but only by adding another layer
>>>>>>>>> of complexity to the code which is not what is being discussed.
>>>>>>>>
>>>>>>>> I'm not going to spend my free time simulating your system for
>>>>>>>> you. That's what you're paid to do. So why don't you spend your
>>>>>>>> free -- or paid -- time simulating your system for you?
>>>>>>>>
>>>>>>>> I've done this stuff before, it's too long for me to remember the
>>>>>>>> detailed answer, but I do remember that when you actually take
>>>>>>>> the trouble to simulate the system, or calculate it's behavior
>>>>>>>> mathematically, you find a dependency on average temperature with
>>>>>>>> ambient.
>>>>>>>
>>>>>>> I'm not asking you to simulate anything. I just described a
>>>>>>> system simple enough to be simulated in your head and gave you the
>>>>>>> result. It may be somewhat unrealistic given the vagaries of real
>>>>>>> world situations,
>>>>>>> but it is clear enough to show a set point controller maintains an
>>>>>>> average temperature controlled by the set point when the cooling
>>>>>>> losses are constant, at least to a first order approximation.
>>>>>>
>>>>>> Well, there you go. You're smarter than the resident control
>>>>>> expert.
>>>>>>
>>>>>> Have fun!
>>>>>
>>>>> Rick may not want to be "prickly", but he often comes across that
>>>>> way.
>>>>> I'll take him at his word though. No insult intended Rick, but
>>>>> smart people sometimes are less adept at the social graces.
>>>>
>>>> Certainly there is no intent to tick people off. I guess it just
>>>> comes naturally... ?? I consider it to be a shortcoming of the
>>>> medium. I write with a deadpan emotional intent, most of the time,
>>>> but I guess it must be read as though I am trying to offend.
>>>>
>>>> I really don't know what Tim is ticked off about. I give a *very*
>>>> simple example that can be considered entirely in your mind and
>>>> describe the results. Tim seems to think it requires simulation and
>>>> gets mad about it when I point out how simple it is. Or maybe I'm
>>>> not understanding what he is upset about. Don't know.
>>>>
>>>>
>>>>> Besides driving the error signal to zero, doesn't a PI controller
>>>>> also have a faster response, compared to just P? Instead of a flat
>>>>> gain, you get more gain at lower frequencies. (That might not be
>>>>> right.. I'm far from a control expert :^)
>>>>
>>>> Ok, but your model assumes there is some variability to the control I
>>>> think. If the control consists of deciding on each cycle of the PID
>>>> loop whether to turn the heater on or off, how does a PID controller
>>>> improve response? If the desire is to turn the heater on at a
>>>> smaller deviation from the set point, the hysteresis can be set
>>>> closer to the set point, no? To be honest, if you don't care how
>>>> often the heat is turned on, why would you even need hysteresis?
>>>> Just turn on the heat when the temperature is below the set point and
>>>> off again when the set point is reached. Then the only issue is the
>>>> overshoot from the thermal mass of the heating element. An
>>>> anticipator can help with that.
>>>>
>>>> The other point was that running the PID loop faster than the
>>>> temperature is updated seems pointless. The person who has designed
>>>> this approach creates a process for each part of the algorithm, one
>>>> for measuring the temperature, one for running the PID and others.
>>>> I'm not clear at all why he thinks the PID is usefully run faster
>>>> than the temperature is updated. I can't get anything out of him
>>>> other than because "it's fun". I'm just trying to understand how a
>>>> PID controller can work better than the set point controller when
>>>> there is no proportional control over the heat, just on and off.
>>>>
>>>> The only thing I can think is that the PID, when properly designed,
>>>> will inherently consider the thermal mass of the heating element
>>>> while with the set point controller it has to be accounted for by an
>>>> anticipator. Even so, I don't see the two as much similar, is that
>>>> wrong?
>>>>
>>>> BTW, who is "the resident control expert"?
>>>>
>>>>
>>> http://www.amazon.com/Applied-Control-Embedded-Systems-Technology/
dp/0750678399
>>
>> Ha!
>>
>>
>
> I have a copy. It's a pretty good book, though I'm really not a control
> guy myself, so it may be better than that.
Pretty good for people who aren't control experts is what I was aiming at
(hence the "applied"). I wouldn't recommend it to a control expert
unless they wanted a book to hand out to people, or possibly if it's
someone used to doing things in analog and they wanted more familiarity
with doing things in digital-land.
--
Tim Wescott
Wescott Design Services
http://www.wescottdesign.com
[toc] | [prev] | [next] | [standalone]
| From | George Herold <gherold@teachspin.com> |
|---|---|
| Date | 2015-11-23 17:36 -0800 |
| Message-ID | <d9ce4c0c-3bb7-4de9-9b1c-b935247c0170@googlegroups.com> |
| In reply to | #386358 |
On Monday, November 23, 2015 at 5:22:17 PM UTC-5, Lasse Langwadt Christensen wrote:
> Den mandag den 23. november 2015 kl. 23.08.39 UTC+1 skrev rickman:
> > On 11/23/2015 4:11 PM, George Herold wrote:
> > > On Monday, November 23, 2015 at 3:07:59 PM UTC-5, Tim Wescott wrote:
> > >> On Mon, 23 Nov 2015 14:48:16 -0500, rickman wrote:
> > >>
> > >>> On 11/23/2015 2:17 PM, Tim Wescott wrote:
> > >>>> On Mon, 23 Nov 2015 13:43:30 -0500, rickman wrote:
> > >>>>
> > >>>>> On 11/23/2015 1:07 PM, Tim Wescott wrote:
> > >>>>>> On Sun, 22 Nov 2015 14:33:55 -0500, rickman wrote:
> > >>>>>>
> > >>>>>>> If a heater is controlled by turning it on and off, does a PID
> > >>>>>>> algorithm help in more closely controlling the temperature?
> > >>>>>>>
> > >>>>>>> Will running the PID loop faster than the temperature measurement
> > >>>>>>> improve anything?
> > >>>>>>>
> > >>>>>>> How would a PID control be an improvement over a simple temperature
> > >>>>>>> comparison with or without an anticipator?
> > >>>>>>
> > >>>>>> On a totally different line of thought than my previous response:
> > >>>>>>
> > >>>>>> A traditional thermostat/anticipator acts, more or less, like a
> > >>>>>> proportional-derivative controller with a relay output ("relay" is
> > >>>>>> just control systems jargon for an on-off switch). There's usually
> > >>>>>> hysteresis in the switch, but that's not uncommon with relay-output
> > >>>>>> controllers, and it's the anticipator that -- more or less --
> > >>>>>> provides the derivative action.
> > >>>>>>
> > >>>>>> (Note the "more or less" -- "sorta-kinda" might be better. At any
> > >>>>>> rate, don't get wrapped around the axle if it's not exactly the same
> > >>>>>> --
> > >>>>>> because it isn't.)
> > >>>>>>
> > >>>>>> Such a system will still show some sensitivity of the long-term
> > >>>>>> average controlled temperature to ambient conditions -- your plant
> > >>>>>> (or house, whatever) will be a bit colder on average when ambient is
> > >>>>>> colder, and warmer on average when ambient is warmer.
> > >>>>>>
> > >>>>>> Putting a bit of integrator action into a controller like that will,
> > >>>>>> perforce, guarantee that the average temperature of the plant is as
> > >>>>>> close to correct as can be achieved with available sensors. It won't
> > >>>>>> prevent the heat from cycling up and down, however -- that's a
> > >>>>>> consequence of turning the heat on and off close to, or slower than,
> > >>>>>> the thermal time constant of the plant.
> > >>>>>>
> > >>>>>> Whether the benefit from integral action in the controller is worth
> > >>>>>> the effort in such a circumstance is going to depend on the
> > >>>>>> individual cases. I suspect that in general it won't, but I'm sure
> > >>>>>> there are edge cases where it'll be all that's needed.
> > >>>>>
> > >>>>> It is not clear to me that your assumptions are correct. For example,
> > >>>>> ignoring the issue of the anticipator, the idea that without an
> > >>>>> integral term in the control loop, the average temperature will be
> > >>>>> sensitive to the ambient isn't clear to me. Consider the controlled
> > >>>>> temperature as a function of time in two cases. In one case the heat
> > >>>>> leaking from the chamber is 1/10 the rate at which the heating element
> > >>>>> adds heat and in the other case heat leaks at 1/2 the rate of the
> > >>>>> heater. The control loop is a simple temperature set point with a
> > >>>>> fixed amount of plus and minus hysteresis. In the 1/10 rate case the
> > >>>>> heat will be on 1/10 of the time. The graph will be a saw tooth with
> > >>>>> the warming slope being 1/9th the width of the cooling slope. The
> > >>>>> average temperature will be the set point. The 1/2 cooling rate will
> > >>>>> give a sawtooth graph with equal heating and cooling periods... and
> > >>>>> again the average temperature will be the set point.
> > >>>>>
> > >>>>> What periods of heating and cooling would you expect a PID controller
> > >>>>> could provide if it is not using PWM modulation of the heating, but
> > >>>>> rather the PID loop directly turns the heat on or off?
> > >>>>>
> > >>>>> If heating a house, the furnace should not be cycled too often, so
> > >>>>> there is no opportunity to modulate the heat cycle over short periods.
> > >>>>> However, the system is question is an electric oven so such modulation
> > >>>>> would be possible, but only by adding another layer of complexity to
> > >>>>> the code which is not what is being discussed.
> > >>>>
> > >>>> I'm not going to spend my free time simulating your system for you.
> > >>>> That's what you're paid to do. So why don't you spend your free -- or
> > >>>> paid -- time simulating your system for you?
> > >>>>
> > >>>> I've done this stuff before, it's too long for me to remember the
> > >>>> detailed answer, but I do remember that when you actually take the
> > >>>> trouble to simulate the system, or calculate it's behavior
> > >>>> mathematically, you find a dependency on average temperature with
> > >>>> ambient.
> > >>>
> > >>> I'm not asking you to simulate anything. I just described a system
> > >>> simple enough to be simulated in your head and gave you the result. It
> > >>> may be somewhat unrealistic given the vagaries of real world situations,
> > >>> but it is clear enough to show a set point controller maintains an
> > >>> average temperature controlled by the set point when the cooling losses
> > >>> are constant, at least to a first order approximation.
> > >>
> > >> Well, there you go. You're smarter than the resident control expert.
> > >>
> > >> Have fun!
> > >
> > > Rick may not want to be "prickly", but he often comes across that way.
> > > I'll take him at his word though. No insult intended Rick, but smart
> > > people sometimes are less adept at the social graces.
> >
> > Certainly there is no intent to tick people off. I guess it just comes
> > naturally... ?? I consider it to be a shortcoming of the medium. I
> > write with a deadpan emotional intent, most of the time, but I guess it
> > must be read as though I am trying to offend.
> >
> > I really don't know what Tim is ticked off about. I give a *very*
> > simple example that can be considered entirely in your mind and describe
> > the results. Tim seems to think it requires simulation and gets mad
> > about it when I point out how simple it is. Or maybe I'm not
> > understanding what he is upset about. Don't know.
> >
> >
> > > Besides driving the error signal to zero, doesn't a PI controller also
> > > have a faster response, compared to just P? Instead of a flat gain,
> > > you get more gain at lower frequencies. (That might not be right..
> > > I'm far from a control expert :^)
> >
> > Ok, but your model assumes there is some variability to the control I
> > think. If the control consists of deciding on each cycle of the PID
> > loop whether to turn the heater on or off, how does a PID controller
> > improve response? If the desire is to turn the heater on at a smaller
> > deviation from the set point, the hysteresis can be set closer to the
> > set point, no? To be honest, if you don't care how often the heat is
> > turned on, why would you even need hysteresis? Just turn on the heat
> > when the temperature is below the set point and off again when the set
> > point is reached. Then the only issue is the overshoot from the thermal
> > mass of the heating element. An anticipator can help with that.
> >
> > The other point was that running the PID loop faster than the
> > temperature is updated seems pointless. The person who has designed
> > this approach creates a process for each part of the algorithm, one for
> > measuring the temperature, one for running the PID and others. I'm not
> > clear at all why he thinks the PID is usefully run faster than the
> > temperature is updated. I can't get anything out of him other than
> > because "it's fun". I'm just trying to understand how a PID controller
> > can work better than the set point controller when there is no
> > proportional control over the heat, just on and off.
> >
> > The only thing I can think is that the PID, when properly designed, will
> > inherently consider the thermal mass of the heating element while with
> > the set point controller it has to be accounted for by an anticipator.
> > Even so, I don't see the two as much similar, is that wrong?
> >
> > BTW, who is "the resident control expert"?
> >
>
> http://www.amazon.com/Applied-Control-Embedded-Systems-Technology/dp/0750678399
>
>
> -Lasse
There is that...
George H.
[toc] | [prev] | [next] | [standalone]
| From | M Philbrook <jamie_ka1lpa@charter.net> |
|---|---|
| Date | 2015-11-23 18:47 -0500 |
| Message-ID | <MPG.30bd6f9720743803989dc3@news.eternal-september.org> |
| In reply to | #386355 |
In article <n302kj$u4t$1@dont-email.me>, gnuarm@gmail.com says...
> Besides driving the error signal to zero, doesn't a PI controller also
> > have a faster response, compared to just P? Instead of a flat gain,
> > you get more gain at lower frequencies. (That might not be right..
> > I'm far from a control expert :^)
>
> Ok, but your model assumes there is some variability to the control I
> think. If the control consists of deciding on each cycle of the PID
> loop whether to turn the heater on or off, how does a PID controller
> improve response? If the desire is to turn the heater on at a smaller
> deviation from the set point, the hysteresis can be set closer to the
> set point, no? To be honest, if you don't care how often the heat is
> turned on, why would you even need hysteresis? Just turn on the heat
> when the temperature is below the set point and off again when the set
> point is reached. Then the only issue is the overshoot from the thermal
> mass of the heating element. An anticipator can help with that.
>
> The other point was that running the PID loop faster than the
> temperature is updated seems pointless. The person who has designed
> this approach creates a process for each part of the algorithm, one for
> measuring the temperature, one for running the PID and others. I'm not
> clear at all why he thinks the PID is usefully run faster than the
> temperature is updated. I can't get anything out of him other than
> because "it's fun". I'm just trying to understand how a PID controller
> can work better than the set point controller when there is no
> proportional control over the heat, just on and off.
>
> The only thing I can think is that the PID, when properly designed, will
> inherently consider the thermal mass of the heating element while with
> the set point controller it has to be accounted for by an anticipator.
> Even so, I don't see the two as much similar, is that wrong?
>
> BTW, who is "the resident control expert"?
>
Look I work with temp controllers alot and I can most likely fill
in some of your gaps for you.
First of all, lets get to the issues at hand you seem to be stuck
on.
COntrollers for one have a tuning mode, you set the temp and initiate
it. It'll cycle for a while and there are some parameters it'll set.
P = Gain/BW depending on the maker of the controller.
I = Integrated readings of the PV (process value)
D = rate of change which can be used to dampen the PID output. +/-
Btw, some D's only work once it starts to get near setpoint, others
will work across the whole stretch.
Also on top of all this....
You have soak time that can be programmed for many controllers in
various ways.
Output power:
This helps in the case of large mass. Output duration can be set
for a max/min effect, reguardless if it reaches desired set point or
not.
In water cooling systems, you can adjust the output power so to not
over cool per cycle. All this does is turn on the cooling for short
pulses when needed.
Heating is also done the same way. For systems that have large mass it
can over shoot and take too long to correct. The output of the
controller simply pulses a short ON pulse and the duration between is
done via the PID terms.
In otherwords, if you remove the PID out of the picture and use only
power output settings, you can simply set the max ON time for heat or
cooling.
Some systems use a Duty cycle parameter instead of a MAx on time.
Others use a Max On/MaxOff same as duty cycle.
If the controller has a 0..10/4 to 20mA output, it does not pulse, it
simple does not go to full output at all when adjusting power bands.
On top of all this, Many controllers have a percentage of direct and
PID control, meaning the PID only effects the output a certain
percentage over the direct output.
A non PID controller is basically something that just has a Power band
set and when it reaches setpoint it just turns off. When the temp drops
a little, it turns on, when it gets a little too hot, it turns on the
cooling, using the cooling's power band settings and there is a dead
band setting.
I work with various controllers, many of them PLC's that have built in
PID loops and found that most of the time they work fine however, there
are times where I've had to intercept on the PID output to add a little
control of my own. Things like a power band for example.
I have also found in some cases, there was just no way to to use a
basic PID due to changing events out side the norm.
have a good day
Jamie
[toc] | [prev] | [next] | [standalone]
| From | Tim Wescott <seemywebsite@myfooter.really> |
|---|---|
| Date | 2015-11-23 18:08 -0600 |
| Message-ID | <cpOdnU9-QMgFN87LnZ2dnUU7-bednZ2d@giganews.com> |
| In reply to | #386370 |
On Mon, 23 Nov 2015 18:47:23 -0500, M Philbrook wrote: > In article <n302kj$u4t$1@dont-email.me>, gnuarm@gmail.com says... >> Besides driving the error signal to zero, doesn't a PI controller also >> > have a faster response, compared to just P? Instead of a flat gain, >> > you get more gain at lower frequencies. (That might not be right.. >> > I'm far from a control expert :^) >> >> Ok, but your model assumes there is some variability to the control I >> think. If the control consists of deciding on each cycle of the PID >> loop whether to turn the heater on or off, how does a PID controller >> improve response? If the desire is to turn the heater on at a smaller >> deviation from the set point, the hysteresis can be set closer to the >> set point, no? To be honest, if you don't care how often the heat is >> turned on, why would you even need hysteresis? Just turn on the heat >> when the temperature is below the set point and off again when the set >> point is reached. Then the only issue is the overshoot from the >> thermal mass of the heating element. An anticipator can help with >> that. >> >> The other point was that running the PID loop faster than the >> temperature is updated seems pointless. The person who has designed >> this approach creates a process for each part of the algorithm, one for >> measuring the temperature, one for running the PID and others. I'm not >> clear at all why he thinks the PID is usefully run faster than the >> temperature is updated. I can't get anything out of him other than >> because "it's fun". I'm just trying to understand how a PID controller >> can work better than the set point controller when there is no >> proportional control over the heat, just on and off. >> >> The only thing I can think is that the PID, when properly designed, >> will inherently consider the thermal mass of the heating element while >> with the set point controller it has to be accounted for by an >> anticipator. Even so, I don't see the two as much similar, is that >> wrong? >> >> BTW, who is "the resident control expert"? >> >> > Look I work with temp controllers alot and I can most likely fill > in some of your gaps for you. > > First of all, lets get to the issues at hand you seem to be stuck > on. > > COntrollers for one have a tuning mode, you set the temp and initiate > it. It'll cycle for a while and there are some parameters it'll set. > > P = Gain/BW depending on the maker of the controller. > > I = Integrated readings of the PV (process value) > > D = rate of change which can be used to dampen the PID output. +/- > Btw, some D's only work once it starts to get near setpoint, others > will work across the whole stretch. > > Also on top of all this.... > > You have soak time that can be programmed for many controllers in > various ways. > > Output power: > > This helps in the case of large mass. Output duration can be set > for a max/min effect, reguardless if it reaches desired set point or > not. > > In water cooling systems, you can adjust the output power so to not > over cool per cycle. All this does is turn on the cooling for short > pulses when needed. > > Heating is also done the same way. For systems that have large mass it > can over shoot and take too long to correct. The output of the > controller simply pulses a short ON pulse and the duration between is > done via the PID terms. > > In otherwords, if you remove the PID out of the picture and use only > power output settings, you can simply set the max ON time for heat or > cooling. > > Some systems use a Duty cycle parameter instead of a MAx on time. > Others use a Max On/MaxOff same as duty cycle. > > If the controller has a 0..10/4 to 20mA output, it does not pulse, it > simple does not go to full output at all when adjusting power bands. > > On top of all this, Many controllers have a percentage of direct and > PID control, meaning the PID only effects the output a certain > percentage over the direct output. > > A non PID controller is basically something that just has a Power band > set and when it reaches setpoint it just turns off. When the temp drops > a little, it turns on, when it gets a little too hot, it turns on the > cooling, using the cooling's power band settings and there is a dead > band setting. > > I work with various controllers, many of them PLC's that have built in > PID loops and found that most of the time they work fine however, there > are times where I've had to intercept on the PID output to add a little > control of my own. Things like a power band for example. > > I have also found in some cases, there was just no way to to use a > basic PID due to changing events out side the norm. All valid observations if he's using a prepackaged temperature controller. But from the sounds of it they're building a temperature controller into some embedded software. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
[toc] | [prev] | [next] | [standalone]
| From | Tim Wescott <seemywebsite@myfooter.really> |
|---|---|
| Date | 2015-11-23 18:06 -0600 |
| Message-ID | <cpOdnUx-QMiUN87LnZ2dnUU7-bednZ2d@giganews.com> |
| In reply to | #386355 |
On Mon, 23 Nov 2015 17:08:32 -0500, rickman wrote:
> On 11/23/2015 4:11 PM, George Herold wrote:
>> On Monday, November 23, 2015 at 3:07:59 PM UTC-5, Tim Wescott wrote:
>>> On Mon, 23 Nov 2015 14:48:16 -0500, rickman wrote:
>>>
>>>> On 11/23/2015 2:17 PM, Tim Wescott wrote:
>>>>> On Mon, 23 Nov 2015 13:43:30 -0500, rickman wrote:
>>>>>
>>>>>> On 11/23/2015 1:07 PM, Tim Wescott wrote:
>>>>>>> On Sun, 22 Nov 2015 14:33:55 -0500, rickman wrote:
>>>>>>>
>>>>>>>> If a heater is controlled by turning it on and off, does a PID
>>>>>>>> algorithm help in more closely controlling the temperature?
>>>>>>>>
>>>>>>>> Will running the PID loop faster than the temperature measurement
>>>>>>>> improve anything?
>>>>>>>>
>>>>>>>> How would a PID control be an improvement over a simple
>>>>>>>> temperature comparison with or without an anticipator?
>>>>>>>
>>>>>>> On a totally different line of thought than my previous response:
>>>>>>>
>>>>>>> A traditional thermostat/anticipator acts, more or less, like a
>>>>>>> proportional-derivative controller with a relay output ("relay" is
>>>>>>> just control systems jargon for an on-off switch). There's
>>>>>>> usually hysteresis in the switch, but that's not uncommon with
>>>>>>> relay-output controllers, and it's the anticipator that -- more or
>>>>>>> less -- provides the derivative action.
>>>>>>>
>>>>>>> (Note the "more or less" -- "sorta-kinda" might be better. At any
>>>>>>> rate, don't get wrapped around the axle if it's not exactly the
>>>>>>> same --
>>>>>>> because it isn't.)
>>>>>>>
>>>>>>> Such a system will still show some sensitivity of the long-term
>>>>>>> average controlled temperature to ambient conditions -- your plant
>>>>>>> (or house, whatever) will be a bit colder on average when ambient
>>>>>>> is colder, and warmer on average when ambient is warmer.
>>>>>>>
>>>>>>> Putting a bit of integrator action into a controller like that
>>>>>>> will, perforce, guarantee that the average temperature of the
>>>>>>> plant is as close to correct as can be achieved with available
>>>>>>> sensors. It won't prevent the heat from cycling up and down,
>>>>>>> however -- that's a consequence of turning the heat on and off
>>>>>>> close to, or slower than, the thermal time constant of the plant.
>>>>>>>
>>>>>>> Whether the benefit from integral action in the controller is
>>>>>>> worth the effort in such a circumstance is going to depend on the
>>>>>>> individual cases. I suspect that in general it won't, but I'm
>>>>>>> sure there are edge cases where it'll be all that's needed.
>>>>>>
>>>>>> It is not clear to me that your assumptions are correct. For
>>>>>> example,
>>>>>> ignoring the issue of the anticipator, the idea that without an
>>>>>> integral term in the control loop, the average temperature will be
>>>>>> sensitive to the ambient isn't clear to me. Consider the
>>>>>> controlled temperature as a function of time in two cases. In one
>>>>>> case the heat leaking from the chamber is 1/10 the rate at which
>>>>>> the heating element adds heat and in the other case heat leaks at
>>>>>> 1/2 the rate of the heater. The control loop is a simple
>>>>>> temperature set point with a fixed amount of plus and minus
>>>>>> hysteresis. In the 1/10 rate case the heat will be on 1/10 of the
>>>>>> time. The graph will be a saw tooth with the warming slope being
>>>>>> 1/9th the width of the cooling slope. The average temperature will
>>>>>> be the set point. The 1/2 cooling rate will give a sawtooth graph
>>>>>> with equal heating and cooling periods... and again the average
>>>>>> temperature will be the set point.
>>>>>>
>>>>>> What periods of heating and cooling would you expect a PID
>>>>>> controller could provide if it is not using PWM modulation of the
>>>>>> heating, but rather the PID loop directly turns the heat on or off?
>>>>>>
>>>>>> If heating a house, the furnace should not be cycled too often, so
>>>>>> there is no opportunity to modulate the heat cycle over short
>>>>>> periods.
>>>>>> However, the system is question is an electric oven so such
>>>>>> modulation would be possible, but only by adding another layer of
>>>>>> complexity to the code which is not what is being discussed.
>>>>>
>>>>> I'm not going to spend my free time simulating your system for you.
>>>>> That's what you're paid to do. So why don't you spend your free --
>>>>> or paid -- time simulating your system for you?
>>>>>
>>>>> I've done this stuff before, it's too long for me to remember the
>>>>> detailed answer, but I do remember that when you actually take the
>>>>> trouble to simulate the system, or calculate it's behavior
>>>>> mathematically, you find a dependency on average temperature with
>>>>> ambient.
>>>>
>>>> I'm not asking you to simulate anything. I just described a system
>>>> simple enough to be simulated in your head and gave you the result.
>>>> It may be somewhat unrealistic given the vagaries of real world
>>>> situations,
>>>> but it is clear enough to show a set point controller maintains an
>>>> average temperature controlled by the set point when the cooling
>>>> losses are constant, at least to a first order approximation.
>>>
>>> Well, there you go. You're smarter than the resident control expert.
>>>
>>> Have fun!
>>
>> Rick may not want to be "prickly", but he often comes across that way.
>> I'll take him at his word though. No insult intended Rick, but smart
>> people sometimes are less adept at the social graces.
>
> Certainly there is no intent to tick people off. I guess it just comes
> naturally... ?? I consider it to be a shortcoming of the medium. I
> write with a deadpan emotional intent, most of the time, but I guess it
> must be read as though I am trying to offend.
>
> I really don't know what Tim is ticked off about. I give a *very*
> simple example that can be considered entirely in your mind and describe
> the results. Tim seems to think it requires simulation and gets mad
> about it when I point out how simple it is. Or maybe I'm not
> understanding what he is upset about. Don't know.
>
>
>> Besides driving the error signal to zero, doesn't a PI controller also
>> have a faster response, compared to just P? Instead of a flat gain,
>> you get more gain at lower frequencies. (That might not be right.. I'm
>> far from a control expert :^)
>
> Ok, but your model assumes there is some variability to the control I
> think. If the control consists of deciding on each cycle of the PID
> loop whether to turn the heater on or off, how does a PID controller
> improve response?
That's been answered! Just read!
> If the desire is to turn the heater on at a smaller
> deviation from the set point, the hysteresis can be set closer to the
> set point, no? To be honest, if you don't care how often the heat is
> turned on, why would you even need hysteresis? Just turn on the heat
> when the temperature is below the set point and off again when the set
> point is reached. Then the only issue is the overshoot from the thermal
> mass of the heating element. An anticipator can help with that.
If you're going to refuse to use well-known useful techniques like PWM-ing
an ON/OFF output, or using a sigma-delta modulator, then yes, an old
traditional bang-bang controller with an anticipator may work best.
But why refuse to use well-known useful techniques?
> The other point was that running the PID loop faster than the
> temperature is updated seems pointless.
If it's properly tuned it may lead to better precision by turning the
heater on or off part-way between temperature measurements. That doesn't
mean that it's a good decision, that's just a (very slight) advantage
that it may have.
> The person who has designed
> this approach creates a process for each part of the algorithm, one for
> measuring the temperature, one for running the PID and others. I'm not
> clear at all why he thinks the PID is usefully run faster than the
> temperature is updated. I can't get anything out of him other than
> because "it's fun".
OK. So your real concern is that you've got some out of control
designer, presumably a software guy, who's so severely unprofessional
that he's letting himself be motivated by what's "fun" instead of what's
best for the project. Meaning that he could do something just as "fun"
with bang-bang control, to an equal level of dismay on your part. So the
basic problem you're trying to address is only incidental to the PID
controller.
(BTW: "because it's fun" is very occasionally an allowable excuse for
doing something in my book, but generally only if there's plenty of slack
in that part of the project, the guy's attention isn't needed elsewhere,
AND if the guy has a track record of giving up on the "fun" stuff if it
isn't panning out. If someone is sticking to something substandard
"because it's fun" at risk to the project, then they need to be
encouraged, possibly with a pink slip, to go find a more "fun" place to
work.)
> I'm just trying to understand how a PID controller
> can work better than the set point controller when there is no
> proportional control over the heat, just on and off.
Well, I already told you that, several times. Possibly because I took
your questions at face value.
> The only thing I can think is that the PID, when properly designed, will
> inherently consider the thermal mass of the heating element while with
> the set point controller it has to be accounted for by an anticipator.
> Even so, I don't see the two as much similar, is that wrong?
They're not all that similar, and there's no reason that a bang-bang
controller might not be inherently better in certain circumstances -- but
whether a PID is better than bang-bang or visa-versa depends on the plant
and what you're trying to do with it. There's no one right answer.
The above assumes that each controller is designed by someone who cares.
Certainly, a bang-bang controller designed by someone focused on getting
decent performance has a very good chance of outperforming anything
designed by a guy who doesn't give a shit about doing a good job if
there's "fun" to be had.
Certainly, if a bang-bang controller is so far better than adequate that
no one could want anything better, and if that bang-bang controller isn't
adorned with an anticipator that's more ornate than the PID controller
that might be used instead, then it's probably the way to go -- no matter
how "cool" the PID controller may be.
There are cases, in fact, where bang-bang control may well be superior.
If you get a PID controller all tuned up to within a gnat's eyelash of
perfect for an empty oven, it may have a horrid, even an unstable,
response to an oven with a big thermal mass in it (even if -- or possibly
especially if -- it has nice PWM'd output). Ditto if you tune it up for
the big thermal mass and then try to run it with an empty oven.
It's been known since the 1950's that bang-bang control can be a much
better alternative to either robustly tuned linear control or to on-line
adaptive control -- in fact, the signal motivation for adaptive control
theory (aside from the pretty math) since the 1960's was that bang-bang
control works scares the bejabbers out of a human pilot, however well it
works in an unmanned missile. This leaves the control system designer
contemplating robust or adaptive control of some sort.
> BTW, who is "the resident control expert"?
Has this question been answered to your satisfaction?
--
Tim Wescott
Wescott Design Services
http://www.wescottdesign.com
[toc] | [prev] | [next] | [standalone]
| From | rickman <gnuarm@gmail.com> |
|---|---|
| Date | 2015-11-23 22:04 -0500 |
| Message-ID | <n30jv5$hmk$1@dont-email.me> |
| In reply to | #386372 |
On 11/23/2015 7:06 PM, Tim Wescott wrote:
> On Mon, 23 Nov 2015 17:08:32 -0500, rickman wrote:
>
>> On 11/23/2015 4:11 PM, George Herold wrote:
>>> On Monday, November 23, 2015 at 3:07:59 PM UTC-5, Tim Wescott wrote:
>>>> On Mon, 23 Nov 2015 14:48:16 -0500, rickman wrote:
>>>>
>>>>> On 11/23/2015 2:17 PM, Tim Wescott wrote:
>>>>>> On Mon, 23 Nov 2015 13:43:30 -0500, rickman wrote:
>>>>>>
>>>>>>> On 11/23/2015 1:07 PM, Tim Wescott wrote:
>>>>>>>> On Sun, 22 Nov 2015 14:33:55 -0500, rickman wrote:
>>>>>>>>
>>>>>>>>> If a heater is controlled by turning it on and off, does a PID
>>>>>>>>> algorithm help in more closely controlling the temperature?
>>>>>>>>>
>>>>>>>>> Will running the PID loop faster than the temperature measurement
>>>>>>>>> improve anything?
>>>>>>>>>
>>>>>>>>> How would a PID control be an improvement over a simple
>>>>>>>>> temperature comparison with or without an anticipator?
>>>>>>>>
>>>>>>>> On a totally different line of thought than my previous response:
>>>>>>>>
>>>>>>>> A traditional thermostat/anticipator acts, more or less, like a
>>>>>>>> proportional-derivative controller with a relay output ("relay" is
>>>>>>>> just control systems jargon for an on-off switch). There's
>>>>>>>> usually hysteresis in the switch, but that's not uncommon with
>>>>>>>> relay-output controllers, and it's the anticipator that -- more or
>>>>>>>> less -- provides the derivative action.
>>>>>>>>
>>>>>>>> (Note the "more or less" -- "sorta-kinda" might be better. At any
>>>>>>>> rate, don't get wrapped around the axle if it's not exactly the
>>>>>>>> same --
>>>>>>>> because it isn't.)
>>>>>>>>
>>>>>>>> Such a system will still show some sensitivity of the long-term
>>>>>>>> average controlled temperature to ambient conditions -- your plant
>>>>>>>> (or house, whatever) will be a bit colder on average when ambient
>>>>>>>> is colder, and warmer on average when ambient is warmer.
>>>>>>>>
>>>>>>>> Putting a bit of integrator action into a controller like that
>>>>>>>> will, perforce, guarantee that the average temperature of the
>>>>>>>> plant is as close to correct as can be achieved with available
>>>>>>>> sensors. It won't prevent the heat from cycling up and down,
>>>>>>>> however -- that's a consequence of turning the heat on and off
>>>>>>>> close to, or slower than, the thermal time constant of the plant.
>>>>>>>>
>>>>>>>> Whether the benefit from integral action in the controller is
>>>>>>>> worth the effort in such a circumstance is going to depend on the
>>>>>>>> individual cases. I suspect that in general it won't, but I'm
>>>>>>>> sure there are edge cases where it'll be all that's needed.
>>>>>>>
>>>>>>> It is not clear to me that your assumptions are correct. For
>>>>>>> example,
>>>>>>> ignoring the issue of the anticipator, the idea that without an
>>>>>>> integral term in the control loop, the average temperature will be
>>>>>>> sensitive to the ambient isn't clear to me. Consider the
>>>>>>> controlled temperature as a function of time in two cases. In one
>>>>>>> case the heat leaking from the chamber is 1/10 the rate at which
>>>>>>> the heating element adds heat and in the other case heat leaks at
>>>>>>> 1/2 the rate of the heater. The control loop is a simple
>>>>>>> temperature set point with a fixed amount of plus and minus
>>>>>>> hysteresis. In the 1/10 rate case the heat will be on 1/10 of the
>>>>>>> time. The graph will be a saw tooth with the warming slope being
>>>>>>> 1/9th the width of the cooling slope. The average temperature will
>>>>>>> be the set point. The 1/2 cooling rate will give a sawtooth graph
>>>>>>> with equal heating and cooling periods... and again the average
>>>>>>> temperature will be the set point.
>>>>>>>
>>>>>>> What periods of heating and cooling would you expect a PID
>>>>>>> controller could provide if it is not using PWM modulation of the
>>>>>>> heating, but rather the PID loop directly turns the heat on or off?
>>>>>>>
>>>>>>> If heating a house, the furnace should not be cycled too often, so
>>>>>>> there is no opportunity to modulate the heat cycle over short
>>>>>>> periods.
>>>>>>> However, the system is question is an electric oven so such
>>>>>>> modulation would be possible, but only by adding another layer of
>>>>>>> complexity to the code which is not what is being discussed.
>>>>>>
>>>>>> I'm not going to spend my free time simulating your system for you.
>>>>>> That's what you're paid to do. So why don't you spend your free --
>>>>>> or paid -- time simulating your system for you?
>>>>>>
>>>>>> I've done this stuff before, it's too long for me to remember the
>>>>>> detailed answer, but I do remember that when you actually take the
>>>>>> trouble to simulate the system, or calculate it's behavior
>>>>>> mathematically, you find a dependency on average temperature with
>>>>>> ambient.
>>>>>
>>>>> I'm not asking you to simulate anything. I just described a system
>>>>> simple enough to be simulated in your head and gave you the result.
>>>>> It may be somewhat unrealistic given the vagaries of real world
>>>>> situations,
>>>>> but it is clear enough to show a set point controller maintains an
>>>>> average temperature controlled by the set point when the cooling
>>>>> losses are constant, at least to a first order approximation.
>>>>
>>>> Well, there you go. You're smarter than the resident control expert.
>>>>
>>>> Have fun!
>>>
>>> Rick may not want to be "prickly", but he often comes across that way.
>>> I'll take him at his word though. No insult intended Rick, but smart
>>> people sometimes are less adept at the social graces.
>>
>> Certainly there is no intent to tick people off. I guess it just comes
>> naturally... ?? I consider it to be a shortcoming of the medium. I
>> write with a deadpan emotional intent, most of the time, but I guess it
>> must be read as though I am trying to offend.
>>
>> I really don't know what Tim is ticked off about. I give a *very*
>> simple example that can be considered entirely in your mind and describe
>> the results. Tim seems to think it requires simulation and gets mad
>> about it when I point out how simple it is. Or maybe I'm not
>> understanding what he is upset about. Don't know.
>>
>>
>>> Besides driving the error signal to zero, doesn't a PI controller also
>>> have a faster response, compared to just P? Instead of a flat gain,
>>> you get more gain at lower frequencies. (That might not be right.. I'm
>>> far from a control expert :^)
>>
>> Ok, but your model assumes there is some variability to the control I
>> think. If the control consists of deciding on each cycle of the PID
>> loop whether to turn the heater on or off, how does a PID controller
>> improve response?
>
> That's been answered! Just read!
>
>> If the desire is to turn the heater on at a smaller
>> deviation from the set point, the hysteresis can be set closer to the
>> set point, no? To be honest, if you don't care how often the heat is
>> turned on, why would you even need hysteresis? Just turn on the heat
>> when the temperature is below the set point and off again when the set
>> point is reached. Then the only issue is the overshoot from the thermal
>> mass of the heating element. An anticipator can help with that.
>
> If you're going to refuse to use well-known useful techniques like PWM-ing
> an ON/OFF output, or using a sigma-delta modulator, then yes, an old
> traditional bang-bang controller with an anticipator may work best.
>
> But why refuse to use well-known useful techniques?
Tim, you aren't grasping the situation. I am not designing a
controller. Someone else is. I have asked him why he is using a PID
controller in the way he is and he isn't interested in discussing it.
So I'm trying to understand why a PID controller might be used in that
way. Adding a PWM to it doesn't help me understand how a PID can be
used in the way it is being used.
>> The other point was that running the PID loop faster than the
>> temperature is updated seems pointless.
>
> If it's properly tuned it may lead to better precision by turning the
> heater on or off part-way between temperature measurements. That doesn't
> mean that it's a good decision, that's just a (very slight) advantage
> that it may have.
I'm not seeing how it would turn the heater on and off again in the
smaller cycles. If there was a decision made to turn the heat on with
the temperature update, that heat would most likely remain on until the
temperature reading was updated, no? I suppose it is possible that the
D term might result in the threshold being crossed at the start and then
reversed at the next cycle when the D term goes to zero. In fact, I can
see this causing the heat to turn on when it is *not* desired because
the temperature is above the set point.
Of course this is largely hand waving because a PID controller is not so
easy to analyze with words. So if you say it may have a very slight
advantage, I won't argue that point. But at best it seems it would be a
vanishingly small advantage and even that would require the PID
controller to be very well tuned to the task which might even require
tuning for different items places in the oven giving very different
thermal masses to the overall device.
>> The person who has designed
>> this approach creates a process for each part of the algorithm, one for
>> measuring the temperature, one for running the PID and others. I'm not
>> clear at all why he thinks the PID is usefully run faster than the
>> temperature is updated. I can't get anything out of him other than
>> because "it's fun".
>
> OK. So your real concern is that you've got some out of control
> designer, presumably a software guy, who's so severely unprofessional
> that he's letting himself be motivated by what's "fun" instead of what's
> best for the project. Meaning that he could do something just as "fun"
> with bang-bang control, to an equal level of dismay on your part. So the
> basic problem you're trying to address is only incidental to the PID
> controller.
This is not a "project" in any professional sense. An amateur is doing
this has a home project. I just wanted to understand how the PID might
be useful. So far I am still pretty convinced a set point controller
will give virtually as good a result with less work and complication.
> (BTW: "because it's fun" is very occasionally an allowable excuse for
> doing something in my book, but generally only if there's plenty of slack
> in that part of the project, the guy's attention isn't needed elsewhere,
> AND if the guy has a track record of giving up on the "fun" stuff if it
> isn't panning out. If someone is sticking to something substandard
> "because it's fun" at risk to the project, then they need to be
> encouraged, possibly with a pink slip, to go find a more "fun" place to
> work.)
>
>> I'm just trying to understand how a PID controller
>> can work better than the set point controller when there is no
>> proportional control over the heat, just on and off.
>
> Well, I already told you that, several times. Possibly because I took
> your questions at face value.
>
>> The only thing I can think is that the PID, when properly designed, will
>> inherently consider the thermal mass of the heating element while with
>> the set point controller it has to be accounted for by an anticipator.
>> Even so, I don't see the two as much similar, is that wrong?
>
> They're not all that similar, and there's no reason that a bang-bang
> controller might not be inherently better in certain circumstances -- but
> whether a PID is better than bang-bang or visa-versa depends on the plant
> and what you're trying to do with it. There's no one right answer.
>
> The above assumes that each controller is designed by someone who cares.
> Certainly, a bang-bang controller designed by someone focused on getting
> decent performance has a very good chance of outperforming anything
> designed by a guy who doesn't give a shit about doing a good job if
> there's "fun" to be had.
>
> Certainly, if a bang-bang controller is so far better than adequate that
> no one could want anything better, and if that bang-bang controller isn't
> adorned with an anticipator that's more ornate than the PID controller
> that might be used instead, then it's probably the way to go -- no matter
> how "cool" the PID controller may be.
>
> There are cases, in fact, where bang-bang control may well be superior.
> If you get a PID controller all tuned up to within a gnat's eyelash of
> perfect for an empty oven, it may have a horrid, even an unstable,
> response to an oven with a big thermal mass in it (even if -- or possibly
> especially if -- it has nice PWM'd output). Ditto if you tune it up for
> the big thermal mass and then try to run it with an empty oven.
>
> It's been known since the 1950's that bang-bang control can be a much
> better alternative to either robustly tuned linear control or to on-line
> adaptive control -- in fact, the signal motivation for adaptive control
> theory (aside from the pretty math) since the 1960's was that bang-bang
> control works scares the bejabbers out of a human pilot, however well it
> works in an unmanned missile. This leaves the control system designer
> contemplating robust or adaptive control of some sort.
>
>> BTW, who is "the resident control expert"?
>
> Has this question been answered to your satisfaction?
Lol. Without having faces I have a hard time remembering names and
personalities. I have learned a few like John Larkin and Joerg. But I
often mix up Tim Wescott and Jim Thompson just because the names "feel"
similar to me. I believe Jim is the one with the far right politics
that he shares a lot. I hope I'm not offending anyone by mixing up the
two of you. Hmmm, I just realized you are the same guy I see in c.a.e.
Thanks for the insight.
--
Rick
[toc] | [prev] | [next] | [standalone]
Page 2 of 3 — ← Prev page 1 [2] 3 Next page →
Back to top | Article view | sci.electronics.design
csiph-web