Computing the Amplitude and Phase Spectrums

The power spectrum shows power as the mean squared amplitude at each frequency line but includes no phase information. Because the power spectrum loses phase information, you might want to use the FFT to view both the frequency and the phase information of a signal.

The phase information the FFT provides is the phase relative to the start of the time-domain signal. Therefore, you must trigger from the same point in the signal to obtain consistent phase readings. A sine wave shows a phase of –90° at the sine wave frequency. A cosine wave shows a 0° phase. Usually, the primary area of interest for analysis applications is either the relative phases between components or the phase difference between two signals acquired simultaneously. You can view the phase difference between two signals by using some of the advanced FFT functions.

The FFT produces a two-sided spectrum in complex form with real and imaginary parts. You must scale and convert the two-sided spectrum to polar form to obtain magnitude and phase. The frequency axis of the polar form is identical to the frequency axis of the two-sided power spectrum. The amplitude of the FFT is related to the number of points in the time-domain signal. Use the following equations to compute the amplitude and phase versus frequency from the FFT.

(A)

Phase spectrum in radians = Phase[FFT(A)] (B)

where the arctangent function returns values of phase between –π and +π, a full range of 2π radians.

The two-sided amplitude spectrum actually shows half the peak amplitude at the positive and negative frequencies. To convert to the single-sided form, multiply each frequency, other than DC, by two and discard the second half of the array. The units of the single-sided amplitude spectrum are then in quantity peak and give the peak amplitude of each sinusoidal component making up the time-domain signal.

To obtain the single-sided phase spectrum, discard the second half of the array.

Calculating Amplitude in Vrms and Phase in Degrees

To view the amplitude spectrum in volts rms (Vrms), divide the non-DC components by the square root of two after converting the spectrum to the single-sided form. Because you multiply the non-DC components by two to convert from the two-sided amplitude spectrum to the single-sided amplitude spectrum, you can calculate the rms amplitude spectrum directly from the two-sided amplitude spectrum by multiplying the non-DC components by the square root of two and discarding the second half of the array. The following equations show the entire computation from a two-sided FFT to a single-sided amplitude spectrum.

(C)
(D)

where i is the frequency line number, or array index, of the FFT of A.

The magnitude in Vrms gives the rms voltage of each sinusoidal component of the time-domain signal.

The amplitude spectrum is closely related to the power spectrum. You can compute the single-sided power spectrum by squaring the single-sided rms amplitude spectrum. Conversely, you can compute the amplitude spectrum by taking the square root of the power spectrum.

Use the following equation to view the phase spectrum in degrees.

Phase Spectrum in Degrees = (180/π)Phase FFT(A) (E)