Experiment 4: To Perform Convolution in MATLAB
Experiment 4: To Perform Convolution in MATLAB
Experiment 4: To Perform Convolution in MATLAB
Tools used:
MATLAB
Description:
Discrete Convolution
Convolution is a formal mathematical operation, just as multiplication, addition, and integration. Addition takes two
numbers and produces a third number, while convolution takes two signals and produces a third signal. Convolution
is used in the mathematics of many fields, such as probability and statistics. In linear systems, convolution is used to
describe the relationship between three signals of interest: the input signal, the impulse response, and the output
signal.
Linear Convolution
The response y[n] of a LTI system for any arbitrary input x[n] is given by convolution of impulse
response h[n] of the system and the arbitrary input x[n].
∞
Y[n] = ∑ x [ k ] h[n−k ]
−∞
1. Folding
2. Shifting
3. Multiplication
4. Summation
Circular Convolution
The convolution of two periodic sequences with period N is called circular convolution of two signals
x1[n] and x2[n].
Y[n] = x1[n] * x2[n]
1. Both the sequences consist of equal number of samples. (If the sequences are different in length,
then convert the smaller size sequence to that of larger size by appending zeros.)
Lab Exercise
Question 4.1
Write a complete program to compute the impulse response of a LTI system? You can use Matlab’s impz
function
x = [1 -2 3 -4 3 2 1];
Code:
< Insert program code here. Copy from m-file(s) and paste. >
Plot:
< Insert program plot here. Copy from Matlab figure and paste. >
Explanation:
Question 4.2
Write a complete program to perform linear convolution? You can use Matlab’s conv function
Code:
< Insert program code here. Copy from m-file(s) and paste. >
Plot:
< Insert program plot here. Copy from Matlab figure and paste. >
Explanation:
< Insert your explanation here>
Question 4.3
Write a complete program to perform linear convolution and show that convolution of two rectangular pulses
is equal to
a triangle.
Code:
< Insert program code here. Copy from m-file(s) and paste. >
Plot:
< Insert program plot here. Copy from Matlab figure and paste. >
Explanation:
Question 4.4
Write a complete program to perform circular convolution? You can use Matlab’s cconv function.
Code:
< Insert program code here. Copy from m-file(s) and paste. >
Plot:
< Insert program plot here. Copy from Matlab figure and paste. >
Explanation:
Question 4.5
Code:
< Insert program code here. Copy from m-file(s) and paste. >
Plot:
< Insert program plot here. Copy from Matlab figure and paste. >
Explanation:
< Insert your explanation here>
To
Demonstrate Correctly With minor With major With major Does not
elementary performs all mistakes mistakes or mistakes work
skills to conduct the tasks performs the partially and Partially
2 experiments tasks. performs the performs
using various tasks the tasks
digital signal
processing
techniques.