SlideShare une entreprise Scribd logo
1  sur  19
Dr Ambedkar Institute of
Technology
Electronics and Communication branch
Submitted by 1DA19EC016-Anusha H
1DA19EC017-Anusha K
1DA19EC019-Arushi M
1DA19EC023-Bhavana G S
1DA19EC025-Bhoomika K R
1DA20EC402-Aradhana S
BLOCK
CONVOLUTION BY
I)OVERLAP ADD
METHOD
II)OVERLAP SAVE
METHOD USING
MATLAB
Submitted to:
Nagarathana H S mam
Overlap add method
• The overlap-add method allows us to use the DFT-based method
when calculating the convolution of very long sequences.
• It is used to break long signals into smaller segments for easier
processing.
• There are many DSP applications where a long signal must be
filtered in segments . There are also systems that process segment-
by-segment because they operate in real time .
• In still other applications, the processing may require that the signal
be segmented.
• The overlap-add method is based on the fundamental
technique in DSP:
(1) decompose the signal into simple components,
(2) process each of the components in some useful way, and
(3) recombine the processed components into the final
signal.
Overlap add method
MATLAB code
clc;
clear all;
x = input('Enter the sequence X(n) = ‘);
printf('This sequence should be a
integral multiple of 2*n n’);
h = input('Enter the sequence H(n) = ‘);
n1 = length(x);n2 = length(h);
N = n1+n2-1;y = zeros(1,N);
h1 = [h zeros(1,n2-1)]n3 = length(h1);
y = zeros(1,N+n3-n2);
H = fft(h1);
for i = 1:n2:n1if i<=(n1+n2-1)x1 =
[x(i:i+n3-n2) zeros(1,n3-n2)];
else
x1 = [x(i:n1) zeros(1,n3-n2)];
end
x2 = fft(x1);
x3 = x2.*H;
x4 = round(ifft(x3));
If (i==1) y(1:n3) = x4(1:n3);
else
y(i:i+n3-1) = y(i:i+n3-1)+x4(1:n3);
end
subplot(3,1,1);
stem(x(1:n1),'black’);
grid on;
title('X(n)’);xlabel('n---
>’);ylabel('Amplitude --->’);
subplot(3,1,2);
stem(h(1:n2),'red');grid on;
title('H(n)’);xlabel('n---
>’);ylabel('Amplitude --->’);
subplot(3,1,3);
disp(y(1:N));stem(y(1:N));
grid on;
title('Convolved Singal’);
xlabel('n--->');ylabel('Amplitude --->’);
ha = axes ('Position',[0 0 1 1],'Xlim',[0
1],'Ylim',[0
1],'Box','off','Visible','off','Units','normaliz
ed', 'clipping' , 'off’);
text (0.5, 1,'bf Block Convolution using
Overlap Add Method
','HorizontalAlignment','center','VerticalA
lignment', 'top')
Output
x(n)={1,2,1,3,2,2,3,0,1,0,2,2}
h(n)={1,2,1}
Overlap save method
• In this method, the size of the input data blocks is N=L+M-1 and the DFTs
and the IDFTs are of length L. Each Data Block consists of the last M-1 data
points of the previous block followed by L new data points to form a data
sequence of length N=L+M-1.
• An N point DFT is computed for each data block. The impulse response of
the FIR filter is increased in length by appending L-1 zeros and an N-point
DFT of the sequence is computed once and stored. The multiplication of the
N-point DFTs for the mth block of data yields: y(k)=h(k)x(k).
• Since the data record is of length N, the first M-1 points of (n)are corrupted
by aliasing and must be discarded. The last L points of Ym(n) are exactly the
same as the result from linear convolution.
• To avoid loss of data due to aliasing, the last M-1 points of each
data record are saved and these points become the first M-1 data
points of the subsequent record.
• To begin the processing, the first M-1 point of the first record is set
to zero.
• The resulting data sequence from the IDFT are given where the
first M-1 points are discarded due to aliasing and the remaining L
points constitute the desired result from the linear convolution.
• This segmentation of the input data and the fitting of the output
data blocks together form the output sequence.
Overlap Save method
MATLAB code
clc;clear all;
x = input('Enter the sequence X(n) = ‘);
h = input('Enter the sequence H(n) = ‘);
n1 = length(x);
n2 = length(h);
N = n1+n2-1;
h1 = [h zeros(1,N-n1)];n3 = length(h1);y
= zeros(1,N);
x1 = [zeros(1,n3-n2) x zeros(1,n3)];
H = fft(h1);
for i = 1:n2:Ny1 = x1(i:i+(2*(n3-n2)));
y2 = fft(y1);
y3 = y2.*H;
y4 round(ifft(y3));
y(i:(i+n3-n2)) = y4(n2:n3);
end
X(n)subplot(3,1,1);
stem(x(1:n1),'black’);
grid on;
title('X(n)');xlabel('n---
>');ylabel('Amplitude --->’);
H(n)subplot(3,1,2);
stem(h(1:n2),'red’);
grid on;title(' H(n)’);
xlabel('n--->’);
ylabel('Amplitude --->’);
subplot(3,1,3);
disp(y(1:N));
stem(y(1:N));
grid on
;title('Convolved Signal’);
xlabel('n--->’);
ylabel('Amplitude --->');
ha = axes ('Position',[0 0 1 1],'Xlim',[0
1],'Ylim',[0
1],'Box','off','Visible','off','Units','normaliz
ed', 'clipping' , 'off’);
text (0.5, 1,'bf Block Convolution using
Overlap Save Method
','HorizontalAlignment','center','Vertical
Alignment', 'top')
Output
x(n)={1,2,3,1,2,6,4,-1,3,2,0,1,4}
h(n)={1,1,1}
Calculations
Calculations
Conclusion
In this presentation we explained about the block convolution of
long sequences using overlap add and overlap save method Here
we conclude our presentation .
Thank you

Contenu connexe

Similaire à Dsp GA (1).pptx

Matlab 2
Matlab 2Matlab 2
Matlab 2
asguna
 
Basic simulation lab manual1
Basic simulation lab manual1Basic simulation lab manual1
Basic simulation lab manual1
Janardhana Raju M
 
Tree distance algorithm
Tree distance algorithmTree distance algorithm
Tree distance algorithm
Trector Rancor
 

Similaire à Dsp GA (1).pptx (20)

Fast Fourier Transform (FFT) Algorithms in DSP
Fast Fourier Transform (FFT) Algorithms in DSPFast Fourier Transform (FFT) Algorithms in DSP
Fast Fourier Transform (FFT) Algorithms in DSP
 
Unit-1.pptx
Unit-1.pptxUnit-1.pptx
Unit-1.pptx
 
Matlab 2
Matlab 2Matlab 2
Matlab 2
 
Dsp Lab Record
Dsp Lab RecordDsp Lab Record
Dsp Lab Record
 
Digital Signal Processing
Digital Signal ProcessingDigital Signal Processing
Digital Signal Processing
 
Dsp manual
Dsp manualDsp manual
Dsp manual
 
Computing f-Divergences and Distances of\\ High-Dimensional Probability Densi...
Computing f-Divergences and Distances of\\ High-Dimensional Probability Densi...Computing f-Divergences and Distances of\\ High-Dimensional Probability Densi...
Computing f-Divergences and Distances of\\ High-Dimensional Probability Densi...
 
Basic simulation lab manual1
Basic simulation lab manual1Basic simulation lab manual1
Basic simulation lab manual1
 
Dsp manual print
Dsp manual printDsp manual print
Dsp manual print
 
Informe laboratorio n°1
Informe laboratorio n°1Informe laboratorio n°1
Informe laboratorio n°1
 
EC8553 Discrete time signal processing
EC8553 Discrete time signal processing EC8553 Discrete time signal processing
EC8553 Discrete time signal processing
 
Tree distance algorithm
Tree distance algorithmTree distance algorithm
Tree distance algorithm
 
EEP306: Delta modulation
EEP306: Delta modulationEEP306: Delta modulation
EEP306: Delta modulation
 
Smart Multitask Bregman Clustering
Smart Multitask Bregman ClusteringSmart Multitask Bregman Clustering
Smart Multitask Bregman Clustering
 
DIT-Radix-2-FFT in SPED
DIT-Radix-2-FFT in SPEDDIT-Radix-2-FFT in SPED
DIT-Radix-2-FFT in SPED
 
Answers withexplanations
Answers withexplanationsAnswers withexplanations
Answers withexplanations
 
fhss
fhssfhss
fhss
 
DSP_DiscSignals_LinearS_150417.pptx
DSP_DiscSignals_LinearS_150417.pptxDSP_DiscSignals_LinearS_150417.pptx
DSP_DiscSignals_LinearS_150417.pptx
 
Dsp lab manual
Dsp lab manualDsp lab manual
Dsp lab manual
 
Decimation and Interpolation
Decimation and InterpolationDecimation and Interpolation
Decimation and Interpolation
 

Dernier

Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
DeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesDeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakes
MayuraD1
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
Epec Engineered Technologies
 
Verification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptxVerification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptx
chumtiyababu
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Kandungan 087776558899
 

Dernier (20)

Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
Wadi Rum luxhotel lodge Analysis case study.pptx
Wadi Rum luxhotel lodge Analysis case study.pptxWadi Rum luxhotel lodge Analysis case study.pptx
Wadi Rum luxhotel lodge Analysis case study.pptx
 
AIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsAIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech students
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.ppt
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
 
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdf
 
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
 
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
 
kiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal loadkiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal load
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
DeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesDeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakes
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
 
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptxA CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
 
Engineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planesEngineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planes
 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna Municipality
 
Verification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptxVerification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptx
 
Online electricity billing project report..pdf
Online electricity billing project report..pdfOnline electricity billing project report..pdf
Online electricity billing project report..pdf
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 

Dsp GA (1).pptx

  • 1. Dr Ambedkar Institute of Technology Electronics and Communication branch
  • 2. Submitted by 1DA19EC016-Anusha H 1DA19EC017-Anusha K 1DA19EC019-Arushi M 1DA19EC023-Bhavana G S 1DA19EC025-Bhoomika K R 1DA20EC402-Aradhana S
  • 3. BLOCK CONVOLUTION BY I)OVERLAP ADD METHOD II)OVERLAP SAVE METHOD USING MATLAB Submitted to: Nagarathana H S mam
  • 4. Overlap add method • The overlap-add method allows us to use the DFT-based method when calculating the convolution of very long sequences. • It is used to break long signals into smaller segments for easier processing. • There are many DSP applications where a long signal must be filtered in segments . There are also systems that process segment- by-segment because they operate in real time . • In still other applications, the processing may require that the signal be segmented.
  • 5. • The overlap-add method is based on the fundamental technique in DSP: (1) decompose the signal into simple components, (2) process each of the components in some useful way, and (3) recombine the processed components into the final signal.
  • 7. MATLAB code clc; clear all; x = input('Enter the sequence X(n) = ‘); printf('This sequence should be a integral multiple of 2*n n’); h = input('Enter the sequence H(n) = ‘); n1 = length(x);n2 = length(h); N = n1+n2-1;y = zeros(1,N); h1 = [h zeros(1,n2-1)]n3 = length(h1); y = zeros(1,N+n3-n2); H = fft(h1); for i = 1:n2:n1if i<=(n1+n2-1)x1 = [x(i:i+n3-n2) zeros(1,n3-n2)]; else x1 = [x(i:n1) zeros(1,n3-n2)]; end x2 = fft(x1); x3 = x2.*H; x4 = round(ifft(x3)); If (i==1) y(1:n3) = x4(1:n3);
  • 8. else y(i:i+n3-1) = y(i:i+n3-1)+x4(1:n3); end subplot(3,1,1); stem(x(1:n1),'black’); grid on; title('X(n)’);xlabel('n--- >’);ylabel('Amplitude --->’); subplot(3,1,2); stem(h(1:n2),'red');grid on; title('H(n)’);xlabel('n--- >’);ylabel('Amplitude --->’); subplot(3,1,3); disp(y(1:N));stem(y(1:N)); grid on; title('Convolved Singal’); xlabel('n--->');ylabel('Amplitude --->’); ha = axes ('Position',[0 0 1 1],'Xlim',[0 1],'Ylim',[0 1],'Box','off','Visible','off','Units','normaliz ed', 'clipping' , 'off’); text (0.5, 1,'bf Block Convolution using Overlap Add Method ','HorizontalAlignment','center','VerticalA lignment', 'top')
  • 10. Overlap save method • In this method, the size of the input data blocks is N=L+M-1 and the DFTs and the IDFTs are of length L. Each Data Block consists of the last M-1 data points of the previous block followed by L new data points to form a data sequence of length N=L+M-1. • An N point DFT is computed for each data block. The impulse response of the FIR filter is increased in length by appending L-1 zeros and an N-point DFT of the sequence is computed once and stored. The multiplication of the N-point DFTs for the mth block of data yields: y(k)=h(k)x(k). • Since the data record is of length N, the first M-1 points of (n)are corrupted by aliasing and must be discarded. The last L points of Ym(n) are exactly the same as the result from linear convolution.
  • 11. • To avoid loss of data due to aliasing, the last M-1 points of each data record are saved and these points become the first M-1 data points of the subsequent record. • To begin the processing, the first M-1 point of the first record is set to zero. • The resulting data sequence from the IDFT are given where the first M-1 points are discarded due to aliasing and the remaining L points constitute the desired result from the linear convolution. • This segmentation of the input data and the fitting of the output data blocks together form the output sequence.
  • 13. MATLAB code clc;clear all; x = input('Enter the sequence X(n) = ‘); h = input('Enter the sequence H(n) = ‘); n1 = length(x); n2 = length(h); N = n1+n2-1; h1 = [h zeros(1,N-n1)];n3 = length(h1);y = zeros(1,N); x1 = [zeros(1,n3-n2) x zeros(1,n3)]; H = fft(h1); for i = 1:n2:Ny1 = x1(i:i+(2*(n3-n2))); y2 = fft(y1); y3 = y2.*H; y4 round(ifft(y3)); y(i:(i+n3-n2)) = y4(n2:n3); end X(n)subplot(3,1,1); stem(x(1:n1),'black’); grid on; title('X(n)');xlabel('n--- >');ylabel('Amplitude --->’);
  • 14. H(n)subplot(3,1,2); stem(h(1:n2),'red’); grid on;title(' H(n)’); xlabel('n--->’); ylabel('Amplitude --->’); subplot(3,1,3); disp(y(1:N)); stem(y(1:N)); grid on ;title('Convolved Signal’); xlabel('n--->’); ylabel('Amplitude --->'); ha = axes ('Position',[0 0 1 1],'Xlim',[0 1],'Ylim',[0 1],'Box','off','Visible','off','Units','normaliz ed', 'clipping' , 'off’); text (0.5, 1,'bf Block Convolution using Overlap Save Method ','HorizontalAlignment','center','Vertical Alignment', 'top')
  • 18. Conclusion In this presentation we explained about the block convolution of long sequences using overlap add and overlap save method Here we conclude our presentation .