
Simulink Linearize
Linearize Simulink models.
Install
npx skills add matlab/simulink-agentic-toolkit --skill simulink-linearize -g -a claude-code -y- Repository
- matlab/simulink-agentic-toolkit1.3k
- Category
- Engineering
- Updated
- 6d ago
- License
- See repository
- Context cost
- Mediumabout 2,444 tokens
- Runs scripts
- No, instructions only
What it does
Linearize Simulink models. Use when obtaining linear time invariant or linear parameter varying models from Simulink models.
Simulink Linearization
Extract linear time invariant (LTI) or linear parameter varying (LPV) models from Simulink using linearize and related APIs from Simulink Control Design.
When to Use
- Obtaining a linear model (tf, ss, zpk) from a Simulink model
- Batch linearization across operating points and parameter variations
- Building LPV models with
ssInterpolant - Debugging linearization results (zero gain, unexpected dynamics)
- Extracting multiple LTI systems with a single model compile
When NOT to Use
- Frequency response estimation from simulation, use
simulink-frequency-responsefor frestimate-based fallback - No Simulink model is involved
Workflow
The linearization pipeline has four stages. Not every task requires all stages.
1. Define I/O Points 2. Operating Point → 3. Linearize → 4. Debug
(root level/linio) (findop/operspec) (linearize) (advisor)
Stage 1: Define Linearization I/O Points
Determine I/O points using this decision sequence. Use the first case that applies:
Case A, IO points can be inferred from prompt or model context:
Use the first sub-case that matches:
-
User specifies explicit I/O signals or blocks (e.g., "from r to y") → define
liniopoints. Allliniopoints must reference a block's output port. If a candidate block has no output ports (Outport, Terminator, Scope) → trace upstream to find the source block and port withmodel_read.io = [linio(sprintf("%s/InputBlock", mdl), 1, "input"); ... linio(sprintf("%s/OutputBlock", mdl), 1, "output")]; -
User targets a specific block or subsystem (e.g., "linearize the Controller") → Use the block path as the io argument signaling linearize to perform open-loop linearization of the block
io = sprintf("%s/Controller", mdl); -
Model has existing linearization points →
io = getlinio(mdl);, use if non-empty.
