View Single Post
  #11   Spotlight this post!  
Unread 12-07-2016, 07:20 PM
Oblarg Oblarg is offline
Registered User
AKA: Eli Barnett
FRC #0449 (The Blair Robot Project)
Team Role: Mentor
 
Join Date: Mar 2009
Rookie Year: 2008
Location: Philadelphia, PA
Posts: 1,047
Oblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond repute
Re: Velocity PID(F) Best Practices - To Integrate, or Not To Integrate?

Quote:
Originally Posted by Bryce2471 View Post
Great data. Thanks for that contribution. I have a couple questions:
How long did you wait between shots?
How much was the steady state error effected when you changed the set point.
How much time, or how many iterations did you spend tuning the Kf value? How about Kp?

Thanks again.
1) We didn't time this precisely, but it was on the order of 10 seconds.
2) We haven't rigorously tested this yet, will report back once we have data
3) We tested our flywheel speed at max voltage, and then simply naively set Kf to (max output)/(max speed). We did not test across multiple battery voltages or setpoints - if anyone has suggestions for a good systematic way to do this, it'd be appreciated.
4) We started Kp pretty small and then doubled it until we started to see oscillations, at which point we set it to halfway between that and the previous value. There were a couple more iterations after that, I think, but I don't recall exactly how many.

All in all, it was a pretty "rough" tuning procedure - we were mostly interested in getting it working, with the understanding that we can fine-tune it later.

Quote:
Originally Posted by Jared Russell View Post
We didn't use integral gain, but we did use some derivative gain to lessen the initial overshoot, and a 36V/s rate limit to smooth things out a bit:
https://github.com/Team254/FRC-2016-...ants.java#L152

(Talons were in coast mode as well)

We allowed firing whenever our flywheel was within 100rpm (1.67rps) of our setpoint because we found it made no practical difference to our shot trajectory. In practice, most shots we took were within 20rpm of our setpoint. If you are within .1rps (6rpm) steady-state, I'd say you're already in good shape.
Thanks a bunch for all of your input - it's greatly appreciated. I'll add these to the list of things to try.

Hopefully we'll find some time to sit down and really play with different tuning schemes, and record the data.
__________________
"Mmmmm, chain grease and aluminum shavings..."
"The breakfast of champions!"

Member, FRC Team 449: 2007-2010
Drive Mechanics Lead, FRC Team 449: 2009-2010
Alumnus/Technical Mentor, FRC Team 449: 2010-Present
Lead Technical Mentor, FRC Team 4464: 2012-2015
Technical Mentor, FRC Team 5830: 2015-2016

Last edited by Oblarg : 12-07-2016 at 07:25 PM.
Reply With Quote