On Tue, 26 Apr 2016 00:30:18 -0700, Paul Rubin wrote:> Tim Wescott <tim@seemywebsite.com> writes: >> D'oh -- why, of course I'll include an appendix or something on how to >> do this with op-amps. It should have occurred to me immediately. > > Indeed I've been wondering whether this stuff was ever done with purely > analog electronics. I don't know how far back it goes historically but > I imagine quite a way. Optimal control is from the 1940s and I'd expect > PID to be much older? I'm clueless though.The first PID controllers, to my knowledge, were purely mechanical systems. The seminal papers were written in the 1860's, but they were to describe and analyze what had already been in use in industry. Pneumatic systems were a great innovation in the 1930's (or 20's, or teens). Electronics doing PID control is a johnny come lately. Here's Maxwell's paper (yes, James Clerk Maxwell of E&M fame). There was a Russian -- Tchebychev, I think. I can't remember who, nor have I found any papers. https://upload.wikimedia.org/wikipedia/commons/b/b1/On_Governors.pdf -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
PID Without a PhD, Finally
Started by ●April 14, 2016
Reply by ●April 26, 20162016-04-26
Reply by ●April 26, 20162016-04-26
On Thu, 14 Apr 2016 17:03:53 -0500, Tim Wescott <seemywebsite@myfooter.really> wrote:>Embedded Systems Design (or whatever they call themselves) kept moving >this around -- so I've revamped it, updated it, and posted it on the web. > >Take a gander. Please comment on anything you like/don't like. I'm not >sure if the way that I'm setting off the math is a Really Good Idea or a >Really Bad Idea -- I'm trying to make it easy for the math-averse to skip >over it, without breaking up the flow too much for folks who can read >math without breaking stride. > >http://wescottdesign.com/articles/pid/pidWithoutAPhd.pdfI think that PID control originated in the pneumatic controller days, before there were many (or any) PhDs in control theory. One story that I read suggests that the derivative term was discovered accidentally, the result of a leaky bellows or something. I designed a state-of-the-art digital boiler/throttle control system for the Navy's LHA helicopter assault ships. The Navy couldn't maintain it so they ripped it out and substituted pneumatics. -- John Larkin Highland Technology, Inc picosecond timing precision measurement jlarkin att highlandtechnology dott com http://www.highlandtechnology.com
Reply by ●April 26, 20162016-04-26
On Tue, 26 Apr 2016 11:12:45 -0700, John Larkin wrote:> On Thu, 14 Apr 2016 17:03:53 -0500, Tim Wescott > <seemywebsite@myfooter.really> wrote: > >>Embedded Systems Design (or whatever they call themselves) kept moving >>this around -- so I've revamped it, updated it, and posted it on the >>web. >> >>Take a gander. Please comment on anything you like/don't like. I'm not >>sure if the way that I'm setting off the math is a Really Good Idea or a >>Really Bad Idea -- I'm trying to make it easy for the math-averse to >>skip over it, without breaking up the flow too much for folks who can >>read math without breaking stride. >> >>http://wescottdesign.com/articles/pid/pidWithoutAPhd.pdf > > I think that PID control originated in the pneumatic controller days, > before there were many (or any) PhDs in control theory. One story that I > read suggests that the derivative term was discovered accidentally, the > result of a leaky bellows or something. > > I designed a state-of-the-art digital boiler/throttle control system for > the Navy's LHA helicopter assault ships. The Navy couldn't maintain it > so they ripped it out and substituted pneumatics.PID -- or at least PI -- control has been around longer than that: http://rspl.royalsocietypublishing.org/content/16/270.full.pdf+html -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
Reply by ●April 26, 20162016-04-26
On 04/26/2016 03:30 AM, Paul Rubin wrote:> Tim Wescott <tim@seemywebsite.com> writes: >> D'oh -- why, of course I'll include an appendix or something on how to do >> this with op-amps. It should have occurred to me immediately. > > Indeed I've been wondering whether this stuff was ever done with purely > analog electronics.Sure thing. About three weeks ago for me. ;) Cheers Phil Hobbs
Reply by ●April 26, 20162016-04-26
On Thu, 14 Apr 2016 19:09:26 -0400, DJ Delorie <dj@delorie.com> wrote:> >You leave out math but include C code, I think that's defeating the >purpose. If you can't explain it in non-technical words or a simple >picture... well, try harder :-) > >You spend only one page on tuning, and give no examples of "If you see >this, try this" which is much more useful to the practical user.Engineers tend to do Actuator = error * (Kp + Ki + Kd) whereas old-time analog controllers did Actuator = Kp * (1 + Ki + Kd) with the idea being that it's easier to tune on-site. -- John Larkin Highland Technology, Inc picosecond timing precision measurement jlarkin att highlandtechnology dott com http://www.highlandtechnology.com
Reply by ●April 26, 20162016-04-26
On 4/26/2016 8:07 PM, John Larkin wrote:> On Thu, 14 Apr 2016 19:09:26 -0400, DJ Delorie <dj@delorie.com> wrote: > >> >> You leave out math but include C code, I think that's defeating the >> purpose. If you can't explain it in non-technical words or a simple >> picture... well, try harder :-) >> >> You spend only one page on tuning, and give no examples of "If you see >> this, try this" which is much more useful to the practical user. > > > Engineers tend to do > > Actuator = error * (Kp + Ki + Kd) > > whereas old-time analog controllers did > > Actuator = Kp * (1 + Ki + Kd) > > with the idea being that it's easier to tune on-site.I think you mean, Actuator = error * Kp * (1 + Ki + Kd) In other words, the Ki and Kd terms were normalized to Kp. -- Rick C
Reply by ●April 26, 20162016-04-26
Paul Rubin wrote:> Tim Wescott <tim@seemywebsite.com> writes: >> D'oh -- why, of course I'll include an appendix or something on how to do >> this with op-amps. It should have occurred to me immediately. > > Indeed I've been wondering whether this stuff was ever done with purely > analog electronics. I don't know how far back it goes historically but > I imagine quite a way. Optimal control is from the 1940s and I'd expect > PID to be much older? I'm clueless though. >The first PID was used for steering ships and was mostly mechanical: http://www.pcbheaven.com/wikipages/PID_Theory/ -- Les Cargill
Reply by ●April 26, 20162016-04-26
John Larkin wrote:> On Thu, 14 Apr 2016 19:09:26 -0400, DJ Delorie <dj@delorie.com> wrote: > >> >> You leave out math but include C code, I think that's defeating the >> purpose. If you can't explain it in non-technical words or a simple >> picture... well, try harder :-) >> >> You spend only one page on tuning, and give no examples of "If you see >> this, try this" which is much more useful to the practical user. > > > Engineers tend to do > > Actuator = error * (Kp + Ki + Kd) >Uhhhhh... no. Actuator = (error * Kp) + ( filter1(sum(error)) * Ki ) + ( filter2(delta(error,lastError)) * Kd)> whereas old-time analog controllers did > > Actuator = Kp * (1 + Ki + Kd) > > with the idea being that it's easier to tune on-site. > >Because trimpots are awesome. -- Les Cargill
Reply by ●April 26, 20162016-04-26
Tim Wescott wrote:> On Tue, 26 Apr 2016 00:30:18 -0700, Paul Rubin wrote: > >> Tim Wescott <tim@seemywebsite.com> writes: >>> D'oh -- why, of course I'll include an appendix or something on how to >>> do this with op-amps. It should have occurred to me immediately. >> >> Indeed I've been wondering whether this stuff was ever done with purely >> analog electronics. I don't know how far back it goes historically but >> I imagine quite a way. Optimal control is from the 1940s and I'd expect >> PID to be much older? I'm clueless though. > > The first PID controllers, to my knowledge, were purely mechanical > systems. The seminal papers were written in the 1860's, but they were to > describe and analyze what had already been in use in industry. > > Pneumatic systems were a great innovation in the 1930's (or 20's, or > teens). > > Electronics doing PID control is a johnny come lately. > > Here's Maxwell's paper (yes, James Clerk Maxwell of E&M fame). There was > a Russian -- Tchebychev, I think. I can't remember who, nor have I found > any papers. > > https://upload.wikimedia.org/wikipedia/commons/b/b1/On_Governors.pdf >The writing on that is superb. Thanks for the link. -- Les Cargill
Reply by ●April 26, 20162016-04-26
rickman wrote:> On 4/26/2016 8:07 PM, John Larkin wrote: >> On Thu, 14 Apr 2016 19:09:26 -0400, DJ Delorie <dj@delorie.com> wrote: >> >>> >>> You leave out math but include C code, I think that's defeating the >>> purpose. If you can't explain it in non-technical words or a simple >>> picture... well, try harder :-) >>> >>> You spend only one page on tuning, and give no examples of "If you see >>> this, try this" which is much more useful to the practical user. >> >> >> Engineers tend to do >> >> Actuator = error * (Kp + Ki + Kd) >> >> whereas old-time analog controllers did >> >> Actuator = Kp * (1 + Ki + Kd) >> >> with the idea being that it's easier to tune on-site. > > I think you mean, > > Actuator = error * Kp * (1 + Ki + Kd) > > In other words, the Ki and Kd terms were normalized to Kp. >No, he didn't do that properly. Otherwise, there'd be no need for three Kx constants. The integrator term accumulates the error per sample by some law/filter and the Kd is multiplied by a filtered version of the difference between the error this sample and the error of the previous sample. Actuator = (error * Kp) + ( filter1(sum(error)) * Ki ) + ( filter2(delta(error,lastError)) * Kd) where the filters are very likely extremely stateful and not very filter-ey. Forms exist for continuous linear PID and they're about what you'd expect. -- Les Cargill







