Mpc Horizon Tuning
Selecting MPC prediction horizon and cost matrices for web handling.
Install
npx skills add UCSB-NLP-Chang/Skill-Usage --skill mpc-horizon-tuninggit clone --depth 1 https://github.com/UCSB-NLP-Chang/Skill-Usage.git /tmp/Skill-Usage
mkdir -p ~/.claude/skills
cp -r /tmp/Skill-Usage/tasks/r2r-mpc-control/environment/skills/mpc-horizon-tuning ~/.claude/skills/mpc-horizon-tuningPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# MPC Tuning for Tension Control ## Prediction Horizon Selection **Horizon N** affects performance and computation: - Too short (N < 5): Poor disturbance rejection - Too long (N > 20): Excessive computation - Rule of thumb: N ≈ 2-3× settling time / dt For R2R systems with dt=0.01s: **N = 5-15** typical ## Cost Matrix Design **State cost Q**: Emphasize tension tracking ```python Q_tension = 100 / T_ref² # High weight on tensions Q_velocity = 0.1 / v_ref² # Lower weight on velocities Q = diag([Q_tension × 6, Q_velocity × 6]) ``` **Control cost R**: Penalize actuator effort ```python R = 0.01-0.1 × eye(n_u) # Smaller = more aggressive ``` ## Trade-offs | Higher Q | Effect | |----------|--------| | Faster tracking | More control effort | | Lower steady-state error | More aggressive transients | | Higher R | Effect | |----------|--------| | Smoother control | Slower response | | Less actuator wear | Higher tracking error | ## Terminal Cost Use LQR solution for terminal cost to guarantee stability: ```python P = solve_continuous_are(A, B, Q, R) ```
Details
- Skill name
mpc-horizon-tuning- Repository
- UCSB-NLP-Chang/Skill-Usage
- Path
tasks/r2r-mpc-control/environment/skills/mpc-horizon-tuning/SKILL.md- Repo updated
- 8 April 2026
FAQ
What does the Mpc Horizon Tuning skill do?
Selecting MPC prediction horizon and cost matrices for web handling.
How do I install the Mpc Horizon Tuning skill?
skills CLI (Claude Code, Cursor, Codex and more): npx skills add UCSB-NLP-Chang/Skill-Usage --skill mpc-horizon-tuning. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Mpc Horizon Tuning popular?
It lives in UCSB-NLP-Chang/Skill-Usage, which has 49 GitHub stars and 5 forks.
Related skills
Pubchem Database
49UCSB-NLP-Chang/Skill-Usage
Query PubChem via PUG-REST API/PubChemPy (110M+ compounds). Search by name/CID/SMILES, retrieve properties, similarity/substructure searches, bioactivity, for cheminformatics.
Pymatgen
49UCSB-NLP-Chang/Skill-Usage
Materials science toolkit. Crystal structures (CIF, POSCAR), phase diagrams, band structure, DOS, Materials Project integration, format conversion, for computational materials science.
Rdkit
49UCSB-NLP-Chang/Skill-Usage
Cheminformatics toolkit for fine-grained molecular control. SMILES/SDF parsing, descriptors (MW, LogP, TPSA), fingerprints, substructure search, 2D/3D generation, similarity, reactions. For standard workflows with simpler interface, use datamol (wrapper around RDKit). Use rdkit for advanced control, custom sanitization, specialized algorithms.
Nws Flood Thresholds
49UCSB-NLP-Chang/Skill-Usage
Download flood stage thresholds from NWS (National Weather Service). Use when determining flood levels for USGS stations, accessing action/minor/moderate/major flood stages, or matching stations to their flood thresholds.
Meteorology Driver Classification
49UCSB-NLP-Chang/Skill-Usage
Classify environmental and meteorological variables into driver categories for attribution analysis. Use when you need to group multiple variables into meaningful factor categories.
Output Validation
49UCSB-NLP-Chang/Skill-Usage
Local self-check of instructions and mask outputs (format/range/consistency) without using GT.
Browse the most popular Claude skills, all other skills, or write your own with the skills generator.