Digital signal Processing
Course Instructor
Dr. Deepa Sharma
ECE Department
IIIT Bhopal
2
DFT 11/29/2022
The Discrete Fourier Transform
• To perform frequency analysis on a discrete-time signal {x(n)}, convert the time-
domain sequence to an equivalent frequency-domain representation.
• Such a representation is given by the Fourier transform X(w) of the sequence {x(n)}.
• X(w) is a continuous function of frequency, therefore it is not a computationally
convenient representation of the sequence {x(n)}.
• The Discrete Fourier transform (DFT), is a powerful computational tool for
performing frequency analysis of discrete-time signals. DFT represent sequence
{x(n)} by samples of its spectrum X (w) in frequency-domain .
• The DFT and IDFT are computational tools that play a very important role in many
digital signal processing applications, such as frequency analysis (spectrum analysis)
of signals, power spectrum estimation, and linear filtering.
3
DFT 11/29/2022
Frequency-Domain Sampling: The Discrete Fourier
Transform
To establish the relationship between the sampled Fourier transform and the DFT:
Consider the sampling of the fourier transform of an aperiodic discrete-time sequence.
• Recall that, aperiodic finite-energy signals have continuous spectra. Consider such an
aperiodic discrete-time signal x (n) with fourier transform,
• Suppose that, X (w) sample periodically in frequency at a spacing of δw radians between
successive samples. Since X(w) is periodic with period 2π, only samples in the
fundamental frequency range are necessary.
• For convenience, we take N equidistant samples in the interval 0≤ w < 2π with spacing
δw = 2π / N , as shown in Fig.
4
DFT 11/29/2022
• First, we consider the selection of N, the number of samples in the frequency domain.
at w = 2πk/ N,
The summation can be subdivided into an
infinite number of summations, where each
sum contains N terms.
Frequency-domain sampling of
the Fourier transform.
5
DFT 11/29/2022
If we change the index in the inner summation from n to n -lN and interchange the·
order of the summation, we obtain
Eqn 1
xp(n) obtained by the periodic repetition of x(n) every N samples, is clearly periodic
with fundamental period N. Consequently, it can be expanded in a Fourier series as
Eqn 2
6
DFT 11/29/2022
with Fourier coefficients
Eqn 3
Compare Eqn. 1 and 3,
Eqn4
Therefore from Eqn. 2 and 4 give,
The relation in above eqn. provides the reconstruction of the periodic signal xp(n)
from the samples of the spectrum X(w). However, it does not imply that we can
recover X(w) or x(n) from the samples. To accomplish this, we need to consider the
relationship between xp(n) and x(n).
7
DFT 11/29/2022
• Since xp(n) is the periodic extension of x(n), it is clear that x(n) can be recovered
from xp(n) if there is no aliasing in the time domain, that is, if x(n) is time-limited
to less than the period N of xp(n). This situation is illustrated in fig., where without
loss of generality, we consider a finite-duration sequence x(n), which is nonzero in
the interval 0 ≤n ≤ L -1.
Aperiodic sequence x(n) of length L
and its periodic extension for N > L
(no aliasing) and N < L (aliasing).
8
DFT 11/29/2022
We observe that when N ≥ L,
• So that x(n) can be recovered from xp(n) without ambiguity.
• if N < L, it is not possible to recover x(n) from its periodic extension due to
timedomain aliasing.
• Thus, the spectrum of an aperiodic discrete-time signal with finite duration L can
be exactly recovered from its samples at frequencies wk = 2πk/N, if N ≥ L.
9
DFT 11/29/2022
The Discrete Fourier Transform (DFT)
Summary: A finite-duration sequence x(n) of length L [i.e., X(n) = 0 for n < 0 and n
≥ L] has a fourier transform
When we sample X(w) at equally spaced frequencies wk = 2πk/ N, k = 0, 1,2, ... , N -
1, where N≥L, the resultant samples are
where for convenience, the upper index in the sum has been increased from L-1 to N -
1 since x(n) = 0 for n ≥L.
10
DFT 11/29/2022
• It transform a sequence {x(n)} of length L ≤ N into a sequence of frequency samples
{X(k)} of length N. Since the frequency samples are obtained by evaluating the
Fourier transform X(w) at a set of N (equally spaced) discrete frequencies, the
above relation is called the discrete Fourier transform (DFT) of x(n).
• The relation to recover the sequence x(n) from the frequency samples,
is called the inverse DFT (IDFT).
• when x (n) has length L < N, the N -point IDFT yields x(n) = 0 for L≤ n≤ N -1.
11
DFT 11/29/2022
The DFT as a Linear Transformation
Where,
• The computation of each point of the DFT can be accomplished by N complex
multiplications and (N - 1) complex additions. Hence, the N -point DFT values can
be computed in a total of N2 complex multiplications and N(N -1) complex
additions.
12
DFT 11/29/2022
Let us define an N-point vector xN of the signal sequence x(n), n = 0, 1, ... ,N-1, an N -
point vector XN of frequency samples, and an N x N matrix WN as,
With these definitions, the N -point DFT may be expressed in matrix form as
13
DFT 11/29/2022
• WN is a symmetric matrix. If we assume that the inverse of WN exists, then above
equation can be inverted by pre multiplying both sides by W-1N . Then IDFT is
given by,
• The IDFT can also be expressed in matrix form as
where W*N denotes the complex conjugate of the matrix WN.
The Relation between W-1N & W*N ,
Or,
where IN is an N x N identity matrix. Therefore, the matrix WN in the transformation is an
orthogonal (unitary) matrix.
14
DFT 11/29/2022
Problem: Compute the DFT of the four-point sequence
x(n)=(0,1, 2, 3)
15
DFT 11/29/2022
Properties of the DFT
The N -point DFT pair x(n) and X(k) is
1. Periodicity, Linearity, and Symmetry Properties:
2. Linearity:
then for any real-valued or complex-valued constants a1 and a2,
16
DFT 11/29/2022
Circular symmetries of a sequence
The N -point DFT of a finite duration sequence x(n), of length L ≤ N, is equivalent to
the N -point DFT of a periodic sequence xp(n), of period N, which is obtained by
periodically extending x(n), that is,
Now suppose that we shift the periodic sequence xp(n) by k units to the right,
obtain another periodic sequence
The finite-duration sequence
is related to the original sequence x(n) by a circular shift.
17
DFT 11/29/2022
Circular shift of
a sequence.
18
DFT 11/29/2022
• The circular shift of the sequence can be represented as the index modulo N.
• x'(n) is simply x(n) shifted circularly by two units in time, where the counter-
clockwise direction has been arbitrarily selected as the positive direction. Thus we
conclude that a circular shift of an N -point sequence is equivalent to a linear shift
of its periodic extension, and vice versa.
19
DFT 11/29/2022
• An N -point sequence is called circularly even if it is symmetric about the point
zero on the circle.
• An N -point sequence is called circularly odd if it is antisymmetric about the point
zero on the circle.
• The time reversal of an N -point sequence is attained by reversing its samples about
the point zero on the circle.
This time reversal is equivalent to plotting x(n) in a clockwise direction on a circle.
20
DFT 11/29/2022
• If the periodic sequence is complex valued,
• The sequence xp(n) can be expressed as
21
DFT 11/29/2022
Symmetry properties of the DFT
Circular Convolution
• Multiplication of the DFT of two sequences is equivalent to the circular
convolution of the two sequences in the time domain.
• Or,
Problem: Perform the circular convolution of the following two sequences:
x1(n) = {2,1,2, 1}
x2(n) = {1,2,3, 4}
22
DFT 11/29/2022
23
DFT 11/29/2022
Circular convolution of two sequences:
24
DFT 11/29/2022
• Circular convolution
• Time reversal of a sequence
25
DFT 11/29/2022
• Circular time shift of a sequence
• Circular frequency shift
• Complex-conjugate properties
26
DFT 11/29/2022
Circular correlation
The (un normalized) circular cross correlation sequence, defined as
Multiplication of two sequences.
27
DFT 11/29/2022
Parseval's theorem
For complex-valued sequences x(n) and y(n), in general, if
28
DFT 11/29/2022
Tutorial
1. Compute the N-point DFT of each of the following sequences:
2. Compute the N -point DFTs of the signals
29
DFT 11/29/2022
EfficiEnt computation of thE Dft: fft
algorithms
30
Efficient Computation of the DFT: FFT Algorithms DFT 11/29/2022
• DFT is useful in various digital signal processing applications, such as linear
filtering, correlation analysis, and spectrum analysis, therefore its efficient
computation received considerable attention and many algorithms are developed
and one of them is :FFT Algorithm.
• To compute all N values of the DFT requires N2 complex multiplications and N 2 -
N complex additions.
• Direct computation of DFT is inefficient, because it does not exploit the symmetry
and periodicity properties of the phase factor WN.
31
DFT 11/29/2022
• FFT: the algorithms efficiently compute DFT by exploiting the symmetry and
periodicity properties of the phase factor WN, known collectively as fast fourier
transform (FFT) algorithms.
▫ FFT algorithms are based on the fundamental principle of decomposing the
computation of the Discrete Fourier Transform of a sequence of length N into
smaller-length Discrete Fourier Transforms that are combined to form the N-
point transform.
▫ These smaller-length transforms may be evaluated by direct methods, or they
may be further decomposed into even smaller transforms. The manner in which
this principle is implemented leads to a variety of different algorithms, all with
comparable improvements in computational speed.
32
DFT 11/29/2022
▫ Two basic classes of FFT algorithms:
Decimation in time: the sequence x[n] (generally thought of as a time
sequence) is decomposed into successively smaller subsequences.
Decimation in frequency: the sequence of Discrete Fourier Transform
coefficients X[k] is decomposed into smaller subsequence.
• Radix-2 FFT Algorithms
In N-point DFT computation, N can be factored as N= r1 .r2 …..rv , if r1 =r2 =….. =rv,
then N= rv . In such a case the DFT are of size r, so that the computation of the N -
point DFT has a regular pattern. The number “r” is called the radix of the FFT
algorithm. If r=2, then called as Radix-2 FFT Algorithms.
33
DFT 11/29/2022
Decimation-in-Time FFT
Algorithms in which the decomposition is based on decomposing the sequence x[n] into
successively smaller subsequences are called decimation-in-time algorithms.
▫ Split the N -point data sequence into two N/2- point data sequences f1(n) and f2(n),
corresponding to the even-numbered and odd-numbered samples of x(n), respectively,
▫ the N -point DFT can be expressed in terms of the DFTs of the decimated sequences as ,
34
DFT 11/29/2022
▫ With this substitution,
where F1(k) and F2(k) are the N /2-point DFTs of the sequences f1(m) and f2(m), respectively.
▫ Since F1 (k) and F2 (k) are periodic, with period N /2, we have
F1 (k + N /2) = F1(k) and
F2(k + N/2) = F2(k).
In addition, the factor
Hence,
35
DFT 11/29/2022
▫ Having performed the decimation-in-time once, we can repeat the process for each of the
sequences f1(n) and f2(n). Thus, f1(n) would result in the two N /4-point sequences,
and f2(n) would yield
▫ By computing N/4-point DFTs, we would obtain the N/2-point DFTs F1(k) and F2(k)
36
DFT 11/29/2022
The decimation of the data sequence can be repeated again and again until the
resulting sequences are reduced to one-point sequences. For N = 2v, this
decimation can be performed v=log2N times or stages. Thus, the total number of
complex multiplications is reduced to (N /2) log2 N. The number of complex
additions is N log2 N.
37
Flow graph Explanation of the Decimation-in-Time Decomposition
DFT 11/29/2022
1.
2. 3.
38
DFT 11/29/2022
Flow graph of complete decimation-in-time decomposition of an 8-point DFT
computation.
39
Basic butterfly computation in the decimation- DFT 11/29/2022
in-time FFT algorithm.
Eight-point decimation-in-
time FFT algorithm.
40
DFT 11/29/2022
Decimation-in-Frequency FFT Algorithm
• To derive the algorithm, we begin by splitting the DFT formula into two summations,
of which one involves the Sum over the first N/2 data points and the second the sum
over the last N/2 data points.
41
DFT 11/29/2022
• Now, let us split (decimate) X(k) into the even- and odd-numbered samples.
And
• If we define the N 12-point sequences g1(n) and g2(n) as
42
DFT 11/29/2022
• Then,
• This computational procedure can be repeated through decimation of the N/2- point
DFTs, X(2k) and X(2k + 1).
• The entire process involves v = log2N stages of decimation, where each stage
involves N /2 butterflies .
• The computation of the N-point DFT via the decimation-in-frequency FFT
algorithm requires (N/2)log2N complex multiplications and Nlog2N complex
additions, just as in the decimation-in-time algorithm.
43
Flow graph Explanation of the Decimation-in-Frequency Decomposition
DFT 11/29/2022
1.
2.
3.
44
DFT 11/29/2022
Basic butterfly computation in the
decimation-in-frequency FFT algorithm.
N=8-point decimation-in-
frequency FFT algorithm
45
DFT 11/29/2022
Problem: Given x(n) = {1, 2, 3, 4, 4, 3, 2 1}, find X(k) using DIT FFT algorithm.
Problem: Given x(n)=2n and N=8, find X(k) using DIF FFT algorithm.
46
DFT 11/29/2022
47
DFT 11/29/2022
48
DFT 11/29/2022
Thank You