Documentation Center |
Output power spectrum of time series models
spectrum(sys)
spectrum(sys,{wmin, wmax})
spectrum(sys,w)
spectrum(sys1,...,sysN,w)
ps = spectrum(sys,w)
[ps,w] = spectrum(sys)
[ps,w,sdps]
= spectrum(sys)
spectrum(sys) creates an output power spectrum plot of the identified time series model sys. The frequency range and number of points are chosen automatically.
sys is a time series model, which represents the system:
Where, e(t) is a Gaussian white noise and y(t) is the observed output.
spectrum plots abs(H'H), scaled by the variance of e(t) and the sample time.
If sys is an input-output model, it represents the system:
Where, u(t) is the measured input, e(t) is a Gaussian white noise and y(t) is the observed output.
In this case, spectrum plots the spectrum of the disturbance component He(t).
spectrum(sys,{wmin, wmax}) creates a spectrum plot for frequencies ranging from wmin to wmax.
spectrum(sys,w) creates a spectrum plot using the frequencies specified in the vector w.
spectrum(sys1,...,sysN,w) creates a spectrum plot of several identified models on a single plot. The 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');
ps = spectrum(sys,w) returns the power spectrum amplitude of sys for the specified frequencies, w. No plot is drawn on the screen.
[ps,w] = spectrum(sys) returns the frequency vector, w, for which the output power spectrum is plotted.
[ps,w,sdps] = spectrum(sys) returns the estimated standard deviations of the power spectrum.
For discrete-time models with sampling time Ts, spectrum uses the transformation z = exp(j*w*Ts) to map the unit circle to the real frequency axis. The spectrum is only plotted for frequencies smaller than the Nyquist frequency pi/Ts, and the default value 1 (time unit) is assumed when Ts is unspecified.
ps |
Power spectrum amplitude. If sys has Ny outputs, then ps is an array of size [Ny Ny length(w)]. Where ps(:,:,k) corresponds to the power spectrum for the frequency at w(k). For amplitude values in dB, type psdb = 10*log10(ps). |
w |
Frequency vector for which the output power spectrum is plotted. |
sdps |
Estimated standard deviation of the power spectrum. |