Why characterize?#
Guessing PID gains is slow and fragile. Elite teams instead measure their mechanism's physics. The permanent-magnet DC motors in FRC closely obey the voltage-balance equation:
V = kS * sgn(v) + kV * v + kA * a (add + kG for gravity-loaded systems)
SysId, included with the WPILib installer, drives the mechanism through controlled test routines and regresses these constants from logged voltage/velocity/position data.
The four constants#
- kS (static): voltage to overcome friction/stiction. Nearly impossible to model, must be measured.
- kV (velocity): voltage to hold a given velocity, the dominant term.
- kA (acceleration): voltage to produce a given acceleration; matters during fast moves.
- kG (gravity): for arms/elevators, the voltage to counter gravity (cosine-scaled for arms).
The test routines#
SysId runs two kinds of tests in both directions:
- Quasistatic: voltage ramps slowly so acceleration ≈ 0, isolating kS and kV.
- Dynamic (step): a sudden voltage step, exciting acceleration to extract kA.
You wire your subsystem into a SysId routine, run quasistatic-forward, quasistatic-reverse, dynamic-forward, dynamic-reverse, then analyze the log.
Deploying the gains#
Drop the results into the matching feedforward (note the constructor order kS, kG, kV, kA for the gravity classes):
// Drive / flywheel
var ff = new SimpleMotorFeedforward(kS, kV, kA);
// Arm (kG cosine-compensated internally)
var armFf = new ArmFeedforward(kS, kG, kV, kA);
// Elevator (constant kG)
var elevFf = new ElevatorFeedforward(kS, kG, kV, kA);
Then add a modest kP for disturbance rejection. With good feedforward, kP does very little work, which is exactly what you want.
Per-side / per-module matters#
Characterize each drive side (tank) or each module (swerve) separately. Mismatched kV across sides is the textbook cause of a robot veering; distinct, measured gains fix it.
Pitfalls#
- Garbage in, garbage out: ensure encoder conversion factors are correct before testing, or every gain is scaled wrong.
- Run on the real surface with real mass; characterizing a bare gearbox gives gains that don't hold the loaded mechanism.
- Respect mechanism limits, set soft limits so a dynamic step doesn't crash an arm into a hard stop.
The payoff#
A characterized mechanism tracks motion profiles accurately, recovers from disturbances predictably, and behaves the same on Saturday as it did in your shop, the foundation every advanced technique below builds on.
the part worth keeping
Key takeaways
- SysId empirically measures kS/kV/kA (and kG) via quasistatic + dynamic routines instead of guessing gains.
- Feed the measured constants into SimpleMotorFeedforward/ArmFeedforward/ElevatorFeedforward (gravity classes use order kS, kG, kV, kA), then add only a small kP.
- Characterize each drive side/swerve module separately and verify encoder conversion factors first, or every gain is wrong.
Mechanical, Build & PneumaticsAdvanced Techniques & Case Studieslesson 1 of 5
Keep going
Take the quiz+10 XP with an accountMore in Advanced Techniques & Case Studies
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 Introduction to System Identification
- docs.wpilib.orgWPILib Feedforward Control
- docs.wpilib.orgWPILib Introduction to DC Motor Feedforward
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
- 7 min readFRC Motion Profiling Explained: TrapezoidProfile and ProfiledPIDControllerHow WPILib's TrapezoidProfile and ProfiledPIDController smooth mechanism motion, how to pick velocity and acceleration constraints, and when a profile beats plain PID./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
01What is the primary output of running a SysId characterization routine on a mechanism?
02How does the SysId quasistatic test differ from the dynamic test?
03When characterizing an arm with SysId, what additional gain is required compared to a simple flywheel?
Answer every question to submit.
All 47 lessons in Mechanical, Build & Pneumaticsopenclose
01 / prerequisites
02 / drivetrains
03 / power-transmission
04 / structure-materials-fasteners
05 / mechanisms-fabrication-assembly
06 / pneumatics-fundamentals
07 / pneumatic-components
08 / build-wire-program
09 / safety-rules-testing
10 / worked-examples-mini-projects
- Not read yet:Mini-Project 1: A Single-Jointed Arm From Math to Motion
- Not read yet:Mini-Project 2: A Two-Stage Cascade Elevator
- Not read yet:Mini-Project 3: A Velocity-Controlled Flywheel Shooter
- Not read yet:Mini-Project 4: A Pivoting Roller Intake
- Not read yet:Mini-Project 5: Integrating a COTS Swerve Module
11 / common-mistakes-troubleshooting
- Not read yet:Pneumatics Won't Fire: A Full Diagnostic Tree
- Not read yet:The Robot Won't Drive Straight (and Other Drivetrain Sins)
- Not read yet:Gearboxes That Grenade and Fasteners That Vibrate Loose
- Not read yet:Closed-Loop Mechanisms That Oscillate, Sag, or Stall
- Not read yet:Field-Ready Reliability: Inspection, Spares, and the Pit Checklist
12 / advanced-techniques-case-studies
- Not read yet:Characterizing Any Mechanism with SysId
- Not read yet:Simulation-Driven Design with WPILib Physics Models
- Not read yet:Motion Profiling and Superstructure Coordination
- Not read yet:Designing for Weight, Stiffness, and Manufacturability
- Not read yet:Case Studies: Learning From Open Alliance Robots