Discrete Fourier Transform and Signal Spectrum: Advance Digital Signal Processing
Discrete Fourier Transform and Signal Spectrum: Advance Digital Signal Processing
SUPERVISED BY
1
Outlines
Introduction.
Discrete Fourier Transform )DFT).
Amplitude Spectrum and Power Spectrum.
Spectral Estimation Using Window.
Fast Fourier Transform (FFT).
Method of Decimation-in-Frequency Fast Fourier Transform (DIF-FFT).
Method of Decimation-in-Frequency Inverse Fast Fourier Transform (DIF-IFFT).
Method of Decimation-in-Time Fast Fourier Transform (DIT-FFT).
Method of Decimation-in- Time Inverse Fast Fourier Transform (DIT-IFFT).
2
Introduction
• In time domain, representation of digital signals describes the signal amplitude
versus the sampling time instant or the sample number. However, in some
applications, signal frequency content is very useful otherwise than as digital
signal samples. The representation of the digital signal in terms of its frequency
component in a frequency domain, that is, the signal spectrum, needs to be
developed.
• The algorithm transforming the time domain signal samples to the frequency
domain components is known as the discrete Fourier transform, or DFT. The DFT
also establishes a relationship between the time domain representation and the
frequency domain representation. Therefore, we can apply the DFT to perform
frequency analysis of a time domain sequence. In addition, the DFT is widely
used in many other areas, including spectral analysis, acoustics, imaging/video,
audio, instrumentation, and communications systems.
Discrete Fourier Transform )DFT):
•
• Now, let us concentrate on development of the DFT. Figure 1 shows one
way to obtain the DFT formula.
• In practice, we often deal with discrete functions X(k) represented by:
N 1 kn
j 2
X ( k ) x ( n)e N
n 0
Where:
the coefficients are obtained from the Fourier series expansion in the
complex form.
X(k) constitutes the DFT coefficients.
N represents the number of points that are equally spaced in the interval 0 to
on the unit circle. Fig 1: Development of DFT formula.
Discrete Fourier Transform )DFT):
•• Now let us conclude the DFT definition. Given a sequence x(n), , its DFT is defined as:
•• Given a sequence x(n) for , where x(0) = 1, x(1) = 2, x(2) = 3, and x(3) = 4, Evaluate its DFT X(k).
Solution:
• Since N=4 and
6
7
Example 2:
•• Using the DFT coefficients X(k) for computed in Example 1, Evaluate its inverse DFT to determine the
time domain sequence x(n).
Solution:
Since N=4 and
8
9
Amplitude Spectrum and Power Spectrum:
•One
of the DFT applications is transformation of a finite-length digital signal x(n) into the
spectrum in frequency domain. Figure 2 demonstrates such an application, where and are the
computed amplitude spectrum and the power spectrum, respectively, using the DFT
coefficients X(k). First, we achieve the digital sequence x(n) by sampling the analog signal
x(t) and truncating the sampled signal with a data window with a length , where T is the
sampling period and N the number of data points. The time for data window is: .
• We can define the frequency resolution as the frequency step between two consecutive DFT
coefficients to measure how fine the frequency domain presentation is and achieve:
•Example
3:
• Given a sequence x(n) for , where x(0) = 1, x(1) = 2, x(2) = 3, and x(3) = 4, we have
computed four DFT coefficients X(k) for as X(0) = 10, X(1) = -2+j2, X(2) = -2, and X(3)
= -2-j2. If the sampling rate is 10 Hz,
a. Determine the sampling period, time index, and sampling time instant for a digital sample
x(3) in time domain.
b. Determine the frequency resolution, frequency bin number, and mapped frequency for
each of the DFT coefficients X(1) and X(3) in frequency domain.
Solution:
• We define the amplitude spectrum as:
• Besides the amplitude spectrum, the power spectrum is also used. The DFT power spectrum
is defined as:
Example 4:
•• Consider the sequence assuming that = 100 Hz, Compute the amplitude spectrum, phase spectrum,
and power spectrum.
Solution:
• Since N = 4, and using the DFT shown in Example 1, we find the DFT
coefficients to be:
• The amplitude spectrum, phase spectrum, and power density spectrum are computed as follows:
Spectral Estimation Using Window Functions:
• When we apply DFT to the sampled data in the previous section, we theoretically imply the following
assumptions: first, that the sampled data are periodic to themselves (repeat themselves), and second, that the
sampled data are continuous to themselves and band limited to the folding frequency. The second assumption is
often violated, thus the discontinuity produces undesired harmonic frequencies. Consider the pure 1-Hz sine
wave with 32 samples shown in Figure 3.
Fig 3: Sampling a 1-Hz sine wave using (top) 16 samples per cycle
and (bottom) 18 samples per cycle.
• We call such an effect spectral leakage. The amount of spectral leakage shown in the second plot is due to amplitude
discontinuity in time domain. The bigger the discontinuity, the more the leakage. To reduce the effect of spectral leakage,
a window function can be used whose amplitude tapers smoothly and gradually toward zero at both ends.
Applying the window function to a data sequence x(n) to obtain a windowed sequence is better illustrated in Figure 4
using Equation below:
for
• FFT is a very efficient algorithm in computing DFT coefficients and can reduce a
very large amount of computational complexity (multiplications).
Without loss of generality, we consider the digital sequence x(n) consisting of
samples, where m is a positive integer-the number of samples of the digital sequence
x(n) is a power of 2, N = 2, 4, 8, 16, etc.
If x(n) does not contain samples, then we simply append it with zeros until the
number of the appended sequence is equal to an integer of a power of 2 data points.
This algorithm is published in 1965 by Cooley and Tukey. We begin with the radix-2
decimation-in-frequency FFT.
25
Method of Decimation-in-Frequency Fast Fourier Transform (DIF-FFT):
Where:
Figure below illustrates the FFT computation for the eight-point DFT, where there are 12
complex multiplications. The computation process can be illustrated in Figure 3. As shown in
this figure, there are three graphical operations, which are illustrated in Figure 3. If we
continue the process described by Figure 5, we obtain the block diagrams shown in Figures 7
and 8.
Fig 5: The first iteration of the eight-point FFT. Fig 6: Definitions of the graphical operations.
Fig 7: The second iteration of the eight-point FFT.
Fig 8: Block diagram for the eight-point FFT (total twelve multiplications).
For N=4, The twiddle factor can be computed from the unit circle shown below:
For N=8, The twiddle factor can be computed from the unit circle shown:
Method of Decimation-in-Frequency Inverse Fast Fourier Transform (DIF-IFFT):
The twiddle factor is changed to be and the sum is multiplied by a factor of 1/N.
The inverse FFT can be calculated by using the FFT algorithm directly by complex conjugate
of X(k), and then the output must be scaled by 1/ N.
• The inverse FFT block diagram for the eight-point inverse FFT is shown in figure
below:
• Using 8-point radix-2 DIF-FFT algorithm to determine the DFT of the sequence .
0 2
0 6
1 4
1 -2
2 -2
2 -2+2j
3 -2 2j
3 -2-2j
0 -2j
0 -1.414-j4.828
1 0.707-j0.707 -1.414-j2.828
0 1.414+j0.828
2 2j 0 2j
0 1.414-j0.828
3
0 -1.414+j4.828
-2.121-j2.121
2.828+j1.414 1.414-j2.828
Method of Decimation-in-Time Fast Fourier Transform (DIT-FFT):
• The
decimation-in-time FFT algorithm is based on splitting (decimating) x(n) into smaller
sequences and finding from the DFTs of these decimated sequences.
• The sequence x(n) consisting of samples, where m is a positive integer-the number of
samples of the digital sequence x(n) is a power of 2. So (N = 2, 4, 8,16, etc).
Fig 10 : The eight-point DIT-FFT algorithm using decimation-in-time (twelve complex multiplications).
Method of Decimation-in-Frequency Inverse Fast Fourier Transform (DIF-IFFT):
• The inverse FFT block diagram for the eight-point inverse FFT is shown in
figure below:
• Given
a sequence x(n) for , where x(0) = 1, x(1) = 2, x(2) = 3, and x(3) = 4, Evaluate its
DFT X(k) using the decimation-in-time FFT method.
Solution:
Example 10:
• Given
the DFT sequence X(k) for computed in Example 9, Evaluate its inverse DFT x(n)
using the decimation-in-time FFT method.
Solution:
Example 11:
Find the DFT of the following sequence x(n) using the DIT- FFT.
.
2 2
1 0
0 2j
1 -1.414+j3.414
0 2
-1 2-2j
-2 -2j
1 1.414-j0.586
0 -2
-1 4
-2 -2
1 1.414+j0.586
-2 2 -2j
-1 2+2j
0 -2
-1 -1.414-j3.414
1.414+j1.414
References:
Digital Signal Processing Fundamentals and Applications, Li Tan DeVry University Decatur, Georgia.
Schaum's Outline of Theory and Problems of Digital Signal Processing ,Monson H. Hayes, Professor
of Electrical and Computer Engineering, Georgia Institute of Technology.