本文へ移動
cccskills
無料GitHub で公開

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. 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.

インストール方法を見る

含まれるファイル(65)

  • SKILL.md11.2 KB
  • manifest.yaml3.9 KB
  • references/block-config/block-configurations-bldc.md4.1 KB
  • references/block-config/block-configurations-utility.md25.2 KB
  • references/block-config/block-configurations.md25.8 KB
  • references/common/api-and-tooling.md24.8 KB
  • references/common/COMMON-mcb.md6.7 KB
  • references/common/critical-constraints-domain.md14.7 KB
  • references/common/critical-constraints.md23.9 KB
  • references/common/detailed-workflows.md19.0 KB
  • references/common/mcb-examples.md12.0 KB
  • references/common/ROUTER-mcb.md5.1 KB
  • references/common/tool-routing.md12.4 KB
  • references/configurations/acim-indirect-rfoc.md3.5 KB
  • references/configurations/acim-simscape-rfoc.md2.4 KB
  • references/configurations/acim-vf-openloop.md3.3 KB
  • references/configurations/adrc-speed.md2.4 KB
  • references/configurations/backstepping-speed.md2.2 KB
  • references/configurations/bldc-hall-sixstep.md2.7 KB
  • references/configurations/bldc-sensorless-bemf.md3.3 KB
  • references/configurations/deadbeat-current.md2.7 KB
  • references/configurations/dtc-svpwm-pmsm.md3.0 KB
  • references/configurations/dual-motor-sync.md1.9 KB
  • references/configurations/hfi-smo-hybrid.md3.2 KB
  • references/configurations/nonlinear-gain-scheduled.md2.9 KB
  • references/configurations/overmodulation-foc.md2.5 KB
  • references/configurations/position-cascade-foc.md2.8 KB
  • references/configurations/sliding-mode-speed.md2.2 KB
  • references/configurations/wind-turbine-pmsg.md3.1 KB
  • references/design/application-catalog.md18.9 KB
  • references/design/architecture-patterns.md10.1 KB
  • references/design/beginner-path.md19.5 KB
  • references/design/composition-rules-combining.md6.2 KB
  • references/design/constraint-curves.md6.3 KB
  • references/diagnostics/auto_fix/auto-fix-recipes.md28.5 KB
  • references/diagnostics/auto_fix/ERROR_PATTERNS.md30.8 KB
  • references/diagnostics/model-sanity-check-control.md5.5 KB
  • references/diagnostics/model-sanity-check-domain.md13.5 KB
  • references/diagnostics/model-sanity-check-infrastructure.md8.7 KB
  • references/diagnostics/model-sanity-check.md3.8 KB
  • references/diagnostics/recovery-protocol.md6.2 KB
  • references/diagnostics/validation-checks.md7.2 KB
  • references/estimation/estimation-procedures.md5.8 KB
  • references/estimation/estimation-to-tuning.md3.4 KB
  • references/nonlinear-data/pmsmlut-structure.md5.9 KB
  • references/plants/acim-configuration.md4.1 KB
  • references/plants/block-configurations-plants.md19.5 KB
  • references/plants/plant-model-converters.md24.5 KB
  • references/sensorless/hfi-scheduler.md5.1 KB
  • references/sensorless/sensorless-blocks.md22.6 KB
  • references/shared/gain-formulas.md4.1 KB
  • references/shared/simscape-plant-patterns.md6.1 KB
  • references/shared/solver-settings-by-plant.md2.7 KB
  • references/tuning/parameter-computation-motors.md6.4 KB
  • references/tuning/parameter-computation.md17.6 KB
  • references/wiring/composition-rules-infrastructure.md9.7 KB
  • references/wiring/composition-rules-integration.md10.7 KB
  • references/wiring/composition-rules.md20.8 KB
  • references/wiring/wiring-topologies-advanced.md22.1 KB
  • references/wiring/wiring-topologies.md20.2 KB
  • references/workflows/wf-linear-motor-commissioning.md6.5 KB
  • references/workflows/wf-motor-characterization.md4.3 KB
  • references/workflows/wf-nonlinear-motor-commissioning.md5.9 KB
  • references/workflows/wf-sensorless-observer-integration.md6.4 KB
  • references/workflows/wf-virtual-dyno-validation.md6.5 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

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

  1. Read references/common/COMMON-mcb.md (shared conventions — always load first)
  2. Read references/common/ROUTER-mcb.md for block routing and resolution rules
  3. Identify user intent using the routing table below
  4. Follow the matching section — each section points to detailed reference files
  5. Consult references/configurations/ for non-FOC architectures (DTC, six-step, V/f, BLDC, ACIM)
  6. Use references/common/mcb-examples.md for official MCB example references

Intent Routing

User IntentSectionKey Reference
New to MCB / learningDesigningreferences/design/beginner-path.md
What pattern for my application?Designingreferences/design/application-catalog.md
Build a new modelBuildingreferences/wiring/wiring-topologies.md
Configure block parametersConfiguringreferences/block-config/block-configurations.md
Compute PI gains / tuneTuningreferences/common/detailed-workflows.md § Tuning
Generate LUT / FEA dataNonlinear Datareferences/common/detailed-workflows.md § Importing
Add sensorless (SMO, HFI)Sensorlessreferences/common/detailed-workflows.md § Sensorless
Estimate Rs, Ld, Lq, JParametersreferences/common/detailed-workflows.md § Estimating
Convert plant (MCB→Simscape)Plantreferences/common/detailed-workflows.md § Plant
Model errors / doesn't moveDiagnosingreferences/common/detailed-workflows.md § Diagnosing
End-to-end workflow—references/workflows/ directory

