Spectrum Normalization
The spectrum of a signal is the square of the Fourier transform
of the signal. The spectral estimate using the commands spa
, spafdr
, and etfe
is normalized by the sample time T:
where WM(k) is the lag window, and M is the width of the lag window. The output covariance Ry(kT) is given by the following discrete representation:
Because there is no scaling in a discrete Fourier transform of a vector, the purpose of T is to relate the discrete transform of a vector to the physically meaningful transform of the measured signal. This normalization sets the units of as power per radians per unit time, and makes the frequency units radians per unit time.
The scaling factor of T is necessary to preserve the energy density of the spectrum after interpolation or decimation.
By Parseval's theorem, the average energy of the signal must equal the average energy in the estimated spectrum, as follows:
To compare the left side of the equation (S1
) to the right side
(S2
), enter the following commands. In this code,
phiy
contains between and with the frequency step given as follows:
load iddata1
Create a time-series iddata object.
y = z1(:,1,[]);
Define sample interval from the data.
T = y.Ts;
Estimate the frequency response.
sp = spa(y);
Remove spurious dimensions.
phiy = squeeze(sp.spec);
Compute average energy of the signal.
S1 = sum(y.y.^2)/size(y,1)
S1 = 19.4646
Compute average energy from the estimated energy spectrum, where S2 is scaled by T.
S2 = sum(phiy)/length(phiy)/T
S2 = 19.2076
Thus, the average energy of the signal approximately equals the average energy in the estimated spectrum.