LOW VARIANCE SPECTRAL ANALYSIS :
In this second tutorial, we will explore AutoSignal's spectral methods for that instance where low variance spectral power estimates are needed. Here it is assumed that accuracy in the power measurements is the primary consideration.
Generating A Test Signal
Select the Generate Signal option in the Edit menu or Main toolbar.
For this tutorial, we will create a data set that contains two sinusoids in the lower half of the Nyquist range. A high power component at a low frequency is combined with a 10dB component at a much higher frequency. 20% white noise is added.
Click Read and select the file tutor2.sig from the Signals subdirectory.
The following signal expression is imported:
F1=SIN(2*PI*X*200+PI/4)
F2=0.31622777*SIN(2*PI*X*1600+PI)
Y=F1+F2
The X (time) values vary from 0 to 0.1 with a 0.0001 sample increment. The Nyquist frequency is thus 5000 (half the 10000 sampling frequency).
Click OK to process the current signal.
An AutoSignal graph is presented containing the generated data.
Click OK to accept the generated data. Click Yes when asked to update the main data table with the revised data.
The 1001 point generated data set is now displayed in the main status window.
A Parametric LeastSquares Reference
The variance of an FFT does not decrease when the data length is increased. Instead, the variance is a constant whose square root (standard deviation) is approximately equal to the mean power present in the signal. To reduce the variance of FFTbased spectral estimates, ensemble averaging and orthogonal taper techniques are used. We will explore both methods in this tutorial.
There are various ways to appraise the reduction in spectral variance. The most widely used approach is to analyze multiple data sets with different sizes or S/N ratios and to then compare the variance against a theoretical lower variance bound. To keep this tutorial as simple as possible, we will explore variance reduction using only this single data set and we will seek a target variance based on the parametric standard deviations arising from a leastsquares nonlinear minimization.
Select the Parametric Interpolation and Prediction option in the Process menu or toolbar. Use the defaults (AR,Data FB algorithm, order 40, Undamped model, Enable checked for NL Optimization). Change the Signal Subspace to 4.
The two components are shown on the Y axis in the lower graph. The fit is shown in the Y2 axis.
Click the Numeric Summary button and take note of the fitted parameters and statistics.
r2 Coef Det 
DF Adj r2 
Fit Std Err 
Fvalue 
0.96029044 
0.96005074 
0.15000321 
4812.38723 
Parameter Statistics
Comp 1 Sine

Parm 
ValueStd 
Error 
tvalue 
95% Confidence Limits 
Ampl 
0.99287443 
0.00670497 
148.080371 
0.97971693 
1.00603194 
Freq 
200.028537 
0.03719958 
5377.17223 
199.955539 
200.101536 
Phse 
0.78143857 
0.01357737 
57.5544967 
0.75479501 
0.80808213 
Comp 2 Sine

