Changes between Version 8 and Version 9 of MotorControl
- Timestamp:
- Feb 24, 2016, 1:20:16 PM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
MotorControl
v8 v9 39 39 * Integral (I): Power is increased/decreased in proportion to the average size and duration of the error: this accelerates movement towards the goal, increasing responsiveness, but increasing the tendency to overshoot goals (instability). 40 40 * Derivative (D): Power is increased/decreased in proportion to the rate at which the motor is approaching its goal (i.e. if the motor is not closing in fast enough, increase power, if it is closing in fast, decrease power); D increases stability by slowing the motor as it approaches its goal; this lets you increase P and I (responsiveness) without making the system unstable. 41 * FeedForward (F): Adds a constant to the output to keep it from going to zero41 * !FeedForward (F): Adds a constant to the output to keep it from going to zero 42 42 43 43 PID control loops are an important concept and the basics are explained in [https://en.wikipedia.org/wiki/PID_controller Wikipedia] and [http://www.expertune.com/tutor.aspx this tutorial] and [http://www.csimn.com/CSI_pages/PIDforDummies.html PID for Dummies]. You can implement a PID control loop using the Talon SRX; you should refer to the [https://www.ctr-electronics.com/Talon%20SRX%20Software%20Reference%20Manual.pdf Talon software manual] section 12.4 (page 75) for a detailed explanation of how to configure the Talon for PID control with Java example code. In cases where PID control can't be implemented via the TalonSRX (e.g. for a non-Talon-controlled motor or when the feedback mechanism can't connect to the Talon), the !RoboRio can also implement PID control using the PIDController and PIDSubsystem classes; see [https://wpilib.screenstepslive.com/s/4485/m/13809/l/241901-pidsubsystems-for-built-in-pid-control here] and [http://cntsoftware.com/robotics/pdf/WPILib_programming.pdf here], and [https://www.assembla.com/spaces/rbhsrobotics/documents/cS2tESqASr45PGacwqjQYw/download/cS2tESqASr45PGacwqjQYw# here].