LTPDA Toolbox | contents | ![]() ![]() |
Univariate power spectral density is performed by the Welch's averaged, modified periodogram method.
psd estimates the power spectral density of time-series
signals, included in the input aos. Data are windowed prior to the estimation of the spectrum, by multiplying
it with a spectral window object, and can be detrended by polinomial of time in order to reduce the impact
of the border discontinuities. The window length is adjustable to shorter lenghts to reduce the spectral
density uncertainties, and the percentage of subsequent window overlap can be adjusted as well. The detrending is
performed on the individual windows. The user can choose the quantity being given in output among
ASD (amplitude spectral density), PSD (power spectral density), AS (amplitude spectrum), and PS (power spectrum).
Syntax
b = psd(a1,a2,a3,...,pl)
a1, a2, a3, ... are ao(s) containing the input time series to be evaluated. b includes the output object(s). The parameter list pl includes the following parameters:
The length of the window is set by the value of the parameter 'Nfft', so that the window is actually rebuilt using only the key features of the window, i.e. the name and, for Keiser windows, the PSLL.
As an alternative, the user can input, as a value for the 'Win' key, a string corresponding to the name of the window. In the case of Kaiser window, it's necessary to specify the additional parameter 'psll'.
If the user doesn't specify the value of a given parameter, the default value is used. |
Examples
1. Evaluation of the PSD of a time-series represented by a low frequency sinewave signal, superimposed to white noise. Comparison of the effect of windowing on the estimate of the white noise level and on resolving the signal.
x1 = ao(plist('waveform','sine wave','f',0.1,'A',1,'nsecs',1000,'fs',10)); x2 = ao(plist('waveform','noise','type','normal','nsecs',1000,'fs',10)); x = x1 + x2; y_lf = psd(x); y_hf = psd(x,plist('nfft',1000)); iplot(y_lf, y_hf)
2. Evaluation of the PSD of a time-series represented by a low frequency sinewave signal, superimposed to white noise and to a low frequency linear drift. In the example, the same spectrum is computed with different spectral windows.
x1 = ao(plist('waveform','sine wave','f',0.1,'A',1,'nsecs',1000,'fs',10,'yunits','m')); x2 = ao(plist('waveform','noise','type','normal','nsecs',1000,'fs',10,'yunits','m')); x3 = ao(plist('tsfcn', 't.^2 + t','nsecs',1000,'fs',10,'yunits','m')); x = x1 + x2 + x3; y_1 = psd(x,plist('scale','ASD','order',1,specwin('BH92'))); y_2 = psd(x,plist('scale','ASD','order',2,'win','BH92')); y_3 = psd(x,plist('scale','ASD','order',2,'win',specwin('Hanning'))); iplot(y_1, y_2, y_3);
![]() |
Using spectral windows | Cross-spectral density estimates | ![]() |
©LTP Team