mpc-horizon-tuning

Tune MPC horizon and cost matrices for R2R tension control.

Updated Jan 15, 2026
One-click install
npx skills add https://github.com/KaiserWhoLearns/skillsbench --skill mpc-horizon-tuning
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: mpc-horizon-tuning
Source: https://github.com/KaiserWhoLearns/skillsbench/tree/main/tasks/r2r-mpc-control/environment/skills/mpc-horizon-tuning
Command: npx skills add https://github.com/KaiserWhoLearns/skillsbench --skill mpc-horizon-tuning

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Selecting MPC horizon and cost matrices to achieve stable, efficient tension-control performance under disturbances.

Core Features & Use Cases

  • Horizon tuning to balance disturbance rejection and computational load.
  • Cost design to weight tension tracking (Q) and actuator effort (R).
  • Use Case: Real-time tuning for R2R tension control with dt=0.01s.

Quick Start

Run a tuning workflow to select horizon N, Q, and R for stable, efficient MPC in tension-control tasks.

Frequently Asked Questions about mpc-horizon-tuning

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I tune MPC horizon and cost matrices for tension control?▼

Tune MPC horizon and cost matrices by selecting a prediction horizon N typically between 5 and 15 for R2R systems, and specifying state and control weights Q and R to balance tracking performance against actuator effort.

What is the best way to design Q and R weights for real-time tension-control?▼

Design Q and R weights by prioritizing tension tracking in the Q matrix and actuator effort in the R matrix, while using an Algebraic Riccati Equation (ARE) to specify the terminal cost for stable control.

Why does MPC horizon tuning affect disturbance rejection in R2R systems?▼

MPC horizon tuning affects disturbance rejection because a longer prediction horizon improves the controller's ability to anticipate and compensate for tension disturbances, though it increases the real-time computational load.

Can I use these MPC tuning guidelines for systems with a 0.01s sampling time?▼

Yes, these MPC tuning guidelines are explicitly applicable to real-time tension-control scenarios in R2R systems operating with a sampling time of dt=0.01s, ensuring stable and efficient performance.

How is terminal cost calculated when tuning MPC for tension control?▼

The terminal cost for MPC tension control is calculated via the Algebraic Riccati Equation (ARE), which provides a stabilizing terminal weight to ensure closed-loop stability within the finite prediction horizon.

What horizon length should I choose for MPC tension control?▼

Choose an MPC horizon length N typically between 5 and 15 for tension control, balancing the need for effective disturbance rejection against the available real-time computational capacity.