← ClaudeAtlas

motor-fcs-mpclisted

PMSM Single-Vector Finite-Control-Set MPC Builder. Build an inner-loop finite-control-set MPC current controller for a three-phase voltage-source-inverter-driven PMSM (SPMSM/IPMSM via parameterization) in Simulink, with optional outer speed PI providing iq_ref. Use when constructing, reproducing, porting, or extending an FCS-MPC simulation in Simulink (keywords FCS-MPC, finite control set MPC, single-vector MPC, 7-vector / 8-vector MPC, predictive current control). Skip for FOC, DTC, sensorless, scalar control, BLDC trapezoidal, induction-motor MPC, multi-step horizon, weak-field, MTPA optimization, or pure theory questions. Layered on motor-pmsm-base.
calebzu/pmsm-control-claude-skills-for-matlab · ★ 5 · AI & Automation · score 80
Install: claude install-skill calebzu/pmsm-control-claude-skills-for-matlab
# motor-fcs-mpc — PMSM Single-Vector Finite-Control-Set MPC Builder Three-phase 2-level voltage-source inverter + PMSM (SPMSM / IPMSM via parameterization). Inner-loop = FCS-MPC current control in dq frame. Outer-loop (optional) = speed PI providing `iq_ref`. Generalizes across machine sub-types by parameterizing `Rs, Ld, Lq, ψf, Pn, J, F` — no topology change between sub-types. Layered on [motor-pmsm-base](../motor-pmsm-base/SKILL.md). All base discipline applies (Goto TagVisibility, Vdc/BEMF rule, Visual 4-check, broken-FOC defense). ## Must-Follow Rules 1. **Plan first.** Before any `add_block`, write a numbered plan: parameter table, design-decision choices ([design_decisions.md](references/design_decisions.md)), build-script structure. Get user approval. 2. **One-click reproducibility.** Inject all parameters via `set_param(mdl, 'InitFcn', sprintf(...))`. Model must Run from `.slx` double-click in fresh MATLAB session. See [crit_conditions.md §J-CRIT](references/crit_conditions.md). 3. **MPC chart params via `sprintf` from build-script workspace.** Chart hardcodes `Rs/Ld/Lq/ψf/Pn/Tsc` as numeric literals at build time. Never put MPC params in an external `.m` file (drifts from plant). See [crit_conditions.md §K-CRIT](references/crit_conditions.md). 4. **Chart config = INHERITED + dual ZOH** (NOT DISCRETE+Tsc). `ch.SampleTime='-1'`, `ch.ChartUpdate='INHERITED'`, leave Inputs DataType/Size at Inherit. Rate is locked by ZOH @ Tsc on every chart input + ZOH @ Tsc on char