psd_welch
PSD (Welch method - spectrum averaging).
Namespace: dsp::fourier
Prototype
tuple<Vecf, Vecf> psd_welch(const Veccf &x, int N, cstring fen="hn")
Parameters
x | Signal to be analyzed. |
N | Dimension of each window (that is, the resulting PSD resolution), in number of samples. |
fen | Type of windowing ("hn", "hm", "re", ...). |
Returns
A tuple with two elements: frequences vectors (normalized, between -0.5 and 0.5), and the spectrum.
Description
This function estimates the PSD using the spectrum averaging method: several PSD are computed using windowed parts of the signal (optionnaly with some overlap), then averaged.
Exemple
PSD and averaging