| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Simulink Control Design |
| Contents | Index |
| Learn more about Simulink Control Design |
Plot frequency response model in time- and frequency-domain
frest.simView(simout,input,sysest)
frest.simView(simout,input,sysest,sys)
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
watertank
% Specify portion of model to linearize and estimate
io(1)=linio('watertank/PID Controller',1,'in');
io(2)=linio('watertank/Water-Tank System',1,'out');
% 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 magball model
[sysest,simout] = frestimate('watertank',op,io,input);
% Analyze the estimation results
frest.simView(simout,input,sysest)

![]() | frest.simCompare | frest.Sinestream | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |