Waveform filter programs
|
Sections in this page:
Power spectral density computed by this program is the so-called one-sided PSD. This is, if P(f) is the Fourier transform of the normalized auto-correlation function, the output of the program is 2P(f). The rms-amplitude in a frequency band (f2-f1) is A=sqrt(2*P(f)*(f2-f1)) if P(f) is constant in the interval (f1,f2).
The Fourier transform presented in libfourier is scaled appropriately to represent coefficients of the Fourier integral transform (see libfourier documentation).
The maximum of the transform of the Boxcar taper is T, where T is the duration of the window. Similarly the maximum of the Fourier transform of the Hanning taper is 0.5*T, where the duration of the window is T.
Tapering stationary noise with a Hanning taper reduces total signal energy an thus the signal power obtained through an FFT. In his tutorial Agnew recommends to scale each sample of the series by , where is the -th sample of the taper and
is a measure for the loss in total signal power due to application of the taper. This applies only for staionary noise.
From Walter's Matlab scripts I took:
If data is the time series vector and y is the Hanning taper of appropriate length, Walter calculates
and
where ndata is the length of data and y.
For a Hanning taper
Thus
From Gradshteyn and Ryzhik (eq. 1.321 3) I find
Within the sum the contribution of both cos-terms will vanish, since both are averaged over one and two periods, respectively. Thus
Since foutra is not scaling the taper but scaling the power spectrum, we have to apply the factor 8/3 to the result of power spectrum calculation.
This factor 8/3=2.66667 was tested against the value for , when explicitely derived from a Hanning taper time series by the above formula.
In the Makefile you will find a section with test code. This offers instantaneous testing of PSD scaling in foutra.
For harmonic signals the FFT normalized to the duration of the available time window has an amplitude of the value of the maximum of the Fourier transform of the window function times half the amplitude of the time domain signal. To obtain a spectral representation with peaks of the amplitude of the time domain signal, the FFT must be scaled accordingly.
We understand
as the Fourier transformation of the time domain signal
If we apply a time domain window function to the function , we obtain the tapered function
and its Fourier transform
Let
be the harmonic signal under investigation. Then
and
where is Dirac's delta function with
and
such that
This way I obtain
for the Fourier transform of the tapered function. If we ignore interference with side-lobes from the negative frequency and side-lobes of potential other harmonics at nearby frequencies, we can approximate
and
The boxcar taper is defined as
with
and
The Hanning taper is defined as
with
(see Blackman, R.B. and Tukey, J.W. 1958. The measurement of power spectra. Dover Publications, Inc., New York. Section B.5) and
In the Makefile you will find a section with test code. This offers instantaneous testing of harmonic signal scaling in foutra.