Skip to content
learnFRC.org
programmingmoduleadvanced70 min

SysId Characterization & State-Space Control

Automated mechanism characterization with SysId, state-space modeling, Linear-Quadratic Regulators (LQR), and Kalman filter state estimation.

What you will learn

  • Configure and run automated SysId test routines to extract kS, kV, kA, and kG constants.
  • Analyze SysId regression plots to diagnose mechanical backlash, friction non-linearities, and sensor noise.
  • Formulate continuous-time and discrete-time state-space models for linear mechanisms.
  • Design Linear-Quadratic Regulators (LQR) to calculate mathematically optimal feedback gains.
  • Fuse motor velocity and absolute position measurements using WPILib Kalman filters.

Prerequisites:Physics Simulation & Mechanism Modeling

Classical single-input PID control treats mechanisms as black boxes. While effective for simple velocity flywheels, classical PID struggles with coupled dynamics, flexible arms, or systems requiring aggressive, minimum-time setpoint tracking without overshoot.

Modern control theory represents systems using mathematical state vectors (x=[p,v]Tx = [p, v]^T). By pairing empirical characterization data from SysId with state-space representation, Linear-Quadratic Regulators (LQR) and Kalman filters compute provably optimal voltage commands that balance tracking speed against electrical current limits.

  1. SysId System Characterization (35 min): Integrate WPILib’s SysIdRoutine into your mechanism subsystems. Run automated quasistatic and dynamic voltage sweeps to measure kS,kV,kAk_S, k_V, k_A, and kGk_G with statistical confidence.

  2. State-Space Modeling, LQR & Kalman Filters (35 min): Construct state-space matrices (A,B,C,DA, B, C, D) for mechanisms. Tune cost matrices QQ and RR to compute optimal LQR gain matrices (KK) and design Kalman filters (KalmanFilter, LinearSystemLoop) for noise-resistant closed-loop tracking.

Verified Sources & Standards

Evergreen Standard

Lessons