Simulink Control Design™ - MathWorks

(Tuis.) #1
Create a sinestream input signal. Use the linearization result as an input argument to
automatically set various parameters of the sinestream input signal, such as the set of
frequencies and the number of periods for each frequency, based on the linear system.

in = frest.Sinestream(sys);
in.Amplitude = 0.5

The sinestream input signal:

Frequency : [0.0034142;0.0054345;0.0086502;0.013768 ...] (rad/s)
Amplitude : 0.5
SamplesPerPeriod : [110417;69370;43582;27381 ...]
NumPeriods : [4;4;4;4 ...]
RampPeriods : 0
FreqUnits (rad/s,Hz): rad/s
SettlingPeriods : [1;1;1;1 ...]
ApplyFilteringInFRESTIMATE (on/off) : on
SimulationOrder (Sequential/OneAtATime): Sequential

The software selects 25 frequencies at which to compute the response. These frequencies
vary between 0.0034 rad/s and 14.5 rad/s. The frequencies that are automatically selected
focus on where interesting dynamics occur (such as the anti-resonance at 6.28 rad/s). The
number of periods that it will take for the system to reach steady state is estimated for
each of these frequencies and varies between 1 period (for 0.0034 rad/s) and 188 periods
(for 14.5 rad/s).

Estimate the frequency response using this input signal. frestimate simulates the
model with the input signal, which can take a long time in normal simulation model. To
speed up the simulation, configure the model to use rapid accelerator mode.

set_param(mdl,'SimulationMode','rapid');

Using rapid accelerator mode can significantly increase the speed of the simulation. The
actual speed imporvement depends on your computer configuration.

To run the frequency response estimation use the following command.

sysest = frestimate(mdl,in,io);

For this example, you can load the estimation result from a MAT-file.

load scdskyhogg_frestresults.mat;

5 Frequency Response Estimation

Free download pdf