Anda di halaman 1dari 12

Filtering of Long Data

Signals using
Overlap-Add method.
(Implementation using MATLAB)

By:
Pavan Kumar P N
Pavan Kumar N
Pramod Bhat
Mohit Jain
Pavan A
Certain DSP Applications.

High fidelity digital audio requires a


data rate of about 5 Mbytes/min.
Digital Video requires about 500
Mbytes/min.
Real Time Systems: Telephone Signals
cannot be delayed by more than a few
hundred milliseconds.

2 4/4/2011
Comparison of Execution Time

1.5
Execution Time (msec/point)

Standard

0.5

OLA

0
8 16 32 64 128 256 512 1024

Impulse Response Length

3 4/4/2011
Overlap Add Method (OLA)

Overlap
Input Output
Add

The overlap-add method is an


efficient way to evaluate the discrete
convolution of a very long signal x[n]
with a finite impulse response (FIR)
filter h[n].

4 4/4/2011
The OLA Method Algorithm.

• Decompose the signal into


Step 1 simple components.

• Process each of the


Step 2 components in some useful way

• Recombine the processed


Step 3 components into the final signal

5 4/4/2011
Implementing the OLA Method.

6 4/4/2011
MATLAB Code
function olam1()
x=input('Enter the long data input sequence x(n)=„)
Nsig=length(x)
h=input('Enter the filter co-efficients h(n)=„)
M=length(h)
L=input('Input the length of each segment=')
Nframes=ceil(Nsig/L)
Nt=Nsig+M-1
k=1:1:Nt
xsig=[x zeros(1,M-1)]
subplot(Nframes+2,1,1)
stem(k,xsig)
y=zeros(1,Nt)
for m = 0:(Nframes-1)
index=m*L+1:min((m+1)*L,Nsig)
xm = x(index)
xzp=[xm zeros(1,M-1)]
N=length(xm)+M-1
hzp=[h zeros(1,N-M)]
H=fft(hzp,N)
7 4/4/2011
X=fft(xzp,N)
Ym=X.*H
ym=ifft(Ym,N) %N-point IDFT
ym=[zeros(1,m*L) ym]
ym=[ym zeros(1,min(Nsig-(m+1)*L,Nt-length(ym)))]
subplot(Nframes+2,1,m+2)
stem(k,ym)
y=y+ym
end
subplot(Nframes+2,1,Nframes+2)
stem(k,y)
yc=conv(x,h)
figure(2)
subplot(2,1,1)
stem(y)
title('Plot of Overlap Add')
ylabel('y')
xlabel('n')
subplot(2,1,2)
stem(yc)
title('Plot of Direct Convolution')
ylabel('yc')
xlabel('n')
8 4/4/2011
9 4/4/2011
Advantages of OLA Method.

Simple to Implement.
Eliminates the Drawback of the normal
method, “Insufficient memory to
simultaneously hold the entire signal to
be processed”.
The block's data output rate is M times
faster than its data input rate, where M
is the input frame-size.

10 4/4/2011
Applications of OLA Method.

Digital Image Processing


Processing of Digital Audio and Video
Signals.
Real time Data Processing
Real time Voice Processing
Overlap-add methods for time-scaling
of speech

11 4/4/2011
Thank You

12 4/4/2011

Anda mungkin juga menyukai