0% found this document useful (0 votes)
119 views4 pages

Flowchart: A) Overlap-Add Method

The document describes two methods for computing the linear convolution of sequences: 1) The overlap-add method which divides the input into blocks of length N, computes the circular convolution of each block with the impulse response, and sums the results. 2) The overlap-save method which divides the input into blocks of length N, computes the Fourier transform of each block and the impulse response, multiplies them together, and performs an inverse Fourier transform to obtain the output.

Uploaded by

gpaswathy
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
119 views4 pages

Flowchart: A) Overlap-Add Method

The document describes two methods for computing the linear convolution of sequences: 1) The overlap-add method which divides the input into blocks of length N, computes the circular convolution of each block with the impulse response, and sums the results. 2) The overlap-save method which divides the input into blocks of length N, computes the Fourier transform of each block and the impulse response, multiplies them together, and performs an inverse Fourier transform to obtain the output.

Uploaded by

gpaswathy
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
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