LTPDA Toolbox™ |
contents |

Spectral windows are typically used in spectral analysis algorithms. In all LTPDA spectral analysis
functions, spectral windows are specified as parameters in an input parameter list. The following
example shows the use of `ao/psd` to estimate an Amplitude Spectral Density of
the time-series captured in the input AO, `a`. The help for ao/lpsd
reveals that the required parameter for setting the window function is `'Win'`.

% Parameters nsecs = 1000; fs = 10; % Create input AOs x1 = ao(plist( 'waveform', 'sine wave', 'f',0.1, 'A',1, 'nsecs',nsecs, 'fs',fs)); x2 = ao(plist( 'waveform', 'noise', 'type', 'normal', 'nsecs',nsecs, 'fs',fs)); % Add both x = x1 + x2; % Compute psd with Blackman-Harris window z = psd(x,plist('win','BH92')); % Plot iplot(z);

In this case, the size of the spectral window (number of samples) may not match the length
of the segments in the spectral estimation. The `psd` algorithm then
recomputes the window using the input design but for the correct length of window function.

The table in the previous section shows how each standard spectral window is defined by the
Peak Side-Lobe level (`psll`). However, Kaiser's window allows the user to define the `psll` of the window.

The following example shows the importance of selecting a suitable `psll` according to each application. The example creates
1/f noise (in fact, noise generated
by a pole-zero model with a pole at low frequencies) and computes the Amplitude Spectrum Density (ASD) with three different `psll`
values. The ASD with the lowest value shows a bias at high frequencies compared with the response of the pzmodel used to generate
the data (in black). This effect is due to the power added by the high order lobes of the window. The ASD with the highet value of the
`psll` adds a feature at low frequencies because the main lobe of the window is too wide. Only the
middle value gives an estimation of the ASD without adding window related features.

% Parameters nsecs = 10000; fs = 1; % Create pzmodel with a low frequency pole pzm = pzmodel(1e5,[1e-7,0.1],[]); % Build (nearly) 1/f noise x = ao(plist('pzmodel',pzm, 'nsecs',nsecs, 'fs',fs)); % Compute psd with Blackman-Harris window z1 = psd(x,plist('scale','ASD','win','Kaiser','psll',50)); z1.setName('psll = 50'); z2 = psd(x,plist('scale','ASD','win','Kaiser','psll',100)); z2.setName('psll = 100'); z3 = psd(x,plist('scale','ASD','win','Kaiser','psll',1000)); z3.setName('psll = 1000'); % Plot r = resp(pzm,plist('f1',1e-4,'f2',1)); r.setName('response') r.setPlotinfo(plist('color','k')) iplot(z1,z2,z3,abs(r));

What are LTPDA spectral windows? | Spectral Estimation Methods |

©LTP Team