0% found this document useful (0 votes)
92 views37 pages

DSP Module 2

This document discusses linear filtering methods based on the discrete Fourier transform (DFT). It covers using the DFT for linear filtering of long data sequences via the overlap save and overlap add methods. It also describes the efficient computation of the DFT using fast Fourier transform (FFT) algorithms like the radix-2 FFT. The radix-2 FFT breaks down the DFT computation into decimation-in-time and decimation-in-frequency butterflies to reduce the complexity from O(N^2) to O(NlogN).

Uploaded by

keerti hatti
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
92 views37 pages

DSP Module 2

This document discusses linear filtering methods based on the discrete Fourier transform (DFT). It covers using the DFT for linear filtering of long data sequences via the overlap save and overlap add methods. It also describes the efficient computation of the DFT using fast Fourier transform (FFT) algorithms like the radix-2 FFT. The radix-2 FFT breaks down the DFT computation into decimation-in-time and decimation-in-frequency butterflies to reduce the complexity from O(N^2) to O(NlogN).

Uploaded by

keerti hatti
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 37

MODULE 2

MODULE 2
Linear filtering methods based on the DFT: Use of DFT in Linear Filtering, Filtering of Long
data Sequences.
Fast-Fourier-Transform (FFT) algorithms: Efficient Computation of the DFT: Radix-2 FFT
algorithms for the computation of DFT and IDFT–decimation-in-time and decimation-in-frequency
algorithms.

Text Book/Reference Books:


1. Proakis & Monalakis, “Digital signal processing – Principles Algorithms & Applications”, 4th
Edition, Pearson education, New Delhi, 2007. ISBN: 81-317-1000-9.
2. Oppenheim & Schaffer, “Discrete Time Signal Processing” , PHI, 2003.
3. D.Ganesh Rao and Vineeth P Gejji, “Digital Signal Processing” Cengage India Private Limited,
2017, ISBN: 9386858231
LINEAR FILTERING METHODS BASED ON DFT
▪ USE OF DFT IN LINEAR FILTERING:
• Let a finite duration sequence 𝑥 𝑛 of length L excites a FIR filter of length M.
• Let 𝑥 𝑛 = 0 , 𝑛 < 0 𝑎𝑛𝑑 𝑛 ≥ 𝐿 and h 𝑛 = 0 , 𝑛 < 0 𝑎𝑛𝑑 𝑛 ≥ 𝑀, where h 𝑛 is the impulse
response of the filter.
• The output sequence y 𝑛 of the FIR filter represents the time-domain convolution of 𝑥 𝑛 and
h 𝑛 , y 𝑛 = σ𝑀−1𝑘=0 ℎ 𝑘 𝑥(𝑛 − 𝑘).

