
Simulink Frequency Response
Estimate frequency response from Simulink models using frestimate.
Install
npx skills add matlab/simulink-agentic-toolkit --skill simulink-frequency-response -g -a claude-code -y- Repository
- matlab/simulink-agentic-toolkit1.3k
- Category
- Engineering
- Updated
- 6d ago
- License
- See repository
- Context cost
- Mediumabout 2,928 tokens
- Runs scripts
- No, instructions only
What it does
Estimate frequency response from Simulink models using frestimate. Use when frequency response should be obtained from simulation rather than model linearization.
Simulink Frequency Response Estimation
Obtain frequency response data from Simulink models using simulation-based estimation (frestimate) when analytical linearization is not viable or as a validation tool.
When to Use
- Model contains hard discontinuities (PWM, switching, relay, quantizer) that linearize to zero or NaN
- Validating a linear model against a simulation based linearization of a Simulink model
- Estimating frequency response directly from simulation data
When NOT to Use
- Model linearizes cleanly with
linearize, usesimulink-linearizeinstead - Working with measured data only (no Simulink model), use System Identification Toolbox
Workflow
1. Define I/O → 2. Choose Signal → 3. Configure → 4. Estimate → 5. Fit (optional)
(linio) (PRBS/Sinestream) (constraints) (frestimate) (tfest)
Stage 1: Define I/O Points
Determine I/O points for the estimation 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")]; -
Root-level Inport/Outport blocks exist → use
model_readat root scope (depth"0") to identify root-level Inport/Outport blocks, then define linio at those blocks (trace Outport blocks upstream to their source for the output linio point).
Case B, Cannot determine IO points:
