Estimation of a spectral density function¶
Depending on the available data, we proceed differently:
if the data correspond to several independent realizations of the process, a statistical estimate is performed using statistical average of a realization-based estimator;
if the data correspond to one realization of the process at different time stamps (stored in a TimeSeries object), the process being observed during a long period of time, an ergodic estimate is performed using a time average of an ergodic-based estimator.
Applying the same decomposition,
and finally:
The objective is to get a statistical estimator from these
segments. We define the periodogram associated with the segment
by:
with and
.
Bias
where
is the squared module of the Fourier transform of the function
(Barlett window) defined by:
This estimator is biased but this bias vanishes when
as
.
Covariance
as
, which means that the fluctuations of the periodogram are of the same order of magnitude as the quantity to be estimated and thus the estimator is not convergent.
The periodogram’s lack of convergence may be easily fixed if we consider
the averaged periodogram over independent time series or
segments:
The averaging process has no effect on the significant bias of the periodogram.
The use of a tapering window may significantly reduce
it. The time series
is replaced by a tapered time
series
in the computation of
. One gets:
where is the square module of the Fourier transform
of
at the frequency
. A judicious choice of
tapering function such as the Hann window
can
dramatically reduce the bias of the estimate:
(1)¶
The library builds an estimation of the spectrum on a TimeSeries by fixing the number of segments, the overlap size parameter and a FilteringWindows. The available ones are:
The Hamming window
with
=
The Hann window described in (1) which is supposed to be the most useful.
API:
See
Hann
See
Hamming
See
WelchFactory
Examples: