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

Exp3 Convolution

Uploaded by

eshaviraj23
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views4 pages

Exp3 Convolution

Uploaded by

eshaviraj23
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

EXP.NO.

LINEAR AND CIRCULAR CONVOLUTION

AIM:

To perform linear and circular convolution of the given signals using MATLAB program.

x1(t) =

x2(t) =

SOFTWARE / HARDWARE REQUIREMENTS:

● MATLAB

THEORY:

Linear Convolution

● Linear convolution is a mathematical operation done to calculate the output of any Linear-Time
Invariant (LTI) system given its input and impulse response.
● It is applicable for both continuous and discrete-time signals.
● Linear Convolution can be represented as y(n)=x(n)*h(n)
y(n) is the output (also known as convolution sum). x(n) is the input signal, and h(n) is
the impulse response of the LTI system.
● In linear convolution, both the sequences (input and impulse response) may or may not be of
equal sizes.
For example, x(n)= [1,2,3] & h(n)= [1,2,3,4,5]
● The number of samples in the output of linear convolution is L = M + N – 1
Where M is the number of samples in x(n). N is the number of samples in h(n)
● It is possible to find the response of a filter using linear convolution.

Circular Convolution

● Circular convolution is essentially the same process as linear convolution. Just like linear
convolution, it involves the operation of folding a sequence, shifting it, multiplying it with another
sequence, and summing the resulting products
● Circular Convolution is represented as y(n)=x(n)⊕ h(n)
● In circular convolution, both the sequences (input and impulse response) must be of equal
sizes. Circular convolution is possible only after modifying the signals via a method known as zero
padding. In zero padding, zeroes are appended to the sequence that has a lesser size to make the
sizes of the two sequences equal. If x(n) = [1,2,3] , after zero padding x(n) = [1,2,3,0,0]

Vel Tech-ECE-VTR UGE-2021- 10211EC303 - Signal Processing Lab Exp:no:3 Linear and Circular Convolution
FLOWCHART /ALGORITHM:

1. Start the MATLAB program.


2. Get the two input sequences to be convoluted.
3. Determine the length of the sequences.
4. Perform the necessary convolution operation using inbuilt function and matrix method.

NOTE: If the lengths of the two sequences are different, then for circular convolution, zero padding
must be performed.

5. Plot the input and output sequences.

PORGRAM:

LINEAR CONVOLUTION:

clc;
clear all;
close all;

x1=input('enter the first sequence');


x2=input('enter the second
sequence');

figure;
subplot(2,2,1);
stem(x1);
xlabel('Time');
ylabel('Amplitude');
title('First Input Sequence');
subplot(2,2,2);
stem(x2);
xlabel('Time');
ylabel('Amplitude');
title('Second Input
Sequence'); x3=conv(x1,x2);
subplot(2,2,3);
stem(x3);
disp('Convolution Output');
disp(x3);
xlabel('Time');
ylabel('Amplitude');
title('Output Sequence');

CIRCULAR CONVOLUTION:

clc;
clear all;
close all;
x1=input('enter the first sequence');
x2=input('enter the second
sequence'); figure;
subplot(2,2,1);
Vel Tech-ECE-VTR UGE-2021- 10211EC303 - Signal Processing Lab Exp:no:3 Linear and Circular Convolution
stem(x1);
xlabel('Time');
ylabel('Amplitude');
title('First Input Sequence');
subplot(2,2,2); stem(x2); xlabel('Time'); ylabel('Amplitude');
title('Second Input Sequence');
N1=length(x1);
N2=length(x2);
N3=max(N1,N2);
x3=fft(x1,N3);
x4=fft(x2,N3);
x5=(x3.*x4);
x6=ifft(x5,N3);
subplot(2,2,3);
stem(x6);
disp('Circular Convolution Output');
disp(x6);
xlabel('Time');
ylabel('Amplitude');
title('Output Sequence');

OUTPUT:
LINEAR CONVOLUTION:

Vel Tech-ECE-VTR UGE-2021- 10211EC303 - Signal Processing Lab Exp:no:3 Linear and Circular Convolution
CIRCULAR CONVOLUTION:

RESULT:

Thus the linear and circular convolution operation of the given signals has been performed using
MATLAB and the output is verified.

Vel Tech-ECE-VTR UGE-2021- 10211EC303 - Signal Processing Lab Exp:no:3 Linear and Circular Convolution

You might also like