PMSM Claude Skills para MATLAB/Simulink
calebzu/pmsm-control-claude-skills-for-matlab
Skills IA para projetos avançados de controle PMSM em MATLAB/Simulink
Ver no GitHubBiblioteca de skills e metodologia para modelagem de controle de motores síncronos de imã permanente (PMSM) em MATLAB/Simulink com auxílio de IA. Inclui seis skills especializados em técnicas de controle (FCS-MPC, DTC, SMC, MFPCC-ESO) mais um workflow estruturado de 11 fases para destilação de modelos de referência, com exemplo pronto de controlador FOC com estimador de torque de carga.
Instalação
npx convez-ai calebzu/pmsm-control-claude-skills-for-matlab1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.
Métricas
Casos de uso
- Prototipagem rápida de estratégias de controle de motor síncrono
- Validação de leis de controle (MPC, DTC, SMC) em simulação antes de hardware
- Geração assistida por IA de modelos Simulink otimizados com layout automático
Veredito

Skill muito especializado, direcionado a engenheiros de controle em sistemas embarcados e acionamento de motores. Excelente exemplo de uso de Claude Code em engenharia de domínio técnico denso, mas requer background sólido em MATLAB, Simulink e teoria de controle para aproveitamento real.
README
A tradução para o português deste README ainda está na fila.
PMSM Control Claude Skills (for MATLAB / Simulink)
A methodology and skill library for AI-augmented MATLAB/Simulink modeling of Permanent Magnet Synchronous Motor (PMSM) control, built for use with Claude Code.
The repository is itself a Claude Code workspace: clone it, install the
prerequisites, open Claude Code in the folder, and follow CLAUDE.md.
Layout
| Path | Contents |
|---|---|
CLAUDE.md | Workspace entry point — setup steps and working rules a fresh Claude Code reads on open. |
.claude/skills/ | Six PMSM modeling skills plus a general-purpose Simulink layout utility (Claude Code skill format), registered automatically when Claude Code opens this folder. |
workflow/ | The 11-phase Reference Model Learning Workflow for distilling a reference model into a Claude Code skill under anti-contamination discipline. |
shared/ | Domain assets the skills reuse: formulas/ (PMSM plant model + control-law derivations), building_blocks/ (atomic Simulink blocks + API notes). |
workspace/ | Where you build your own models. |
extended/ | An extra reference generated by Claude Code following the workflow — a FOC speed controller with a load-torque estimator (Luenberger + Kalman family) + feed-forward compensation. Builds on the skills but is not itself a formal skill. |
Skills
motor-pmsm-base— PMSM plant modeling, dq conventions, building-blocks SOP, broken-FOC diagnostics. The method skills layer on this.motor-fcs-mpc— single-vector Finite-Control-Set Model Predictive Control (inner current loop).motor-fcs-mpc-dualvector— dual-vector (two-vectors-per-period) FCS-MPC current loop: two voltage vectors with q-axis deadbeat time allocation cut switching-cycle ripple ~3-5× below single-vector. Layers onmotor-fcs-mpc.motor-fcs-mpc-trivector— three-vector (two adjacent active + one zero per period) FCS-MPC current loop: a 2×2 dual-axis deadbeat solve synthesizes an expected voltage vector that nulls bothi_dandi_qin one period. Layers onmotor-pmsm-base.motor-dtc-pmsm— Direct Torque Control (αβ frame, Sutikno 6-state switching table).motor-smc-pmsm— Sliding Mode Control speed loop (PD-type sliding surface + super-twisting) over a dq PI current loop.motor-mfpcc-eso— model-free deadbeat predictive current control (ultralocal model + Extended State Observer) modulated by SVPWM. The current law uses no machine parameters — only the input gainαand ESO bandwidthω0. Continuous control set (deadbeat + SVM), not FCS-MPC. Layers onmotor-pmsm-base.simulink-layout-tidy— general-purpose Simulink layout tidier: removes block overlaps, minimizes line crossings honestly (never promising a zero the graph's topology forbids), and exports a screenshot for human sign-off. Not motor-specific; supports the layout gate used in the build workflow.
Prerequisites
- MATLAB R2024b or later, with Simulink, Simscape, Simscape Electrical, Control System Toolbox.
- Claude Code.
- matlab-mcp-core-server (MathWorks, MIT) — lets Claude Code run MATLAB directly. Install per its README.
- MathWorks' official MATLAB skills for Claude Code — install per MathWorks' instructions.
Getting started
- Clone this repository.
- Install the prerequisites above.
- Open Claude Code in the repository folder. It loads
CLAUDE.mdand registers.claude/skills/. - Follow
CLAUDE.mdandworkflow/.
Reproducibility & Evidence
This repository ships skills (instructions) and shared assets (formulas/,
building_blocks/). It does not include end-to-end build scripts that generate
complete models, simulation results (.mat, waveforms, logs), or a CI harness —
those live in the author's private development repository. The only runnable
artifacts here are the pi_design.m scripts under .claude/skills/*/scripts/.
The case studies in workflow/
(Appendix C) are anonymized narrative descriptions of engineering experience
(problem / diagnosis / resolution), not artifact-backed reproducible benchmarks.
Phrases like "validated case" refer to the author's private testing — treat them as
documented experience, not published, data-backed benchmarks.
To reproduce: install the prerequisites, then drive the skills with your own build script and your own PMSM parameters.
Attribution and license compatibility
This repository indexes — it does not redistribute — the following MathWorks open-source references, used by workflow phases that need official ecosystem reference models. Clone them separately if needed:
- mathworks/pmsm-drive-optimization — BSD-3-Clause
- mathworks/FOC-of-PMSM — BSD-3-Clause
This repository's original content (skills, workflow, scripts) is under Apache-2.0. BSD-3-Clause (the indexed references above) is compatible with Apache-2.0 for downstream use.
shared/building_blocks/pmsm_blocks.slx is a user-authored Simulink model that
references MathWorks Simscape Electrical library blocks (PMSM, Universal Bridge,
powergui, SVPWM, etc.) by reference — it does not embed or redistribute MathWorks
block implementations. Opening it requires your own licensed MATLAB + Simulink +
Simscape Electrical installation, the same way models are shared on MathWorks File
Exchange.
Trademark notice: MATLAB® and Simulink® are registered trademarks of The MathWorks, Inc. This is an independent project, not affiliated with, endorsed by, or sponsored by MathWorks.
The "skill" format follows the Claude Code skill specification.
Citation
See CITATION.cff.
Author
Zong Chuhang — School of Electrical and Electronic Engineering, Nanyang Technological University, Singapore. ZONG0008@e.ntu.edu.sg