• Since 𝑥 𝑛 and h 𝑛 are finite duration sequences, y 𝑛 is also finite of length L+M-1.
• In frequency domain 𝑌 𝜔 = 𝑋 𝜔 𝐻(𝜔).
• In terms of DFT, 𝑌 𝑘 = 𝑋 𝑘 𝐻 𝑘 𝑘 = 0,1,2 … . 𝑁 − 1.
• N-point circular convolution of 𝑥 𝑛 and h 𝑛 is equivalent to their linear convolution.
…LINEAR FILTERING METHODS BASED ON
DFT…
▪ FILTERING OF LONG DATA SEQUENCES:
• In some real time processing of applications involving linear filtering of signals, the
input sequence 𝑥 𝑛 is a very long sequence.
• Linear filtering on such signals involving DFT imposes severe memory constraints.
• In such filtering the sequences are processed block-wise and the output blocks are
fitted together to form the overall sequence.
• There are two methods for this:
❑ Overlap Save Method:
• Size of input data block N=L+M-1 and size of DFT and IDFT is N.
…LINEAR FILTERING METHODS BASED ON
DFT…
• Each data block consists of M-1 points of previous block and N new points.
• N-point DFT is computed per block.
• Impulse response of filter is increased by appending L-1 zeros and its DFT computed.
• For mth block we have, 𝑌෠𝑚 𝑘 = 𝐻 𝑘 𝑋𝑚 𝑘 , multiplication of two N-point DFTs 𝐻 𝑘 and
𝑋𝑚 𝑘 .
• Then N-point IDFT is computed to yield, 𝑌෠𝑚 𝑛 = {𝑦ො𝑚 0 𝑦ො𝑚 1 … 𝑦ො𝑚 𝑀 − 1
𝑦ො𝑚 𝑀 … 𝑦ො𝑚 𝑁 − 1 }.
• For a N-length record, the first M-1 datapoints of 𝑦𝑚 𝑛 are corrupted by aliasing and
discarded.
• Last L points of 𝑦𝑚 𝑛 are that similar to linear convolution.
…LINEAR FILTERING METHODS BASED ON
DFT…
• To avoid data loss due to aliasing, the last M-1 points of each record are made the
first M-1 points of subsequent record.
• To process the data, the first M-1 points of first block is set to zero.
• The block of data is as follows:
OVERLAP ADD EXAMPLE
Given x[n]={3,-1,0,1,3,2,0,1,2,1} & h[n]={1,1,1}
Let, L=5
Length of h[n], M= 3 , Therefore, M-1= 2
We know, L=(N+M-1)
5=N+3-1
N=3
∴Pad M-1=2 zeros with h[n]
i.e. h[n]={1,1,1,0,0}
Performing yk[n]= xk[n] h[n],
where k=1,2,3,4
1. y1[n]= {3,2,2,-1,0}
2. y2[n]= {1,4,6,5,2}
3. y3[n]= {0,1,3,3,2}
4. y4[n]= {1,1,1,0,0}
…LINEAR FILTERING METHODS BASED ON
DFT…
❑ Overlap Add method:
• Size of input data block L and size of DFT and IDFT is N.
• Each data block is appended with M-1 zeros and DFT calculated.
• The block of data is as follows:
…LINEAR FILTERING METHODS BASED ON
DFT…
• The two N-point DFTs are multiplied to obtain 𝑌𝑚 𝑘 = 𝐻 𝑘 𝑋𝑚 𝑘 .
• IDFT yields N-points that are free of aliasing.
• Since each data block is terminated with M-1 zeros, the last M-1 points of each
block is added to M-1 points of subsequent block.
• Overlapping and adding yields, 𝑦 𝑛 = {𝑦1 0 , 𝑦1 1 , . . 𝑦1 𝐿 − 1 , 𝑦1 𝐿 +
{𝑦2 1 , … 𝑦1 𝑁 − 1 + 𝑦2 𝑀 − 1 , 𝑦1 𝑀 , … }
OVERLAP SAVE EXAMPLE
Given x[n]={3,-1,0,1,3,2,0,1,2,1} & h[n]={1,1,1}
Let, L=5
Length of h[n], M= 3, Therefore, M-1= 2
We know, L=(N+M-1)
5=N+3-1
N=3
∴Pad M-1=2 zeros with h[n] i.e. h[n]={1,1,1,0,0}
x1[n]=(0 0 3 -1 0) x2[n]=(-1 0 1 3 2) x3[n]=(3 2 0 1 2) x4[n]=( 1 2 1 0 0)
Performing yk[n]= xk[n] h[n], where k=1,2,3,4
1. y1[n]= {-1,0,3,2,2}
2. y2[n]= {4,1,0,4,6}
3. y3[n]= {6,7,5,3,3}
4. y4[n]= {1,3,4,3,1}
OVERLAP SAVE VS ADD
METHOD
Overlap Save Overlap Add

•Overlapped values has to be discarded. •Overlapped values has to be added.


•It does not require any addition. •It will involve adding a number of values in
the output.
•It can be computed using linear
convolution •Linear convolution is not applicable here.
RADIX-2FFT 𝑣
• We consider N-point DFT where 𝑁 = 2 and select M=N/2 and L=2.
• We split N-point data sequence into two N/2 sequences 𝑓1 𝑛 = 𝑥(2𝑛) and 𝑓2 𝑛 = 𝑥 2𝑛 + 1 , n =
N
0,1,2 … − 1.
2

• 𝑓1 𝑛 and 𝑓2 𝑛 are obtained by decimating 𝑥(𝑛) by a factor of 2-decimation in time.


• DFT of decimated sequence is 𝑋 𝑘 = σ𝑁−1 𝑘𝑛
𝑛=0 𝑥(𝑛)𝑊𝑁 𝑘 = 0,1,2. . 𝑁 − 1 =
𝑁 𝑁
−1 −1
σ𝑛 𝑒𝑣𝑒𝑛 𝑥 𝑛 𝑊𝑁𝑘𝑛 + σ𝑛 𝑜𝑑𝑑 𝑥 𝑛 𝑊𝑁𝑘𝑛 = σ𝑚=0 𝑥 2𝑚 𝑊𝑁2𝑚𝑘 + σ𝑚=0 𝑥(2𝑚 + 1)𝑊𝑁(2𝑚+1)𝑘 , 𝑊𝑁2 = 𝑊𝑁 .
2 2
2
𝑁 𝑁
−1 −1
• X k = σ𝑚=0 𝑓1 (𝑚)𝑊𝑁2𝑚𝑘 + 𝑊𝑁𝑘 σ𝑚=0 𝑓2 (𝑚)𝑊𝑁𝑘𝑚 = 𝐹1 𝑘 + 𝑊𝑁𝑘 𝐹2 𝑘 , k = 0,1,2 … N − 1.
2 2

2 2
𝑁
𝑁 𝑁 𝑘+
• Periodic sequences, 𝐹1 𝑘 + = 𝐹1 𝑘 and 𝐹2 𝑘 + = 𝐹2 𝑘 . Also 𝑊𝑁 2 = −𝑊𝑁𝑘 .
2 2
𝑁 𝑁
• 𝑋 𝑘 = 𝐹1 𝑘 + 𝑊𝑁𝑘 𝐹2 𝑘 and 𝑋 𝑘 + = 𝐹1 𝑘 − 𝑊𝑁𝑘 𝐹2 𝑘 , 𝑘 = 0,1,2 … − 1.
2 2
𝑁2 𝑁 𝑁
• Computation of 𝑋 𝑘 requires + . Also 𝐺1 𝑘 = 𝐹1 𝑘 and 𝐺2 𝑘 = 𝑊𝑁𝑘 𝐹2 𝑘 , 𝑘 = 0,1,2 … − 1.
2 2 2
𝑁 𝑁
• 𝑋 𝑘 = 𝐺1 𝑘 + 𝐺2 𝑘 and 𝑋 𝑘 + = 𝐺1 𝑘 − 𝐺2 𝑘 , 𝑘 = 0,1,2 … − 1.
2 2
…RADIX-2FFT…
• The process is repeated for 𝑓1 𝑛 and 𝑓2 𝑛 .
• 𝑓1 𝑛 results in two N/4 point sequences-𝑣11 𝑛 = 𝑓1 (2𝑛) and 𝑣12 𝑛 = 𝑓1 2𝑛 + 1 , k =
N
0,1,2. . − 1.
4
• 𝑓2 𝑛 results in two N/4 point sequences-𝑣21 𝑛 = 𝑓1 (2𝑛) and 𝑣22 𝑛 = 𝑓2 2𝑛 + 1 , k =
N
0,1,2. . − 1.
4
𝑘 𝑁
• By using these we obtain N/2-point DFTs: 𝐹1 𝑘 = 𝑉11 𝑘 + 𝑊𝑁/2 𝑉12 , 𝐹1 𝑘 + = 𝑉11 𝑘 −
4
𝑁 N
𝑘
𝑊𝑁/2 𝑉12 , 𝐹2 𝑘 = 𝑉21 𝑘 𝑘
+ 𝑊𝑁/2 𝑉22 , 𝐹2 𝑘 + = 𝑉21 𝑘 − 𝑊𝑁𝑘 𝑉22 , k = 0,1,2 … − 1.
4 4
2

𝑁2
• 𝐹1 𝑘 and 𝐹2 𝑘 can be accomplished with + 𝑁 complex multiplications.
4
• Decimation is repeated again and again till one point sequence is obtained. Operation can be
performed 𝑣 = log 2 𝑁 times.
𝑁
• Number of complex multiplications: log 2 𝑁. Number of complex additions: N log 2 𝑁.
2
…RADIX-2FFT…
• N=8 point DFT computation is as follows.
…RADIX-2FFT…
• Butterfly Diagram
…RADIX-2FFT…
• Data points to be stored are 2N in bit reversed manner.
• Decimation in frequency FFT algorithm uses M=2 and L=N/2.
𝑘𝑁
𝑁
•𝑋 𝑘 = σ𝑁/2−1
𝑛=0 𝑥 𝑛 𝑊𝑁𝑘𝑛 + σ𝑁−1 𝑘𝑛
𝑁 𝑥(𝑛)𝑊𝑁 = σ𝑁−1 𝑘𝑛
𝑛=0 𝑥 𝑛 𝑊𝑁 + 𝑊𝑁 2
σ𝑁/2−1
𝑛=0 𝑥 𝑛 + 𝑊𝑁𝑘𝑛 .
𝑛= 2
2
𝑘𝑁
𝑊𝑁 2
= (−1)𝑘 ,
𝑁
thus 𝑋 𝑘 = σ𝑁−1 𝑘
𝑛=0 [𝑥 𝑛 + (−1) 𝑥 𝑛 + ] 𝑊𝑁𝑘𝑛 .
2
• Shuffling of data and bit reversal
…RADIX-2FFT…
• We split 𝑋 𝑘 into odd numbered and even numbered sequence.
𝑁 𝑁
−1 𝑁 𝑘𝑛 −1 𝑁
• 𝑋 2𝑘 = σ𝑛=0[𝑥 𝑛 + 𝑥 𝑛 +
2
] 𝑊𝑁 and 𝑋 2𝑘 + 1 = σ𝑛=0[𝑥 𝑛 − 𝑥 𝑛 +
2
𝑊𝑁𝑛 ] 𝑊𝑁𝑘𝑛 ,
2 2
𝑁 2 2
𝑘= 0,1 … − 1. 𝑊𝑁2 = 𝑊𝑁 .
2 2
𝑁
• If 𝑔1 (𝑛) and 𝑔2 (𝑛) are two N/2-point sequences, 𝑔1 𝑛 = 𝑥 𝑛 + 𝑥 𝑛 + and
2
𝑁 𝑁
𝑔2 𝑛 = [𝑥 𝑛 − 𝑥 𝑛 + ]𝑊𝑁𝑛 , 𝑛 = 0,1,2 … − 1.
2 2
𝑁 𝑁
−1 −1
• 𝑋 2𝑘 = σ𝑛=0 𝑔1 (𝑛)𝑊𝑁𝑘𝑛 and 𝑋 2𝑘 + 1 = σ𝑛=0 𝑔2 (𝑛)𝑊𝑁𝑘𝑛 .
2 2

2 2

• The computation procedure can be repeated and the process involves 𝑣 = log 2 𝑁 stages of
decimation.
• First stage of decimation in frequency FFT.
• Butterfly computation for Decimation in Frequency Algorithm
𝑁
• Number of complex multiplications: log 2 𝑁.
2
• Number of complex additions: N log 2 𝑁.

• 8-point Decimation in frequency FFT.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy