simulink-control-motors
Build motor control solutions using Motor Control Blockset for PMSM, induction motors, BLDC, and SynRM. Implement field oriented control, sensorless FOC, six-step control, speed control, current control, and torque control.
Install / Use
npx skills add matlab/simulink-agentic-toolkit --skill simulink-control-motorsInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
Project & Program ManagementSupported Platforms
Tags
Our assessment of simulink-control-motors
simulink-control-motors scores 85/100 on our quality scale, 30th of 77 Project & Program Management skills we index (top 39%).
Its SKILL.md is 11 KB long, well organised into 20 sections and no code examples: a thorough specification that gives an agent plenty to work with.
With 1,148 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated 16 days ago, so simulink-control-motors is actively maintained.
- No license is declared. By default that means all rights are reserved: you can read it, but reusing or redistributing it is not clearly permitted. Ask the author before building on it commercially.
- Its trust signals score 88/100, with 1 caution from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
simulink-control-motors compared with similar skills
All 4 of these similar skills score higher than simulink-control-motors; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| simulink-control-motors (this skill)by matlab | 85 | 1.1k | 16d ago | SKILL.md |
| algorithmic-artby anthropics | 100 | 177.9k | 11d ago | SKILL.md |
| pptxby anthropics | 100 | 177.9k | 11d ago | SKILL.md |
| designby nextlevelbuilder | 100 | 130.2k | 12d ago | SKILL.md |
| ui-ux-pro-maxby nextlevelbuilder | 100 | 130.2k | 12d ago | SKILL.md |
Frequently asked questions
- How do I install simulink-control-motors?
- Run
npx skills add matlab/simulink-agentic-toolkit --skill simulink-control-motors. The install tabs above show the steps for each supported agent. - Which AI agents does simulink-control-motors work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is simulink-control-motors safe to use?
- It declares no license and scores 88/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is simulink-control-motors still maintained?
- The repository was last updated 16 days ago, so simulink-control-motors is actively maintained.
Skill content
View source on GitHubname: simulink-control-motors description: "Build motor control solutions using Motor Control Blockset for PMSM, induction motors, BLDC, and SynRM. Implement field oriented control, sensorless FOC, six-step control, speed control, current control, and torque control. Configure SVPWM, flux weakening, MTPA, MTPV, control of non-linear motors, inverter control, and motor parameter estimation. Compose motor drive models, tune gains, and generate embedded code." license: https://www.mathworks.com/content/dam/mathworks/license/pmrl/license.md metadata: author: MathWorks version: "1.0"
Simulink Control Motors — Motor Control Blockset Skill
Build motor control solutions using Motor Control Blockset (MCB): characterize motors, select control algorithms (FOC, DTC, six-step, V/f), compose Simulink models, tune gains, configure sensorless estimation, and generate code for embedded targets.
When to Use
- User explicitly requests motor control assistance or asks to load this skill
- User works with Motor Control Blockset or motor drive design
- Building, tuning, debugging, or designing motor control systems
- User mentions PMSM, BLDC, induction motor, SynRM, FOC, sensorless, six-step, SVPWM, flux weakening, MTPA, MTPV
When NOT to Use
- General Simulink modeling work that does not involve motor control
- Simple factual questions about motors (no model building needed)
Dependencies
- Required: Motor Control Blockset, Simulink
- Optional: Embedded Coder, Simscape Electrical, Powertrain Blockset
How This Skill Works
- Read
references/common/COMMON-mcb.md(shared conventions — always load first) - Read
references/common/ROUTER-mcb.mdfor block routing and resolution rules - Identify user intent using the routing table below
- Follow the matching section — each section points to detailed reference files
- Consult
references/configurations/for non-FOC architectures (DTC, six-step, V/f, BLDC, ACIM) - Use
references/common/mcb-examples.mdfor official MCB example references
Intent Routing
| User Intent | Section | Key Reference |
|---|---|---|
| New to MCB / learning | Designing | references/design/beginner-path.md |
| What pattern for my application? | Designing | references/design/application-catalog.md |
| Build a new model | Building | references/wiring/wiring-topologies.md |
| Configure block parameters | Configuring | references/block-config/block-configurations.md |
| Compute PI gains / tune | Tuning | references/common/detailed-workflows.md § Tuning |
| Generate LUT / FEA data | Nonlinear Data | references/common/detailed-workflows.md § Importing |
| Add sensorless (SMO, HFI) | Sensorless | references/common/detailed-workflows.md § Sensorless |
| Estimate Rs, Ld, Lq, J | Parameters | references/common/detailed-workflows.md § Estimating |
| Convert plant (MCB→Simscape) | Plant | references/common/detailed-workflows.md § Plant |
| Model errors / doesn't move | Diagnosing | references/common/detailed-workflows.md § Diagnosing |
| End-to-end workflow | — | references/workflows/ directory |
Quick Decision
- User describes an application → Designing
- User says "build" → Building
- User has an error → Diagnosing
- User wants to tune gains → Tuning
- User has FEA/LUT data → Nonlinear Data
- User wants sensorless → Sensorless
- User wants Simscape plant → Plant
Designing Motor Control
Recommends control strategies, selects patterns, evaluates feature compatibility.
Load: references/design/beginner-path.md for enquiry protocol and learning paths.
- Detect mode (Learn / Select / Validate / Enquiry) — see
references/design/beginner-path.md - Search
references/design/application-catalog.mdby user's keywords → get Pattern + Features - Validate combination against
references/design/composition-rules-combining.md - Review architecture details in
references/design/architecture-patterns.md
Critical rules:
- NEVER recommend Pattern A for speed control (structural instability with MCB discrete plant)
- NEVER recommend Sensorless Six-Step + BLDC AVI together
- Pattern B is the DEFAULT for standard speed-controlled FOC
Output: basePattern + features + motorType + controlMode → carry to Building section.
Building Motor Controller
Constructs complete models using wiring topologies, composition rules, and model_edit.
Step 1: Check for a Dedicated Configuration
BEFORE using generic wiring tables, check references/configurations/ for a matching file:
| Architecture | Configuration File |
|---|---|
| ACIM Indirect RFOC | references/configurations/acim-indirect-rfoc.md |
| ACIM Simscape RFOC | references/configurations/acim-simscape-rfoc.md |
| ACIM V/f Open-Loop | references/configurations/acim-vf-openloop.md |
| BLDC Hall Six-Step | references/configurations/bldc-hall-sixstep.md |
| BLDC Sensorless BEMF | references/configurations/bldc-sensorless-bemf.md |
| DTC (SVPWM) | references/configurations/dtc-svpwm-pmsm.md |
| Nonlinear Gain-Scheduled | references/configurations/nonlinear-gain-scheduled.md |
| Position Cascade FOC | references/configurations/position-cascade-foc.md |
| Overmodulation FOC | references/configurations/overmodulation-foc.md |
| HFI+SMO Hybrid | references/configurations/hfi-smo-hybrid.md |
| Dual Motor Sync | references/configurations/dual-motor-sync.md |
| Wind Turbine PMSG | references/configurations/wind-turbine-pmsg.md |
| ADRC Speed | references/configurations/adrc-speed.md |
| Backstepping Speed | references/configurations/backstepping-speed.md |
| Deadbeat Current | references/configurations/deadbeat-current.md |
| Sliding Mode Speed | references/configurations/sliding-mode-speed.md |
If a config file exists: follow it directly. Otherwise: proceed to Step 2.
Step 2: Generic FOC Wiring
| Pattern | Document |
|---|---|
| A, A+FF, A+PWM, B, B-Simple, C | references/wiring/wiring-topologies.md |
| D, E, F, G, H | references/wiring/wiring-topologies-advanced.md |
Step 3: Add Features
- Core (FW, SMO, GainSched, FF, Position, I/f):
references/wiring/composition-rules.md - Infrastructure (Protection, PWM, Multi-Rate):
references/wiring/composition-rules-infrastructure.md - Integration (Logging, Speed Profiles):
references/wiring/composition-rules-integration.md
Step 4: Set Structural Config
- PI:
ControllerParametersSource='internal',ExternalReset='none',InitialConditionSource='internal' - Park:
ThetaInput='Electrical position',AngleInput='Radians' - Unit Delay on voltage path to plant
Key rules:
- Always check
references/configurations/FIRST - Use wiring-topologies.md block lists verbatim (type strings are validated)
- Composition-rules operations are STRUCTURAL (affect port count) — do during wiring
- All structural changes go through model_edit
Configuring MCB Blocks
Sets mask parameters for 30+ MCB block types using motor datasheet values.
Reference files:
references/block-config/block-configurations.md— control blocksreferences/plants/block-configurations-plants.md— plant/sensor blocksreferences/block-config/block-configurations-utility.md— utility blocksreferences/block-config/block-configurations-bldc.md— BLDC blocks
Critical configurations (must get right):
| Block | Critical Setting | Wrong Default |
|---|---|---|
| FOC CC | Port 6 VLimits = [Vmax;-Vmax;0;0] | q-axis non-zero → drift |
| SMO | PositionUnit='Radians' | Default 'Degrees' → 57× error |
| Interior PMSM | P = pole pairs (not 2×p) | Double frequency → zero torque |
| LUT Control Ref | Hidden params: MTPA, FW enable | Defaults leave FW disabled |
Key rules:
- Mask param names ≠ motor struct fields — always check reference table
- Use
model_edit configurefor setting parameters - Single-precision plant outputs need DTC blocks before double-precision control
Tuning Motor FOC Gains
Computes PI gains, IIR filters, and PU normalization.
Full workflow: references/common/detailed-workflows.md § Tuning Motor FOC Gains
Quick summary: Use mcb.calcFOCGains(pmsm, inverter, Ts, Ts_speed) for all categories except Category A (kt/J > 10,000) which needs manual Ki_speed override. MCB uses Ki×Ts convention — never pass raw Ki.
Reference files: references/tuning/parameter-computation.md, references/shared/gain-formulas.md
Importing Nonlinear Motor Data
Generates and validates LUTs from FEA/measurement data.
Full workflow: references/common/detailed-workflows.md § Importing Nonlinear Motor Data
Quick summary: Use mcb.generateMotorLUT(pmsm, inverter, purpose) with correct purpose string. Validate trefVec symmetry and FluxDTable first row = 0.
Reference files: references/nonlinear-data/pmsmlut-structure.md
Building Motor Plant
Converts between MCB ideal plants, Simscape, and FEM-parameterized models.
Full workflow: references/common/detailed-workflows.md § Building Motor Plant
Quick summary: Solver must change to ode14x for Simscape. Add angle adapter Gain(1/(2*pi)). Gains need re-tuning after plant swap.
Reference files: references/plants/plant-model-converters.md, references/plants/block-configurations-plants.md
Estimating Motor Parameters
Commissioning workflows for Rs, Ld, Lq, FluxPM, J, B.
Full workflow: references/common/detailed-workflows.md § Estimating Motor Parameters
Quick summary: Estimate in order: Rs → Ld/Lq → FluxPM → J/B. Motor must be stationary for Rs and Ld/Lq. Feed results into mcb.calcFOCGains.
Reference files: references/estimation/estimation-procedures.md, references/estimation/estimation-to-tuning.md
Estimating Sensorless Motor Position
Configures I/F startup, SMO, HFI, EEMF observers, and handoff logic.
Full workflow: references/common/detailed-workflows.md § Estimating Sensorless Motor Position
Quick summary: SPM → SMO + I/F. IPM → HFI + SMO hybrid. ACIM → Flux Observer + I/F. Always set SMO PositionUnit='Radians'.
Reference files: references/sensorless/sensorless-blocks.md, references/sensorless/hfi-scheduler.md
Diagnosing Motor Control
Diagnoses errors, oscillations, zero-torque using structured checklists.
Full workflow: references/common/detailed-workflows.md § Diagnosing Motor Control
Quick summary: Identify symptom → run matching checklist → apply fix from auto-fix-recipes → validate. Never rebuild from scratch.
Reference files: references/diagnostics/auto_fix/ERROR_PATTERNS.md, references/diagnostics/auto_fix/auto-fix-recipes.md, references/diagnostics/model-sanity-check.md
Copyright 2026 The MathWorks, Inc.
Related Skills
algorithmic-art
177.9kCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems.
pptx
177.9kUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an em…
design
130.2kComprehensive design skill: brand identity, design tokens, UI styling, logo generation (55 styles, Gemini, Atlas Cloud, or MuAPI AI), corporate identity program (50 deliverables, CIP mockups), HTML presentations (Chart.js), banner design (22 styles, social/ads/web/print), icon design (15 styles, SVG…
ui-ux-pro-max
130.2kUI/UX design intelligence for web, mobile, and desktop. This skill should be used when designing, building, reviewing, or fixing interfaces, including pages, components, design systems, accessibility, interaction, responsive layout, typography, color, charts, and stack-specific UI implementation.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
