- name
SKILL.md
스킬 파일은 게시자의 저장소에 그대로 있습니다.
복사한 명령을 터미널에 붙여넣습니다. 이 SKILL.md가 해당 에이전트에 설치됩니다.
npx skills add matlab/simulink-agentic-toolkit --skill simulink-frequency-response -a cursor -y복사한 명령을 터미널에 붙여넣습니다. 이 SKILL.md가 해당 에이전트에 설치됩니다.
npx skills add matlab/simulink-agentic-toolkit --skill simulink-frequency-response -a claude-code -y복사한 명령을 터미널에 붙여넣습니다. 이 SKILL.md가 해당 에이전트에 설치됩니다.
npx skills add matlab/simulink-agentic-toolkit --skill simulink-frequency-response -a codex -y복사한 명령을 터미널에 붙여넣습니다. 이 SKILL.md가 해당 에이전트에 설치됩니다.
npx skills add matlab/simulink-agentic-toolkit --skill simulink-frequency-response -a grok -y복사한 메시지를 Grok Bot 채팅에 보냅니다. Bot이 GitHub에서 이 SKILL.md를 가져와 모든 Bot이 공유하는 스킬에 추가합니다.
Install this skill: https://github.com/matlab/simulink-agentic-toolkit/tree/HEAD/skills-catalog/control-systems/simulink-frequency-response게시자 제공
Obtain frequency response data from Simulink models using simulation-based estimation (frestimate) when analytical linearization is not viable or as a validation tool.
linearize — use simulink-linearize instead1. Define I/O → 2. Choose Signal → 3. Configure → 4. Estimate → 5. Fit (optional)
(linio) (PRBS/Sinestream) (constraints) (frestimate) (tfest)
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 linio points. All linio points 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 with model_read.
io = [linio(sprintf("%s/InputBlock", mdl), 1, "input"); ...
linio(sprintf("%s/OutputBlock", mdl), 1, "output")];
Root-level Inport/Outport blocks exist → use model_read at 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:
If none of the above apply → do not guess. Ask the user which signals to use as estimation input and output. Present the available blocks/signals from the model to help them decide.
Pre-flight checks (before choosing a signal):
Decision (follow in order):
frest.PRBS (DEFAULT)frest.PRBS with Ts matching the I/O sample time, or frest.createFixedTsSinestream if per-frequency data neededfrest.Sinestream (continuous) or frest.createFixedTsSinestream (discrete)Prefer frest.PRBS — it estimates the full frequency range in a single simulation. Sinestream simulates each frequency sequentially and is significantly slower for broadband estimation.
PRBS (default):
in = frest.PRBS(Ts=Ts, Amplitude=0.01, Order=10, NumPeriods=2);
If the I/O signal is discrete, set Ts to match the signal sample time. If continuous, set Ts to a value that provides sufficient temporal resolution. Choose Amplitude small enough to stay in the linear regime of saturations/nonlinearities.
Why PRBS first? A single PRBS simulation estimates the full frequency range at once. Sinestream simulates each frequency sequentially — for 30 frequencies with 8 periods each, this can take 10-100x longer. Use Sinestream only when you need precise per-frequency data (e.g., gain/phase margin at specific crossover frequencies).
Sinestream (continuous models):
in = frest.Sinestream(Frequency=logspace(-1, 2, 30), Amplitude=0.01);
in.NumPeriods = 8;
in.SettlingPeriods = 3;
The filtering constraint: NumPeriods - SettlingPeriods >= 3 when ApplyFilteringInFRESTIMATE = "on" (default). Violating this throws an error at estimation time.
Fixed-Ts Sinestream (discrete models):
Ts = 0.01;
in = frest.createFixedTsSinestream(Ts, {wmin, wmax});
in.Amplitude = 0.01;
in.NumPeriods = 8;
in.SettlingPeriods = 3;
Use the cell syntax {wmin, wmax} for the frequency range — this auto-selects frequencies that are valid integer divisors of the sampling frequency. Do NOT pass an explicit frequency vector:
% CORRECT — cell syntax auto-selects valid frequencies
in = frest.createFixedTsSinestream(Ts, {wmin, wmax});
% WRONG — explicit vector (most frequencies violate integer-multiple constraint)
in = frest.createFixedTsSinestream(Ts, logspace(-1, 2, 30)); % Error
When to use Sinestream instead of PRBS:
Check simulation time: Always verify that the signal duration is practical before launching the estimation:
tFinal = getSimulationTime(in);
fprintf("Estimated simulation time: %.1f seconds\n", tFinal);
If tFinal is too big compared to Ts, use larger lower frequency bounds for estimation.
Determine where to start the experiment. Choose one:
sysest = frestimate(mdl, op, io, in, opts);
op and opts are optional arguments. If op is not provided, the experiment will start at model initial conditions.
opts is a frestimateOptions object. Pass it when time-varying sources need to be disabled (see below).
The result is an frd (frequency response data) object.
Only perform this step if a parametric model (transfer function, state-space, zpk) is required. If the goal is frequency response data only (e.g., Bode plot, gain/phase margins from frd), stop after Stage 4.
Convert the non-parametric frd to a parametric model:
sysFit = tfest(sysest, np, nz);
fprintf("Fit: %.1f%%\n", sysFit.Report.Fit.FitPercent);
Time-varying source blocks (Step, Ramp, Signal Generator, etc.) can drive the model away from its steady-state operating point during estimation. When this happens, the system does not remain near the operating point and the estimated response is unreliable — gain estimates can be off by orders of magnitude while executing without error.
When to disable sources:
How to identify and disable them:
Use frest.findSources to identify time-varying source blocks in the estimation path, then set BlocksToHoldConstant so they are held at their initial value during estimation:
srcblks = frest.findSources(mdl, io);
opts = frestimateOptions;
opts.BlocksToHoldConstant = srcblks;
sysest = frestimate(mdl, io, in, opts);
Note: frest.findSources requires model compilation. The perturbation input is not affected by BlocksToHoldConstant.
When linearize returns zero, follow this sequence:
% 1. Try linearize
sys = linearize(mdl, io);
if dcgain(sys) == 0
% 2. Disable time-varying sources if present
srcblks = frest.findSources(mdl, io);
opts = frestimateOptions;
opts.BlocksToHoldConstant = srcblks;
% 3. Fall back to frestimate with PRBS
in = frest.PRBS(Ts=Ts, Amplitude=0.01, Order=10, NumPeriods=2);
sysest = frestimate(mdl, io, in, opts);
% 4. Fit parametric model
sysFit = tfest(sysest, 2);
end
Do NOT use manual block substitution (replace_block) as a workaround for zero linearization. The frestimate approach is generalizable to any discontinuous model without requiring domain knowledge of each block's averaged equivalent.
frest.findSources and BlocksToHoldConstant to disable themfrest.PRBS for broadband estimation — faster than Sinestream for most workflows{wmin, wmax} with frest.createFixedTsSinestreamNumPeriods - SettlingPeriods >= 3 when filtering is enabledgetSimulationTime — Validate signal duration before running. Long simulations relative to max solver step size should prompt redesign.frestimate over manual block substitution for discontinuous modelstfest or ssest for fitting parametric models to frd resultsreplace_block as a general linearization workaroundCopyright 2026 The MathWorks, Inc.
>
---name: simulink-frequency-responsedescription: >---# skills-catalog/control-systems/simulink-frequency-response/SKILL.mdFAQ
게시자에게서 skills-catalog/control-systems/simulink-frequency-response/SKILL.md를 다운로드하거나 경로를 복사해 저장소를 엽니다. PlugMCP는 스킬을 목록에 올릴 뿐 파일을 호스팅하지 않습니다.
게시자가 https://github.com/matlab/simulink-agentic-toolkit에서 관리합니다.
Claude, Cursor, Codex, Grok Build는 게시자의 저장소에서 추가한 SKILL.md를 읽을 수 있습니다. Grok Bot은 채팅에서 스킬의 GitHub 폴더 링크를 보내면 설치합니다.