Simulink Control Design™ - MathWorks

(Tuis.) #1

values for every time step except the last. For instance, in a To Workspace block, you can
set the Limit data points to last parameter to 1. Then, when the experiment ends, the
resulting workspace variable contains a vector of complex values, one for each frequency
specified in the Frequencies parameter.


Dependencies


To enable this port, set Estimation Mode to Online.


Data Types: single | double


Parameters


Sample time (Ts) — Experiment sample time
0.1 (default) | positive scalar | –1


The block is a discrete-time block that runs at a fixed sample time, specified with this
parameter. The largest frequency that you can estimate is the Nyquist frequency, π/Ts
rad/s. Best practice is to use a sampling time at least five times faster than the Nyquist
frequency,
Ts = π/(5ωmax) ≅ 0.6/ωmax or 0.1/fmax,


where , where ωmax is the highest frequency in Frequencies in rad/s, and fmax is the
highest frequency in Hz. The sample time must be small enough to estimate the fastest
desired frequency, but not so small as to introduce unnecessary computational burden.


If you set the sample time to –1, then the software determines the sample time on
compilation, based on the sources outside the block. Setting sample time to –1 disables
the internal checks in the block that ensure your estimation frequencies are below the
Nyquist frequency.


Tip


If you want to run the deployed block with different sample times in your application, set
this parameter to –1 and put the block in a Triggered Subsystem. Then, trigger the
subsystem at the desired sample time. If you do not plan to change the sample time after
deployment, specify a fixed and finite sample time.


Programmatic Use
Block Parameter: DiscreteTs
Type: scalar


Frequency Response Estimator
Free download pdf