Sei sulla pagina 1di 5

EXPERIMENT 4 Date Perform: ________________

To Perform Convolution in MATLAB


 Introduction
In this Matlab lab, you will learn about:
 Discrete Convolution
 Linear Convolution
 Circular Convolution

 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[n] * h[n]


Y[n] = ∑ x [ k ] h[n−k ]
−∞

Steps involved in linear convolution

1. Folding
2. Shifting
3. Multiplication
4. Summation

Linear convolution is for aperiodic and infinite sequence.

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]

Step involved in circular convolution

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.)

Circular convolution is for periodic and finite sequence.

Lab Exercise

Perform the following tasks.

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];

y=[3 -4 6 -10 9 0 17 2 -9 10 -2 -20 5 6 3];

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.2

Write a complete program to perform linear convolution? You can use Matlab’s conv function

h = [3 2 1 -2 1 0 -4 0 3]; % impulse response

x = [1 -2 3 -4 3 2 1]; % input sequence

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:

< Insert your explanation here>

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:

< Insert your explanation here>

Question 4.5

Write a complete program to perform circular convolution of two unequal sequences.

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>

Score→ Developing Beginning


CLO Exemplary (5) Proficient (4) Novice (1)
Statement↓ (3) (2)

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.

CLO MARKS OBTAINED


2
Instructor’s Signatures: __________________________

Potrebbero piacerti anche