Waiting for a physical robot before writing and testing software leads to rushed code, uncalibrated control loops, and software bugs discovering hardware travel limits the night before competition.
Modern FRC software engineering is simulation-first. By writing mathematical physics models of your mechanisms in code, you can build, tune, and stress-test autonomous routines and operator controls on a laptop before the mechanical team cuts the first piece of aluminum. Once hardware is built, automated system identification (SysId) and state-space control theory (LQR and Kalman filters) replace manual PID guesswork with optimal, robust mathematical control.
This course builds upon the fundamentals taught in Guided Learning Course. Students should understand Command-Based programming and basic feedforward and feedback tuning.
Course Architecture
Section titled “Course Architecture”The curriculum consists of two focused modules totaling 140 minutes across 4 lessons:
1. Physics Simulation & Mechanism Modeling (70 min, 2 lessons)
Section titled “1. Physics Simulation & Mechanism Modeling (70 min, 2 lessons)”- Mechanism Physics Models with DCMotor (35 min): Model elevators, single-jointed arms, and flywheels using differential equations in WPILib’s
ElevatorSim,SingleJointedArmSim, andFlywheelSim. Configure accurate brushless motor curves (Kraken X60,Minion,NEO). - Simulated Hardware & AdvantageScope (35 min): Feed applied motor controller voltages into simulated physics and loop back simulated encoder states into production subsystem classes. Test commands and visualizer animations in SimGUI and AdvantageScope.
2. SysId Characterization & State-Space Control (70 min, 2 lessons)
Section titled “2. SysId Characterization & State-Space Control (70 min, 2 lessons)”- SysId System Characterization (35 min): Run automated quasistatic and dynamic voltage routines to calculate static friction , velocity feedforward , acceleration feedforward , and gravity with statistical confidence.
- State-Space Modeling, LQR & Kalman Filters (35 min): Transition beyond classical single-input PID. Formulate linear continuous-time state-space models
x_dot = A * x + B * u, compute optimal gain matrices using Linear-Quadratic Regulators, and estimate unmeasured states with Kalman filters.
Verified Sources & Standards
- WPILib Robot Simulation Architecturedocs.wpilib.orgWPILib Standard
- WPILib State-Space & Modern Controldocs.wpilib.orgWPILib Standard
- WPILib System Identification (SysId)docs.wpilib.orgWPILib Standard
Course modules
Physics Simulation & Mechanism Modeling
Mathematical mechanism modeling with WPILib simulation classes, brushless DCMotor models, and virtual sensor loopback.
SysId Characterization & State-Space Control
Automated mechanism characterization with SysId, state-space modeling, Linear-Quadratic Regulators (LQR), and Kalman filter state estimation.