Commit 038919c6 authored by thomas.forbriger's avatar thomas.forbriger
Browse files

ts/wf/foutra [TASK]: specify computed values are one-sided PSD

parent 66f5cabc
......@@ -733,6 +733,9 @@ int main(int iargc, char* argv[])
// we have an energy spectrum so far
// adjust scaling factor to obtain signal power
//
// This factor computes the one-sided PSD, i.e. twice the Fourier
// transform of the normalized auto-correlation function.
double scalingfactor=2.*tapscaling/Tw;
// scale to relative bandwidth if requested
......@@ -980,7 +983,7 @@ int main(int iargc, char* argv[])
/*! \page page_foutra Spectral analysis (foutra.cc)
*
* Sections in this page:
* - \ref sec_foutra_fourier_scaling
* - \ref sec_foutra_one_sided_PSD
* - \ref sec_foutra_hanning_PSD_scaling
* - \ref sec_foutra_scaling_harmonics
* - \ref subsec_foutra_scaling_harmonics_harmsig
......@@ -989,6 +992,15 @@ int main(int iargc, char* argv[])
* - \ref subsec_foutra_scaling_harmonics_tests
*
* <HR>
* \section sec_foutra_one_sided_PSD One-sided PSD
*
* 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).
*
* <HR>
* \section sec_foutra_fourier_scaling Scaling of Fourier transforms
*
* The Fourier transform presented in libfourier is scaled appropriately to
......
......@@ -21,23 +21,37 @@ column in each file specifies frequency in Hertz and the second column
specifies the corresponding spectral values. This format supports output with
logarithmic sampling along the frequency scale (-logascii).
By default (if -power or -harmonic are not selected) foutra computes Fourier
amplitude spectra.
If input units are K, then the output units of amplitude spectra are K/Hz.
Power spectral density
----------------------
Option: -power
If input units are K, then the output units of power spectra will
be K*K/Hz. The units for amplitude spectra then are K/Hz. If scaling
to the mean in a relative bandwidth is used (only applies for power
spectra; switch -scalerbw) the output units are K*K.
Foutra outputs the called the one-sided PSD (power spectral density) 2*P(f),
where P(f) is the Fourier transform of the normalized auto-correlation
function.
If input units are K, then the output units of power spectral density will
be K*K/Hz.
Option: -scalerbw
Option -scalerbw selects the computation of average signal power in a finite
relative bandwidth (rather than power spectral density). The square root of
this value is rms-amplitude in the finite relative bandwidth. The program
however outputs signal power, not rms-amplitude. The units of the output
values are K*K.
If P(f) is constant in the frequency band f1 to f2, then the rms-amplitude in
this band is A=sqrt(2*P(f)*(f2-f1)).
The integral over the power spectral density calculated by foutra
over the total bandwidth (over all frequencies from 0 Hz to Nyquist
frequency) provides the total power of the signal (i.e. the
variance of the input signal, i.e. the square of the rms value).
This is called the one-sided power spectral density.
Option -scalerbw selects the computation of average signal power in a finite
relative bandwidth (rather than power spectral density).
This value will be output upon selection of option -rms.
Amplitudes of harmonic signals
------------------------------
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment