You are on page 1of 4

Lab 6-To compute the convolution of LTI Systems

Usman Khaliq Yousaf Baig Aliza khan Syed Anees Asad


Department of biomedical Department of biomedical Department of biomedical Department of biomedical
engineering engineering engineering engineering
Air university Air university Air university Air university
Islamabad, Pakistan Islamabad, Pakistan Islamabad, Pakistan Islamabad, Pakistan
usmankhaliq856@gmail.com hyousafbaig@gmail.com Alizakhann@gmail.com aneesaleen@gmail.com

Zuhaa Ejaz Kazmi


Department of biomedical
engineering
Air university
Islamabad, Pakistan
Zuhaaejaz12@gmail.com

I. Tools extensive built-in libraries and toolboxes, coupled


with a user-friendly syntax, empower users to
The fundamental software we used was: perform complex computations and visualize data
• Matlab with ease. In this lab we delved deeper into the conv
Matlab has a variety of in-built functions function in MATLAB that allows us to convolute two
and a multitude tool that aided us in this signals. Convolution in MATLAB refers to the
basic lab and will be of great use for future mathematical operation of combining two sequences
signal processing. of data to produce a third sequence. It's commonly
used in signal processing, image processing, and
various other fields of engineering and science. In
MATLAB, you can perform convolution using the
II. INTRODUCTION conv function.
Signal processing is an engineering subfield that Convolution:
allows us to scrutinize, modify and synthesize
various signals such as images, sounds, videos. This You start with two sequences of data. These
allows us to observe things that aren’t visible sequences can be represented as vectors in
otherwise. As biomedical engineers signal processing MATLAB. The conv function in MATLAB computes
is a paramount area to master to efficiently generate the convolution of the two input sequences. The
and manipulate signals as per our requirements. operation involves sliding one sequence (usually the
MATLAB, short for Matrix Laboratory, is a powerful impulse response) across the other sequence (the
and widely-used programming language and input signal), multiplying the overlapping elements at
numerical computing environment designed for each position, and summing the products.
scientific computing, data analysis, and visualization.
Developed by MathWorks, MATLAB integrates The result of the convolution operation is a third
computation, visualization, and programming in an sequence, which represents the combined effect of
easy-to-use environment, making it a versatile tool the input signal and the impulse response. This
for engineers, scientists, and researchers. Its primary resulting sequence can have a different length
strength lies in its ability to handle matrix operations compared to the original sequences.
seamlessly, making it particularly suitable for tasks
involving linear algebra, signal processing, image
analysis, and control system design. MATLAB's
• Execution:

III. LAB TASKS

Task 1:

Consider the following input signa l and the impulse


response of the LTI system

X(t) = e (0.2t) u(t);

H(t) = u(t – 2);

find the output y(t) = x(t)*h(t)

where t is from -10 to 10 for the inputs and decide an


appropriate time scale

for the output

• Code:

• Explanation:
In order to convolute the two signals x(t)= e
(0.2t) u(t) and H(t) = u(t – 2) we first define
the two signals. Then we convolute them
using inbuilt conv function and plot them
using the stem function for discreet time.

Task 2:

Create a MATLAB code to compute the output of the


LTI system making use of

‘CASE ‘statement, with t= -10 to 10

a. Take the input from the user

b. If user enters ‘unit’ input signal should be x(t) =


u(t) - u(t – 2)

c. If user enters ‘imp’ input signal should be x(t) = δ(t


+ 2) + δ (t – 3)

d. Impulse response is h(t) = exp(0.3t)*u(t)

e. Plot the input signal impulse response and the


output signal y(t) = x(t)*h(t)
ii. Unit impulse:

• Code:

• Explanation:

In order to convolute the two signals H(t) = u(t – 2)


and either x(t) = u(t) - u(t – 2) or be x(t) = δ(t + 2) + δ
(t – 3) we define x(t) and u(9). Then we use a switch
tructure to switch between two of our inputs
despending upon the value of the h(t) function input
function. After defining the axes we use plot function
or stem function to plot them.

IV. CONCLUSION
• Execution:
In this Lab our primary goal was to familiarize
ourselves with the convolution function in
i. Unit step: LABVIEW. We learnt how to implement switching
between two inputs depending upon the users will.
This is the first step in the wide world of signals and
systems.

V. REFRENCES

[1]. "Digital Signal Processing Using MATLAB" by

Vinay K. Ingle and John G. Proakis

[2]. "Signals and Systems: A Primer with MATLAB"

by Matthew N. O. Sadiku

[3]. "MATLAB for Engineers" by Holly Moore

You might also like