Power Spectrum (Not in Base Package)

Computes the Power Spectrum, Sxx, of the input sequence X. Details

X is the input sequence.
Power Spectrum returns the harmonic power content of periodic signals. If X represents actual measurements in volts, the VI expresses the normalized units of the output sequence Power Spectrum in watts on a 1- basis.
error returns any error or warning from the VI. Refer to Signal Processing Error Codes for more information about these conditions.

Power Spectrum Details

The Power Spectrum of a function x(t) is defined as

,

where X(f) = F{x(t)}, and X* (f) is the complex conjugate of X(f).

The Power Spectrum VI uses the FFT and DFT routines to compute the power spectrum, which is given by

where represents the output sequence Power Spectrum, and n is the number of samples in the input sequence X.

When the number of samples, n, in the input sequence X is a valid power of 2

for m = 1, 2, 3,…,23,

the Power Spectrum VI computes the fast Fourier transform of a real-valued sequence using the split-radix algorithm and efficiently scales the magnitude square. The largest Power Spectrum the VI can compute using the FFT is 2^23 (8,388,608 or 8M).

When the number of samples in the input sequence X is not a valid power of 2

for m = 1, 2, 3,…,23,

where n is the number of samples, the Power Spectrum VI computes the discrete Fourier transform of a real-valued sequence using an efficient DFT algorithm and scales the magnitude square. The largest Power Spectrum the VI can compute using the fast DFT is

.

Let Y be the Fourier transform of the input sequence X and n be the number of samples in it. You can show that

.

You can interpret the power in the element of Y as the power in the element of the sequence, which represents the power in the negative harmonic. You can find the total power for the harmonic (DC and Nyquist component not included) using

The total power in the DC and Nyquist components are respectively.

If n is even, let . The following table shows the format of the output sequence corresponding to the Power Spectrum.

Array Element Interpretation
Power in DC component
Power at frequency f
Power at frequency 2f
Power at frequency 3f
.
.
.
.
.
.
Power at frequency (k-2)f
Power at frequency (k-1)f
Power in Nyquist harmonic
The following illustration represents the preceding table information.

If n is odd, let . The following table shows the format of the output sequence corresponding to the Power Spectrum.

Array Element Interpretation
Power in DC component
Power at frequency f
Power at frequency 2f
Power at frequency 3f
.
.
.
.
.
.
Power at frequency (k-2)f
Power at frequency (k-1)f
Power at frequency kf
The following illustration represents the preceding table information.

The format described in the preceding tables is an accepted standard in digital signal processing applications.