Download presentation
1
Linear filtering based on the DFT
Lecture 3 Linear filtering based on the DFT Advanced Digital Signal Processing Dr Dennis Deng Department of Electronic Engineering, La Trobe University 1998,1999
2
Contents Linear filter and circular convolution
Overlap and save method Overlap and add method Self test exercises
3
Linear Filtering A sequence x(n) of length L filtered by an FIR filter h(n) of length M The length of y(n) is L+M-1 Example x(n) =[1 1 1] , h(n) =[-1 1]
4
Linear Filtering In the frequency domain
Sampling both side by an interval The kth sample is given by Using the DFT notation X(k) and H(k) are the DFT (with zero padding) of x(n) and h(n), respectively.
5
Linear Filtering Performing the inverse DFT
Is the same as y(n) ? YES. Because is the Fourier transform of y(n), to recover y(n), an N-point sampling of and an N-point IDFT is necessary. An equivalent question is under what condition circular convolution becomes linear convolution ? A 4-point circular convolution of the previous example in the following slide
6
Linear Filtering This example shows that by zero padding such that the length of the circular convolution is greater than or equal to L+M-1, circular convolution is the same as linear convolution.
7
Linear Filtering The multiplication in DFT domain corresponds to circular convolution in the time domain. By zero padding the two sequences, circular convolution becomes linear convolution To perform linear convolution using the DFT (1) zero padding x(n) and h(n) such that the length of them is N=L+M-1 (2) Calculate an N-point DFT for both sequences and multiply them point-by-point (3) perform an N-point inverse DFT
8
Linear Filtering The following example shows a 3-point circular convolution
9
Linear Filtering The following example shows a 5-point circular convolution These examples show that when circular convolution is the same as linear convolution
10
Overlap-save method 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.
11
Overlap-save method The method is shown in the following diagram
12
Overlap-save method Each step consists:
(1) calculating N-point DFT of x(n) and multiply it with the N-point DFT of h(n). (2) calculating N-point IDFT and discarding the first M-1 output sample. The last L samples are the desired filter output (3) append the last M-1 samples to the beginning of the new block of signal (4) goto (1) until reach the end of the signal.
13
Overlap-save method The reason for discarding the first M-1 output samples is that they are the result of circular convolution. Linear convolution starts at the Mth sample. For the same reason, the last M-1 samples of the processed block should be appended to the beginning of the new block
14
Overlap-save method This is can be easily seen from a simple example: x(n)=[ ]; h(n)=[1 -1]. (L=4, M=2). A 6-point circular convolution (x(n) represents a block of data)
15
Overlap-add method This method is shown in the following diagram
16
Overlap-add method In each step:
(1) perform the L+M-1 point DFT, multiplication and IDFT (2) the last M-1 samples of the previous output is added to the first M-1 samples of the current output
17
Summary The DFT can be used to implement linear filtering
A key point is to choose the N-point DFT such that circular convolution is the same as linear convolution The overlap-save and overlap-add methods can be used in real time signal processing.
18
Self test exercises For a signal x(n)=[ ] and a filter h(n)=[1 -2 1], (1) Calculate its circular convolution. (2) Verify your result by using Matlab (hint: real(ifft(fft(x).*fft(h,6)))) (3) Calculate its N-point (N=8,9,10,128) circular convolution. Which one is the same as linear convolution For a signal x(n)=[ ] and a filter h(n)=[1 2 1], calculate the filter output using (1) Overlap-save (2) Overlap-add
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.