0% found this document useful (0 votes)
22 views4 pages

NomanHamza13021 Lab7 of DSP

Uploaded by

13021
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views4 pages

NomanHamza13021 Lab7 of DSP

Uploaded by

13021
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Department of Electrical Engineering

Faculty of Engineering & Applied Sciences


Riphah International University, Islamabad, Pakistan

Program: B.Sc. Electrical Engineering Semester: VII, Fall 2022


Subject: EE-443-L Digital signal Processing Date: ………

Experiment No.7: Computation of impulse Response of LTI system/Discrete


Convolution

1. To Understand the correlation process using matlab


2. To compute impulse response of LTI system using matlab
Noman Hamza 13021
Haris Khan 2899
Um-e-Habiba 13762
Inquiry Level = 1

Performance Lab Report

Description Total Marks Description Total Marks


Marks Obtained Marks Obtained
Ability to 5 Organization/Structure 5
conduct
Experiment

Simulation & 5 MATLAB Code & 5


Results Results
Total Marks obtained

Remarks (if any): ………………………………….

Name & Signature of faculty: …………………………………


LAB REPORT

Title:
Computation of impulse Response of LTI system/Discrete Convolution.

Objectives
⚫ To convolve two signals in MATLAB(Phyton) using built-in functions.

Introduction
In this lab, we’ll learn and perform convolution. We’ll convolve two signals in
MATLAB using built-in functions. First, we’ve to know about convoultion. The output
signal from a linear system is equal to the input signal convolved with the system’s
impulse response. Convolution is denoted by a star when written in equation:

x[n] * h[n] = y[n]

An input signal, x[n], enters a linear system with an impulse response, h[n], resulting in an
output signal, y[n]. If we express in words, the input signal convolved with the impulse response
is equal to the output signal. Convolution is represented by the hysteric ‘*’.
These are four steps for discrete convolution.
i. Folding
ii. Shifting
iii. Multiplication
iv. Summation
For Discrete time convolution, we’ve formula:
Discrete Convolution on MATLAB
h = [1 2 1 -1]; % impulse response
x = [1 2 3 1]; % input sequence
y = conv(h,x);
n = 0:6;
subplot(2,1,1);
stem(n,y);
xlabel('Time index n');
ylabel('Amplitude');
title('Output Obtained by Convolution');
grid;

import matplotlib.pyplot as plt


import numpy as np
from math import pi
from scipy import signal
x=np.array([1,2,3])
h=np.array([1,1])
u= signal.convolve(h,x)
print(u)
plt.stem(u)
plt.xlabel ('No. of samples')
plt.ylabel('Amplitude')
plt.title('convolve')
plt.grid(True)

Output:
Conclusion:
In today’s lab, we’ve learned about Discrete Convolution. We learned to convolve two
signals in MATLAB(Python) using built-in functions. We also performed discrete
convolution mathematically according to the given formula. We’ve come to know that
the input signal convolved with the impulse response is equal to the output signal. This
lab is very helpful to learn and implement discrete convolution. After this lab I am fully
able to do these kinds of experiments on my own.

You might also like