Go to Post FRC isn't all of FIRST. - Rich Kressly [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
  #26   Spotlight this post!  
Unread 12-31-2016, 12:26 PM
thatprogrammer's Avatar
thatprogrammer thatprogrammer is online now
Registered User
AKA: Ahad Bawany
no team (None)
Team Role: Programmer
 
Join Date: Apr 2014
Rookie Year: 2014
Location: Florida
Posts: 603
thatprogrammer has a reputation beyond reputethatprogrammer has a reputation beyond reputethatprogrammer has a reputation beyond reputethatprogrammer has a reputation beyond reputethatprogrammer has a reputation beyond reputethatprogrammer has a reputation beyond reputethatprogrammer has a reputation beyond reputethatprogrammer has a reputation beyond reputethatprogrammer has a reputation beyond reputethatprogrammer has a reputation beyond reputethatprogrammer has a reputation beyond repute
Re: Drivetrain PID tuning

Quote:
Originally Posted by AustinSchuh View Post
If you've got a bunch of friction, you end up needing to slow things down a bit. Friction is a pain to deal with. You also need to ask yourself really how accurate you need to be. If you can tolerate moderate steady state error, leave it as a PD loop. As the robot goes faster, it takes less energy to get it to steer, which works in your favor. If you really need good tracking, you are going to have to work at tuning I correctly.

Consider running in low gear if you have a transmission so friction is a smaller portion of your overall torque. The most annoying steering loop I tuned was 254's 2011 robot, geared for crazy speeds. We needed to run auto in high gear too, which meant we were close to saturation all the time
Thanks for this advice! I'll make sure to look into running robots in low gear for turning in auto if needed


Quote:
Run your loops at 100 - 200 hz. You want to run your loops at 10x the frequency of the highest frequency you want to control. So, if you want to control at 10 hz, you need a 100 hz loop. The more reliable you can get your loop timing, the better. We go to great lengths to hit a 5 ms +- 5% loop timing, and it helps a lot.
On my old team, we used 254's looper code to run every loop we wanted to use closed control on at 5ms. We found this made our intake PD tuning much simpler (we originally couldn't get it to work at 20ms).

Quote:
The most important part here is to plot everything. Plot your error vs time, and watch it evolve. Plot the power due to P, I, D, FF. Plot the encoder based heading and the gyro based heading. It's possible but hard to tune these things by eye. Honestly, sometimes I think it's easier to rough tune them by listening to them and listening for the overshoot, and then reaching for the plots when I'm stuck. I also like to grab it and feel the loop, though you have to be very careful since robots can cause lots of damage fast.
Considering how fast 971's robots and their mechanism tend to be geared, I hope you lower your gains a lot before you do that
__________________
Takin' a break.
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 07:56 PM.

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