simulink-linearize

Extract LTI and LPV models from Simulink models using linearize and Simulink Control Design APIs.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Obtaining linear time invariant (LTI) or linear parameter varying (LPV) models from nonlinear Simulink models requires correctly defining I/O points, finding operating points, configuring batch linearization, and debugging zero-gain results—steps where mistakes like using legacy linmod APIs or misplacing linio points are common.

Core Features & Use Cases

  • Guided Linearization Workflow: Four-stage pipeline covering I/O point definition (linio), operating point computation (operspec/findop), linearization (linearize/slLinearizer), and debugging with the Linearization Advisor.
  • Batch and LPV Support: Batch linearization across parameter grids with BatchConsistency and StoreOffsets options, plus LPV model construction via ssInterpolant.
  • Multi-Transfer-Function Extraction: Uses slLinearizer to extract multiple closed-loop, sensitivity, and loop transfer functions with a single model compile.
  • Use Case: Linearize a feedback control system at multiple trim points across a parameter grid, then build a gridded LPV model with ssInterpolant and validate it against Simulink simulation using lsim.

Quick Start

Linearize my Simulink model from the input block to the output block at a steady-state operating point and convert the result to a transfer function.

Frequently Asked Questions about simulink-linearize

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

FAQPage Schema
How do I linearize a Simulink model in MATLAB?

Use the linearize function from Simulink Control Design with the model name, optional linio I/O points, and an operating point. If root-level Inport and Outport blocks exist, linearize uses them automatically without explicit linio definitions.

How to perform batch linearization over parameter variations in Simulink?

Create an array of operating point specifications using copy(opBase) in a loop, define parameter values with a params struct, and call findop followed by linearize with BatchConsistency set to on. This produces a model array suitable for LPV construction with ssInterpolant.

What is the difference between linearize and slLinearizer?

linearize computes a single linearization per call and recompiles the model each time, while slLinearizer compiles the model once and extracts multiple transfer functions such as getIOTransfer, getSensitivity, and getLoopTransfer. Use slLinearizer when extracting several I/O relationships from one model.

Why does Simulink linearization return zero gain?

Zero gain typically results from blocks with hard discontinuities like PWM, relays, or dead zones, or from an unsuitable operating point. Enable StoreAdvisor in linearizeOptions and run advise on the advisor object to identify the problematic blocks and their diagnostics.

Can I use linmod instead of linearize for Simulink linearization?

No, linmod, linmod2, linmodv5, and dlinmod are legacy APIs with limited features and should not be used. Use linearize or slLinearizer from Simulink Control Design, which support operating points, block substitution, and advisor diagnostics.

What products are required to linearize Simulink models with this skill?

The skill requires Simulink Control Design and Control System Toolbox, with MATLAB R2023a or later. It also depends on the MCP tools evaluate_matlab_code and model_read from the Simulink Agentic Toolkit.