Package: frest

Plot frequency response model in time- and frequency-domain




frest.simView(simout,input,sysest) plots the following frequency response estimation results:

  • Time-domain simulation simout of the Simulink model

  • FFT of time-domain simulation simout

  • Bode of estimated system sysest

    This Bode plot is available when you create the input signal using frest.Sinestream or frest.Chirp. In this plot, you can interactively select frequencies or a frequency range for viewing the results in all three plots.

You obtain simout and sysest from the frestimate command using the input signal input.

frest.simView(simout,input,sysest,sys) includes the linear system sys in the Bode plot when you create the input signal using frest.Sinestream or frest.Chirp. Use this syntax to compare the linear system to the frequency response estimation results.


Estimate the closed-loop of the watertank Simulink® model and analyze the results:

% Open the Simulink model

% Specify portion of model to linearize and estimate
io(1)=linio('watertank/PID Controller',1,'input');
io(2)=linio('watertank/Water-Tank System',1,'output');

% Specify the operating point for the linearization and estimation
watertank_spec = operspec('watertank');
op = findop('watertank',watertank_spec);

% Create input signal for simulation
input = frest.Sinestream('Frequency',logspace(-1,2,10));

% Estimate the frequency response of the watertank model
[sysest,simout] = frestimate('watertank',op,io,input);

% Analyze the estimation results

Introduced in R2009b

Was this topic helpful?