# Power Spectrum

The DFT or FFT of a real signal is a complex number, having a real and an imaginary part. You can obtain the power in each frequency component represented by the DFT or FFT by squaring the magnitude of that frequency component. Thus, the power in the kth frequency component—that is, the kth element of the DFT or FFT—is given by the following equation.

power = |X[k]|2, | (A)

where |X[k]| is the magnitude of the frequency component.

The power spectrum returns an array that contains the two-sided power spectrum of a time-domain signal and that shows the power in each of the frequency components. You can use Equation B to compute the two-sided power spectrum from the FFT.

| (B)

where FFT*(A) denotes the complex conjugate of FFT(A). The complex conjugate of FFT(A) results from negating the imaginary part of FFT(A).

The values of the elements in the power spectrum array are proportional to the magnitude squared of each frequency component making up the time-domain signal. Because the DFT or FFT of a real signal is symmetric, the power at a positive frequency of kΔf is the same as the power at the corresponding negative frequency of –kΔf, excluding DC and Nyquist components. The total power in the DC component is |X[0]|2. The total power in the Nyquist component is |X[N/2]|2.

A plot of the two-sided power spectrum shows negative and positive frequency components at a height given by the following relationship:

(ak2)/4 | (C)

where ak is the peak amplitude of the sinusoidal component at frequency k. The DC component has a height of A02 where A0 is the amplitude of the DC component in the signal.

The following figure shows the power spectrum result from a time-domain signal that consists of a 3 Vrms sine wave at 128 Hz, a 3 Vrms sine wave at 256 Hz, and a DC component of 2 VDC. A 3 Vrms sine wave has a peak voltage of 3.0 • or about 4.2426 V. The power spectrum is computed from the basic FFT function, as shown in Equation B.

## Converting a Two-Sided Power Spectrum to a Single-Sided Power Spectrum

Most frequency analysis instruments display only the positive half of the frequency spectrum because the spectrum of a real-world signal is symmetrical around DC. Thus, the negative frequency information is redundant. The two-sided results from the analysis functions include the positive half of the spectrum followed by the negative half of the spectrum, as shown in the previous figure.

A two-sided power spectrum displays half the energy at the positive frequency and half the energy at the negative frequency. Therefore, to convert a two-sided spectrum to a single-sided spectrum, you discard the second half of the array and multiply every point except for DC by two, as shown in the following equations.

GAA(i) = SAA(i), i = 0 (DC) | (D)

GAA(i) = (2SAA(i)), i = 1 to (N/2 – 1) | (E)

where SAA(i) is the two-sided power spectrum, GAA(i) is the single-sided power spectrum, and N is the length of the two-sided power spectrum. You discard the remainder of the two-sided power spectrum SAA, N/2 through N – 1.

The non-DC values in the single-sided spectrum have a height given by the following relationship:

(Ak2)/2 | (F)

Equation F is equivalent to the following relationship.

(Ak/)2 | (G)

where Ak/ is the root mean square (rms) amplitude of the sinusoidal component at frequency k.

The units of a power spectrum are often quantity squared rms, where quantity is the unit of the time-domain signal. For example, the single-sided power spectrum of a voltage waveform is in volts rms squared, Vrms2.

The following figure shows the single-sided spectrum of the signal whose two-sided spectrum the previous figure shows.

In the previous figure, the height of the non-DC frequency components is twice the height of the non-DC frequency component in the two-sided power spectrum. Also, the spectrum in the previous figure stops at half the frequency of that in the two-sided power spectrum.

## Loss of Phase Information

Because the power is obtained by squaring the magnitude of the DFT or FFT, the power spectrum is always real. The disadvantage of obtaining the power by squaring the magnitude of the DFT or FFT is that the phase information is lost. If you want phase information, you must use the DFT or FFT, which gives you a complex output.

You can use the power spectrum in applications where phase information is not necessary, such as calculating the harmonic power in a signal. You can apply a sinusoidal input to a nonlinear system and see the power in the harmonics at the system output.