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

Overlap Save Method

The document describes the overlap-save method for computing the linear convolution of two signals, x and h, with length N. It provides a flow chart and MATLAB program to implement the method. The program takes in inputs x, h, and N. It computes the convolution using successive blocks of length N, overlapping and adding the results. The method outputs the convolution y by discarding the first samples and assembling the blocks. When run with sample inputs, it produces graphs of the true convolution and result from the overlap-save method.

Uploaded by

ArunKumar
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
200 views

Overlap Save Method

The document describes the overlap-save method for computing the linear convolution of two signals, x and h, with length N. It provides a flow chart and MATLAB program to implement the method. The program takes in inputs x, h, and N. It computes the convolution using successive blocks of length N, overlapping and adding the results. The method outputs the convolution y by discarding the first samples and assembling the blocks. When run with sample inputs, it produces graphs of the true convolution and result from the overlap-save method.

Uploaded by

ArunKumar
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

OVERLAP SAVE METHOD

FLOW CHART

START
INPUT X,H,N

lx=length(x)
m=length(h)
l=N-m+1
k=floor((lx+m2)/l)
For j=0:N-1

true
k = mod((i-j),N);
y(i+1)=y(i+1)+x(j+1)*h(
k+1);

false

Display Y

STOP

MATLAB PROGRAM
%overlap save method lab-04 date 31-08-2015
close all
clc
clear all
x=input('x:- ');
h=input('h:- ');
N=input('N:- ');
Lenx = length(x); M = length(h);
z=conv(x,h);
subplot(2,1,1);
title('convolution of X and H');
stem(z,'LineWidth',2);
M1 = M-1; L = N-M1;
h = [h zeros(1,N-M)];
x = [zeros(1,M1), x, zeros(1,N-1)]; % preappend (M-1)
zeros
K = floor((Lenx+M1-1)/(L)); %number of blocks
Y = zeros(K+1,N);
% convolution with succesive blocks
for k=0:K
xk = x(k*L+1:k*L+N);
Y(k+1,:) = cconv(xk,h,N);
end
Y = Y(:,M:N)'; % discard the first (M-1) samples
y = (Y(:))' % assemble output
subplot(2,1,2);
title('linear convolution by overlap save method');
stem(y,'LineWidth',2);

Execution of the program with:X= [3 9 1 2 3 4 5 6 3 4 5 6 7 8 9 8 7 5]


H=[1 2 2 1]
N=4

Graph Obtained

You might also like