matlab-identify-linear-system

Identify linear dynamic models from measurement data using MATLAB System Identification Toolbox.

995|122|Updated Apr 3, 2026
One-click install
npx skills add https://github.com/matlab/matlab-agentic-toolkit --skill matlab-identify-linear-system
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: matlab-identify-linear-system
Source: https://github.com/matlab/matlab-agentic-toolkit/tree/main/skills-catalog/control-systems/matlab-identify-linear-system
Command: npx skills add https://github.com/matlab/matlab-agentic-toolkit --skill matlab-identify-linear-system

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Estimating transfer function, state-space, or polynomial models from measured input-output data requires expert decisions about model structure, order, delay, and validation. This Skill encodes the System Identification Toolbox expert workflow so an AI agent selects the right model type, avoids common pitfalls, and validates results on held-out data.

Core Features & Use Cases

  • Model structure selection: Decision tree covering process models (procest), transfer functions (tfest), state-space (ssest), and polynomial models (ARX, ARMAX, OE, BJ) for SISO and MIMO data.
  • Order and delay determination: Uses delayest, arxstruc, n4sid order ranges, and iterative complexity ladders with hedged delay estimates.
  • Rigorous validation: Enforces simulation-based comparison on held-out data, residual whiteness and cross-correlation analysis, and fit-percentage interpretation thresholds.
  • Use Case: Given a .mat file of step-response measurements from a motor, the agent writes one MATLAB script that splits the data, estimates P1D/P2D process models and a state-space model, compares validation fits, and saves the best model with Bode and residual plots.

Quick Start

Ask the agent to identify a linear model from your measurement data file, for example: identify a transfer function model from the data in experiments.mat and validate it on held-out data.

Frequently Asked Questions about matlab-identify-linear-system

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

FAQPage Schema
How do I estimate a transfer function from measured data in MATLAB?

Use tfest with the number of poles, zeros, and an estimated delay on an iddata object. Estimate the delay first with delayest, try delay values nk-1 through nk+1, and validate the model by simulation on held-out data using compare.

What is the difference between ssest and n4sid in System Identification Toolbox?

ssest uses n4sid subspace estimation as initialization, then refines the model via iterative optimization, outperforming standalone n4sid in most cases. Use n4sid mainly for order selection diagnostics and ssest for the final model.

When should I use a state-space model instead of a transfer function?

Use state-space models (ssest) for MIMO systems, high-order dynamics, or when you need a quick default model requiring only an order number. Transfer functions (tfest) suit SISO continuous-time systems with moderate complexity up to about 10 poles.

Why does my identified model fit training data well but fail on validation data?

This indicates overfitting from excessive model order or validating with prediction fit instead of simulation fit. Reduce the order, add regularization via arxRegul, and always validate by simulation on a held-out dataset.

Can I identify a model from closed-loop data with System Identification Toolbox?

Yes, but ARX and OE give biased plant estimates in closed loop. Use the indirect method, iv4 instrumental variables, or BJ/ARMAX with a correct noise model, and validate by simulation since prediction fit is misleadingly good in closed loop.

When should I not use linear system identification?

Avoid it when the system is strongly nonlinear, data quality is poor, or excitation is insufficient. Check nonlinearity with amplitude-dependence tests or isnlarx, and consider Hammerstein-Wiener, NLARX, or neural state-space models instead.