Rather than guess feedforward constants, you can measure them. WPILib's SysId (System Identification) tool runs your mechanism through controlled tests, records data, and computes kS, kV, kA, (kG for arms/elevators), and starting PID gains.
How SysId works#
SysId runs four tests, each forward and backward (reverse):
- Quasistatic: the mechanism is sped up very slowly so acceleration is negligible — this isolates kS and kV.
- Dynamic: a constant 'step' voltage is applied so the mechanism accelerates — this reveals kA.
During each test SysId logs voltage, position, and velocity. It then fits these to the feedforward model to extract the constants. Because the fit uses real data from your robot, the numbers reflect your actual friction, gearing, and mass.
The modern workflow#
In current WPILib you create a SysIdRoutine in your subsystem. You give it a way to apply a voltage and a logging callback that records the motor's voltage, position, and velocity, then bind the four test commands (quasistatic-forward/reverse, dynamic-forward/reverse) to buttons:
SysIdRoutine routine = new SysIdRoutine(
new SysIdRoutine.Config(),
new SysIdRoutine.Mechanism(
voltage -> motor.setVoltage(voltage.in(Volts)),
log -> log.motor("arm")
.voltage(appliedVolts)
.angularPosition(positionRad)
.angularVelocity(velocityRadPerSec),
this));
The Config lets you set the quasistatic ramp rate, the dynamic step voltage, and a timeout so a mechanism does not run into its hard stop. CTRE's Phoenix 6 integrates with SysId as well, logging via signals for Talon FX systems.
Safety and good practice#
- Give the mechanism room to run, and set a short timeout; for limited-travel arms/elevators use a small ramp/step so it does not slam a hard stop.
- Run each test and stop before the mechanism reaches its limit.
- Load the resulting log into the SysId analyzer, pick the correct mechanism type (Simple, Arm, or Elevator) so kG is computed correctly, and confirm the fit looks clean (a good R-squared).
- Treat the PID gains SysId suggests as a starting point, then fine-tune with the methodology from the earlier lesson.
SysId turns control tuning from guesswork into measurement, which is the difference between a robot that occasionally works and one that repeats the same shot all match.
the part worth keeping
Key takeaways
- SysId runs quasistatic (isolates kS/kV) and dynamic (reveals kA) tests, forward and reverse, on your real robot.
- Modern WPILib uses a SysIdRoutine that applies voltage and logs voltage/position/velocity; Phoenix 6 integrates too.
- Pick the right mechanism type (Simple/Arm/Elevator) so kG is correct, and treat suggested PID gains as a starting point.
Programming, Controls & SensorsClosed-Loop Control: PID, Feedforward, and SysIdlesson 4 of 4
Keep going
Take the quiz+10 XP with an accountMore in Closed-Loop Control: PID, Feedforward, and SysId
where this came from
Sources and corrections
This lesson is AI-assisted: drafted from primary sources, then reviewed and edited by hand. Errors still get through. When one is reported we fix it and write down what changed, in public, in the corrections log.
sources and further reading
- docs.wpilib.orgWPILib: Creating an Identification Routine (SysId)
- docs.wpilib.orgWPILib: Introduction to System Identification
- v6.docs.ctr-electronics.comPhoenix 6: SysId integration
clipped to this lesson
Articles that go further on this
The lesson gets you through the topic. These go wider on it, and they read in one sitting.
- 16 min readFRC Elevator and Arm Design: Staging, Rigging, Motors, Gravity, and SafetyA primary-source FRC guide to designing elevators and arms: cascade vs continuous rigging, staging, motor and gear-ratio sizing, gravity math, and safe holding./blogread it
- 8 min readThe FRC Software Toolbox: Driver Station, Dashboards, AdvantageScope & SysIdA beginner-friendly tour of the FRC software ecosystem beyond robot code: Driver Station, dashboards (Glass, Elastic, AdvantageScope), SysId, and vendor tools./blogread it
- 19 min readAdvantageScope: Logging and Reviewing FRC Robot DataLearn AdvantageScope, the free FRC tool for logging and reviewing robot data: connect live NetworkTables, open WPILOG and DS logs, and debug with every tab./blogread it
answer sheet
Lesson quiz
All 3 right completes the lesson. Miss one and only that question comes back, anything you already answered correctly stays banked.
0 of 3 answered
01In a SysId routine, what characterizes the quasistatic test?
02What is the purpose of the dynamic (step) test in SysId?
03How should the PID gains produced by SysId be treated?
Answer every question to submit.
All 51 lessons in Programming, Controls & Sensorsopenclose
01 / prerequisites
02 / foundations-tools-and-first-program
03 / robot-program-and-command-based
04 / motors-and-control
05 / autonomous-trajectories-simulation
06 / sensing-fundamentals
07 / encoders
08 / gyros-imus-orientation
09 / closed-loop-control
10 / vision-pose-estimation
11 / worked-examples-mini-projects
- Not read yet:Mini-Project: A Closed-Loop Elevator with Motion Magic
- Not read yet:Mini-Project: A Velocity-Controlled Shooter on REVLib
- Not read yet:Mini-Project: A Teleop Swerve Drive Subsystem
- Not read yet:Mini-Project: An Autonomous Routine with PathPlanner
- Not read yet:Mini-Project: Vision-Aligned Scoring with Limelight
12 / common-mistakes-troubleshooting
13 / advanced-techniques-case-studies
- Not read yet:State-Space Control and Kalman Filtering
- Not read yet:Log Replay Architecture with AdvantageKit
- Not read yet:Advanced Pose Estimation: Multi-Tag Fusion and Standard Deviations
- Not read yet:Robot Coordination, Alerts, and Operator Feedback
- Not read yet:Case Study: Hardening Software Before an Event