spectrum
Plot or return output power spectrum of time series model or disturbance spectrum of linear input/output model
Syntax
Description
Plot Results
spectrum(
plots the output power
spectrum of an identified time series model sys
)sys
or the
disturbance spectrum of an identified input/output model
sys
. The function chooses the frequency range and
number of points automatically.
If
sys
is a time series model, thensys
represents the system:Here, e(t) is Gaussian white noise and y(t) is the observed output.
spectrum
plots |H'H|, scaled by the variance of e(t) and the sample time.If
sys
is an input/output model,sys
represents the system:Here, u(t) is the measured input, e(t) is Gaussian white noise, and y(t) is the observed output.
In this case,
spectrum
plots the spectrum of the disturbance component He(t).
For discrete-time models with sample time
Ts, spectrum
uses the transformation to map the unit circle to the real frequency axis. The
function plots the spectrum only for frequencies smaller than the Nyquist
frequency π/Ts, and uses the default
value of 1 time unit when Ts
is unspecified.
spectrum(sys1,...,sysN,
creates a
spectrum plot of several identified models on a single plot. The
w
)w
argument is optional.
You can specify a color, line style, and marker for each model. For example,
spectrum(sys1,'r',sys2,'y--',sys3,'gx')
uses red for
sys1
, yellow dash markers for sys2
,
and green x
markers for sys3
.
Return Results
Examples
Input Arguments
Output Arguments
Version History
Introduced in R2012a