0% found this document useful (0 votes)
21 views

Linear Convolution Using DFT3.Doc1.Doc3

The document describes two methods for computing the linear convolution of two sequences: overlap-add and overlap-save. Overlap-add divides the input into blocks, computes convolutions, and sums overlapping results. Overlap-save works by computing convolutions on blocks and discarding overlapping samples.

Uploaded by

gpaswathy
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views

Linear Convolution Using DFT3.Doc1.Doc3

The document describes two methods for computing the linear convolution of two sequences: overlap-add and overlap-save. Overlap-add divides the input into blocks, computes convolutions, and sums overlapping results. Overlap-save works by computing convolutions on blocks and discarding overlapping samples.

Uploaded by

gpaswathy
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 4

Flowchart

a) Overlap-add method.
Start input x(n) = [1 2 -1 2 3 -2 -3 -1 1 2 -1] h(n) = [1 2], N = 3

Lin = length(x) M = length(h) Lvonv = Lin+M-1

h = [h zeros(1,N-M)] x = [x zeros(1,Lconv-Lin)] rem1 = rem(length(x),h) extra-L-rem1 x = [x zeros(1,Lconv-Lin)] x = [x zeros(1,extra)]

k=1, i=1, n=k

no n=k+L-1 k+L-1<=length(x) k = k+L i = i+1

yes X1 = X(n) X1 = [X1 zeros(1,M-1)] y1 = circular convolution(x,h) [m n] = size(y)

i==1 no z = [z,y(1,M:N-M+1)y(i,L+1:end)+y(i+1,1:M-1)] yes z = [y(i,1:L)y(1,L+1:end)y(i+1,1:M-1)] z = [z y(m, m:end)] z = z(1:Lconv)

plot x, h, z

Stop

b) Overlap-save method.

Start input x(n) = [1 2 -1 2 3 -2 -3 -1 1 2 -1] h (n) = [1 2], N=2 Lin = length(x) M = length(h) Lconv = Lin+M-1

no
Error(length of block should be greater than or equal to the length of impulse sequence)

N>M

yes
L = N-(M-1) h = [h zeros(1,N-M) x = [zeros(1,M-1)x zeros(1,N)]

k = 1, i = 1, n=k

no

n = k+N-1

yes

k = k+1

no

k+N1<=length(x)
yes

n = n+1

x1 = x(n) y2 = fft(x1).*fft(h) y(I,:) = ifft(y2)

k = k+L, n=k n = k+N1

no
i = i+1

yes
y1 = y(:,M:end) y1=y [M N] = size[y1]

y = reshape(y1,1,M*N) y = y(1:Lconv) plot x, h, y

Stop

Observation
a) Overlap-add method.

Enter the input sequence: [ 1 2 -1 2 3 -2 -3 -1 1 2 -1 ] Enter the impulse sequence: [ 1 2 ] Enter the length of each block: 3

b) Overlap-save method.

Enter the input sequence: [ 1 2 -1 2 3 -2 -3 -1 1 2 -1 ] Enter the impulse sequence: [ 1 2 ] Enter the length of each block: 2

You might also like