motor-fcs-mpc-dualvector

motor-fcs-mpc-dualvector is a skill for Claude Code from calebzu/pmsm-control-claude-skills-for-matlab. It costs 267 tokens per session (2,861 once invoked), scanned A, original, Apache-2.0.

A Simulink builder for controlling a permanent-magnet synchronous motor (PMSM) with model-predictive control that applies two voltage vectors during each control period.

In plain words
What is it for?
Use it to build and simulate a PMSM drive with speed control and two-vector finite-control-set model-predictive current control.
Why use it?
It gives the motor controller a second voltage choice within each period, helping manage current changes more precisely than a single-vector approach.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Good fit Use it to build and simulate a PMSM drive with speed control and two-vector finite-control-set model-predictive current control.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/calebzu/pmsm-control-claude-skills-for-matlab/motor-fcs-mpc-dualvector
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add calebzu/pmsm-control-claude-skills-for-matlab --skill motor-fcs-mpc-dualvector
Clone the repo
git clone --depth 1 https://github.com/calebzu/pmsm-control-claude-skills-for-matlab

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for motor-fcs-mpc-dualvector

README.md
[![agentmods](https://agentmods.dev/badge/skills/calebzu/pmsm-control-claude-skills-for-matlab/motor-fcs-mpc-dualvector/github.svg)](https://agentmods.dev/skills/calebzu/pmsm-control-claude-skills-for-matlab/motor-fcs-mpc-dualvector)
Your own site
<a href="https://agentmods.dev/skills/calebzu/pmsm-control-claude-skills-for-matlab/motor-fcs-mpc-dualvector"><img src="https://agentmods.dev/badge/skills/calebzu/pmsm-control-claude-skills-for-matlab/motor-fcs-mpc-dualvector/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for motor-fcs-mpc-dualvector

Your own site · 80×15
<a href="https://agentmods.dev/skills/calebzu/pmsm-control-claude-skills-for-matlab/motor-fcs-mpc-dualvector"><img src="https://agentmods.dev/badge/skills/calebzu/pmsm-control-claude-skills-for-matlab/motor-fcs-mpc-dualvector.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 267 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,861 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00267 $0.02861
Opus 5 $0.00133 $0.01430
Sonnet 5 $0.00053 $0.00572
Haiku 4.5 $0.00027 $0.00286

Measured 12d ago against content hash eb107f6bcf6e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

motor-fcs-mpc-dualvector scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/motor-fcs-mpc-dualvector/SKILL.md · 97 lines

How it starts

The opening of the file, as written. The whole thing — 97 lines — stays where its author put it; the contents beside it link to each section on GitHub.

motor-fcs-mpc-dualvector — PMSM Dual-Vector Finite-Control-Set MPC Builder

Three-phase 2-level voltage-source inverter + PMSM (SPMSM / mild-saliency IPMSM via parameterization). Inner loop = dual-vector FCS-MPC current control in the dq frame: each control period applies two voltage vectors — the first optimal active vector V_opt1 for a deadbeat-computed on-time t_opt1, then a second vector V_j for the remainder Tsc − t_opt1. Outer loop = speed PI providing iq_ref. The second vector + intra-period time split drive switching-cycle current ripple far below single-vector FCS-MPC at the same Tsc.

Distilled from Xu Yanping et al. 2017 (Two-Vector Model Predictive Current Control for PMSM, Trans. China Electrotech. Soc. 32(20):222-230). Control-law formulas are the signed N2–N5 in pmsm_formulas.md §E; plant physics, prediction, speed PI, Clarke/Park and the 8-vector set are reused by pointer from the same file (§0-§7 / §A / §B.5).

Layered on motor-pmsm-base. All base discipline applies (Goto TagVisibility, Vdc/BEMF rule, Visual 4-check, broken-FOC defense).

What makes dual-vector different (vs single-vector motor-fcs-mpc)

Aspect Single-vector (motor-fcs-mpc) Dual-vector (this skill)
Vectors per period 1 (held the whole Tsc) 2: V_opt1 for t_opt1, then V_j
Modulator none; one switch state per period none; time-slicer sequences two states within Tsc
Extra novelty q-axis deadbeat time allocation (N3), duty-weighted average voltage (N4)
Chart sample-time INHERITED + dual ZOH two-rate DISCRETE: controller @ Tsc, slicer @ Ts (see rule 4)
Cost (this reference) L2 weighted L1 unweighted (paper eq 7)
Ripple @ same Tsc baseline ~3-5x lower (paper Table 2)

There is no SVPWM and no Anti_Park — the selected discrete vectors are applied directly; the gate comes from the time-slicer, not a PWM modulator.

Read the full file on GitHub · 97 lines

Files

What ships with it

7 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 97 lines · 267 tokens per session scan A eb107f6bcf6e

Subscribe to this mod's changes

motor-fcs-mpc-dualvector is a skill published in the GitHub repository calebzu/pmsm-control-claude-skills-for-matlab (13 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 267 tokens to every session and 2,861 once invoked, about $0.0013 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

matlab-simulate-radar-detections

Configure, simulate, debug, and analyze radarDataGenerator within radarScenario. Use for: interactively building radar detection scenarios from datasheets or performance requirements; diagnosing missed detections and configuration errors; interpreting sensor spherical, body, and scenario-frame outputs; deriving…

matlab/matlab-agentic-toolkit · 92 tokens

matlab-analyze-em

S-parameters, insertion loss, fields, currents, mesh control, and solver selection for RF PCB performance validation. TRIGGER: user asks to compute S-parameters, analyze insertion/return loss, extract fields or currents, compare MoM vs FEM, or control mesh for any RF PCB component. Invoke BEFORE writing sparameters()…

matlab/matlab-agentic-toolkit · 143 tokens

matlab-model-via

Via modeling: pads, antipads, ground return vias, GRV placement, and signal integrity for high-speed layer transitions. TRIGGER: user asks to model a via, design a via transition, place ground return vias, analyze via performance, or check signal integrity through layer transitions. Invoke BEFORE writing code — only…

matlab/matlab-agentic-toolkit · 144 tokens

matlab-compute-gnss-position

Computes multi-constellation Global Positioning System (GPS) or Global Navigation Satellite System (GNSS) positions from RINEX v3 data using rinexread, gnssmeasurements, receiverposition, and gnssoptions. Filters by constellation, elevation mask, C/N0, and observation code. Reports DOP, scatter RMS, and satellite…

matlab/matlab-agentic-toolkit · 140 tokens

matlab-plan-robot-motion

Plan manipulator motion and generate trajectories in MATLAB. Use when the task involves moving a robot arm between configurations or poses — whether the user says "trajectory," "motion," "path," "move from A to B," or "plan." This skill applies regardless of whether the user explicitly mentions collisions or…

matlab/matlab-agentic-toolkit · 219 tokens

matlab-design-dsphdl-ddc

Use when designing a Digital Down Converter (DDC) using dsphdl System objects. Triggers on requests involving DDC design, frequency down-conversion for FPGA/ASIC, NCO + mixer + decimation filter chains, fractional/non-integer sample rate conversion, or HDL-optimized receiver front-end signal processing.

matlab/matlab-agentic-toolkit · 74 tokens