CONTROLLER MODE
VELOCITY TRACKING
104520TARGETACTUAL
VOLTAGE OUTPUT
-12V0V12V
VELOCITY ERROR
-32032
FEEDFORWARD GAINS
FEEDBACK GAINS (PID)
SETPOINT PROFILE
UNDERSTANDING FEEDFORWARD
V = kS·sgn(v) + kV·v + kA·a
kS - Static Friction

Minimum voltage to overcome static friction and start moving. Applied as ±kS based on direction of motion.

kV - Velocity Gain

Voltage required to sustain a given velocity against back-EMF and friction. Dominant during cruise phase.

kA - Acceleration Gain

Extra voltage needed to accelerate the mechanism's inertia. Matters most during ramp-up/ramp-down.

Feedback Role

With good FF, feedback only corrects small residual errors - it doesn't have to do all the work, reducing oscillation.

How it Works

1. The Model

The simulator runs a motor plant with realistic back-EMF and static friction. Your feedforward constants predict the required voltage at each moment; feedback only corrects what's left over. Switch between FF Only, PID Only, and FF + PID to compare their tracking error directly.

2. Tuning Guide

  • kS: Voltage to overcome static friction. Start small — if the motor hesitates at rest, increase it.
  • kV: Voltage per unit/s of velocity. Tune this first — it's the dominant term during cruise.
  • kA: Voltage per unit/s² of acceleration. Helps during ramp-up/down; usually small.

3. The Equation

The feedforward output is calculated as:

V = kS·sgn(v) + kV·v + kA·a

Each term handles a different physical characteristic of your motor and mechanism.

4. FF vs PID

PID reacts to errors after they happen. Feedforward anticipates the required output. Used together, FF handles the steady-state load while PID corrects small residual errors — giving you fast, stable, low-oscillation control.

Want to implement this in code?

Our feedforward guide covers the full theory and provides a Java implementation compatible with the FTC SDK and Road Runner.

View Feedforward Guide →