Documentation Center

  • Trials
  • Product Updates

Contents

frest.simView

Package: frest

Plot frequency response model in time- and frequency-domain

Syntax

frest.simView(simout,input,sysest)
frest.simView(simout,input,sysest,sys)

Description

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.

Examples

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

% Open the Simulink model
watertank

% 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
frest.simView(simout,input,sysest)

See Also

|

Was this topic helpful?