Go to Post It's not pink enough, I don't beleive it! :p - Lil' Lavery [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 21-01-2012, 16:38
rbtying rbtying is offline
Team 846 Chief Software
AKA: Robert Ying
FRC #0846 (Funky Monkeys)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2011
Location: San Jose, CA
Posts: 9
rbtying is an unknown quantity at this point
Tuning PID Parameters

So I just got back from a fairly long conversation about tuning PID parameters and other closed-loop control systems, and am wondering how most of you guys do it.

The key item of debate was whether or not it would be better to tune the P gain first (that is, start with I and D gains set to zero, as per the Ziegler-Nichols method), or to algorithmically relate P and I to D and a damping factor.
  #2   Spotlight this post!  
Unread 21-01-2012, 16:39
davidthefat davidthefat is offline
Alumni
AKA: David Yoon
FRC #0589 (Falkons)
Team Role: Alumni
 
Join Date: Jan 2011
Rookie Year: 2010
Location: California
Posts: 792
davidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud of
Re: Tuning PID Parameters

Easiest way: do both and find which works the best. I mean, it won't take more than 30 minutes...
__________________
Do not say what can or cannot be done, but, instead, say what must be done for the task at hand must be accomplished.
  #3   Spotlight this post!  
Unread 21-01-2012, 16:46
rbtying rbtying is offline
Team 846 Chief Software
AKA: Robert Ying
FRC #0846 (Funky Monkeys)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2011
Location: San Jose, CA
Posts: 9
rbtying is an unknown quantity at this point
Re: Tuning PID Parameters

Sadly, as a tradition, our team usually doesn't finish / assemble the robot 'till well after ship date, so our tuning tends to occur during 15-minute practice field runs.

It's thus a little difficult to test both xD.
  #4   Spotlight this post!  
Unread 21-01-2012, 16:49
davidthefat davidthefat is offline
Alumni
AKA: David Yoon
FRC #0589 (Falkons)
Team Role: Alumni
 
Join Date: Jan 2011
Rookie Year: 2010
Location: California
Posts: 792
davidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud of
Re: Tuning PID Parameters

Quote:
Originally Posted by rbtying View Post
Sadly, as a tradition, our team usually doesn't finish / assemble the robot 'till well after ship date, so our tuning tends to occur during 15-minute practice field runs.

It's thus a little difficult to test both xD.
LA Regional? I'll be there, I probably can help. Thursday does not count for anything and you pretty much have all day between inspection and all that.
__________________
Do not say what can or cannot be done, but, instead, say what must be done for the task at hand must be accomplished.
  #5   Spotlight this post!  
Unread 21-01-2012, 16:52
rbtying rbtying is offline
Team 846 Chief Software
AKA: Robert Ying
FRC #0846 (Funky Monkeys)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2011
Location: San Jose, CA
Posts: 9
rbtying is an unknown quantity at this point
Re: Tuning PID Parameters

Nah, we'll be at NYC first, and then SVR

And the question isn't so much whether or not we can do the tuning (we have in the past), but more whether or not there's a tangible benefit in the more complex derivative-based method.
  #6   Spotlight this post!  
Unread 21-01-2012, 16:54
davidthefat davidthefat is offline
Alumni
AKA: David Yoon
FRC #0589 (Falkons)
Team Role: Alumni
 
Join Date: Jan 2011
Rookie Year: 2010
Location: California
Posts: 792
davidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud of
Re: Tuning PID Parameters

Quote:
Originally Posted by rbtying View Post
Nah, we'll be at NYC first, and then SVR

And the question isn't so much whether or not we can do the tuning (we have in the past), but more whether or not there's a tangible benefit in the more complex derivative-based method.
Probably time, any way you do it, you will get the same constants ± a tiny fraction
__________________
Do not say what can or cannot be done, but, instead, say what must be done for the task at hand must be accomplished.
  #7   Spotlight this post!  
Unread 21-01-2012, 17:19
Tom Line's Avatar
Tom Line Tom Line is offline
Raptors can't turn doorknobs.
FRC #1718 (The Fighting Pi)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 1999
Location: Armada, Michigan
Posts: 2,513
Tom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond repute
Re: Tuning PID Parameters

We always start with P, because frankly, a well tuned "P" term can almost completely negate the need for I and D. In fact, we've never had to use an I or D term on any of our robots.
  #8   Spotlight this post!  
Unread 21-01-2012, 17:40
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,026
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Tuning PID Parameters

Quote:
Originally Posted by Tom Line View Post
We always start with P, because frankly, a well tuned "P" term can almost completely negate the need for I and D. In fact, we've never had to use an I or D term on any of our robots.
Have you used this method successfully with the built-in PID in the Jaguars for speed control?

  #9   Spotlight this post!  
Unread 21-01-2012, 17:52
apalrd's Avatar
apalrd apalrd is offline
More Torque!
AKA: Andrew Palardy (Most people call me Palardy)
VRC #3333
Team Role: College Student
 
Join Date: Mar 2009
Rookie Year: 2009
Location: Auburn Hills, MI
Posts: 1,347
apalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond repute
Re: Tuning PID Parameters

In the past two years, we never used an I or D term (except for a controller that was I only...)

For VRC this fall, on the Cortex controller, we worked with the Zeigler-Nichols method to get good PID gains for our arms. It worked really really well, as we calibrated with one game piece in, so the mass changes with none or two game pieces (most use cases in that game) wasn't very bad. After writing all of the spreadsheets to calculate the gains (and figuring out that the equations give you integral and derivative time instead of gain), I just did a data capture on the serial port, found some data in Excel (space delimited text FTW!), punched the gains back in, and it ran beautifully.

I've always manually found a good P-only gain anyway, so increasing kP until the system oscillates isn't very hard and doesn't take much time.
__________________
Kettering University - Computer Engineering
Kettering Motorsports
Williams International - Commercial Engines - Controls and Accessories
FRC 33 - The Killer Bees - 2009-2012 Student, 2013-2014 Advisor
VEX IQ 3333 - The Bumble Bees - 2014+ Mentor

"Sometimes, the elegant implementation is a function. Not a method. Not a class. Not a framework. Just a function." ~ John Carmack
  #10   Spotlight this post!  
Unread 21-01-2012, 18:17
plnyyanks's Avatar
plnyyanks plnyyanks is offline
Data wins arguments.
AKA: Phil Lopreiato
FRC #1124 (The ÜberBots), FRC #2900 (The Mighty Penguins)
Team Role: College Student
 
Join Date: Apr 2010
Rookie Year: 2010
Location: NYC/Washington, DC
Posts: 1,113
plnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond repute
Re: Tuning PID Parameters

Quote:
Originally Posted by apalrd View Post
In the past two years, we never used an I or D term (except for a controller that was I only...)
Same here, I can't remember a final application we had that used either an I or D term. We've played with all three terms in testing, but always found that a finely tuned P controller worked much better for our needs.

And when we tune our constants, we do use the Ziegler–Nichols method.
__________________
Phil Lopreiato - "It's a hardware problem"
Team 1124 (2010 - 2013), Team 1418 (2014), Team 2900 (2016)
FRC Notebook The Blue Alliance for Android
  #11   Spotlight this post!  
Unread 22-01-2012, 02:47
rbtying rbtying is offline
Team 846 Chief Software
AKA: Robert Ying
FRC #0846 (Funky Monkeys)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2011
Location: San Jose, CA
Posts: 9
rbtying is an unknown quantity at this point
Re: Tuning PID Parameters

Thanks for the responses--I'll bring them up in the next discussion we have. It's nice to know I'm not the only person using Z-N for tuning =)
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 09:20.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi