Continuous SysId
Static System Identification (running specific “quasistatic” tests in the pits) is the industry standard. However, mechanism friction changes as the robot’s gears wear down or get dirty throughout a 3-day competition. MARSLib introduces Continuous SysId, which passively identifies your kV and kA constants during real matches.
1. The Logging Advantage
Because every motor voltage and velocity is logged at high frequency through AdvantageKit, we don’t need dedicated tests. The MARSSysIdManager runs an Ordinary Least Squares (OLS) regression against the log data every time the robot is disabled.
2. Implementation
To enable passive characterization, you must register your subsystem’s IO with the manager.
// Inside RobotContainer.javaSysIdManager.getInstance().registerMechanism( "Shooter", flywheel::getVoltage, flywheel::getVelocityRadPerSec);3. Viewing the Results
The calculated kV (Volts per Unit/s) and kA (Volts per Unit/s²) are pushed to NetworkTables. If the passion-identified kV differs from your hardcoded constant by more than 15%, a Fault Alert will trigger, notifying the pit crew that a mechanism is experiencing unexpected friction.
📖 Further Reading & External Resources
- WPILib: System Identification (SysId) - Characterize your robot with automated experiments.
- CTRE Phoenix 6: Signal Logging - Best practices for high-speed telemetry in characterization.