PID tuning. Lag = ~ integrating time

Started by George Herold April 24, 2017
Hi all, this is not so much a question, as me just spouting.  
If I do say (spout) something wrong, or that you disagree with 
or that you don't understand, then please do speak up.  

I've been tuning loops for years.  (By tuning I mean picking 
some reasonable starting values, all loops IME need a little 
real time tweaking from the starting values.)  I've always 
used the Zeigler-Nichols oscillation method, and looked no further. 

Now my boss asked for some other technique and I started reading about 
tuning from the step response. (What Z-N call the Process-reaction curve)
Oh I stuck the Z-N paper here, along with a few 'scope shots.  

https://www.dropbox.com/sh/7lkqazuy6wvzknk/AADcZtTvFvaD3TEzeJiAjEy6a?dl=0

If only I'd read the paper ~20 years ago.  

This is a more up to date rehash of the same things.  
http://faculty.mercer.edu/jenkins_he/documents/TuningforPIDControllers.pdf

For completeness I'll stick in Tim W's excellent article.  
(Though unfortunately he doesn't talk about Z-N directly.) 
http://www.wescottdesign.com/articles/pid/pidWithoutAPhd.pdf
(Maybe he'll add an appendix for me. :^)

So if you look at the step response in my dropbox link, there is a lag 
of 300-350 ms.  And if you look at the oscillations at the "ultimate gain" 
you'll see a period of about 2 seconds.  And lo and behold, 
2*pi*tau (the lag) = period!  That is very satisfying.  

Estimating the needed gain (proportional term) from the step response,
didn't work out that well in this case.  But I'm running at gains 
that are ~20% the ultimate gain, so oscillation method didn't work all
that well either in this regard.     


Oh I do have one question for Tim.  
You show a thermal control loop with just integrating control.  
Does this really work?  (I would have thought it would just oscillate.) 
Or do you have a little bit of proportional term in there?  

Cheers,

George H. 
On Mon, 24 Apr 2017 12:29:24 -0700, George Herold wrote:

> Hi all, this is not so much a question, as me just spouting. > If I do say (spout) something wrong, or that you disagree with or that > you don't understand, then please do speak up. > > I've been tuning loops for years. (By tuning I mean picking some > reasonable starting values, all loops IME need a little real time > tweaking from the starting values.) I've always used the > Zeigler-Nichols oscillation method, and looked no further. > > Now my boss asked for some other technique and I started reading about > tuning from the step response. (What Z-N call the Process-reaction > curve) Oh I stuck the Z-N paper here, along with a few 'scope shots. > > https://www.dropbox.com/sh/7lkqazuy6wvzknk/AADcZtTvFvaD3TEzeJiAjEy6a?
dl=0
> > If only I'd read the paper ~20 years ago. > > This is a more up to date rehash of the same things. > http://faculty.mercer.edu/jenkins_he/documents/
TuningforPIDControllers.pdf
> > For completeness I'll stick in Tim W's excellent article. > (Though unfortunately he doesn't talk about Z-N directly.) > http://www.wescottdesign.com/articles/pid/pidWithoutAPhd.pdf (Maybe > he'll add an appendix for me. :^)
Nope. For two reasons: First, because I've never used Z-N, never felt the need, and so never built up practical experience with it. Second, because all the industrial control guys I've talked to, both in person and 'lectronically, tell me that Z-N gets you a good starting point but then you need to either tweak things, do measurement + system ID + design, or do frequency sweeps + design. There's enough material out there on it, and too many people that think that it's the bees knees.
> So if you look at the step response in my dropbox link, there is a lag > of 300-350 ms. And if you look at the oscillations at the "ultimate > gain" > you'll see a period of about 2 seconds. And lo and behold, > 2*pi*tau (the lag) = period! That is very satisfying. > > Estimating the needed gain (proportional term) from the step response, > didn't work out that well in this case. But I'm running at gains that > are ~20% the ultimate gain, so oscillation method didn't work all that > well either in this regard. > > > Oh I do have one question for Tim. > You show a thermal control loop with just integrating control. > Does this really work? (I would have thought it would just oscillate.) > Or do you have a little bit of proportional term in there?
If you keep a firm lid on your ambitions, certainly. For most systems you won't get nearly the speed you'd get with some proportional action or even proportional + derivative -- but any system that has a flat gain characteristic going down to zero frequency can be controlled with just an integrator, if you're patient. The one thermal loop that I've done had a simple first-order response well beyond any reasonable loop bandwidth. So it got a simple PI controller and worked just grand. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com I'm looking for work -- see my website!
On Monday, April 24, 2017 at 8:52:04 PM UTC-4, Tim Wescott wrote:
> On Mon, 24 Apr 2017 12:29:24 -0700, George Herold wrote: > > > Hi all, this is not so much a question, as me just spouting. > > If I do say (spout) something wrong, or that you disagree with or that > > you don't understand, then please do speak up. > > > > I've been tuning loops for years. (By tuning I mean picking some > > reasonable starting values, all loops IME need a little real time > > tweaking from the starting values.) I've always used the > > Zeigler-Nichols oscillation method, and looked no further. > > > > Now my boss asked for some other technique and I started reading about > > tuning from the step response. (What Z-N call the Process-reaction > > curve) Oh I stuck the Z-N paper here, along with a few 'scope shots. > > > > https://www.dropbox.com/sh/7lkqazuy6wvzknk/AADcZtTvFvaD3TEzeJiAjEy6a? > dl=0 > > > > If only I'd read the paper ~20 years ago. > > > > This is a more up to date rehash of the same things. > > http://faculty.mercer.edu/jenkins_he/documents/ > TuningforPIDControllers.pdf > > > > For completeness I'll stick in Tim W's excellent article. > > (Though unfortunately he doesn't talk about Z-N directly.) > > http://www.wescottdesign.com/articles/pid/pidWithoutAPhd.pdf (Maybe > > he'll add an appendix for me. :^) > > Nope. For two reasons: > > First, because I've never used Z-N, never felt the need, and so never > built up practical experience with it. > > Second, because all the industrial control guys I've talked to, both in > person and 'lectronically, tell me that Z-N gets you a good starting > point but then you need to either tweak things, do measurement + system > ID + design, or do frequency sweeps + design. There's enough material > out there on it, and too many people that think that it's the bees knees.
Huh, Ok I only said it was my starting point. Then do some step responses and see what it looks like. (I'm mostly an idiot when it comes to thermal loops... I'm starting to think that 1/2 the time I got lucky and put the sensor in a good place, and the other times, not so good.) Well sometimes you just need to put the sensor at the point you care about.... I could think more about where to put the heater. Grumble.... What's your starting point?
> > > So if you look at the step response in my dropbox link, there is a lag > > of 300-350 ms. And if you look at the oscillations at the "ultimate > > gain" > > you'll see a period of about 2 seconds. And lo and behold, > > 2*pi*tau (the lag) = period! That is very satisfying. > > > > Estimating the needed gain (proportional term) from the step response, > > didn't work out that well in this case. But I'm running at gains that > > are ~20% the ultimate gain, so oscillation method didn't work all that > > well either in this regard. > > > > > > Oh I do have one question for Tim. > > You show a thermal control loop with just integrating control. > > Does this really work? (I would have thought it would just oscillate.) > > Or do you have a little bit of proportional term in there? > > If you keep a firm lid on your ambitions, certainly. For most systems > you won't get nearly the speed you'd get with some proportional action or > even proportional + derivative -- but any system that has a flat gain > characteristic going down to zero frequency can be controlled with just > an integrator, if you're patient. > > The one thermal loop that I've done had a simple first-order response > well beyond any reasonable loop bandwidth. So it got a simple PI > controller and worked just grand.
Huh, OK I'll have to try, the loss is in the delay/lag? This thermal loop is fast, (at least for me) so ten seconds is no problem. George H.
> > -- > > Tim Wescott > Wescott Design Services > http://www.wescottdesign.com > > I'm looking for work -- see my website!
On Mon, 24 Apr 2017 19:22:31 -0700, George Herold wrote:

> On Monday, April 24, 2017 at 8:52:04 PM UTC-4, Tim Wescott wrote: >> On Mon, 24 Apr 2017 12:29:24 -0700, George Herold wrote: >> >> > Hi all, this is not so much a question, as me just spouting. >> > If I do say (spout) something wrong, or that you disagree with or >> > that you don't understand, then please do speak up. >> > >> > I've been tuning loops for years. (By tuning I mean picking some >> > reasonable starting values, all loops IME need a little real time >> > tweaking from the starting values.) I've always used the >> > Zeigler-Nichols oscillation method, and looked no further. >> > >> > Now my boss asked for some other technique and I started reading >> > about tuning from the step response. (What Z-N call the >> > Process-reaction curve) Oh I stuck the Z-N paper here, along with a >> > few 'scope shots. >> > >> > https://www.dropbox.com/sh/7lkqazuy6wvzknk/AADcZtTvFvaD3TEzeJiAjEy6a? >> dl=0 >> > >> > If only I'd read the paper ~20 years ago. >> > >> > This is a more up to date rehash of the same things. >> > http://faculty.mercer.edu/jenkins_he/documents/ >> TuningforPIDControllers.pdf >> > >> > For completeness I'll stick in Tim W's excellent article. >> > (Though unfortunately he doesn't talk about Z-N directly.) >> > http://www.wescottdesign.com/articles/pid/pidWithoutAPhd.pdf (Maybe >> > he'll add an appendix for me. :^) >> >> Nope. For two reasons: >> >> First, because I've never used Z-N, never felt the need, and so never >> built up practical experience with it. >> >> Second, because all the industrial control guys I've talked to, both in >> person and 'lectronically, tell me that Z-N gets you a good starting >> point but then you need to either tweak things, do measurement + system >> ID + design, or do frequency sweeps + design. There's enough material >> out there on it, and too many people that think that it's the bees >> knees.
> Huh, Ok I only said it was my starting point. Then do some step > responses and see what it looks like. (I'm mostly an idiot when it > comes to thermal loops... I'm starting to think that 1/2 the time I got > lucky and put the sensor in a good place, and the other times, not so > good.) Well sometimes you just need to put the sensor at the point you > care about.... I could think more about where to put the heater. > Grumble.... > > What's your starting point?
I usually have an idea of what the DC response of the loop is (flat, integrating, double integrating), and some idea of the initial gain and rolloffs. If not, then I take a step response and eyeball it (OK, kind of your Z-N, only much more casual). Once I have the system stable and staying within bounds, I put a frequency sweep on it and do Bode plot design.
>> >> > So if you look at the step response in my dropbox link, there is a >> > lag of 300-350 ms. And if you look at the oscillations at the >> > "ultimate gain" >> > you'll see a period of about 2 seconds. And lo and behold, >> > 2*pi*tau (the lag) = period! That is very satisfying. >> > >> > Estimating the needed gain (proportional term) from the step >> > response, didn't work out that well in this case. But I'm running at >> > gains that are ~20% the ultimate gain, so oscillation method didn't >> > work all that well either in this regard. >> > >> > >> > Oh I do have one question for Tim. >> > You show a thermal control loop with just integrating control. >> > Does this really work? (I would have thought it would just >> > oscillate.) >> > Or do you have a little bit of proportional term in there? >> >> If you keep a firm lid on your ambitions, certainly. For most systems >> you won't get nearly the speed you'd get with some proportional action >> or even proportional + derivative -- but any system that has a flat >> gain characteristic going down to zero frequency can be controlled with >> just an integrator, if you're patient. >> >> The one thermal loop that I've done had a simple first-order response >> well beyond any reasonable loop bandwidth. So it got a simple PI >> controller and worked just grand. > Huh, OK I'll have to try, the loss is in the delay/lag? > This thermal loop is fast, (at least for me) > so ten seconds is no problem. > > George H. > > > >> -- >> >> Tim Wescott Wescott Design Services http://www.wescottdesign.com >> >> I'm looking for work -- see my website!
-- Tim Wescott Control systems, embedded software and circuit design I'm looking for work! See my website if you're interested http://www.wescottdesign.com
On Mon, 24 Apr 2017 12:29:24 -0700 (PDT), George Herold
<gherold@teachspin.com> wrote:

>Hi all, this is not so much a question, as me just spouting. >If I do say (spout) something wrong, or that you disagree with >or that you don't understand, then please do speak up. > >I've been tuning loops for years. (By tuning I mean picking >some reasonable starting values, all loops IME need a little >real time tweaking from the starting values.) I've always >used the Zeigler-Nichols oscillation method, and looked no further. > >Now my boss asked for some other technique and I started reading about >tuning from the step response. (What Z-N call the Process-reaction curve) >Oh I stuck the Z-N paper here, along with a few 'scope shots. > >https://www.dropbox.com/sh/7lkqazuy6wvzknk/AADcZtTvFvaD3TEzeJiAjEy6a?dl=0 > >If only I'd read the paper ~20 years ago. > >This is a more up to date rehash of the same things. >http://faculty.mercer.edu/jenkins_he/documents/TuningforPIDControllers.pdf > >For completeness I'll stick in Tim W's excellent article. >(Though unfortunately he doesn't talk about Z-N directly.) >http://www.wescottdesign.com/articles/pid/pidWithoutAPhd.pdf >(Maybe he'll add an appendix for me. :^) > >So if you look at the step response in my dropbox link, there is a lag >of 300-350 ms. And if you look at the oscillations at the "ultimate gain" >you'll see a period of about 2 seconds. And lo and behold, >2*pi*tau (the lag) = period! That is very satisfying. > >Estimating the needed gain (proportional term) from the step response, >didn't work out that well in this case. But I'm running at gains >that are ~20% the ultimate gain, so oscillation method didn't work all >that well either in this regard. > > >Oh I do have one question for Tim. >You show a thermal control loop with just integrating control. >Does this really work? (I would have thought it would just oscillate.) >Or do you have a little bit of proportional term in there? > >Cheers, > >George H.
If you do it in software, you may program a "rate predictor" and know in advance how to feedback. w.
On 04/24/2017 10:22 PM, George Herold wrote:
> On Monday, April 24, 2017 at 8:52:04 PM UTC-4, Tim Wescott wrote: >> On Mon, 24 Apr 2017 12:29:24 -0700, George Herold wrote: >> >>> Hi all, this is not so much a question, as me just spouting. >>> If I do say (spout) something wrong, or that you disagree with or that >>> you don't understand, then please do speak up. >>> >>> I've been tuning loops for years. (By tuning I mean picking some >>> reasonable starting values, all loops IME need a little real time >>> tweaking from the starting values.) I've always used the >>> Zeigler-Nichols oscillation method, and looked no further. >>> >>> Now my boss asked for some other technique and I started reading about >>> tuning from the step response. (What Z-N call the Process-reaction >>> curve) Oh I stuck the Z-N paper here, along with a few 'scope shots. >>> >>> https://www.dropbox.com/sh/7lkqazuy6wvzknk/AADcZtTvFvaD3TEzeJiAjEy6a? >> dl=0 >>> >>> If only I'd read the paper ~20 years ago. >>> >>> This is a more up to date rehash of the same things. >>> http://faculty.mercer.edu/jenkins_he/documents/ >> TuningforPIDControllers.pdf >>> >>> For completeness I'll stick in Tim W's excellent article. >>> (Though unfortunately he doesn't talk about Z-N directly.) >>> http://www.wescottdesign.com/articles/pid/pidWithoutAPhd.pdf (Maybe >>> he'll add an appendix for me. :^) >> >> Nope. For two reasons: >> >> First, because I've never used Z-N, never felt the need, and so never >> built up practical experience with it. >> >> Second, because all the industrial control guys I've talked to, both in >> person and 'lectronically, tell me that Z-N gets you a good starting >> point but then you need to either tweak things, do measurement + system >> ID + design, or do frequency sweeps + design. There's enough material >> out there on it, and too many people that think that it's the bees knees. > Huh, Ok I only said it was my starting point. Then do some step responses > and see what it looks like. (I'm mostly an idiot when it comes to > thermal loops... I'm starting to think that 1/2 the time I got lucky > and put the sensor in a good place, and the other times, not so good.) > Well sometimes you just need to put the sensor at the point you care > about.... I could think more about where to put the heater. > Grumble.... > > What's your starting point? >> >>> So if you look at the step response in my dropbox link, there is a lag >>> of 300-350 ms. And if you look at the oscillations at the "ultimate >>> gain" >>> you'll see a period of about 2 seconds. And lo and behold, >>> 2*pi*tau (the lag) = period! That is very satisfying. >>> >>> Estimating the needed gain (proportional term) from the step response, >>> didn't work out that well in this case. But I'm running at gains that >>> are ~20% the ultimate gain, so oscillation method didn't work all that >>> well either in this regard. >>> >>> >>> Oh I do have one question for Tim. >>> You show a thermal control loop with just integrating control. >>> Does this really work? (I would have thought it would just oscillate.) >>> Or do you have a little bit of proportional term in there? >> >> If you keep a firm lid on your ambitions, certainly. For most systems >> you won't get nearly the speed you'd get with some proportional action or >> even proportional + derivative -- but any system that has a flat gain >> characteristic going down to zero frequency can be controlled with just >> an integrator, if you're patient. >> >> The one thermal loop that I've done had a simple first-order response >> well beyond any reasonable loop bandwidth. So it got a simple PI >> controller and worked just grand. > Huh, OK I'll have to try, the loss is in the delay/lag? > This thermal loop is fast, (at least for me) > so ten seconds is no problem.
I get starting points for thermal loops by looking at the open-loop step response. In small systems it's usually well approximated by a time delay cascaded with an integrator. Thus the plant's transfer function is approximately H_plant(f) ~ (1/j 2 pi f tau_I) exp(-j 2 pi f tau_delay) Then I do the usual frequency-compensation thing, aiming for about a 60-degree phase margin. If the system is reasonably well insulated, the effect of the heat leak is usually small enough to ignore for frequency compensation purposes, but if it isn't, you need to move the pole from zero out to (j 2 pi f tau_leak). For things like diode lasers and IR photodiodes, this is usually close enough. 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
On Tuesday, April 25, 2017 at 1:22:30 PM UTC-4, Phil Hobbs wrote:
> On 04/24/2017 10:22 PM, George Herold wrote: > > On Monday, April 24, 2017 at 8:52:04 PM UTC-4, Tim Wescott wrote: > >> On Mon, 24 Apr 2017 12:29:24 -0700, George Herold wrote: > >> > >>> Hi all, this is not so much a question, as me just spouting. > >>> If I do say (spout) something wrong, or that you disagree with or that > >>> you don't understand, then please do speak up. > >>> > >>> I've been tuning loops for years. (By tuning I mean picking some > >>> reasonable starting values, all loops IME need a little real time > >>> tweaking from the starting values.) I've always used the > >>> Zeigler-Nichols oscillation method, and looked no further. > >>> > >>> Now my boss asked for some other technique and I started reading about > >>> tuning from the step response. (What Z-N call the Process-reaction > >>> curve) Oh I stuck the Z-N paper here, along with a few 'scope shots. > >>> > >>> https://www.dropbox.com/sh/7lkqazuy6wvzknk/AADcZtTvFvaD3TEzeJiAjEy6a? > >> dl=0 > >>> > >>> If only I'd read the paper ~20 years ago. > >>> > >>> This is a more up to date rehash of the same things. > >>> http://faculty.mercer.edu/jenkins_he/documents/ > >> TuningforPIDControllers.pdf > >>> > >>> For completeness I'll stick in Tim W's excellent article. > >>> (Though unfortunately he doesn't talk about Z-N directly.) > >>> http://www.wescottdesign.com/articles/pid/pidWithoutAPhd.pdf (Maybe > >>> he'll add an appendix for me. :^) > >> > >> Nope. For two reasons: > >> > >> First, because I've never used Z-N, never felt the need, and so never > >> built up practical experience with it. > >> > >> Second, because all the industrial control guys I've talked to, both in > >> person and 'lectronically, tell me that Z-N gets you a good starting > >> point but then you need to either tweak things, do measurement + system > >> ID + design, or do frequency sweeps + design. There's enough material > >> out there on it, and too many people that think that it's the bees knees. > > Huh, Ok I only said it was my starting point. Then do some step responses > > and see what it looks like. (I'm mostly an idiot when it comes to > > thermal loops... I'm starting to think that 1/2 the time I got lucky > > and put the sensor in a good place, and the other times, not so good.) > > Well sometimes you just need to put the sensor at the point you care > > about.... I could think more about where to put the heater. > > Grumble.... > > > > What's your starting point? > >> > >>> So if you look at the step response in my dropbox link, there is a lag > >>> of 300-350 ms. And if you look at the oscillations at the "ultimate > >>> gain" > >>> you'll see a period of about 2 seconds. And lo and behold, > >>> 2*pi*tau (the lag) = period! That is very satisfying. > >>> > >>> Estimating the needed gain (proportional term) from the step response, > >>> didn't work out that well in this case. But I'm running at gains that > >>> are ~20% the ultimate gain, so oscillation method didn't work all that > >>> well either in this regard. > >>> > >>> > >>> Oh I do have one question for Tim. > >>> You show a thermal control loop with just integrating control. > >>> Does this really work? (I would have thought it would just oscillate.) > >>> Or do you have a little bit of proportional term in there? > >> > >> If you keep a firm lid on your ambitions, certainly. For most systems > >> you won't get nearly the speed you'd get with some proportional action or > >> even proportional + derivative -- but any system that has a flat gain > >> characteristic going down to zero frequency can be controlled with just > >> an integrator, if you're patient. > >> > >> The one thermal loop that I've done had a simple first-order response > >> well beyond any reasonable loop bandwidth. So it got a simple PI > >> controller and worked just grand. > > Huh, OK I'll have to try, the loss is in the delay/lag? > > This thermal loop is fast, (at least for me) > > so ten seconds is no problem. > > I get starting points for thermal loops by looking at the open-loop step > response. In small systems it's usually well approximated by a time > delay cascaded with an integrator. Thus the plant's transfer function > is approximately > > H_plant(f) ~ (1/j 2 pi f tau_I) exp(-j 2 pi f tau_delay)
Right, I went looking for a pulse response with "your" delay*RC time constant, model in mind. Seem's like Z-N did it before we were born... which I love. They also give a guess at the gain, from the pulse response.
> > Then I do the usual frequency-compensation thing, aiming for about a > 60-degree phase margin. If the system is reasonably well insulated, the > effect of the heat leak is usually small enough to ignore for frequency > compensation purposes, but if it isn't, you need to move the pole from > zero out to (j 2 pi f tau_leak).
Huh, Phil, lots of the time you're talking over my head, (or at least not where my head is at the moment.) I'm not sure where 60 degree's is, but I look at the set point step response and lower the gain if there's not too much ringing. Say a Q of 1-2. (probably closer to one, and then in production each unit is a bit different.)
> > For things like diode lasers and IR photodiodes, this is usually close > enough.
I was thinking I'd like to make my Rb cell heaters faster. A cylinder of glass (25mm daim X 25 mm length) Oh here's some pics on drop box. There's another one, similar but with an Al cylinder holding the heater wire, rather than a glass cylinder. https://www.dropbox.com/sh/9mv2b813latvvla/AAAEdQqEFEr9iw_6k9QONagHa?dl=0 I stick the thermal couple in next the the Rb cylinder. Would I do better sticking it on the heater? (I, the students, can monitor the light transmission to give a measure of when the cell temperate stabilizes...) (Hey I found that all my old dropbox links still work, which is nice.) George H.
> > 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
On Tuesday, April 25, 2017 at 8:02:54 PM UTC-4, George Herold wrote:
> On Tuesday, April 25, 2017 at 1:22:30 PM UTC-4, Phil Hobbs wrote: > > On 04/24/2017 10:22 PM, George Herold wrote: > > > On Monday, April 24, 2017 at 8:52:04 PM UTC-4, Tim Wescott wrote: > > >> On Mon, 24 Apr 2017 12:29:24 -0700, George Herold wrote: > > >> > > >>> Hi all, this is not so much a question, as me just spouting. > > >>> If I do say (spout) something wrong, or that you disagree with or that > > >>> you don't understand, then please do speak up. > > >>> > > >>> I've been tuning loops for years. (By tuning I mean picking some > > >>> reasonable starting values, all loops IME need a little real time > > >>> tweaking from the starting values.) I've always used the > > >>> Zeigler-Nichols oscillation method, and looked no further. > > >>> > > >>> Now my boss asked for some other technique and I started reading about > > >>> tuning from the step response. (What Z-N call the Process-reaction > > >>> curve) Oh I stuck the Z-N paper here, along with a few 'scope shots. > > >>> > > >>> https://www.dropbox.com/sh/7lkqazuy6wvzknk/AADcZtTvFvaD3TEzeJiAjEy6a? > > >> dl=0 > > >>> > > >>> If only I'd read the paper ~20 years ago. > > >>> > > >>> This is a more up to date rehash of the same things. > > >>> http://faculty.mercer.edu/jenkins_he/documents/ > > >> TuningforPIDControllers.pdf > > >>> > > >>> For completeness I'll stick in Tim W's excellent article. > > >>> (Though unfortunately he doesn't talk about Z-N directly.) > > >>> http://www.wescottdesign.com/articles/pid/pidWithoutAPhd.pdf (Maybe > > >>> he'll add an appendix for me. :^) > > >> > > >> Nope. For two reasons: > > >> > > >> First, because I've never used Z-N, never felt the need, and so never > > >> built up practical experience with it. > > >> > > >> Second, because all the industrial control guys I've talked to, both in > > >> person and 'lectronically, tell me that Z-N gets you a good starting > > >> point but then you need to either tweak things, do measurement + system > > >> ID + design, or do frequency sweeps + design. There's enough material > > >> out there on it, and too many people that think that it's the bees knees. > > > Huh, Ok I only said it was my starting point. Then do some step responses > > > and see what it looks like. (I'm mostly an idiot when it comes to > > > thermal loops... I'm starting to think that 1/2 the time I got lucky > > > and put the sensor in a good place, and the other times, not so good.) > > > Well sometimes you just need to put the sensor at the point you care > > > about.... I could think more about where to put the heater. > > > Grumble.... > > > > > > What's your starting point? > > >> > > >>> So if you look at the step response in my dropbox link, there is a lag > > >>> of 300-350 ms. And if you look at the oscillations at the "ultimate > > >>> gain" > > >>> you'll see a period of about 2 seconds. And lo and behold, > > >>> 2*pi*tau (the lag) = period! That is very satisfying. > > >>> > > >>> Estimating the needed gain (proportional term) from the step response, > > >>> didn't work out that well in this case. But I'm running at gains that > > >>> are ~20% the ultimate gain, so oscillation method didn't work all that > > >>> well either in this regard. > > >>> > > >>> > > >>> Oh I do have one question for Tim. > > >>> You show a thermal control loop with just integrating control. > > >>> Does this really work? (I would have thought it would just oscillate.) > > >>> Or do you have a little bit of proportional term in there? > > >> > > >> If you keep a firm lid on your ambitions, certainly. For most systems > > >> you won't get nearly the speed you'd get with some proportional action or > > >> even proportional + derivative -- but any system that has a flat gain > > >> characteristic going down to zero frequency can be controlled with just > > >> an integrator, if you're patient. > > >> > > >> The one thermal loop that I've done had a simple first-order response > > >> well beyond any reasonable loop bandwidth. So it got a simple PI > > >> controller and worked just grand. > > > Huh, OK I'll have to try, the loss is in the delay/lag? > > > This thermal loop is fast, (at least for me) > > > so ten seconds is no problem. > > > > I get starting points for thermal loops by looking at the open-loop step > > response. In small systems it's usually well approximated by a time > > delay cascaded with an integrator. Thus the plant's transfer function > > is approximately > > > > H_plant(f) ~ (1/j 2 pi f tau_I) exp(-j 2 pi f tau_delay) > Right, I went looking for a pulse response with "your" > delay*RC time constant, model in mind. > Seem's like Z-N did it before we were born... which I love. > They also give a guess at the gain, from the pulse response. > > > > > Then I do the usual frequency-compensation thing, aiming for about a > > 60-degree phase margin. If the system is reasonably well insulated, the > > effect of the heat leak is usually small enough to ignore for frequency > > compensation purposes, but if it isn't, you need to move the pole from > > zero out to (j 2 pi f tau_leak). > Huh, Phil, lots of the time you're talking over my head, > (or at least not where my head is at the moment.) > > I'm not sure where 60 degree's is, but I look at the set point > step response and lower the gain if there's not too much ringing.
oops delete "not" ............................^^^ (please forgive all the other numerous mistakes...) GH.
> Say a Q of 1-2. (probably closer to one, and then in production > each unit is a bit different.) > > > > For things like diode lasers and IR photodiodes, this is usually close > > enough. > > I was thinking I'd like to make my Rb cell heaters faster. > A cylinder of glass (25mm daim X 25 mm length) > Oh here's some pics on drop box. > There's another one, similar but with an Al cylinder > holding the heater wire, rather than a glass cylinder. > https://www.dropbox.com/sh/9mv2b813latvvla/AAAEdQqEFEr9iw_6k9QONagHa?dl=0 > > I stick the thermal couple in next the the Rb cylinder. > Would I do better sticking it on the heater? (I, the students, > can monitor the light transmission to give a measure of when the > cell temperate stabilizes...) > (Hey I found that all my old dropbox links still work, which is nice.) > > > George H. > > > > > 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
On Tue, 25 Apr 2017 17:02:48 -0700, George Herold wrote:

> On Tuesday, April 25, 2017 at 1:22:30 PM UTC-4, Phil Hobbs wrote: >> On 04/24/2017 10:22 PM, George Herold wrote: >> > On Monday, April 24, 2017 at 8:52:04 PM UTC-4, Tim Wescott wrote: >> >> On Mon, 24 Apr 2017 12:29:24 -0700, George Herold wrote: >> >> >> >>> Hi all, this is not so much a question, as me just spouting. >> >>> If I do say (spout) something wrong, or that you disagree with or >> >>> that you don't understand, then please do speak up. >> >>> >> >>> I've been tuning loops for years. (By tuning I mean picking some >> >>> reasonable starting values, all loops IME need a little real time >> >>> tweaking from the starting values.) I've always used the >> >>> Zeigler-Nichols oscillation method, and looked no further. >> >>> >> >>> Now my boss asked for some other technique and I started reading >> >>> about tuning from the step response. (What Z-N call the >> >>> Process-reaction curve) Oh I stuck the Z-N paper here, along with a >> >>> few 'scope shots. >> >>> >> >>> https://www.dropbox.com/sh/7lkqazuy6wvzknk/
AADcZtTvFvaD3TEzeJiAjEy6a?
>> >> dl=0 >> >>> >> >>> If only I'd read the paper ~20 years ago. >> >>> >> >>> This is a more up to date rehash of the same things. >> >>> http://faculty.mercer.edu/jenkins_he/documents/ >> >> TuningforPIDControllers.pdf >> >>> >> >>> For completeness I'll stick in Tim W's excellent article. >> >>> (Though unfortunately he doesn't talk about Z-N directly.) >> >>> http://www.wescottdesign.com/articles/pid/pidWithoutAPhd.pdf (Maybe >> >>> he'll add an appendix for me. :^) >> >> >> >> Nope. For two reasons: >> >> >> >> First, because I've never used Z-N, never felt the need, and so >> >> never built up practical experience with it. >> >> >> >> Second, because all the industrial control guys I've talked to, both >> >> in person and 'lectronically, tell me that Z-N gets you a good >> >> starting point but then you need to either tweak things, do >> >> measurement + system ID + design, or do frequency sweeps + design. >> >> There's enough material out there on it, and too many people that >> >> think that it's the bees knees. >> > Huh, Ok I only said it was my starting point. Then do some step >> > responses and see what it looks like. (I'm mostly an idiot when it >> > comes to thermal loops... I'm starting to think that 1/2 the time I >> > got lucky and put the sensor in a good place, and the other times, >> > not so good.) Well sometimes you just need to put the sensor at the >> > point you care about.... I could think more about where to put the >> > heater. >> > Grumble.... >> > >> > What's your starting point? >> >> >> >>> So if you look at the step response in my dropbox link, there is a >> >>> lag of 300-350 ms. And if you look at the oscillations at the >> >>> "ultimate gain" >> >>> you'll see a period of about 2 seconds. And lo and behold, >> >>> 2*pi*tau (the lag) = period! That is very satisfying. >> >>> >> >>> Estimating the needed gain (proportional term) from the step >> >>> response, didn't work out that well in this case. But I'm running >> >>> at gains that are ~20% the ultimate gain, so oscillation method >> >>> didn't work all that well either in this regard. >> >>> >> >>> >> >>> Oh I do have one question for Tim. >> >>> You show a thermal control loop with just integrating control. >> >>> Does this really work? (I would have thought it would just >> >>> oscillate.) >> >>> Or do you have a little bit of proportional term in there? >> >> >> >> If you keep a firm lid on your ambitions, certainly. For most >> >> systems you won't get nearly the speed you'd get with some >> >> proportional action or even proportional + derivative -- but any >> >> system that has a flat gain characteristic going down to zero >> >> frequency can be controlled with just an integrator, if you're >> >> patient. >> >> >> >> The one thermal loop that I've done had a simple first-order >> >> response well beyond any reasonable loop bandwidth. So it got a >> >> simple PI controller and worked just grand. >> > Huh, OK I'll have to try, the loss is in the delay/lag? >> > This thermal loop is fast, (at least for me) >> > so ten seconds is no problem. >> >> I get starting points for thermal loops by looking at the open-loop >> step response. In small systems it's usually well approximated by a >> time delay cascaded with an integrator. Thus the plant's transfer >> function is approximately >> >> H_plant(f) ~ (1/j 2 pi f tau_I) exp(-j 2 pi f tau_delay) > Right, I went looking for a pulse response with "your" > delay*RC time constant, model in mind. > Seem's like Z-N did it before we were born... which I love. > They also give a guess at the gain, from the pulse response. > > >> Then I do the usual frequency-compensation thing, aiming for about a >> 60-degree phase margin. If the system is reasonably well insulated, >> the effect of the heat leak is usually small enough to ignore for >> frequency compensation purposes, but if it isn't, you need to move the >> pole from zero out to (j 2 pi f tau_leak). > Huh, Phil, lots of the time you're talking over my head, > (or at least not where my head is at the moment.) > > I'm not sure where 60 degree's is, but I look at the set point step > response and lower the gain if there's not too much ringing. > Say a Q of 1-2. (probably closer to one, and then in production each > unit is a bit different.)
You need to learn frequency-domain tuning. Just looking at the time domain response is not a reliable way to get the best response and a known loop robustness. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com I'm looking for work -- see my website!
On Tuesday, April 25, 2017 at 11:20:50 PM UTC-4, Tim Wescott wrote:
> On Tue, 25 Apr 2017 17:02:48 -0700, George Herold wrote: > > > On Tuesday, April 25, 2017 at 1:22:30 PM UTC-4, Phil Hobbs wrote: > >> On 04/24/2017 10:22 PM, George Herold wrote: > >> > On Monday, April 24, 2017 at 8:52:04 PM UTC-4, Tim Wescott wrote: > >> >> On Mon, 24 Apr 2017 12:29:24 -0700, George Herold wrote: > >> >> > >> >>> Hi all, this is not so much a question, as me just spouting. > >> >>> If I do say (spout) something wrong, or that you disagree with or > >> >>> that you don't understand, then please do speak up. > >> >>> > >> >>> I've been tuning loops for years. (By tuning I mean picking some > >> >>> reasonable starting values, all loops IME need a little real time > >> >>> tweaking from the starting values.) I've always used the > >> >>> Zeigler-Nichols oscillation method, and looked no further. > >> >>> > >> >>> Now my boss asked for some other technique and I started reading > >> >>> about tuning from the step response. (What Z-N call the > >> >>> Process-reaction curve) Oh I stuck the Z-N paper here, along with a > >> >>> few 'scope shots. > >> >>> > >> >>> https://www.dropbox.com/sh/7lkqazuy6wvzknk/ > AADcZtTvFvaD3TEzeJiAjEy6a? > >> >> dl=0 > >> >>> > >> >>> If only I'd read the paper ~20 years ago. > >> >>> > >> >>> This is a more up to date rehash of the same things. > >> >>> http://faculty.mercer.edu/jenkins_he/documents/ > >> >> TuningforPIDControllers.pdf > >> >>> > >> >>> For completeness I'll stick in Tim W's excellent article. > >> >>> (Though unfortunately he doesn't talk about Z-N directly.) > >> >>> http://www.wescottdesign.com/articles/pid/pidWithoutAPhd.pdf (Maybe > >> >>> he'll add an appendix for me. :^) > >> >> > >> >> Nope. For two reasons: > >> >> > >> >> First, because I've never used Z-N, never felt the need, and so > >> >> never built up practical experience with it. > >> >> > >> >> Second, because all the industrial control guys I've talked to, both > >> >> in person and 'lectronically, tell me that Z-N gets you a good > >> >> starting point but then you need to either tweak things, do > >> >> measurement + system ID + design, or do frequency sweeps + design. > >> >> There's enough material out there on it, and too many people that > >> >> think that it's the bees knees. > >> > Huh, Ok I only said it was my starting point. Then do some step > >> > responses and see what it looks like. (I'm mostly an idiot when it > >> > comes to thermal loops... I'm starting to think that 1/2 the time I > >> > got lucky and put the sensor in a good place, and the other times, > >> > not so good.) Well sometimes you just need to put the sensor at the > >> > point you care about.... I could think more about where to put the > >> > heater. > >> > Grumble.... > >> > > >> > What's your starting point? > >> >> > >> >>> So if you look at the step response in my dropbox link, there is a > >> >>> lag of 300-350 ms. And if you look at the oscillations at the > >> >>> "ultimate gain" > >> >>> you'll see a period of about 2 seconds. And lo and behold, > >> >>> 2*pi*tau (the lag) = period! That is very satisfying. > >> >>> > >> >>> Estimating the needed gain (proportional term) from the step > >> >>> response, didn't work out that well in this case. But I'm running > >> >>> at gains that are ~20% the ultimate gain, so oscillation method > >> >>> didn't work all that well either in this regard. > >> >>> > >> >>> > >> >>> Oh I do have one question for Tim. > >> >>> You show a thermal control loop with just integrating control. > >> >>> Does this really work? (I would have thought it would just > >> >>> oscillate.) > >> >>> Or do you have a little bit of proportional term in there? > >> >> > >> >> If you keep a firm lid on your ambitions, certainly. For most > >> >> systems you won't get nearly the speed you'd get with some > >> >> proportional action or even proportional + derivative -- but any > >> >> system that has a flat gain characteristic going down to zero > >> >> frequency can be controlled with just an integrator, if you're > >> >> patient. > >> >> > >> >> The one thermal loop that I've done had a simple first-order > >> >> response well beyond any reasonable loop bandwidth. So it got a > >> >> simple PI controller and worked just grand. > >> > Huh, OK I'll have to try, the loss is in the delay/lag? > >> > This thermal loop is fast, (at least for me) > >> > so ten seconds is no problem. > >> > >> I get starting points for thermal loops by looking at the open-loop > >> step response. In small systems it's usually well approximated by a > >> time delay cascaded with an integrator. Thus the plant's transfer > >> function is approximately > >> > >> H_plant(f) ~ (1/j 2 pi f tau_I) exp(-j 2 pi f tau_delay) > > Right, I went looking for a pulse response with "your" > > delay*RC time constant, model in mind. > > Seem's like Z-N did it before we were born... which I love. > > They also give a guess at the gain, from the pulse response. > > > > > >> Then I do the usual frequency-compensation thing, aiming for about a > >> 60-degree phase margin. If the system is reasonably well insulated, > >> the effect of the heat leak is usually small enough to ignore for > >> frequency compensation purposes, but if it isn't, you need to move the > >> pole from zero out to (j 2 pi f tau_leak). > > Huh, Phil, lots of the time you're talking over my head, > > (or at least not where my head is at the moment.) > > > > I'm not sure where 60 degree's is, but I look at the set point step > > response and lower the gain if there's not too much ringing. > > Say a Q of 1-2. (probably closer to one, and then in production each > > unit is a bit different.) > > You need to learn frequency-domain tuning. Just looking at the time > domain response is not a reliable way to get the best response and a > known loop robustness.
Grin, right. (There are bucket loads of things I need to learn.) You do a frequency sweep with the loop closed? Do you have a video showing that? :^) Once you know what you are doing (I'm not claiming that *I* know.) Doesn't the step response (I'm thinking closed loop) contain the same information as a frequency sweep? George H.
> > -- > > Tim Wescott > Wescott Design Services > http://www.wescottdesign.com > > I'm looking for work -- see my website!