In high-performance robotics control systems, feedforward models the dominant voltage requirements from system physics, while feedback control corrects for unmodeled disturbances and tracking error.
Feedback control is inherently reactive: it cannot apply motor voltage until a tracking error has already occurred (). Feedforward control is predictive: based on desired target velocity, acceleration, and mechanism position, physics dictates the required electrical voltage.
V_output = V_feedforward(v, a, θ) + V_feedback(e)(Where feedforward typically accounts for 90% to 95% of output voltage, and feedback provides 5% to 10%)
Test the physical difference between feedforward and feedback in the PID & Feedforward Simulator by running the Untuned Elevator vs Tuned Elevator presets.
Four Feedforward Gains
Section titled “Four Feedforward Gains”1. (Static Friction Voltage)
Section titled “1. kSkSkS (Static Friction Voltage)”- Units: Volts ()
- Physical Meaning: The minimum voltage required to break Coulomb static friction in the gearbox, bearings, and bushings to initiate movement.
- Directionality: Always applied in the direction of intended motion: .
2. (Velocity Feedforward)
Section titled “2. kVkVkV (Velocity Feedforward)”- Units: Volts per unit velocity (, , or )
- Physical Meaning: The voltage required to sustain steady-state cruise velocity against motor back-electromotive force (back-EMF).
- Formula:
kV ≈ 12V / (Free Speed of Mechanism).
3. (Acceleration Feedforward)
Section titled “3. kAkAkA (Acceleration Feedforward)”- Units: Volts per unit acceleration ( or )
- Physical Meaning: The voltage required to accelerate mechanism mass according to Newton’s second law (, ).
4. (Gravity Compensation)
Section titled “4. kGkGkG (Gravity Compensation)”- Units: Volts ()
- Physical Meaning: The continuous voltage required to hold mechanism mass stationary against gravity.
- Elevators vs. Arms:
- Linear Elevators: Gravity is constant regardless of height:
V_G = kG - Single-Jointed Rotating Arms: Gravity torque varies with the cosine of the horizontal angle :
V_G = kG · cos(θ)
- Linear Elevators: Gravity is constant regardless of height:
Bench Calibration Procedure
Section titled “Bench Calibration Procedure”To calibrate feedforward on a live mechanism:
- Find : Slowly ramp open-loop voltage by 0.05V increments until the mechanism starts moving. The voltage where motion initiates is .
- Find : Spin the mechanism at a known constant velocity (for example, 50 rotations/sec). Measure the applied voltage in Tuner X. Subtract :
kV = (V_measured - kS) / v_measured - Find : For an arm or elevator, find the voltage where the mechanism balances horizontally without falling or climbing. That value is .
CTRE Phoenix 6 allows configuring directly into Slot0Configs, executing onboard at 1 kHz without roboRIO latency:
Slot0Configs slot0 = new Slot0Configs();slot0.kS = 0.25; // 0.25V to overcome frictionslot0.kV = 0.12; // 0.12V per rot/sslot0.kG = 0.40; // 0.40V to hold against gravityTest how balancing eliminates steady-state droop in our Interactive PID & Feedforward Simulator.
Verified Sources & Standards
- WPILib Feedforward Control Physics & Tuningdocs.wpilib.orgWPILib Standard