Parm 
ValueStd 
Error 
tvalue 
95% Confidence Limits 
Ampl 
0.30991410 
0.00670834 
46.1983393 
0.29674998 
0.32307821 
Freq 
1599.93973 
0.11898820 
13446.2048 
1599.70624 
1600.17323 
Phse 
3.15957593 
0.04318540 
73.1630537 
3.07483101 
3.24432085 
In this case, the 95% confidence limits about the fitted parameters bracket the original generated parameters. Note the 0.0067 amplitude standard error for both of the components. The values you see will probably differ from these as a consequence of the 20% random noise component.
Close the Numeric Summary and click on the View Residuals button. Be sure the SNP option is selected. It is the second from the end of the toolbar.
The stabilized normal probability plot should be similar to the following graph where the residuals are confirmed as being normally distributed. The blue line is a 90% critical limit. In 1 of 10 random Gaussian noise sets, a single SNP point will reach this 90% critical limit. The green line is a 95% limit, the yellow line a 99% limit, and the red line is a 99.9% limit.
When all of the SNP points fall within this 90% range, there is high confidence that the residuals are normally distributed. Leastsquares parametric estimates and errors can only be considered statistically valid when the residuals from the fit have a Gaussian distribution.
Close the Residuals window. Close the Parametric Interpolation and Prediction option using the OK button.
SegmentedOverlapped Fourier Spectrum ("Periodogram")
There are two Fourier procedures in AutoSignal that can be used to produce reduced variance spectral estimates. The first of these is the "periodogram". For a stationary data series, each subset of the full data sequence should have the same spectral characteristics. It is thus possible to average a series of FFTs in order to produce a lower variance estimate. The FFTs are made within a sliding window (a smaller segment size) that is moved across the data sequence with a specified measure of overlap. The smaller size FFT results in decreased resolution. The resolution is sacrificed in exchange for less variability in the final spectral estimates.
AutoSignal's implementation of the periodogram method saves each of the individual FFT spectra for display and computes not only an average spectrum but also a standard deviation at each frequency. Further, to aid comparisons, each segment is normalized so that its power is equal to the power in the full length data record. If a data window is used, an additional normalization is made to conserve power. Stationary data are thus assumed. Note that the average of the set of normalized spectra will not usually contain exactly the same power as the original data. For stationary data, the error is tytut2_imgally much less than 1%.
Despite the conservation of power, the height of the peaks in the averaged spectrum will evidence some attenuation if data windowing is used. Although this attenuation is not a factor in gauging relative power when a normalized dB scale is used, it does make it impossible to directly infer sinusoidal amplitudes or powers from the heights of the spectral peaks. To best see how close the segmentedoverlapped FFT can come to offering the 0.0067 amplitude standard errors from the parametric fit, we will not use a data tapering window.
Select the Fourier Spectra of Segmented Data option in the Spectral menu or toolbar. Set the window to None and enter 250 in the segment length (Seg n) field. Be sure the overlap % is set at 50. Set the FFT length (FFT n) to 8192. Select the Amplitude plot, and set the signal count (sig) to 2.
Be sure the Toggle Display of Reference Data in the graph's toolbar is on.
Turn off the Toggle Reference Labels option in the graph's toolbar (these labels are useful mainly for nonstationary data).
The two peaks in the amplitude spectrum are clearly visible above the noise background. Note that 7 segments are averaged to produce the composite spectrum.
Optimizing A SegmentedOverlapped Fourier Spectrum
Click the List Data button. In the Format menu of the summary window, turn off all display options except Add Avg,SD Amplitude. Scroll down and view the amplitude standard deviations for the spectrum at the 200 and 1600 frequencies.
Chnl 
Frequency 
Amplitude 
SD[7] 
164 
200.195312 
0.99168632 
0.01758334 
1311 
1600.34180 
0.30944798 
0.01387409 
The amplitude standard deviations are approximately 23 times greater than those derived from the nonlinear sinusoidal fit.
Optimizing the segment size and overlap is not generally a pleasant task. In general, a large number of segments will not substantially improve the variance. Tytut2_imgally, there is little variance reduction beyond 5070% overlap, regardless of whether data windowing is used. The following results are for a 90% overlap where 31 spectra are averaged:
Chnl 
Frequency 
Amplitude 
SD[31] 
164 
200.195312 
0.99262565 
0.01754968 
1311 
1600.34180 
0.30830652 
0.01276679 
Here are the results when a segment size of 125 is used with a 50% overlap. There are 15 spectra averaged:
Chnl 
Frequency 
Amplitude 
SD[15] 
164 
200.195312 
0.99384938 
0.02545793 
1311 
1600.34180 
0.30861298 
0.02168984 
An improvement is realized with a segment size of 500 and a 75% overlap, Five spectra are averaged:
Chnl 
Frequency 
Amplitude 
SD[5] 
164 
200.195312 
0.99002786 
0.01105447 
1311 
1600.34180 
0.30858435 
0.00949745 
With so few spectra, 90% overlaps offers a modest advantage. There are 11 spectra averaged:
Chnl 
Frequency 
Amplitude 
SD[11] 
164 
200.195312 
0.99001860 
0.00949715 
1311 
1600.34180 
0.30752915 
0.00959042 
The SD values in this last set are about 40% higher than the 0.0067 amplitude SD values in the parametric fit. Although these differences may seem considerable, all of the cases represent a major reduction in variance from processing the full data record with a single FFT. If you select a segment size that gives good resolution of spectral features and you further use a 50% overlap, the results should be satisfactory. Note that all of the settings did a very good job in accurately rendering the two amplitudes.
Impact Of Data Windowing
At this point, it is instructive to compare the results when a data tapering window is used. The following results are for the last of the settings except that the Hann (cs2 Hann) window is used:
Chnl 
Frequency 
Amplitude 
SD[11] 
164 
200.195312 
0.80789356 
0.00760060 
1311 
1600.34180 
0.24993460 
0.00696540 
Although the power of the input data is preserved regardless of segment length, overlap, and data windowing, the amplitudes are reduced as a consequence of the smearing introduced by the data tapering window, and the SD values also reflect this effect. Bear in mind that the amplitudes and power values represented by spectral peaks will diminish with the spectral width of the window. The results for a 4component cosine window (cs4 BHarris min) follow. A cs4 window has a onesided spectral width of 4 frequency bins as compared to 2 for a cs2 window and 3 for a cs3 window. Note the further attenuation of amplitude values.
Chnl 
Frequency 
Amplitude 
SD[11] 
164 
200.195312 
0.69905393 
0.00671690 
1311 
1600.34180 
0.21561025 
0.00651382 
When a data window is used, only relative power comparisons should be made.
Close the FFT Data Summary window and change the plot to the dB Norm format. The window should still be set to None.
The individual spectra are more apparent with this format. Note that the second peak in both the averaged and constituent spectra is 10dB below the first peak.
Select the cs4 BHarris min window.
Note that the second peak remains 10dB below the first peak. Also, you can see the smoothing effect that is introduced by the frequency domain convolution of the data window and data.
Error Bars
Use the left mouse button to zoom in on the second peak. Click the Show Error Bars button to enable the display of error bars.
Click on the Set Error Bar Type and Level button. Select 95% in the As Pred Interval in order to compute 95% prediction intervals. Click OK to close the Error Bars dialog.
Note that the error bars consist of 95% prediction intervals which tighten dramatically in the vicinity of the second spectral peak. This is particularly strong evidence of a statistically valid spectral component. It is very unlikely that a peak arising from noise will be present in all of the segments.
Significance Levels
With ensemble averaging and the ability to inspect error bars, critical limits are more of a secondary tool for confirming that spectral peaks are unlikely to have arisen from random noise. Because of the complexity of segmentedoverlapped FFTs, AutoSignal offers critical limits only for the nonwindowed case. Even for this simplest instance, trivariate (4D) Chebyshev polynomial critical limit models are needed.
Click the Show Error Bars button to disable the display of error bars. Right click in the graph region to restore full scaling (this clears the zoomin). Again select None for the window. Set the overlap % to 90.
Click the Toggle Display of Reference Data button to turn off the display of the spectra for the individual segments.
Click the Show Significance Levels button.
Both peaks are shown to be statistically valid well in excess of the 99.9% critical limits. In 1000 white noise data sets of equivalent variance, only 1 is likely to contain a peak that reaches the magnitude of the red line.
Stationary Assumption
For a segmentedoverlapped Fourier Spectrum to be valid, the data must be widesense stationary. Often the individual spectra in the 2D plot can alert you to nonstationary data. Visualizing a stationary signal is much easier, however, using a 3D plot.
Select the Display as 3D Plot option. Confirm that Contour is selected in the 3D Profile.
The dB Norm data for all 31 segments is plotted in a 3D contour plot that readily confirms that the two spectral components are present in approximately equal magnitudes across all segments.
Click the OK button to close the 3D display window. Click the OK button to close the Segmented Fourier Spectrum window.
Multitaper Spectral Analysis
The second Fourier option in AutoSignal for generating reduced variance spectra is the multitaper procedure. In a multitaper procedure, a set of orthogonal tapers is applied to the data and the spectrum from each is averaged in some manner to produce a composite spectrum. Unlike the segmentedoverlapped approach which uses only a portion of the data stream for each individual spectrum, a multitaper procedure uses the full data stream with each taper.
A multitaper procedure is somewhat similar to averaging the spectra from a variety of data tapering windows. In that case, there would be a certain redundancy since the different tapering windows are highly correlated (all have a very common peak shape). Unlike conventional data tapers, the orthogonal tapers used in producing a multitaper spectrum are uncorrelated. Only the first of the data tapering windows has the traditional shape.
The spectra from the different tapers do not produce a common central peak for a harmonic component. Only the first taper produces a central peak at the harmonic frequency of the component. The other tapers produce spectral peaks that are shifted slightly up and down in frequency. Each of the spectra contribute to an overall spectral envelope for each component.
The advantages in multitaper analysis are that no Fourier resolution is sacrificed and there is no loss of information at the extremes of the data. Whereas the information near the bounds is indeed lost with the first taper, it is included and indeed emphasized in the subsequent tapers. The spectral envelope associated with each component makes relative power determinations a straightforward matter.
The disadvantage is that the spectral envelope associated with each component does not readily offer sharp frequency resolution. Further, this is a tapering procedure that alters the original data. Even when power is conserved by normalizing the composite spectrum to match the power within the raw data, there is the smearing that arises from the frequency domain convolution (the time domain multiplication of a tapering window is equivalent to a convolution within the frequency domain). Absolute amplitudes and powers cannot be inferred directly from multitaper peaks since the magnitudes are attenuated by this spreading effect.
Select the Fourier Multitaper Spectra option in the Spectral menu or toolbar. Be sure the algorithm is set to Adapt Wts, the width of the spectra window nPi is set to 4, and the number of tapers nWin is set to 5. Set the FFT length Nmin to 4096. Set the plot to dB Norm/F. Set the peak count sig to 2.
Be sure the Toggle Display of Reference Data option is off.
Select a logarithmic Y2 axis.
Note the tabletop shaped spectral peaks characteristic of a multitaper spectra. This shape makes it easy to visually discern the relative spectral power, but it is hard to locate the central frequency of the envelope that defines each peak. AutoSignal uses the peak locations in the Fratio spectrum to assign peak frequencies. The F values are a measure of significance and are not directly related to the variance.
Significance
The Fvalues are usually a good measure of significance, but peaks in the Fvalue spectrum can occur at frequencies where only noise is present. As a second check on the significance of spectral peaks, critical limits are available.
Click on the Show Significance Levels button to enable the critical limits.
As was true in the segmentedoverlapped Fourier spectrum, both peaks are significant well beyond a 99.9% critical limit. In 1000 samples of white noise with an equivalent variance, not a single spectrum would contain a peak equaling the power of either component.
Multitaper Spectral Envelope
It is instructive to closely examine a multitaper spectral peak.
Toggle off the critical limits.
Toggle on the Toggle Display of Reference Data button. Zoom in on the second peak using the left mouse button.
Only the first taper, the white curve, produces the traditional singular spectral peak.
Change the plot format to dB Norm, change Nmin to 16384, and zoomin even more closely on the second peak.
Enable the Toggle Reference Labels button.
Note that the second taper in the series (the blue curve) produces two peaks within the envelope with a null at the central peak frequency. The third taper (green) produces three peaks, the fourth taper (the lower yellow curve) has four peaks, and the fifth taper (red) contains five. This should give some flavor for the uncorrelated nature of the individual spectra and why the composite peak has this unusual shape.
Multitaper Spectral Leakage
There is a limit to the number of tapers that can be used in multitaper analysis. The spectral leakage increases with each taper in the sequence. AutoSignal limits the maximum number of windows to a practical upper limit, although a lower nWin value may be needed for high dynamic range processing.
Click OK to close the Multitaper Spectral procedure.
Minimum Variance Spectrum
The Minimum Variance spectral procedure offers an accurate representation of relative power of spectral components. These algorithms are not based upon Fourier analysis, but are derived from the estimated autocorrelation matrix. The procedure has a very close relationship with AR (autoregressive) modeling.
Select the Minimum Variance Spectrum option in the Spectral menu or toolbar. Change the algorithm to Musicus and the order to 100. Be sure the spectrum is Full Range and that 8193 points are in the spectrum (n). Change the plot format to dB0(Spec) and set the peak count (sig) to 2.
Click the Display Maxima button until both frequencies and spectral magnitudes are displayed as labels.
The procedure offers a good estimate of the second peak's power relative to the first. Critical limits are also available.
Enable the Show Significance Levels button in order to display the critical limits.
As with the other methods, both peaks are shown to be significant beyond a 99.9% critical limit.
Click OK to close the Minimum Variance spectral procedure. 