Agent skill
integral-action-design
Adding integral action to MPC for offset-free tension tracking.
Install this agent skill to your Project
npx add-skill https://github.com/benchflow-ai/skillsbench/tree/main/tasks/r2r-mpc-control/environment/skills/integral-action-design
SKILL.md
Integral Action for Offset-Free Control
Why Integral Action?
MPC with model mismatch may have steady-state error. Integral action eliminates offset by accumulating error over time.
Implementation
u_I = gamma * u_I - c_I * dt * (T - T_ref)
u_total = u_mpc + u_I
Where:
- u_I: Integral control term
- gamma: Decay factor (0.9-0.99)
- c_I: Integral gain (0.1-0.5 for web systems)
- dt: Timestep
Tuning Guidelines
Integral gain c_I:
- Too low: Slow offset correction
- Too high: Oscillations, instability
- Start with 0.1-0.3
Decay factor gamma:
- gamma = 1.0: Pure integral (may wind up)
- gamma < 1.0: Leaky integrator (safer)
- Typical: 0.9-0.99
Anti-Windup
Limit integral term to prevent windup during saturation:
u_I = np.clip(u_I, -max_integral, max_integral)
For R2R Systems
Apply integral action per tension section:
for i in range(num_sections):
u_I[i] = gamma * u_I[i] - c_I * dt * (T[i] - T_ref[i])
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?