<< Chapter < Page | Chapter >> Page > |
The Discrete Fourier Transform, from now on DFT, of a finite length sequence is defined as
To motivate this transform think of as equally spaced samples of a -periodic signal over a period, e.g., . Then, using the Riemann Sum as an approximation of an integral, i.e.,
we find
Note that the approximation is better, the larger the sample size is.
Remark on why the factor in [link] : recall that is an average while is a sum. Take for instance : is the average of the signal while is the sum of the samples.
From the above we may hope that a development similar to the Fourier series [link] should also exist in the discrete case. To this end, we note first that the DFT is a linear transform and can berepresented by a matrix multiplication (the “exponent” means transpose):
The matrix possesses lines and rows; the entry in line row is . A few examples are
The rows are orthogonal
The scalar product for complex vectors
and
is
computed as
Inverse DFT
From all this we conclude that the inverse matrix of is . Since we find
Spectral interpretation, symmetries, periodicity
Combining [link] and [link] we may now interpret as the coefficient of the complex harmonic with frequency in a decomposition of the discrete signal ; its absolute value provides the amplitude of the harmonic and its argument the phase difference.
If is even, is real for all and all harmonics are in phase.
Using the periodicity of we obtain when evaluating [link] for arbitrary . Short, we can consider as equally-spaced samples of the -periodic signal over any interval of length :
Similarly, is periodic: . Thus, it makes sense to evaluate for any . For instance, we can rewrite [link] as
Since corresponds to the frequency , the period of corresponds to a period of in actual frequency. This is exactly the sampling frequency (or sampling rate) of the original signal( samples per time units). Compare to the spectral repetitions.
However, the period of the original signal is nowhere present in the formulas of the DFT (cpre. [link] and [link] ). Thus, if nothing is known about , it is assumed that the sampling rate is 1 (1 sample per time unit), meaning that .
FFT
The Fast Fourier Transform (FFT) is a clever algorithm which implements the DFT in only operations. Note that the matrix multiplication would require operations.
Matlab implements the FFT with the command
fft(x)
where
is the input vector.
Note that in Matlab the indices start always with 1! This means that the first entry ofthe Matlab vector
, i.e.
is the sample point
. Similar, the last entry of the Matlab vector
is, i.e.
is the sample point
.
Notification Switch
Would you like to follow the 'Sampling rate conversion' conversation and receive update notifications?