Go to Post Honestly, no one at a FIRST competition is gonna judge you. Chances are, there are least 20 people dorkier than you. - JohnnyB [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Spotlight this post!  
Unread 27-12-2016, 12:21
sspoldi's Avatar
sspoldi sspoldi is offline
Steven Spoldi
AKA: Steve Spoldi
FRC #0230 (Gaelhawks)
Team Role: Mentor
 
Join Date: Mar 2010
Rookie Year: 2008
Location: Shelton, CT
Posts: 15
sspoldi is a splendid one to beholdsspoldi is a splendid one to beholdsspoldi is a splendid one to beholdsspoldi is a splendid one to beholdsspoldi is a splendid one to beholdsspoldi is a splendid one to behold
Re: Drivetrain PID tuning

Quote:
Originally Posted by ollien View Post
Today, I was encouraging my rookie programmers to utilize the NavX to experiment with PID Control in order to make our robot drive straight. Given that we've never done this in a season, one of the things that crossed my mind is how we should deal with the differences in CoFs between our lab's carpet and that of a true to life field. What have other teams done to account for this? Have you guys just purchased carpet, and just calibrated it on that? What would you use to re-tune your loop at competition?

Thanks so much!
We have never needed to re-tune for a change in carpet. Our typical heading stabilization is a PI controller for angular rate via gyro to stabilize heading. We tune via the following:

1.We do a quick system id on the yaw axis
a. Apply a moderate amplitude yaw step
(usually 1/2 max input on whatever yaw command input you have)
b. Model the angular rate output with the equation
rate = input*k*(1 - exp(-t/tau))

2. design a controller using the following architecture;
error = (yaw_cmd - yaw_rate)
motor_cmd = PID(error, Kp, Ki, Kd)
where:
Kp = gain/K*tau
Ki = gain/K
Kd = 0
gain = 5 to 10 (arbitrary, desired bandwith in rad/sec);

3. Vary gain to get the command response you want. We start at 10, and if it's too sluggish bump it up, if it oscillates or limit cycles (bounces back and forth due to backlash) we back it off.

Sorry for the terse explanation, but that's pretty much it. We do all our own code, so the PI controller is just written into the yaw service function. Sorry I don't have the code right now, but I can find it.

Cheers,
Steve.
Reply With Quote
 


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 08:48.

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