Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

UNIVERSITY OF ENGINEERING AND TECHNOLOGY

TAXILA
FACULTY OF TELECOMMUNICATION AND INFORMATION
ENGINEERING

Telecom Engineering Department


_____________________________________________________________________________________________

Digital Signal
Processing

LAB MANUAL 04

Analyzing Discrete-Time Linear Time Invariant

Digital Signal Processing 6th Semester 2k21-Telecom Spring 2024 Page 1


UNIVERSITY OF ENGINEERING AND TECHNOLOGY
TAXILA
FACULTY OF TELECOMMUNICATION AND INFORMATION
ENGINEERING

Telecom Engineering Department


_____________________________________________________________________________________________

Lab 04

Lab Objective
The objective of this lab is to
− Analyze Discrete-Time Linear Time Invariant (LTI) systems
THEORY
Response of an LTI System
Given impulse response 𝒉[𝒏] and input [𝒏] , the output 𝒚[𝒏] of an LTI system is
given by convolution sum

𝒚[𝒏] = ∑ 𝒙[𝒏]𝒉[𝒏 − 𝒌]
𝒌=−∞

MATLAB function for convolution is 𝒄𝒐𝒏𝒗(𝒉, 𝒙). This function operates on finite-
duration signals and assumes that the two sequences begin at [𝒏] .
Example
𝒉[𝒏] = [𝟏 𝟐 𝟑 𝟒]
𝒙[𝒏] = [𝟒 𝟑 𝟐 𝟏]
Output
𝒚[𝒏] = [𝟒 𝟏𝟏 𝟐𝟎 𝟑𝟎 𝟐𝟎 𝟏𝟏 𝟒]
If the two sequences do not begin at n = 0, then
𝒏𝒚𝒃 = 𝒏𝒙𝒃 + 𝒏𝒉𝒃
𝒏𝒚𝒆 = 𝒏𝒙𝒆 + 𝒏𝒉𝒆

Digital Signal Processing 6th Semester 2k21-Telecom Spring 2024 Page 2


UNIVERSITY OF ENGINEERING AND TECHNOLOGY
TAXILA
FACULTY OF TELECOMMUNICATION AND INFORMATION
ENGINEERING

Telecom Engineering Department


_____________________________________________________________________________________________

Where 𝒃 b indicates begin and 𝒆 indicates end.

Task A
How would you differentiate between a signal and a system? Explain the key
characteristics of each and provide examples to illustrate their roles in the context
of signal processing.
Task B
How does Linear Time-Invariant (LTI) systems play a crucial role in Digital Signal
Processing (DSP), considering their mathematical simplicity, adherence to the
superposition principle, and efficiency in frequency response analysis?
Task C
What are the common methods for signal decomposition, specifically focusing on
techniques like impulse decomposition, step function analysis, even-odd
decomposition, and Fourier analysis? Explore how these methods contribute to
breaking down signals and their applications in signal processing.
Task D
What is convolution, and how does it play a significant role in Digital Signal
Processing (DSP) systems? Explore the fundamental concept of convolution and
elaborate on its importance in various DSP applications, such as filtering, signal
processing, and system analysis.
Task E
When do we correlate two signals, and what are the key applications or scenarios
where signal correlation is crucial in various fields such as communication systems,
Digital Signal Processing 6th Semester 2k21-Telecom Spring 2024 Page 3
UNIVERSITY OF ENGINEERING AND TECHNOLOGY
TAXILA
FACULTY OF TELECOMMUNICATION AND INFORMATION
ENGINEERING

Telecom Engineering Department


_____________________________________________________________________________________________

radar and sonar, image processing, biomedical signal processing, control systems,
wireless communications, and seismic signal processing?
Task 01
Make your own customized function that take two input signals from user and
show convolution sum graphically.

Task 02
Make your own customized function that take two input signals from user and use
flip and slide method to show convolution sum step by step. (Hint. use pause
command to stay and see stepwise convolution results)

Task 03
Compute the response of the following system to the input x(n):

̿, −𝟏, 𝟐, 𝟓, −𝟒]
𝒉[𝒏] = [𝟐, 𝟑
̿, 𝟐, −𝟓, −𝟏, 𝟖]
𝒙[𝒏] = [𝟏, −𝟏, 𝟎, 𝟕, 𝟗, −𝟏, 𝟒

Build a (user-defined) function for this example; four arguments will be passed to
the function:
− Input x(n)
− Information about its origin
− Impulse response h(n)
− Information about its origin

Digital Signal Processing 6th Semester 2k21-Telecom Spring 2024 Page 4


UNIVERSITY OF ENGINEERING AND TECHNOLOGY
TAXILA
FACULTY OF TELECOMMUNICATION AND INFORMATION
ENGINEERING

Telecom Engineering Department


_____________________________________________________________________________________________

To communicate information about origin to MATLAB, specify a vector of step size


1 whose beginning value is the beginning index of the signal and ending value is the
corresponding ending index.

Here,
𝒏𝒉 = [−𝟏 ∶ 𝟒]
𝒏𝒙 = [−𝟔 ∶ 𝟒]
Beginning index of response?
𝒏𝒚𝒃 = 𝒏𝒙 (𝟏) + 𝒏𝒉 (𝟏)
Ending index of response?
𝒏𝒚𝒆 = 𝒏𝒙 (𝒍𝒆𝒏𝒈𝒕𝒉(𝒙)) + 𝒏𝒉 (𝒍𝒆𝒏𝒈𝒕𝒉(𝒙))

The Complete function in matlab


function [y, ny] = myconv(x, nx, h, nh)
nyb = nx(1) + nh(1);
nye = nx(length(x)) + nh(length(h));
ny = [nyb:nye];
y = conv(x, h);

Task 04
̿ 𝟐, 𝟏, −𝟐, 𝟏, 𝟎, −𝟒, 𝟎, 𝟑] .
We have the impulse response of a system as [𝒏] = [ 𝟑,

Digital Signal Processing 6th Semester 2k21-Telecom Spring 2024 Page 5


UNIVERSITY OF ENGINEERING AND TECHNOLOGY
TAXILA
FACULTY OF TELECOMMUNICATION AND INFORMATION
ENGINEERING

Telecom Engineering Department


_____________________________________________________________________________________________

̿, −𝟐, 𝟑, −𝟒, 𝟑, 𝟐, 𝟏] , find y[n].


For 𝒙[𝒏] = [ 𝟏
̿, −𝟒, 𝟑, 𝟐, 𝟏] to the
If we feed shifted version of input signal i.e. 𝒙[𝒏] = [ 𝟏, −𝟐, 𝟑
system, what kind of output signal we receive

Digital Signal Processing 6th Semester 2k21-Telecom Spring 2024 Page 6

You might also like