Week
EE-411: Digital Signal Processing
Dr. Jameel Ahmed
Department of Electrical Engineering
Faculty of Engineering and Applied Sciences
(FEAS), Riphah International University,
Islamabad
09/06/2025
Contents
Classification of Discrete Time
Discrete Time (DT)
Systems
Block Diagram Representation of DT
Systems
Weighted Shifted Unit
Systems
Impulse Response
Impulse
Discrete Time Convolution
Properties of Convolution
Impulse Response
h(n)
x(n) y(n)
LTI
δ(n) h(n)
LTI
When the input of a system is a Unit Impulse then the output of
the system is called Impulse Response.
3
Importance of Impulse
Response
Impulse response allows us to calculate the response of
the system for any input
h (𝑛)
∞
𝑦 (𝑛)=𝑥 (𝑛)∗ h(𝑛)= ∑ 𝑥 (𝑘)h (𝑛−𝑘)
𝑘=− ∞
Impulse Response
Finite Impulse Response
When there are finite no. of samples, the system o/p is said to be
Finite Impulse Response(FIR).
Infinite Impulse Response
When there are infinite no. of samples, the system o/p is said to be
Infinite Impulse Response(IIR).
Discrete Time
Convolution
h(n)
x(n) y(n)
LTI
1. Folding
2. Shifting
3. Multiplication
4. Summation
6
Discrete Time Graphical
Convolution
7
Discrete Time Graphical
Convolution
y(n) = { . . . . . , 0 , 0 , 1 , 4 , 8 , 8 , 3 , -2 , -1 , 0 ,
0,.....} 11
Example: Convolution
Convolve with
Input x(n) Impulse response h(n)
0 0 1 0 0
2
1
1
2
0
0 0
∗
0 1 2 n 0 1 2 3 4 5 n
6 7 8 9
Output y(n)
0 1 2 3 4 5 n
6 7 8 9 10
Step 1: Time reverse
(Folding)
1 0 0
Last First
Input x(n) Impulse response h(n)
0 0 1 0 0
2
1
1
2
0
0 0
∗
0 n 0 1 2 3 4 5 n
1 2
6 7 8 9
First Last
Output y(n)
0 1 2 3 4 5 n
6 7 8 9 10
Shift, multiply, and sum
First (note: all values not shown are zeros)
Input x(n) Impulse response h(n)
0 0 1 0 0
2
1
1
2
0
0 0
∗
n n
0 1 2 0 1 2 3 4 5
6 7 8 9
Output y(n)
0 1 2 3 4 5 n
6 7 8 9 10
Shift, multiply, and sum
n = -1
First
Input x(n) Impulse response h(n)
0 0 1 0 0
2
1
1
2
0
0 0
∗
n n
0 1 2 0 1 2 3 4 5
6 7 8 9
Output y(n)
0 1 2 3 4 5 n
6 7 8 9 10
Shift, multiply, and sum
n=0
Input x(n) Impulse response h(n)
0 0 1 0 0
2
1
1
2
0
0 0
∗
n n
0 1 2 0 1 2 3 4 5
6 7 8 9
Output y(n)
0 1 2 3 4 5 n
6 7 8 9 10
Shift, multiply, and sum
n=1
First
Input x(n) Impulse response h(n)
0 0 1 0 0
2
1
1
2
0
0 0
∗
n n
0 1 2 0 1 2 3 4 5
6 7 8 9
Output y(n)
0 1 2 3 4 5 n
6 7 8 9 10
Shift, multiply, and sum
n=2
First
Input x(n) Impulse response h(n)
0 0 1 0 0
2
1
1
2
0
0 0
∗
n n
0 1 2 0 1 2 3 4 5
6 7 8 9
Output y(n)
0 1 2 3 4 5 n
6 7 8 9 10
Shift, multiply, and sum
n=3
First
Input x(n) Impulse response h(n)
0 0 1 0 0
2
1
1
2
0
0 0
∗
n n
0 1 2 0 1 2 3 4 5
6 7 8 9
Output y(n)
0 1 2 3 4 5 n
6 7 8 9 10
Shift, multiply, and sum
n=4
First
Input x(n) Impulse response h(n)
0 0 1 0 0
2
1
1
2
0
0 0
∗
n n
0 1 2 0 1 2 3 4 5
6 7 8 9
Output y(n)
0 1 2 3 4 5 n
6 7 8 9 10
Shift, multiply, and sum
n=5
First
Input x(n) Impulse response h(n)
0 0 1 0 0
2
1
1
2
0
0 0
∗
n n
0 1 2 0 1 2 3 4 5
6 7 8 9
Output y(n)
0 1 2 3 4 5 n
6 7 8 9 10
Shift, multiply, and sum
n=6
First
Input x(n) Impulse response h(n)
0 0 1 0 0
2
1
1
2
0
0 0
∗
n n
0 1 2 0 1 2 3 4 5
6 7 8 9
Output y(n)
0 1 2 3 4 5 n
6 7 8 9 10
Shift, multiply, and sum
n=7
First
Input x(n) Impulse response h(n)
0 0 1 0 0
2
1
1
2
0
0 0
∗
n n
0 1 2 0 1 2 3 4 5
6 7 8 9
Output y(n)
0 1 2 3 4 5 n
6 7 8 9 10
Shift, multiply, and sum
n=8
First
Input x(n) Impulse response h(n)
0 0 1 0 0
2
1
1
2
0
0 0
∗
n n
0 1 2 0 1 2 3 4 5
6 7 8 9
Output y(n)
0 1 2 3 4 5 n
6 7 8 9 10
Shift, multiply, and sum
n=9
First
Input x(n) Impulse response h(n)
0 0 1 0 0
2
1
1
2
0
0 0
∗
n n
0 1 2 0 1 2 3 4 5
6 7 8 9
Output y(n)
0 1 2 3 4 5 n
6 7 8 9 10
Example: Convolution
An LTI system has impulse response given by
Determine the output of this system when the input is the rectangular pulse
defined as
h [𝑛 ]
0 1 2 3 4 5 n
6 7 8 9 10
𝑥 [11
𝑛 ]
0 1 2 3 4 5 n
6 7 8 9 10
11
Example: Convolution
h (𝑘)
0 1 2 3 4 5 6 7 8 9 10 n
𝑥 (−𝑘)
n
-7 -6 -5 -4 -3 -2 -1 0
5 𝑦 (𝑛 )
4
3
2
1
0 1 2 3 4 5 6 7 8
9 10 11 12 13 14 15 16
17
Example: Convolution
h (𝑘)
0 1 2 3 4 5 6 7 8 9 10 n
𝑥 (−𝑘)
n
-7 -6 -5 -4 -3 -2 -1 0
5 𝑦 (𝑛 )
4
3
2
1
0 1 2 3 4 5 6 7 8
9 10 11 12 13 14 15 16
17
Example: Convolution
h (𝑘)
0 1 2 3 4 5 6 7 8 9 10 n
𝑥 (−𝑘)
n
-7 -6 -5 -4 -3 -2 -1 0
5 𝑦 (𝑛 )
4
3
2
1
0 1 2 3 4 5 6 7 8
9 10 11 12 13 14 15 16
17
Example: Convolution
h (𝑘)
0 1 2 3 4 5 6 7 8 9 10 n
𝑥 (−𝑘)
n
-7 -6 -5 -4 -3 -2 -1 0
5 𝑦 (𝑛 )
4
3
2
1
0 1 2 3 4 5 6 7 8
9 10 11 12 13 14 15 16
17
Example: Convolution
h (𝑘)
0 1 2 3 4 5 6 7 8 9 10 n
𝑥 (−𝑘)
n
-7 -6 -5 -4 -3 -2 -1 0
5 𝑦 (𝑛 )
4
3
2
1
0 1 2 3 4 5 6 7 8
9 10 11 12 13 14 15 16
17
Example: Convolution
h (𝑘)
0 1 2 3 4 5 6 7 8 9 10 n
𝑥 (−𝑘)
n
-7 -6 -5 -4 -3 -2 -1 0
5 𝑦 (𝑛 )
4
3
2
1
0 1 2 3 4 5 6 7 8
9 10 11 12 13 14 15 16
17
Example: Convolution
h (𝑘)
0 1 2 3 4 5 6 7 8 9 10 n
𝑥 (−𝑘)
n
-7 -6 -5 -4 -3 -2 -1 0
5 𝑦 (𝑛 )
4
3
2
1
0 1 2 3 4 5 6 7 8
9 10 11 12 13 14 15 16
17
Example: Convolution
h (𝑘)
0 1 2 3 4 5 6 7 8 9 10 n
𝑥 (−𝑘)
n
-7 -6 -5 -4 -3 -2 -1 0
5 𝑦 (𝑛 )
4
3
2
1
0 1 2 3 4 5 6 7 8
9 10 11 12 13 14 15 16
17
Example: Convolution
h (𝑘)
0 1 2 3 4 5 6 7 8 9 10 n
𝑥 (−𝑘)
n
-7 -6 -5 -4 -3 -2 -1 0
5 𝑦 (𝑛 )
4
3
2
1
0 1 2 3 4 5 6 7 8
9 10 11 12 13 14 15 16
17
Example: Convolution
h (𝑘)
0 1 2 3 4 5 6 7 8 9 10 n
𝑥 (−𝑘)
n
-7 -6 -5 -4 -3 -2 -1 0
5 𝑦 (𝑛 )
4
3
2
1
0 1 2 3 4 5 6 7 8
9 10 11 12 13 14 15 16
17
Example: Convolution
h (𝑘)
0 1 2 3 4 5 6 7 8 9 10 n
𝑥 (−𝑘)
n
-7 -6 -5 -4 -3 -2 -1 0
5 𝑦 (𝑛 )
4
3
2
1
0 1 2 3 4 5 6 7 8
9 10 11 12 13 14 15 16
17
Example: Convolution
h (𝑘)
0 1 2 3 4 5 6 7 8 9 10 n
𝑥 (−𝑘)
-7 -6 -5 -4 -3 -2 -1 0
5 𝑦 (𝑛 )
4
3
2
1
0 1 2 3 4 5 6 7 8
9 10 11 12 13 14 15 16
17
Example: Convolution
h (𝑘)
0 1 2 3 4 5 6 7 8 9 10 n
𝑥 (−𝑘)
n
-7 -6 -5 -4 -3 -2 -1 0
5 𝑦 (𝑛 )
4
3
2
1
0 1 2 3 4 5 6 7 8
9 10 11 12 13 14 15 16
17
Example: Convolution
h (𝑘)
0 1 2 3 4 5 6 7 8 9 10 n
𝑥 (−𝑘)
n
-7 -6 -5 -4 -3 -2 -1 0
5 𝑦 (𝑛 )
4
3
2
1
0 1 2 3 4 5 6 7 8
9 10 11 12 13 14 15 16
17
Example: Convolution
h (𝑘)
0 1 2 3 4 5 6 7 8 9 10 n
𝑥 (−𝑘)
n
-7 -6 -5 -4 -3 -2 -1 0
5 𝑦 (𝑛 )
4
3
2
1
0 1 2 3 4 5 6 7 8
9 10 11 12 13 14 15 16
17
Example: Convolution
h (𝑘)
0 1 2 3 4 5 6 7 8 9 10 n 𝑥 (−𝑘)
n
-7 -6 -5 -4 -3 -2 -1 0
5 𝑦 (𝑛 )
4
3
2
1
0 1 2 3 4 5 6 7 8
9 10 11 12 13 14 15 16
17
Example: Convolution
h (𝑘)
0 1 2 3 4 5 6 7 8 9 10 n 𝑥 (−𝑘)
n
-7 -6 -5 -4 -3 -2 -1 0
5 𝑦 (𝑛 )
4
3
2
1
0 1 2 3 4 5 6 7 8
9 10 11 12 13 14 15 16
17
Example: Convolution
h (𝑘)
0 1 2 3 4 5 6 7 8 9 10 n 𝑥 (−𝑘)
n
-7 -6 -5 -4 -3 -2 -1 0
5 𝑦 (𝑛 )
4
3
2
1
0 1 2 3 4 5 6 7 8
9 10 11 12 13 14 15 16
17
Example: Convolution
h (𝑘)
0 1 2 3 4 5 6 7 8 9 10 n 𝑥 (−𝑘)
n
-7 -6 -5 -4 -3 -2 -1 0
5 𝑦 (𝑛 )
4
3
2
1
0 1 2 3 4 5 6 7 8
9 10 11 12 13 14 15 16
17
Example: Answer
𝑦 (𝑛)
5
0 1 2 3 4 5 6 7 8
9 10 11 12 13 14 15 16
17
Mathematical Method for
Discrete Time Convolution
h (𝑛) 𝑥 (𝑛
2 )
1
0.5
0 1 0 1
∞
2 2
𝑦 (𝑛)=𝑥 (𝑛)∗ h(𝑛)= ∑ 𝑥 ( 𝑘 ) h(𝑛− 𝑘)
3
4
3
4
𝑘=− ∞
∞ Similarly
𝑦 (0)= ∑ 𝑥 ( 𝑘 ) h(0−𝑘)
1
𝑦 (1)=∑ 𝑥 ( 𝑘 ) h (1− 𝑘) 𝑦 (2)=2.5 𝑦 (3)=2 𝑦 (4 )=0
𝑘=−∞
1 𝑘=0
𝑦 (𝑛)
𝑦 (0)=∑ 𝑥 ( 𝑘 ) h(0−𝑘)
𝑘=0 2.5
2
0.5
0 1 2 3 4
Length of the Output
Signal
The length of the output signal is equal to the length of the input signal,
plus the length of the impulse response, minus one.
Example
h (𝑛)
Assume an LTI system has impulse 2
response 1
-2 -1 0 1 2
𝑥 (𝑛) 3
Determine the output of this system in 2
response to the input
-1 0 1 2 3
−2
Example cont.
h (𝑛) 𝑥 (𝑛) 3
2 2 ∞
1 𝑦 (𝑛)=𝑥 (𝑛)∗ h(𝑛)= ∑ 𝑥 ( 𝑘 ) h(𝑛− 𝑘)
𝑘=− ∞
-2 -1 0 1 2 -1 0 1 2 3
−2
𝑦 (𝑛)
∞
𝑦 (0)= ∑ 𝑥 ( 𝑘 ) h(0−𝑘)
7
𝑘=−∞
2
𝑦 (0)=∑ 𝑥 ( 𝑘 ) h(0−𝑘)
𝑘=0
Example cont.
h (𝑛) 𝑥 (𝑛) 3
2 2 ∞
1 𝑦 (𝑛)=𝑥 (𝑛)∗ h(𝑛)= ∑ 𝑥 ( 𝑘 ) h(𝑛− 𝑘)
𝑘=− ∞
-2 -1 0 1 2 -1 0 1 2 3
−2
𝑦 (𝑛)
∞
𝑦 (1)= ∑ 𝑥 ( 𝑘 ) h(1−𝑘)
7
𝑘=−
2 ∞ 6
𝑦 (1)=∑ 𝑥 ( 𝑘 ) h (1− 𝑘)
𝑘=0
Example cont.
h (𝑛) 𝑥 (𝑛) 3
2 2 ∞
1 𝑦 (𝑛)=𝑥 (𝑛)∗ h(𝑛)= ∑ 𝑥 ( 𝑘 ) h(𝑛− 𝑘)
𝑘=− ∞
-2 -1 0 1 2 -1 0 1 2 3
−2
𝑦 (𝑛)
∞
𝑦 (2)= ∑ 𝑥 ( 𝑘) h(2−𝑘)
7
𝑘=−
2∞ 6
𝑦 (2)= ∑ 𝑥 ( 𝑘 ) h(2 −𝑘)
𝑘= 0
−1
Example cont.
h (𝑛) 𝑥 (𝑛) 3
2 2 ∞
1 𝑦 (𝑛)=𝑥 (𝑛)∗ h(𝑛)= ∑ 𝑥 ( 𝑘 ) h(𝑛− 𝑘)
𝑘=− ∞
-2 -1 0 1 2 -1 0 1 2 3
−2
𝑦 (𝑛)
∞
𝑦 (3)= ∑ 𝑥 ( 𝑘 ) h(3−𝑘)
7
𝑘=−∞
2 6
𝑦 (3)= ∑ 𝑥 ( 𝑘 ) h(3 − 𝑘)
𝑘=0
−1
−2
Example cont.
h (𝑛) 𝑥 (𝑛) 3
2 2 ∞
1 𝑦 (𝑛)=𝑥 (𝑛)∗ h(𝑛)= ∑ 𝑥 ( 𝑘 ) h(𝑛− 𝑘)
𝑘=− ∞
-2 -1 0 1 2 -1 0 1 2 3
−2
𝑦 (𝑛)
∞
𝑦 (4)= ∑ 𝑥 ( 𝑘 ) h(4 −𝑘)
7
𝑘=−
2∞ 6
𝑦 (4)= ∑ 𝑥 ( 𝑘 ) h(4 −𝑘)
𝑘= 0
−1
−2
Example cont.
h (𝑛) 𝑥 (𝑛) 3
2 2 ∞
1 𝑦 (𝑛)=𝑥 (𝑛)∗ h(𝑛)= ∑ 𝑥 ( 𝑘 ) h(𝑛− 𝑘)
𝑘=− ∞
-2 -1 0 1 2 -1 0 1 2 3
−2
𝑦 (𝑛)
∞
𝑦 (−1)= ∑ 𝑥 ( 𝑘 ) h(−1−𝑘)
7
2𝑘=− ∞ 6
𝑦 (−1)= ∑ 𝑥(𝑘)h(−1−𝑘) 2
𝑘=0
−1
−2
Example cont.
h (𝑛) 𝑥 (𝑛) 3
2 2 ∞
1 𝑦 (𝑛)=𝑥 (𝑛)∗ h(𝑛)= ∑ 𝑥 ( 𝑘 ) h(𝑛− 𝑘)
𝑘=− ∞
-2 -1 0 1 2 -1 0 1 2 3
−2
𝑦 (𝑛)
∞
𝑦 (−2)= ∑ 𝑥 ( 𝑘 ) h(−2−𝑘)
7
2𝑘=−∞ 6
𝑦 [ −2 ] = ∑ 𝑥 ( 𝑘 ) h(−2−𝑘) 2
𝑘= 0
−1
−2
Properties of Convolution
Commutative Property of
Convolution
𝑦 ( 𝑛 ) =𝑥 ( 𝑛 ) ∗ h (𝑛 )=h ( 𝑛 ) ∗ 𝑥 (𝑛)
Associative Property Of
Convolution
h1(n) h2(n)
x(n)
x(n)
y(n) y(n)
h1(n) * h2(n)
54
Properties of Convolution
Distributive Property of
Convolution
x(n y(n
) h1(n) + h2(n) )
h1(n)
x(n y(n
) + )
h2(n)
55
Discrete Time Correlation
Function
α= attenuation factor
𝜔 (n) = unwanted signal or additive
noise x(n-D) = delayed input signal
The amplitude of Rx and Tx is different
If there is no target then y(n) = 𝜔 (n)
14
Auto-
Correlation
Auto-Correlation is the correlation of the signal
with itself.
57
Cross-Correlation
When two different discrete-time signals are correlated,
then the method of calculating the degree of similarity is
known as Cross Correlation.
If we reverse the role of x(n) & y(n),
we get
58
Cross-Correlation
By reversing the order of x(n) & y(n), we get the mirror image of the
first function.
Example:
x(n) = { 1 , 2 , 3 }
y(n) = { 0 , 1 , 1 }
59
Cross-Correlation
By reversing the order of x(n) & y(n), we get the mirror image of the
first function.
Example:
x(n) = { 1 , 2 , 3 }
y(n) = { 0 , 1 , 1 }
-2 -1 0 1 2 -2 -1 0 1 2
1 3 5 3 0 0 3 5 3 1
60