Agent skill
state-space-linearization
Linearizing nonlinear dynamics around operating points for control design.
Install this agent skill to your Project
npx add-skill https://github.com/benchflow-ai/skillsbench/tree/main/tasks-no-skills/r2r-mpc-control/environment/skills/state-space-linearization
SKILL.md
State-Space Linearization
Jacobian Computation
For nonlinear dynamics dx/dt = f(x, u), linearize around (x_ref, u_ref):
A = ∂f/∂x |_{x_ref} (n×n matrix)
B = ∂f/∂u |_{x_ref} (n×m matrix)
Discretization
For discrete-time control with timestep dt:
Euler method (simple, first-order accurate):
A_d = I + dt * A_c
B_d = dt * B_c
Matrix exponential (exact for LTI):
A_d = expm(A_c * dt)
B_d = inv(A_c) @ (A_d - I) @ B_c
For R2R Systems
The Jacobian depends on current tensions and velocities. Key partial derivatives:
∂(dT_i/dt)/∂T_i = -v_i / L
∂(dT_i/dt)/∂v_i = EA/L - T_i/L
∂(dv_i/dt)/∂T_i = -R²/J
∂(dv_i/dt)/∂u_i = R/J
Tips
- Linearize around the reference operating point
- Update linearization if operating point changes significantly
- Check stability via eigenvalue analysis
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
csv-processing
Use this skill when reading sensor data from CSV files, writing simulation results to CSV, processing time-series data with pandas, or handling missing values in datasets.
pid-controller
Use this skill when implementing PID control loops for adaptive cruise control, vehicle speed regulation, throttle/brake management, or any feedback control system requiring proportional-integral-derivative control.
yaml-config
Use this skill when reading or writing YAML configuration files, loading vehicle parameters, or handling config file parsing with proper error handling.
simulation-metrics
Use this skill when calculating control system performance metrics such as rise time, overshoot percentage, steady-state error, or settling time for evaluating simulation results.
vehicle-dynamics
Use this skill when simulating vehicle motion, calculating safe following distances, time-to-collision, speed/position updates, or implementing vehicle state machines for cruise control modes.
web-interface-guidelines
Vercel's comprehensive UI guidelines for building accessible, performant web interfaces. Use this skill when reviewing or building UI components for compliance with best practices around accessibility, performance, animations, and visual stability.
Didn't find tool you were looking for?