Experiment 7
Experiment 7
Experiment 7
Experiment No. 7:
Discrete Time Convolution
Introduction
Convolution, one of the most important concepts in electrical engineering, can be used to determine the output
a system produces for a given input signal. It can be shown that a linear time invariant system is completely
characterized by its impulse response. The sifting property of the discrete time impulse function tells us that the
input signal to a system can be represented as a sum of scaled and shifted unit impulses. Thus, by linearity,
it would seem reasonable to compute of the output signal as the sum of scaled and shifted unit impulse
responses. That is exactly what the operation of convolution accomplishes. Hence, convolution can be used to
determine a linear time invariant system's output from knowledge of the input and the impulse response.
Objective
x=[3,11,7,0,-1,4,2];
nx=[-3:3];
h=[2,3,0,-5,2,1];
nh=[-1:4];
subplot(3,1,1), stem(nx,x);
subplot(3,1,2), stem(ny,y);
[y,ny]=conv_m(x,nx,h,nh);
subplot(3,1,3), stem(ny,y);
subplot(3,1,1)
xlabel('Time Index n');
ylabel('x[n]');
subplot(3,1,2)
xlabel('Time Index n');
ylabel('h[n]');
subplot(3,1,3)
xlabel('Time Index n');
ylabel('y[n]');
1
Issues
We did not face any issues in this experiment.
Conlcusion
Convolution is such an effective tool that can be utilized to determine a linear time-invariant (LTI) system’s
output from an input and the impulse response knowledge.
We can find out the unit impulse response of discrete time signal using the concept of convolution.
Applications
Convolution has applications that include probability, statistics, acoustics, spectroscopy, signal processing and
image processing, geophysics, engineering, physics, computer vision and differential equations.
x=[1,2,-1];
nx=[0:2];
h=[2,0,2];
nh=[-1:1];
subplot(3,1,1), stem(nx,x);
subplot(3,1,2), stem(nh,h);
2
[y,ny] = conv_m(x,nx,h,nh);
subplot(3,1,3), stem(ny,y);
subplot(3,1,1)
xlabel('Time Index n');
ylabel('x[n]');
subplot(3,1,2)
xlabel('Time Index n');
ylabel('h[n]');
subplot(3,1,3)
xlabel('Time Index n');
ylabel('y[n]');
Q-2
figure;
n=[-3:3];
[x1,n1]=impseq(0,-3,3);
[x2,n2]=impseq(1,-3,3);
x2=2.*x2;
[x3,n3]=impseq(3,-3,3);
x3=-1.*x3;
[x4,n4]=sigadd(x1,n1,x2,n2);
[x,nx]=sigadd(x4,n4,x3,n3);
subplot(3,1,1), stem(nx,x);
n=[-1:4];
[h1,n1]=impseq(-1,-1,4);
h1=2.*h1;
3
[h2,n2]=impseq(1,-1,4);
h2=2.*h2;
[h,nh]=sigadd(h1,n1,h2,n2);
subplot(3,1,2), stem(nh,h);
[y,ny]=conv_m(x,nx,h,nh);
subplot(3,1,3), stem(ny,y);
subplot(3,1,1)
xlabel('Time Index n');
ylabel('x[n]');
subplot(3,1,2)
xlabel('Time Index n');
ylabel('h[n]');
subplot(3,1,3)
xlabel('Time Index n');
ylabel('y[n]');
Q-3
figure;
x=[1,1,1,1,1,1];
nx=[3:8];
subplot(3,1,1), stem(nx,x);
h=[1,1,1,1,1,1,1,1,1,1,1,1];
nh=[4:15];
subplot(3,1,2), stem(nh,h);
[y,ny]=conv_m(x,nx,h,nh);
subplot(3,1,3), stem(ny,y);
4
subplot(3,1,1)
xlabel('Time Index n');
ylabel('x[n]');
subplot(3,1,2)
xlabel('Time Index n');
ylabel('h[n]');
subplot(3,1,3)
xlabel('Time Index n');
ylabel('y[n]');