The Discrete Fourier Transform of a vector (or signal) can be used to compute the so-called spectra, which help us to visualize the frequency components of the signal.
In this lecture we define and explain the amplitude, power and phase spectra.
Let
Remember that the Discrete Fourier Transform (DFT) of an vector is another vector whose entries satisfywhere is the imaginary unit.
We can use the DFT to write the vector as a linear combination of samples of periodic functions having different frequencies:
The coefficients of the linear combination are the entries of the DFT divided by .
The linear combination is called the frequency-domain representation of .
The amplitude spectrum is a simple transformation of the DFT.
It is an vector whose entries are calculated as
In other words, the amplitude spectrum is the vector that contains the absolute values (or moduli) of the coefficients of the frequency-domain representation of .
It shows which frequencies contribute more to the magnitude of .
As explained in the lecture on the DFT or real signals, if is real, then the amplitude spectrum is symmetric around the Nyquist frequency .
Here is an example of an amplitude spectrum.
Let and the entries of the vector be defined by
As it is customary for spectra, we display the amplitude spectrum of as a stem plot.
As you can see, the spectrum is equal to zero everywhere, except at the frequencies:
, corresponding to the constant ();
, corresponding to the term ;
, corresponding to the term ;
and , which are symmetric to and .
The amplitudes are the absolute values of the coefficients of the frequency components (, , -), but the latter two are halved because of the symmetry.
The power spectrum is another vector obtained from the DFT.
Its entries are equal to the squares of the entries of the amplitude spectrum:
The phase spectrum shows the phases of the frequency components of .
It is an vector whose entries are calculated aswhere and are the real and imaginary parts of .
The function is the 2-argument arctangent, which returns a value between and .
It is the same as the argument of a complex number, that is,
Remember thatprovided that and .
When and are both equal to zero (or, equivalently, ), the value of (equivalently, of ) is undefined. It can be set equal to , as we will do below, to make the phase spectrum easier to read.
To understand why the phase spectrum is defined in this manner, consider a cosine wave:where:
;
is the phase;
the number of cycles per samples (the frequency) is a positive integer smaller than .
We assume that .
The Discrete Fourier Transform of is
This implies that the phase spectrum is
We can writeThe latter expression is the frequency-domain representation of as a linear combination of the DFT basis functions. Therefore, the coefficients of the linear combination inside the square brackets are the values of the discrete Fourier transform. All the coefficients are equal to , except those corresponding to the frequencies and , which are equal to and respectively. Therefore, we haveand
Here is an example of a phase spectrum.
Let and the entries of the vector be defined by
The phase spectrum is zero everywhere, except at the following frequencies:
, where it is equal to because ;
, where it is equal to ;
and , which are anti-symmetric to and .
Please cite as:
Taboga, Marco (2021). "Discrete Fourier transform - Spectra", Lectures on matrix algebra. https://www.statlect.com/matrix-algebra/discrete-Fourier-transform-amplitude-power-phase-spectrum.
Most of the learning materials found on this website are now available in a traditional textbook format.