19ece211 Unit I
19ece211 Unit I
Module 1
Prepared by,
Dr.J.Aravinth
31-Jan-24 Dr.J.Aravinth 1
Outline
31-Jan-24 Dr.J.Aravinth 2
TIME-FREQUENCY ANALYSIS OF FOURIER SERIES AND
FOURIER TRANSFORMS
Time Frequency
Domain Domain
31-Jan-24 Dr.J.Aravinth 4
Discrete-Time Fourier Transform
• Many sequences can be expressed as a weighted sum of complex
exponentials as
( ) = xne
j − jn
Xe (forward transform)
n = −
31-Jan-24 Dr.J.Aravinth 5
DISCRETE FOURIER TRANSFORM (DFT)
❑ DFT-Defines a relationship between a signal in the Time-Domain and its
representation in Frequency Domain.
❑ The DFS provides a mechanism for numerically computing the DTFT. It also alerted
us to a potential problem of aliasing in the time domain.
❑ Sampling of the DTFT result in a periodic sequence x˜(n). But most of the signals in
practice are not periodic. They are likely to be of finite duration.
❑ These two features are troublesome because one has to evaluate infinite sums at
uncountably infinite frequencies.
❑ Therefore the DTFT and the ZT are not numerically computable transforms.
31-Jan-24 Dr.J.Aravinth 7
DISCRETE FOURIER TRANSFORM (DFT)
❑ Numerically computable transform –
by sampling the DTFT in the frequency domain (or the z-transform on the unit
circle).
Analysis Equation
Synthesis Equation
31-Jan-24 Dr.J.Aravinth 12
DISCRETE FOURIER TRANSFORM (DFT)
Twiddle factor:
31-Jan-24 Dr.J.Aravinth 13
DISCRETE FOURIER TRANSFORM (DFT)
Or
Let N-point vector x Nof the signal sequence x(n) , n = 0, 1, 2, ….(N-1) and
N-point vector XN of frequency samples and NxN matrix WNas
31-Jan-24 Dr.J.Aravinth 15
EXAMPLE
Compute the DFT of the 4-point sequence
then
31-Jan-24 Dr.J.Aravinth 16
EXAMPLE
1. Given x(n) = {1, 1, 0, 0}, the DFT of this 4-point sequence can be computed
using the matrix formulation as
31-Jan-24 Dr.J.Aravinth 17
DFT-Properties
1. Periodicity:
2. Symmetry:
3. Linearity:
31-Jan-24 Dr.J.Aravinth 18
DFT-Properties
• The desired shift, called the circular shift, is defined using a modulo
operation:
31-Jan-24 Dr.J.Aravinth 19
DFT-Properties
Concept of a circular shift
31-Jan-24 Dr.J.Aravinth 20
DFT-Properties
5. Multiplication:
6. Parseval‘s relation:
Energy spectrum
Power spectrum
31-Jan-24 Dr.J.Aravinth 21
DFT-Properties
7. Circular Convolution:
31-Jan-24 Dr.J.Aravinth 22
DFT-Properties
31-Jan-24 Dr.J.Aravinth 23
Example:
31-Jan-24 Dr.J.Aravinth 24
Example:
Perform the circular convolution of the following 2 sequence:
m=0 m=2
= 14
= 14
m=1 m=3
= 16
= 16
31-Jan-24 Dr.J.Aravinth 25
Continued…
31-Jan-24 Dr.J.Aravinth 26
Continued…
31-Jan-24 Dr.J.Aravinth 27
Continued…
31-Jan-24 Dr.J.Aravinth 28
Linear filtering methods based
on the DFT
➢DFT provides a discrete frequency
representation of a finite duration sequence
in the frequency domain.
➢Computational tool for linear system
analysis, especially for linear filtering.
➢DFT can be used to perform linear filtering
in the frequency domain.
31-Jan-24 Dr.J.Aravinth 29
Linear filtering methods based on the
DFT
1.Use of the DFT in Linear Filtering
2.Filtering of long data sequence
• Overlap-save method
• Overlap-add method
31-Jan-24 Dr.J.Aravinth 30
Use of the DFT in Linear Filtering
Linear Filter
h(n) y ( n) Output or
Input x(n) Response
• Linear Convolution
• By using DFT and IDFT
• Circular Convolution
31-Jan-24 Dr.J.Aravinth 31
Linear Convolution
• A sequence x(n) of length L filtered by an
FIR filter h(n) of length M
M −1
y( n ) = h( n ) x( n − k )
k =0
y(n)={1,4,9,11,8,3}
31-Jan-24 Dr.J.Aravinth 32
31-Jan-24 Dr.J.Aravinth 33
DFT and IDFT
• Therefore ,a DFT of size N L+M-1 is required
to represent y(n) in the frequency domain.
• Using the DFT notation
Y (k ) = H (k ) X (k ), k = 0,1,.........( N − 1)
31-Jan-24 Dr.J.Aravinth 34
• L=4,M=3,N=L+M-1=6
• Eight point DFT of x(n) is
• X(K)= {6,1.707 - 4.121j, -1 – j,0.2929 - j0.121, 0,0.292 + j0.121, -1+j,1.707 + j4.121}
• Eight point DFT of h(n) is
• H(K)={6,2.414 - j4.414, -2-j2,-0.4142+ j1.585,2,-0.414 -j 1.585,-2+j2,2.414 + j4.4142}
• Y(k)=X(k).H(K)={36,-14.0-j17.48,j4,0.07+j0.515,0,0.07-j0.515,-j4,-14.07+j17.48}
• Eight point IDFT of Y(K) is
31-Jan-24 Dr.J.Aravinth 35
Circular Convolution
• Example x(n) =[1, 2, 2, 1] , h(n) =[1, 2, 3]
• L=4,M=3
• The length of sequence y(n) is N=L+M-1=6
• Example x(n)=[1 ,2,2,1,0 ,0] ,h(n)=[1, 2,3,0,0 0]
• y(n)={1,4,9,11,8,3}
31-Jan-24 Dr.J.Aravinth 36
Filtering of Long Data Sequences
• In practical applications involving linear
filtering of signals, the input sequence x(n) is
often a very long sequence.
• Real-time signal processing applications
concerned with signal monitoring and
analysis.
• Overlap-save method
• Overlap-add method
31-Jan-24 Dr.J.Aravinth 37
Filtering of Long Data Sequences
• When the DFT is used to implement linear
filtering, a signal is processed in blocks. Due
to the real-time requirement (low delay) and
the limitation of physical memory, the size of
the block can not be arbitrarily large.
• The length of the FIR filter is M and the length
of on block of data is L (L>M)
• Each time a block of data of length L+M-1 is
filtered by using the DFT method.
31-Jan-24 Dr.J.Aravinth 38
31-Jan-24 Dr.J.Aravinth 39
31-Jan-24 Dr.J.Aravinth 40
Overlap-Add Method
31-Jan-24 Dr.J.Aravinth 41
31-Jan-24 Dr.J.Aravinth 42
31-Jan-24 Dr.J.Aravinth 43
x(n)={3,-1,0,1,3,2,0,1,2,1},h(n)={1,1,1}
• Overlap-Save Method: N −1
x1(n)={0,0,3,-1,0,1}, x3(n)={0,1,2,1,0,0}
x2(n)={0,1,3,2,0,1}
N −1
Perform y1(n)=x1(n) N h(n) y1 (m) = x1 (n) h(n) = x1(n)h((n − m))N
n =0
N −1
y2(n)=x2(n) N h(n) y2 (m) = x 2 (n) h(n) = x (n)h((n − m))
n =0
2 N
N −1
y3(n)=x3(n) N h(n) y3 (m) = x3 (n) h(n) = x3 (n)h((n − m)) N
31-Jan-24 Dr.J.Aravinth 44
n =0
x(n)={3,-1,0,1,3,2,0,1,2,1},h(n)={1,1,1}
• Overlap-Add Method: N −1
x1(n)={3,-1,0,1,0,0}, x3(n)={2,1,0,0,0,0}
x2(n)={3,2,0,1,0,0}
N −1
Perform y1(n)=x1(n) N h(n) y1 (m) = x1 (n) h(n) = x1(n)h((n − m))N
n =0
N −1
y2(n)=x2(n) N h(n) y2 (m) = x 2 (n) h(n) = x (n)h((n − m))
n =0
2 N
N −1
y3(n)=x3(n) N h(n) y3 (m) = x3 (n) h(n) = x3 (n)h((n − m)) N
31-Jan-24 Dr.J.Aravinth 45
n =0
• x(n) ⎯⎯
DFT
→ X(k) ⎯⎯
IDFT
→ x(n)
• Properties of DFT
Circular Convolution N −1
x3 (m) = x1 (n) x 2 (n) =
n =0
x1 (n)x 2 ((n − m)) N ⎯⎯
DFT
→ X3 (K) = X1 (K)X 2 (K)
• Linear Filtering Methods Based on the DFT
1.Use of the DFT in Linear Filtering
• By using DFT and IDFT
x(n) ⎯⎯
→ X(k) → H(K)
H(K) → Y(K) = X(K).H(K) ⎯⎯→ y(n
DFT IDFT
• Linear Convolution
• Circular Convolution
2.Filtering of Long Data Sequence
• Overlap-save method
• Overlap-add method
31-Jan-24 Dr.J.Aravinth 46
COMPUTATIONAL COMPLEXITY
2 4 2 16 8
3 9 6 36 24
4 16 12 64 48
: : : : :
8 64 56 256 224
: : : : :
16 256 240 1024 960
31-Jan-24 Dr.J.Aravinth 47
: : : : :
LIMITATIONS OF DFT
31-Jan-24 Dr.J.Aravinth 48
Why do we need FFT?
❑ DFT properties and its use in system analysis in the numerical computation
of long sequences is prohibitively time-consuming.
31-Jan-24 Dr.J.Aravinth 49
FAST FOURIER TRANSFORM (FFT)
31-Jan-24 Dr.J.Aravinth 50
COMPARISON OF DFT WITH FFT
DFT FFT
2 4 2 1 2
4 16 12 4 8
8 64 56 12 24
16 256 240 32 64
: : : : :
: : : : :
31-Jan-24 Dr.J.Aravinth 51
1024 1048576 1047552 5120 10240
FFT PERFORMANCE
• For N=8;
31-Jan-24 Dr.J.Aravinth 52
FFT PERFORMANCE
• I. Percentage of Computation saved in FFT:
• For N=8;
• For N=16;
31-Jan-24 Dr.J.Aravinth 53
Fast Fourier Transform
• A large amount of work has been devoted to
reducing the computation time of a DFT.
• This has led to efficient algorithms which are
known as the Fast Fourier Transform (FFT)
algorithms.
• Decimation In Time(DIT) Radix-2 Algorithm
• Decimation In Frequency(DIF) Radix-2 Algorithm
31-Jan-24 Dr.J.Aravinth 54
Fast Fourier Transform(FFT) X (k ) = N −1
N −1 2 x n W nk
N
X (k ) = xne
−j nk n =0
N
N −1
−j
2
n =0
x(n ) =
1
X k
W − nk
N
e N
= WN (TwiddleFactor (or ) PhaseFactor ) N n =0
N 2 2 N 2 2
k+ −j k −j −j k −j k
− j
WN 2
=e N
e N 2
=e N
e = −e N
= −WNk , Symmetry Pr operty
N 2 2 N 2
k+ −j k −j −j k
WN 2
=e N 2
e N 22
=e N 2
= W Nk , Periodicit y Pr operty
2 2
N-Point DFT DFT FFT
N(N-1) N2 complex ‘×’ N/2 log2(N) N log2(N)
complex ‘+’ complex ‘×’. complex ‘+’.
8 56 64 12 24
16 240 256 32 64
32 992 1024 80 160
64 4032 4096 192 384
31-Jan-24 Dr.J.Aravinth 55
128 16256 16384 448 896
DIT Radix-2 FFT Algorithm
• Let us consider the computation of the N-Point DFT
N = r m,r-Radix, m- No.of Stages
First Step: x[n] = x[0], x[1], …, x[N-1]
Split the N-point data sequences into two N/2-point
data sequences f1(n) and f2(n)
Lets divide the sequence x[n] into even and odd
Sequences
N
f1(n) =x[2n] = x[0], x[2], …, x[N-2] ; n = 0,1, − 1
2 − − −(1)
f2(n) =x[2n+1] = x[1], x[3], …, x[N-1] ; n = 0,1, N − 1
2
31-Jan-24 Dr.J.Aravinth 56
N −1
X (k ) = xnWNnk ; 0 k N − 1 N-point DFT
n =0
N N
−1 −1
X (k ) =
2 2
x
n =0
2 n W N
2 nk
+ x 2 n + 1 WN
( 2 n +1) k
n =0
2 2
−j 2 nk −j nk
WN2 nk = e N
=e N 2
= W Nnk
2
n =0 2 n =0 2
N N
−1 −1
2 2
= f1 (n)WNnk + WNk f 2 (n)WNnk
n =0 2 n =0 2
F1 (k ) =
2
n =0
f1 ( n)WNnk
2
N
−1
F2 (k ) =
2
n =0
f 2 ( n)WNnk
2
k+N / 2
• Since F1(k+N/2)= F1(k) and F2(k+N/2)= F2(k), WN = −WNk
N
X (k ) = F1 (k ) + W F2 (k ); k = 0, − 1 − − − − − (3.1)
k
2
N
N N
X k + = F1 (k ) − WN F2 (k ); k = 0, − 1 − − − − − (3.2)
k
2 2
31-Jan-24 Dr.J.Aravinth 58
Second Step: Split the N/2-point data sequences into
two N/4-point sequences
N
v11(n) =f1(2n) ; n = 0,1,
4
− 1
v22(n) =f2(2n+1)----------------(4.2)
N
−1
F1 (k ) = f1 (n)WNnk
2
n =0 2
N N
−1 −1
4 4
= f1 (2n)WN2 nk + f1 (2n + 1)WN( 2 n+1) k
n =0 2 n =0 2
N N
−1 −1
( ) ( ) − (5)
4 4
31-Jan-24
= 11
v
n =0
( n )W nk
N + W N Dr.J.Aravinth
k
v 12 ( n ) W nk
N = V11 k + W N V12 k − − 59
k
4 2 n =0 4 2
F 1 (k ) = V11 (k ) + WNkV12 (k ) ; k = 0,1,..........., ( N − 1)
2
4
N
F k + = V11 (k ) − WN V12 (k ) − − − (6.1)
k
1 4 2
F 2 (k ) = V21 (k ) + WN V22 (k )
N
k ; k = 0,1,..........., ( − 1)
4
2
N
F k + = V (k ) − W ( )
N V22 k − − − (6.2)
k
2 4
21
2
n =0 4 n =0 4
N N
−1 −1
n =0 4 n =0 4
31-Jan-24 Dr.J.Aravinth 60
• N=8, N =2 - 3
Three Stages
• Four 2-point(N/4) DFT’s --->Two 4-point(N/2) DFT’s --->One 8-point (N)DFT
v11(n) =f1(2n)
v11(0) = f1(0) = x(0) v12(n) =f1(2n+1)
v11(1) = f1(2) = x(4) v21(n) =f2(2n)
v22(n) =f2(2n+1) ; n=0,1,…(N/4-1)
v12(0) = f1(1) = x(2) f1(n) =x[2n]
n =0 4 n =0 4 n =0 V11 (0)
= v11 (0)W2( 0 ) k + v11 (1)W2(1) k V11 (1)
k = 0;V11 (0 ) = v11 (0)W2( 0 ) 0 + v11 (1)W2(1) 0
= v11 (0) + W20 v11 (1) = x(0) + W80 x( 4) V12 (0)
k = 0;F 1 (0) = V11 (0) + W40V12 (0) = V11 (0) + W80V12 (0) F1 (2)
k = 1;F 1 (1) = V11 (1) + W41V12 (1) = V11 (1) + W82V12 (1)
F1 (3)
N 8
F k + = V11 (k ) − WN V12 (k ) → F k + = V11 (k ) − W8kV12 (k )
k
1 4 2 1 4 2
F2 (0)
k = 0;F 1 (2) = V11 (0) − W40V12 (k ) = V11 (0) − W80V12 (k )
k = 1;F 1 (3) = V11 (1) − W41V12 (1) = V11 (0) − W82V12 (k ) F2 (1)
k = 0;F 2 (0) = V21 (0) + W40V22 (0) = V21 (0) + W80V22 (0)
F2 (2)
k = 1;F 2 (1) = V21 (1) + W V (1) = V21 (1) + W V (1)
1
4 22
2
8 22
k = 0;F 2 (2) = V21 (0) − W40V22 (0) = V21 (0) − W80V22 (0) F2 (3)
k = 1;F 2 (3) = V21 (1) − W41V22 (1) = V21 (1) − W82V22 (1) −j
2 ( 0 )
W8 = e
0 8
=1
2 ( 2 )
−j −j
W8 = e =e =−j
31-Jan-24 Dr.J.Aravinth 2 8
63
2
Third Stage-One 8-point(N) DFT
X (k ) = F1 (k ) + WNk F2 (k )
k = 0; X (0 ) = F1 (0 ) + W80 F2 (0 )
k = 1; X (1) = F1 (1) + W81 F2 (1)
k = 2; X (2 ) = F1 (2 ) + W82 F2 (2 )
k = 3; X (3) = F1 (3) + W83 F2 (3)
N
X k + = F (k ) − W k
F2 (k )
2
1 N
k = 0; X (4 ) = F1 (0 ) − W80 F2 (0 )
k = 1; X (5) = F1 (1) − W81 F2 (1) 2 ( 0 )
−j
k = 2; X (6 ) = F1 (2 ) + W82 F2 (2 ) W =e =1
0 8
8
2 (1 )
−j −j
k = 3; X (7 ) = F1 (3) + W8 F2 (3)
3 W8 = e
1 8
=e 4
= 0707 − j 0.707
2 ( 3 ) 3
−j −j
W8 = − j;W8 = e
2 3 8
=e 4
= −0707 − j 0.707
31-Jan-24 Dr.J.Aravinth 64
1st stage 2nd stage 3rd stage
x(0) X(0)
W80
x(4) X(1)
-1
W80
x(2) X(2)
-1
W80 W81
x(6) X(3)
-1 -1
W80
x(1) X(4)
-1
W80=1 W80 W81
x(5) X(5)
-1 -1
W80 W82
x(3) X(6)
-1 -1
W80 W81 W83
x(7) X(7)
-1 -1 -1
31-Jan-24 Dr.J.Aravinth 65
31-Jan-24 Dr.J.Aravinth 66
Decimation In Frequency(DIF) Radix-2 Algorithm
• Frequency Domain sequence is decimated
• Butterfly Diagram
31-Jan-24 Dr.J.Aravinth 67
Decimation In Frequency(DIF) Radix-2 Algorithm
31-Jan-24 Dr.J.Aravinth 68
31-Jan-24 Dr.J.Aravinth 69
31-Jan-24 Dr.J.Aravinth 70
31-Jan-24 Dr.J.Aravinth 71
31-Jan-24 Dr.J.Aravinth 72
31-Jan-24 Dr.J.Aravinth 73
DIT ! DIF
31-Jan-24 Dr.J.Aravinth 75
• First Stage
V11 (0)
V12 (1)
2 ( 0 )
−j
31-Jan-24 Dr.J.Aravinth
W80 = e 8
= 176
Second Stage
F1 (0)
F1 (1)
F 1 (0) = V11 (0) + W80V12 (0) = 2 + 1.0 = 2
F1 (2)
F 1 (1) = V11 (1) + W8 V12 (1) = 0 + (− j )(−2) = 2 j
2
2 ( 0 )
−j
W8 = e
0 8
=1
2 ( 2 )
−j −j
W8 = e =e =−j
31-Jan-24 Dr.J.Aravinth 2 8
77
2
Third Stage
31-Jan-24 Dr.J.Aravinth 79
Use Of FFT in Linear Filtering
• Let h(n).0nM-1,be the sample response of the FIR
filter
• x(n)-Input data Sequence
Linear Filter
h(n) y ( n) Output or
Input x(n) Response
N n =0
• Step 2: DFT of Y*(k) using either DIT or DIF radix-2
Algorithm
• Step 3:conjugate of result of step 2
• Step 4: The result of Step 3 Divided by N, we get y(n).
31-Jan-24 Dr.J.Aravinth 81
Determine the response of LTI system when the input sequence
x(n)={-1,1,2,1,-1} by radix-2 DIT FFT. The impulse response of the
systems is h(n)={-1,1,1,-1}
• L=5,M=4,N=L+M-1=8
• x(n)= {-1,1,2,1,-1,0,0,0}
• h(n)={-1,1,1,-1,0,0,0,0}
• Determine X(K) using DIT or DIF algorithm
• X(K)={ 2,- 3.414j,-4,0.585j,-2,-0.5858j,-4,3.414j
• Determine H(K) using DIT or DIF algorithm
• H(K)={ 0,-1- 0.414j,0,-1-2.414j,-4,-1+2.414j,0,-1+0.414j}
• Y(k)={0,-1.413+3.414j,0,1.412-j0.585,8,1.12+0.585j,0,-1.413-3.414j}
• Y*(k)={0,-1.413-3.414j,0,1.412+j0.585,8,1.12-0.585j,0,-
1.413+3.414j}
• DFT of Y*(k) using Either DIT or DIF
• The result of previous step divide by N=8
• y(n)={1,-2,0,-1,1,0,2,-1}
31-Jan-24 Dr.J.Aravinth 82
APPLICATIONS OF FOURIER TRANSFORM
31-Jan-24 Dr.J.Aravinth 83
REFERENCES
1. John G. Proakis and Dimitris G. Manolakis, ―Digital Signal Processing:
Principles,Algorithms, and Applications,‖ 4th edition, 2007.
2. http://pws.npru.ac.th/sartthong/data/files/Digital%20Signal%20Processing%20-
%20Computer%20Based%20Approach%20-%20Sanjit%20K.%20Mitra.pdf.
3. https://www.scribd.com/doc/180108714/Digital-signal-processing-by-sk-mitra-
4th-edition-pdf.
5. http://downloadingstarted.com/digital-signal-processing-by-sanjay-sharma-pdf-
free-download.html
31-Jan-24 Dr.J.Aravinth 84