Professional Documents
Culture Documents
Handout - 2 Discrete-Time Systems
Handout - 2 Discrete-Time Systems
Handout - 2 Discrete-Time Systems
Using Matlab
Discrete-Time Systems
Overview
• What is a System?
• System Properties
• Convolution
• The Difference Equation
2
What is a System?
A system is any process or device that produces an output
signal in response to an input signal. The notion 𝑇 ∙ is used to
represent a general system (T stands for Transformation).
𝓣∙
3
System Properties
Memoryless System
Examples:
• 𝑦[𝑛] = 𝑥 2 [𝑛] is a memoryless system.
• 𝑦[𝑛] = 𝑥[𝑛] + 𝑥[𝑛 − 1] is not a memoryless system.
4
System Properties
Additive System
Homogeneous System
Examples:
• The system 𝑦[𝑛] = 𝑥 2 [𝑛] is nonlinear.
• The system 𝑦[𝑛] = 𝑥[𝑛] + 𝑥[𝑛 − 1] is linear.
6
System Properties
Shift-Invariant System
8
System Properties
Causal System
𝑥[𝑛] = 𝑥 𝑘 𝛿[𝑛 − 𝑘]
𝑘=−∞
Let us define ℎ[𝑛] as the response (output) of the LSI system to the
unit sample 𝛿[𝑛], i.e.,
ℎ[𝑛] = 𝓣 𝛿[𝑛]
11
Convolution
In other words, ℎ[𝑛] is the unit sample response of the LSI system.
where the unit sample response fully characterizes the LSI system.
𝑦[𝑛] = 𝑥 𝑘 ℎ[𝑛 − 𝑘]
𝑘=−∞
This equation is known as the convolution sum and is written as:
∞
15
Convolution
𝑥[𝑘] ℎ[𝑘]
Performing Convolutions
Joy of Convolution:
http://www.jhu.edu/~signals/discreteconv2/index.html 𝑛
16
Convolution
Performing Convolutions
𝑛 -3 -2 -1 0 1 2
ℎ[𝑛] 1 -1 3 2
2 -2 6 4
-1 1 -3 -2
𝑦[𝑛] -1 3 -2 1 13 6
17
Convolution
Performing Convolutions
1
MATLAB:
N = 15; 0.5
n = [0:N-1];
0
x = (0.7).^n; 0 2 4 6 8 10 12 14
h = ones(1, N); 1
y = conv(x, h);
Subplot(3,1,1); stem(n, x) 0.5
1. Commutative property:
2. Associative properties
𝑦[𝑛] = 𝑥 𝑛 ∗ ℎ1 𝑛 ∗ ℎ2 [𝑛]
19
Convolution
Convolution Properties
3. Distributive property
𝑦[𝑛] = 𝑥[𝑛] ∗ ℎ1 𝑛 + ℎ2 𝑛 = 𝑥[𝑛] ∗ ℎ1 [𝑛] + 𝑥[𝑛] ∗ ℎ2 [𝑛]
20
The Difference Equation
Linear Constant Coefficient Difference Equation (LCCDE)
𝑎𝑘 𝑦 𝑛 − 𝑘 = 𝑏𝑚 𝑥 𝑛 − 𝑚 , ∀𝑛
𝑘=0 𝑚=0
𝑦 𝑛 = 𝑏𝑚 𝑥 𝑛 − 𝑚 − 𝑎𝑘 𝑦 𝑛 − 𝑘 , ∀𝑛
𝑚=0 𝑘=1
21
The Difference Equation
Solution of the LCCDE
22
The Difference Equation
Example
MATLAB:
b = [1];
a = [1, -1, 0.9];
n = -20:120;
x = [n==0];
y = filter(b, a, x);
subplot(2,1,1); stem(n,x)
title(‘Input Signal’); xlabel(‘n’); ylabel(‘x(n)’)
subplot(2,1,2); stem(n,y)
title(‘Impulse Response’); xlabel(‘n’); ylabel(‘y(n) = h(n)’)
23
The Difference Equation
Example Input Signal
1
x(n)
0.5
0
-20 0 20 40 60 80 100 120
n
Impulse Response
1
0.5
y(n) = h(n)
-0.5
-1
-20 0 20 40 60 80 100 120
n
This particular output is the unit sample response of the system, i.e. 𝒉[𝒏].
24
Matlab Commands
conv Convolution and polynomial multiplication
filter 1-D digital filter
subplot Create axes in tiled positions
title Add title to current axes
xlabel Label x-axis
ylabel Label x-axis
25
Useful Links
Discrete Convolution
https://www.youtube.com/watch?v=A6qR7UhLvng
https://www.youtube.com/watch?v=C_kwjJLepLg
26