Linear Convolution Using DFT3.Doc1.Doc3
Linear Convolution Using DFT3.Doc1.Doc3
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
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
no
i = i+1
yes
y1 = y(:,M:end) y1=y [M N] = size[y1]
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