Forums

Video on tuning PID controllers

Started by Tim Wescott July 6, 2016
Yet another video on tuning PID controllers has been tossed into the 
YouTube pool.
​
https://youtu.be/drYO60z6_h4

-- 

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

I'm looking for work -- see my website!
On Wednesday, July 6, 2016 at 8:44:10 PM UTC-4, Tim Wescott wrote:
> Yet another video on tuning PID controllers has been tossed into the > YouTube pool. > ​
around 18:00 you speak about setting the P gain to 1% of D gain and set it to 2 / 2000 which is 0.1% not 1%?? otherwise very good. M
On Thu, 07 Jul 2016 07:34:42 -0700, makolber wrote:

> On Wednesday, July 6, 2016 at 8:44:10 PM UTC-4, Tim Wescott wrote: >> Yet another video on tuning PID controllers has been tossed into the >> YouTube pool. >> ​ > > around 18:00 you speak about setting the P gain to 1% of D gain and set > it to 2 / 2000 which is 0.1% not 1%?? > > otherwise very good. > > M
Blargh! I should never, ever, try to do math in my head for the final version of anything. I get all the advanced stuff right, and then lose track of the radix point, or flip a sign, or do some other simple thing wrong. -- 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 Thursday, July 7, 2016 at 11:51:16 AM UTC-4, Tim Wescott wrote:
> On Thu, 07 Jul 2016 07:34:42 -0700, makolber wrote: > > > On Wednesday, July 6, 2016 at 8:44:10 PM UTC-4, Tim Wescott wrote: > >> Yet another video on tuning PID controllers has been tossed into the > >> YouTube pool. > >> ​ > > > > around 18:00 you speak about setting the P gain to 1% of D gain and set > > it to 2 / 2000 which is 0.1% not 1%?? > > > > otherwise very good. > > > > M > > Blargh! I should never, ever, try to do math in my head for the final > version of anything. I get all the advanced stuff right, and then lose > track of the radix point, or flip a sign, or do some other simple thing > wrong. > > --m
well I would consider my comment a nit pick except that i was trying to glean the correct rule of thumb. As a rule of thumb, should the P gain be 1% (or 0.1%) of the D gain? or is the thumb too coarse a measure?
On Thu, 07 Jul 2016 09:17:59 -0700, makolber wrote:

> On Thursday, July 7, 2016 at 11:51:16 AM UTC-4, Tim Wescott wrote: >> On Thu, 07 Jul 2016 07:34:42 -0700, makolber wrote: >> >> > On Wednesday, July 6, 2016 at 8:44:10 PM UTC-4, Tim Wescott wrote: >> >> Yet another video on tuning PID controllers has been tossed into the >> >> YouTube pool. >> >> ​ >> > >> > around 18:00 you speak about setting the P gain to 1% of D gain and >> > set it to 2 / 2000 which is 0.1% not 1%?? >> > >> > otherwise very good. >> > >> > M >> >> Blargh! I should never, ever, try to do math in my head for the final >> version of anything. I get all the advanced stuff right, and then lose >> track of the radix point, or flip a sign, or do some other simple thing >> wrong. >> >> --m > > well I would consider my comment a nit pick except that i was trying to > glean the correct rule of thumb. > > As a rule of thumb, should the P gain be 1% (or 0.1%) of the D gain? or > is the thumb too coarse a measure?
The rule of thumb is that you need to pick something and try it. Endlessly shivering on the brink won't get the job done. You'll find out how good it is when the metal meets the road. It really depends more on how fast the sampling rate is compared to the ultimate capability of the system -- I suppose I should have worked that in there, but I always just pick a number, and make sure that nothing (machine or human) will get broken if it's way too big. -- 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
Tim Wescott <tim@seemywebsite.com> Wrote in message:
> On Thu, 07 Jul 2016 09:17:59 -0700, makolber wrote: > >> On Thursday, July 7, 2016 at 11:51:16 AM UTC-4, Tim Wescott wrote: >>> On Thu, 07 Jul 2016 07:34:42 -0700, makolber wrote: >>> >>> > On Wednesday, July 6, 2016 at 8:44:10 PM UTC-4, Tim Wescott wrote: >>> >> Yet another video on tuning PID controllers has been tossed into the >>> >> YouTube pool. >>> >> ? >>> > >>> > around 18:00 you speak about setting the P gain to 1% of D gain and >>> > set it to 2 / 2000 which is 0.1% not 1%?? >>> > >>> > otherwise very good. >>> > >>> > M >>> >>> Blargh! I should never, ever, try to do math in my head for the final >>> version of anything. I get all the advanced stuff right, and then lose >>> track of the radix point, or flip a sign, or do some other simple thing >>> wrong. >>> >>> --m >> >> well I would consider my comment a nit pick except that i was trying to >> glean the correct rule of thumb. >> >> As a rule of thumb, should the P gain be 1% (or 0.1%) of the D gain? or >> is the thumb too coarse a measure? > > The rule of thumb is that you need to pick something and try it. > Endlessly shivering on the brink won't get the job done. You'll find out > how good it is when the metal meets the road. > > It really depends more on how fast the sampling rate is compared to the > ultimate capability of the system -- I suppose I should have worked that > in there, but I always just pick a number, and make sure that nothing > (machine or human) will get broken if it's way too big. >
Fiddling with things until they work is just so unsatisfiying. I want to solve a set of seven coupled nonlinear PDEs and then have it work perfectly first time thanks to my super smart math skills -- ----Android NewsGroup Reader---- http://usenet.sinaapp.com/
On Fri, 08 Jul 2016 08:45:25 -0400, bitrex wrote:

