|
Re: Programming Issues with Crab Drive System
Also, when adjusting the tuning, it's helpful to really understand what each parameter is for.
P's job is to get the motor moving to the target. It does most of the work. The higher the P, the faster it will go. If P is too high, it will overshoot (go past where it is supposed to go.
D's job is to slow it down as it gets where it is going. If you have overshoot (or oscillation) a little more D will help dampen it out. In most systems, D is between 0.01 to 0.1 times P, but can often be 0.
I's job is to correct any small error left at the end of the move. These are for the cases where the motor is /almost/ in the right place, so P can't help. I will eventually build up and nudge the motor the last little bit. In most systems, I is between 0.01 to 0.1 times D, but can often be 0.
VFF (feed forward) is a kick to get the motor moving faster at the beginning of the move. Think of it as getting a head start of moving the right direction before the final target is known. Many PID systems on CNC machines use this.
Friction gain is simple power assist. It overcomes the minimum power needed to get the motor moving, so the PID can just focus on the position control. It's usually not needed unless friction is accounting for a significant percentage of the power needed to move the motor.
Also, I would recommend tuning the two sides separately. Ideally they are identical, but if they aren't having the ability to tune them individually could keep you with a running robot in a pinch. The main goal is that they have the same /response/ which is that they react to a control signal in the same amount of time and move the same amount. Sometimes one side will need more P than the other (i.e. if the CG of the robot is not centered between them), or more I (if you have a bad bearing or one motor is not as well greased as the other)
__________________
Student FRC23 (1996-1999), Mentor FRC246 (2000), Mentor FRC1318 (2007-2009), Mentor FRC93 (2011), Mentor FRC2151 (2012), Mentor FRC23 (2013), Mentor FRC4761 (2014-2017)
1998 - National Chairman's Award and Woodie Flowers Award (FRC23, Mike Bastoni ) | 2007 - PNW SF (488, 1595) | 2008 - Oregon RCA - Seattle #2 Seed, SF (488, 1696) | 2009 - Oregon #1 Seed, Winners (1983, 2635) - Seattle SF (945, 2865) - Galileo #2 Seed, SF (973, 25) | 2012 Midwest F (111, 71) | 2014 RIDE Winners (78, 125), Inspector - NEU #24, QF (3479, 3958) - NECMP #35 | 2015 Reading #11, SF (1058, 190), Inspector - RIDE #17, QF(4055, 5494), Inspector - NECMP #57 | 2016 Reading #4, SF (133, 4474), DCA, Inspector - Ride #22, SF (1735, 2067), Creativity, Inspector - NECMP #48, RCA - Archimedes
|