Exp No-04
Exp No-04
Experiment Name: Determine the convolution of discrete time signal of a LTI using
MATLAB.
Objective:
1. To design a linear time-invariant (LTI) system in MATLAB.
2. To compute the convolution of the signal and the LTI system using MATLAB's built-in
functions or algorithms.
Theory:
As the name suggests the two basic properties of a LTI system are:
Linearity:
A linear system (continuous or discrete time) is a system that possesses the property of
SUPERPOSITION. The principle of superposition states that the response of sum of two or more
weighted inputs is the sum of the weighted responses of each of the signals.
Superposition combines in itself the properties of ADDITIVITY and HOMOGENEITY. This is a
powerful property and allows us to evaluate the response for an arbitrary input, if it can be
expressed as a sum of functions whose responses are known.
Time Invariance:
It allows us to find the response to a function which is delayed or advanced in time; but similar in
shape to a function whose response is known.
Given the response of a system to a particular input, these two properties enable us to find the
response to all its delays or advances and their linear combination.
Discrete Time LTI Systems:
Consider any discrete time signal x[n]. It is intuitive to see how the signal x[n] can be represented
as sum of many delayed/advanced and scaled Unit Impulse Signals.
Convolution sum:
Convolution is a mathematical operation used to express the relation between input and output of
an LTI system. It relates input, output and impulse response of an LTI system as y(t)=x(t) h(t)
Where y (t) = output of LTI x (t) = input of LTI h (t) = impulse response of LTI There are two
types of convolutions:
• Continuous convolution
• Discrete convolution
Discrete Convolution For a relaxed LTI system, the response y(n) to a given input signal x(n) can
be obtained if we know the system impulse response h(n). Then response y(n) is given by the
following relation:
Example:
Using conv () function, we can compute the convolution sum of two discrete time signals. But the
outcome of conv () function does not reveal the timing information. So time index of the sum
should be derived from the signals to be convolved. Recall that the lowest time index of the
convolution sum is the sum of the lowest time indices of the two signals to be convolved. Same
thing applies for highest time index of the sum. Let
Code:
x1=[4 2 6 3 8 1 5];
n1=[-2:4];
x2=[3 8 6 9 6 7];
n2=[-4:1];
kmin=n1(1)+n2(1);
kmax=n1(end)+n2(end);
y=conv(x1,x2);
k=kmin:kmax;
subplot(3,1,1),stem(n1,x1)
subplot(3,1,2),stem(n2,x2)
subplot(3,1,3),stem(k,y)
Output:
kmin = -6
kmax = 5
y = 12 38 58 105 126 179 148 178 108 107 37 35
Exmaple-1:
Hn=[1,2,1,-1] & Xn=[1,2,3,5] find Yn
Here, Hn - arrows below -1 & Xn - arrows below 1
Code:
Hn=[1 2 1 -1];
n1=[-3:0];
Xn=[1 2 3 5];
n2=[0:3];
kmin=n1(1)+n2(1);
kmax=n1(end)+n2(end);
Yn=conv(Hn, Xn);
k=kmin:kmax;
subplot(3,1,1),stem(n1, Hn)
subplot(3,1,2),stem(n2, Xn)
subplot(3,1,3),stem(k,Yn)
Output: kmin
= -3
kmax = 3
Yn = 1 4 8 12 11 2 -5
Conclusion:
Through this experiment we learn that hot the convolution of discrete time signal of a LTI. In
MATLAB, the convolution of a discrete-time signal and a linear time-invariant (LTI) system can
be determined using the "conv" function. By convolving the input signal with the impulse response
of the LTI system, we obtain the output signal. This process allows us to analyze and understand
the effect of the LTI system on the input signal in the time domain.