simulink-control-motors

Build and tune motor control models in Simulink using Motor Control Blockset.

1.0k|98|Updated Apr 15, 2026
One-click install
npx skills add https://github.com/matlab/simulink-agentic-toolkit --skill simulink-control-motors
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: simulink-control-motors
Source: https://github.com/matlab/simulink-agentic-toolkit/tree/main/skills-catalog/control-systems/simulink-control-motors
Command: npx skills add https://github.com/matlab/simulink-agentic-toolkit --skill simulink-control-motors

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Designing motor control systems in Simulink requires deep knowledge of Motor Control Blockset blocks, wiring topologies, gain tuning conventions, and sensorless estimation, where small configuration mistakes cause silent failures like zero torque or drift.

Core Features & Use Cases

  • Architecture Design & Model Building: Select control patterns (FOC, DTC, six-step, V/f) for PMSM, BLDC, induction, and SynRM motors, then wire complete controller models using validated topologies.
  • Gain Tuning & Parameter Estimation: Compute PI gains with mcb.calcFOCGains, estimate motor parameters (Rs, Ld, Lq, FluxPM, J), and generate MTPA/FW lookup tables from FEA data.
  • Sensorless Control & Diagnostics: Configure SMO, HFI, and flux observers with I/f startup, and diagnose errors, oscillations, and zero-torque issues using structured checklists.
  • Use Case: Ask the agent to build a sensorless FOC speed controller for an IPMSM with field weakening, and it selects the pattern, wires the blocks, configures masks, tunes gains, and validates the model.

Quick Start

Ask your AI agent to build a field-oriented control model for a PMSM motor with sensorless speed estimation using Motor Control Blockset.

Frequently Asked Questions about simulink-control-motors

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a field-oriented control model for a PMSM in Simulink?

Use Motor Control Blockset blocks following a validated wiring topology: speed PI, MTPA control reference, current PI loops, inverse Park/Clarke transforms, inverter, and PMSM plant. Compute gains with mcb.calcFOCGains and configure block masks from motor datasheet values.

How do I tune FOC PI gains with Motor Control Blockset?

Call mcb.calcFOCGains(pmsm, Ts, Ts_speed) to get current and speed loop gains. MCB PI blocks use the Ki×Ts convention, so multiply raw Ki by the sample time before setting block parameters. Category A motors with kt/J over 10,000 need a manual Ki_speed override.

Does Motor Control Blockset support sensorless control of induction motors?

Yes, ACIM sensorless control uses a Flux Observer with I/f startup or MRAS-based estimation. For PMSM, use SMO for surface-mount motors and HFI plus SMO hybrid for interior PMSM across the full speed range.

Why does my Simulink motor model produce zero torque?

Common causes include Park transform left in default 4-port mode instead of ThetaInput='Electrical position', pole pairs set to twice the correct value, or missing Unit Delay on the voltage path to the plant. Run the structured diagnostic checklist rather than rebuilding.

What MATLAB release is required for the mcb.* API functions?

The mcb.* package API requires R2025a or later. Earlier releases only have legacy mcb_* functions such as mcb_SetPMSMMotorParameters and mcb_SetControllerParameters with different signatures.

When should I not use this motor control skill?

Avoid it for general Simulink modeling unrelated to motor drives and for simple factual questions about motors that need no model building. It is scoped to Motor Control Blockset design, tuning, and diagnostics workflows.