Quick Decision


Designing Motor Control

Recommends control strategies, selects patterns, evaluates feature compatibility.

Load: references/design/beginner-path.md for enquiry protocol and learning paths.

  1. Detect mode (Learn / Select / Validate / Enquiry) — see references/design/beginner-path.md
  2. Search references/design/application-catalog.md by user's keywords → get Pattern + Features
  3. Validate combination against references/design/composition-rules-combining.md
  4. 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:

ArchitectureConfiguration File
ACIM Indirect RFOCreferences/configurations/acim-indirect-rfoc.md
ACIM Simscape RFOCreferences/configurations/acim-simscape-rfoc.md
ACIM V/f Open-Loopreferences/configurations/acim-vf-openloop.md
BLDC Hall Six-Stepreferences/configurations/bldc-hall-sixstep.md
BLDC Sensorless BEMFreferences/configurations/bldc-sensorless-bemf.md
DTC (SVPWM)references/configurations/dtc-svpwm-pmsm.md
Nonlinear Gain-Scheduledreferences/configurations/nonlinear-gain-scheduled.md
Position Cascade FOCreferences/configurations/position-cascade-foc.md
Overmodulation FOCreferences/configurations/overmodulation-foc.md
HFI+SMO Hybridreferences/configurations/hfi-smo-hybrid.md
Dual Motor Syncreferences/configurations/dual-motor-sync.md
Wind Turbine PMSGreferences/configurations/wind-turbine-pmsg.md
ADRC Speedreferences/configurations/adrc-speed.md
Backstepping Speedreferences/configurations/backstepping-speed.md
Deadbeat Currentreferences/configurations/deadbeat-current.md
Sliding Mode Speedreferences/configurations/sliding-mode-speed.md

If a config file exists: follow it directly. Otherwise: proceed to Step 2.

Step 2: Generic FOC Wiring

PatternDocument
A, A+FF, A+PWM, B, B-Simple, Creferences/wiring/wiring-topologies.md
D, E, F, G, Hreferences/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 blocks
  • references/plants/block-configurations-plants.md — plant/sensor blocks
  • references/block-config/block-configurations-utility.md — utility blocks
  • references/block-config/block-configurations-bldc.md — BLDC blocks

Critical configurations (must get right):

BlockCritical SettingWrong Default
FOC CCPort 6 VLimits = [Vmax;-Vmax;0;0]q-axis non-zero → drift
SMOPositionUnit='Radians'Default 'Degrees' → 57× error
Interior PMSMP = pole pairs (not 2×p)Double frequency → zero torque
LUT Control RefHidden params: MTPA, FW enableDefaults leave FW disabled

Key rules:

  • Mask param names ≠ motor struct fields — always check reference table
  • Use model_edit configure for 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.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Author or upgrade Model Advisor checks for Simulink and System Composer models. Covers the full lifecycle: guideline authoring, check specification, Model Advisor check implementation, and qualification testing. Use when creating new checks (edit-time, standard batch, config-parameter, auto-fix), converting legacy StyleOne/StyleTwo/StyleThree checks to modern DetailStyle, creating a guideline for modeling, enforcing a modeling rule, or testing/qualifying a check. Triggers on any modeling constraint (e.g., "blocks shall...", "signals must match...", "parameters shall be set to...").

日本語の概要は準備中です。原文の説明を表示しています。

matlab/simulink-agentic-toolkit1,2172026年10月8日 更新

Synthesize new waveforms from scratch for Simulink inports using createInputDataset. Use ONLY when the user asks to generate, create, or synthesize signals (step, ramp, sine, chirp, pulse, noise) to populate a Dataset for External Inputs or Signal Editor. Covers timeseries and timetable formats with correct data type, interpolation, units, and dimensions. Also covers function-call and trigger inport timing setup. Do NOT use when the user wants to load, import, or read existing data from files (MAT, CSV, spreadsheet) — even if that data will be used as model input. Do NOT use for running simulations or plotting outputs.

日本語の概要は準備中です。原文の説明を表示しています。

matlab/simulink-agentic-toolkit1,2172026年10月8日 更新

Common steps for building multi-layer system architecture models using System Composer. Use when implementing architecture models or when interacting with interface dictionaries, allocation sets, stereotypes, and requirements for architecture components.

日本語の概要は準備中です。原文の説明を表示しています。

matlab/simulink-agentic-toolkit1,2172026年10月8日 更新

Builds and edits Simulink, System Composer, Stateflow, and Simscape models. Use when modifying model structure, parameters, ports, connections, or Stateflow chart internals.

日本語の概要は準備中です。原文の説明を表示しています。

matlab/simulink-agentic-toolkit1,2172026年10月8日 更新

Use this skill when the user asks to check Simulink model compliance against a standard (MISRA, MAB, JMAAB, ISO, DO, IEC, EN, CERT C/CWE, AUTOSAR, Simulink Code Inspector (SLCI)), wants to run Model Advisor checks, or needs a compliance report with fix suggestions. For JMAAB/MAB, supplement deterministic checks with agentic review of uncheckable guidelines.

日本語の概要は準備中です。原文の説明を表示しています。

matlab/simulink-agentic-toolkit1,2172026年10月8日 更新

Guide users through creating and managing .satk/block-policy.json for controlling which blocks the agent can use, which are excluded, and which block parameters the agent should not modify. Use when setting up block usage policy for a project.

日本語の概要は準備中です。原文の説明を表示しています。

matlab/simulink-agentic-toolkit1,2172026年10月8日 更新

matlab のスキルをすべて見る

このスキルの問題を報告する