Open Simulink® model.
mdl = 'scdplane'; open_system(mdl)
To learn more about general model requirements, see Model Requirements.
Specify input and output points for frequency response estimation, using linearization I/O points.
io(1) = linio('scdplane/Sum1',1) io(2) = linio('scdplane/Gain5',1,'output')
Caution Avoid placing I/O points on bus signals.
Create an input signal for estimation.
sys = linearize('scdplane',io); input = frest.Sinestream(sys)
(Optional) If your model has not reached steady state, initialize the model at a steady state operating point.
Disable all source blocks that generate time-varying signals in the signal path of the linearization outputs. Such time-varying signals can interfere with the signal at the linearization output points and produce inaccurate estimation results.
Identify the time-varying source blocks.
srcblks = frest.findSources('scdplane',io);
Disable these source blocks.
opts = frestimateOptions; opts.BlocksToHoldConstant = srcblks;
Estimate the frequency response.
[sysest,simout] = frestimate('scdplane',io,input,opts);
sysest is the estimated frequency
simout is the simulated output
that is a
For more information about syntax and argument descriptions,
Tip To speed up your estimation or decrease memory requirements, see Managing Estimation Speed and Memory.
Open the Simulation Results Viewer to analyze the estimated frequency response. For example:
You can compare the estimated frequency response (
to a system you linearized using exact linearization (