> Tim Wescott <tim@seemywebsite.com> Wrote in message: >> On Thu, 07 Jul 2016 09:17:59 -0700, makolber wrote: >> >>> On Thursday, July 7, 2016 at 11:51:16 AM UTC-4, Tim Wescott wrote: >>>> On Thu, 07 Jul 2016 07:34:42 -0700, makolber wrote: >>>> >>>> > On Wednesday, July 6, 2016 at 8:44:10 PM UTC-4, Tim Wescott wrote: >>>> >> Yet another video on tuning PID controllers has been tossed into >>>> >> the YouTube pool. >>>> >> ? >>>> > >>>> > around 18:00 you speak about setting the P gain to 1% of D gain and >>>> > set it to 2 / 2000 which is 0.1% not 1%?? >>>> > >>>> > otherwise very good. >>>> > >>>> > M >>>> >>>> Blargh! I should never, ever, try to do math in my head for the >>>> final version of anything. I get all the advanced stuff right, and >>>> then lose track of the radix point, or flip a sign, or do some other >>>> simple thing wrong. >>>> >>>> --m >>> >>> well I would consider my comment a nit pick except that i was trying >>> to glean the correct rule of thumb. >>> >>> As a rule of thumb, should the P gain be 1% (or 0.1%) of the D gain? >>> or is the thumb too coarse a measure? >> >> The rule of thumb is that you need to pick something and try it. >> Endlessly shivering on the brink won't get the job done. You'll find >> out how good it is when the metal meets the road. >> >> It really depends more on how fast the sampling rate is compared to the >> ultimate capability of the system -- I suppose I should have worked >> that in there, but I always just pick a number, and make sure that >> nothing (machine or human) will get broken if it's way too big. >> >> > Fiddling with things until they work is just so unsatisfiying. I > want to solve a set of seven coupled nonlinear PDEs and then have it > work perfectly first time thanks to my super smart math skills
Yes. Several dozens of videos down the road I hope to equip people to do just that. Of course, when you try it in real life you find out that no matter how smart you are, there's always unmodelled features of the system that you missed, requiring you to cycle through measuring and re-doing your equations and re-testing to find the next thing you missed. So you end up fiddling with things until they work no matter what -- but it can be done in a much more intelligent and guided way than just twisting knobs. -- 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 Wednesday, July 6, 2016 at 8:44:10 PM UTC-4, Tim Wescott wrote:
> Yet another video on tuning PID controllers has been tossed into the > YouTube pool. > &#8203; > https://youtu.be/drYO60z6_h4 > > -- > > Tim Wescott > Wescott Design Services > http://www.wescottdesign.com > > I'm looking for work -- see my website!
Huh, I'm far from a control expert. And I come at it from an analog point of view. (Zeigler- Nichols (sp) tuning method) So I think first of an overall system gain. Sometimes just gain (proportional) is enough. If not, then I turn to the integral for more of the gain, and the proportional term starts to look like the damping on the integral gain. Finally the derivative term may can help speed things up when there are quick changes... (I have done a P+D thing.... it was easy to see the derivative gain vs noise trade off. ) Will you reconcile our different "world views" in upcoming installments? I assume the derivative band limit is the same as rolling off the derivative gain at high frequency. One thing I'd like to see on the video is a display (computer or 'scope) of the set point, signal, error signal and output (to plant) on the screen. For me that would help a lot in judging "performance" (over shoot vs. oscillations.) I've got a control system like your balanced arm. And I'd like to make the thing faster.... able to withstand bigger disturbances. George H.
On 7/8/2016 4:46 PM, George Herold wrote:
> On Wednesday, July 6, 2016 at 8:44:10 PM UTC-4, Tim Wescott wrote: >> Yet another video on tuning PID controllers has been tossed into the >> YouTube pool. >> &#8203; >> https://youtu.be/drYO60z6_h4 >> >> -- >> >> Tim Wescott >> Wescott Design Services >> http://www.wescottdesign.com >> >> I'm looking for work -- see my website! > > Huh, I'm far from a control expert. > And I come at it from an analog point of view. > (Zeigler- Nichols (sp) tuning method) > So I think first of an overall system gain. > Sometimes just gain (proportional) is enough. > > If not, then I turn to the integral for more of the gain, > and the proportional term starts to look like the damping > on the integral gain. > > Finally the derivative term may can help speed things up when there > are quick changes... (I have done a P+D thing.... it was easy to see the > derivative gain vs noise trade off. ) > > Will you reconcile our different "world views" in upcoming installments? > > I assume the derivative band limit is the same as rolling off the derivative gain at > high frequency. > > One thing I'd like to see on the video is a display (computer or 'scope) > of the set point, signal, error signal and output (to plant) on the screen. > For me that would help a lot in judging "performance" (over shoot vs. > oscillations.) > > > I've got a control system like your balanced arm. And I'd like > to make the thing faster.... able to withstand bigger disturbances. > > George H. >
Would you be interested in an LTSpice PID circuit that you can play around with all the settings and see what happens?
On Friday, July 8, 2016 at 11:05:19 PM UTC-4, John S wrote:
> On 7/8/2016 4:46 PM, George Herold wrote: > > On Wednesday, July 6, 2016 at 8:44:10 PM UTC-4, Tim Wescott wrote: > >> Yet another video on tuning PID controllers has been tossed into the > >> YouTube pool. > >> &#8203; > >> https://youtu.be/drYO60z6_h4 > >> > >> -- > >> > >> Tim Wescott > >> Wescott Design Services > >> http://www.wescottdesign.com > >> > >> I'm looking for work -- see my website! > > > > Huh, I'm far from a control expert. > > And I come at it from an analog point of view. > > (Zeigler- Nichols (sp) tuning method) > > So I think first of an overall system gain. > > Sometimes just gain (proportional) is enough. > > > > If not, then I turn to the integral for more of the gain, > > and the proportional term starts to look like the damping > > on the integral gain. > > > > Finally the derivative term may can help speed things up when there > > are quick changes... (I have done a P+D thing.... it was easy to see the > > derivative gain vs noise trade off. ) > > > > Will you reconcile our different "world views" in upcoming installments? > > > > I assume the derivative band limit is the same as rolling off the derivative gain at > > high frequency. > > > > One thing I'd like to see on the video is a display (computer or 'scope) > > of the set point, signal, error signal and output (to plant) on the screen. > > For me that would help a lot in judging "performance" (over shoot vs. > > oscillations.) > > > > > > I've got a control system like your balanced arm. And I'd like > > to make the thing faster.... able to withstand bigger disturbances. > > > > George H. > > > > Would you be interested in an LTSpice PID circuit that you can play > around with all the settings and see what happens?
No , but thanks. I've tried spicing control circuits and it's mostly unsatisfying. The PID part is easy, getting a model for the plant and sensor and coupling (delays) is a pain. For the problem I'm thinking about the plant is a piezo stack that controls the wavelength of a laser. (by changing the angle of an optical grating.) Besides having a maximum speed at which it can move, it also has hysteresis. (It's really not that important, what I've done works... but I always wonder if I can make it better.) I'd look into any good book recommendations. Control is such a wide subject. George H.