ELEC-C5231 Lecture2 LTI Systems
ELEC-C5231 Lecture2 LTI Systems
Filip Elvander
Implementation of systems
(Ch. 9)
Filter design
(Ch. 10)
x(n) y(n)
T
• Example:
• y(n) = T (x(n)) = (x(n + 1) + 5x(n) − 3x(n − 2))2 .
• y(n) = T (x(n)) = x(−n).
• We will focus on a certain class of systems, called LTI systems.
• Many important real systems belong to this class, or can be
approximated by them.
• A lot of powerful theory for analysing and building this type of
systems.
February 27, 2025
0.
Our basic building blocks
x(n) ax(n)
a
x(n) x(n − 1)
z−1
x1 (n)
x(n)
x(n)
x(n)
Linearly combining inputs (left) is the same as linearly combining outputs (right).
Delaying the input (left) is the same as delaying the output (right).
∞
x(n) y(n)
LTI ⇐⇒ y(n) = ∑ h(k)x(n − k)
k=−∞
δ (n) = {. . . , 0, 1, 0, . . .} .
How does this help us if we want to compute T (x(n)) for an arbitrary x(n)?
.. ..
. .
δ (n + 1) δ (n + 1) h(n + 1)
x(−1) + T x(−1) +
δ (n − 1) δ (n − 1) h(n − 1)
x(1) + T x(1) +
.. ..
. .
Linearly combining inputs (left) is the same as linearly combining outputs (right).
0.5
-0.5
-1
0 1 2 3 4 5 6 7 8
t (s)
-0.1
• In music recordings, this is created
-0.15
artificially. -0.2
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8
t (s)
1.5
Concert hall IR Play .
1.5
1
1
0.5
0.5
-0.5
-0.5
-1
0 1 2 3 4 5 6 7 8
t (s) -1
0 1 2 3 4 5 6 7 8
0.1
• Sound waves are reflected on the
0
walls ⇒ each reflection is a delayed
-0.1
and scaled version of the signal.
-0.2
0.5 10
0
0
-5
-0.5
-10
-1 -15
0 1 2 3 4 5 6 7 8
t (s) -20
0 1 2 3 4 5 6 7 8
Original signal Play . t (s)
Convolved signal Play .
February 27, 2025
0.
Black board example
Compute the convolution of
∞ ∞
y(n) = ∑ x(k)h(n − k) = ∑ h(k)x(n − k)
k=−∞ k=−∞
2
= ∑ h(k)x(n − k)
k=0
= h(0)x(n − 0) + h(1)x(n − 1) + h(2)x(n − 2)
= 3x(n) + 2x(n − 1) + x(n − 2)
= {6, 16, 28, 31, 22, 9, 2} .
Note:
• convolving a signal of length K with a signal of length L gives a signal of
length N = K + L − 1. Here, K = 5, L = 3 gives N = 7.
• y(n) is just a scaled version x(n), where the scaling ∑∞ −k(α+ jω)
k=−∞ h(k)e
depends on α, ω, and the IR h.
• Exponentials are eigenfunctions of LTIs: they come back unchanged
expect for a (complex) scaling.
• Same concept as in linear algebra: Ax = λ x if x is an eigenvector of A.
February 27, 2025
0.
Hint for future: response to exponentials
0.4
0.2
x(n) = en(α+ jω) y(n) = cen(α+ jω) 0
c
-0.2
-0.4
The constant gain is c = ∑∞ −k(α+ jω) .
k=−∞ h(k)e -0.6
-0.8
-1
• This is one of the most important 0 200 400 600 800 1000
n
topics of the course. System response to exponential. Note scaling
and (slight) phase-shift.
• We will return to this when we look at
frequency analysis.
Associativity
Distributivity
x(n) y(n)
h1 (n) h2 (n)
x(n) y(n)
h2 (n) h1 (n)
x(n) y(n)
h(n) = h1 (n) ∗ h2 (n)
Systems in series: total system by convolving impulse responses. Order does not
matter.
h1 (n)
x(n) y(n)
+
h2 (n)
x(n) y(n)
h(n) = h1 (n) + h2 (n)
∞ −1 ∞
y(n) = x(n) ∗ h(n) = ∑ x(n − k)h(k) = ∑ x(n − k)h(k) + ∑ x(n − k)h(k)
k=−∞ k=−∞ k=0
| {z } | {z }
anti-causal: future causal: past and present
The only way the anti-causal part is zero for any x(n) is if h(n) = 0 for all n < 0.
∞
LTI system stable ⇐⇒ ∑ |h(n)| < ∞
n=−∞
a a2 a3 a4
+ + + + + ...
y(n)
x(n) y(n)
+
a z−1
• If a1 = . . . = aP = 0, this is a FIR system with IR h(n) = b0 , b1, . . . , bQ .
• If a p ̸= 0 for some p, then this is an IIR system.
• {y(n − 1), y(n − 2), . . . , y(n − P)} is called the state of the system at time n.
x(n) y(n)
b0 + +
z−1 b3 +
We can write the system of equations as (recall causality: h(n) = 0 for n < 0)
1 0 0 0 0 h(0) b0
a1
1 0 0 0 0 h(1) b1
a2
a1 1 0 0 ... 0 h(2) b2
a3
a2 a1 1 0 ... 0 h(3) b3
=
.. .. .. ..
.
. . .
0
aQ aQ−1 aQ−2 . . . . . . a1 1aQ+1 a h(Q) bQ
⇒ h(n) = C1 λ1n +C2 λ2n + . . . +CP λPn satisfies (1) for any C1 , . . . ,CP .
So, we only need to find the correct C1 , . . . ,CP to get our infinite length IR.
February 27, 2025
0.
Impulse response for IIR
IIR
As h(n) = C1 λ1n +C2 λ2n + . . . +CP λPn ,
∞ ∞ P P ∞
n
∑ |h(n)| = ∑ ∑ Cp λ pn ≤ ∑ Cp ∑ λp .
n=0 n=0 p=1 p=1 n=0
n
The right-hand-side is finite if and only if ∑∞
n=0 λ p ⇐⇒ λ p < 1. This is in
fact both necessary and sufficient:
IIR stable
⇐⇒
all P roots λ p to λ P + a1 λ P−1 + . . . aP−1 λ + aP = 0 satisfy λ p < 1.
By definition, for the impulse response y(n) = h(n), we have x(n) = δ (n). Thus,
n=0: h(0) − h(−2) = −δ (0) + 2δ (−1) = 1,
n=1: h(1) − h(−1) = −δ (1) + 2δ (0) = 2,
n=2: h(2) − h(0) = −δ (2) + 2δ (1) = 0,
n≥2: h(n) − h(n − 2) = −δ (n) + 2δ (n − 2) = 0.
We look for a causal system, i.e., h(n) = 0 for n < 1. We thus have the
conditions
n=0: h(0) = −1,
n=1: h(1) = 2,
n≥2: h(n) − h(n − 2) = 0.
Let’s find h(n) satisfying this.
February 27, 2025
0.
Black board example (2/3)
Let’s solve the homogeneous equation
λ n − λ n−2 = λ n−2 (λ 2 − 1) = 0, n ≥ 2.
is a solution to (2) for any C1 ,C2 . To find C1 ,C2 we need some ”initial”
conditions. We have two coefficients, thus we need to know h(n) at two time
steps. Take n = 2 and n = 3 (for example). We have from (2) that
In fact, it holds that h(n) = − 32 (−1)n + 21 for n ≥ 0 (how could we have seen
that directly?).
Clearly, the impulse response does not decay: h(n) = {−1, 2, −1, 2, −1, . . .}
and thus is not absolutely summable. This means that the system is not
stable.
∞
x(n) y(n)
LTI ⇐⇒ y(n) = ∑ h(k)x(n − k)
k=−∞
• Any LTI is completely characterized by its impulse response h(n).
• LTI causal ⇐⇒ h(n) = 0 for n < 0.
• LTI stable ⇐⇒ ∑∞
n=−∞ |h(n)| < ∞
• Many useful LTIs can be represented by the difference equation
P Q
∑ a p y(n − p) = ∑ bq x(n − q).
p=0 q=0
λ P + a1 λ P−1 + . . . + aP−1 λ + aP .
Auto-correlation
∞ ∞
rxx (ℓ) = x(ℓ) ∗ x(−ℓ) = ∑ x(n)x(−(ℓ − n)) = ∑ x(n)x(n − ℓ)
n=−∞ n=−∞
Cross-correlation
∞
rxy (ℓ) = x(ℓ) ∗ y(−ℓ) = ∑ x(n)y(n − ℓ)
n=−∞
⇒ find D by computing ryx (ℓ) for ℓ = 0, 1, . . . and see where we get the highest
value!
1
x(n)
0.5 1
0
0.8
-0.5
-1
0 50 100 150 200 250 300 350 0.6
n
1
x(n-D) 0.4
0.5 D
0
0.2
-0.5
-1
0 50 100 150 200 250 300 350 400 0
-150 -100 -50 0 50 100 150
n
1
x(n)
0.5 1
0.9
0
0.8
-0.5
0.7
-1
0 50 100 150 200 250 300 350 0.6
n
0.5
1
x(n-D) 0.4
0.5 D
0.3
0
0.2
-0.5
0.1
-1
0 50 100 150 200 250 300 350 400 0
-150 -100 -50 0 50 100 150
n
1 6
x(n) y(n) = x(n-D) + w(n)
0.5
4
0
-0.5
2
-1
0 50 100 150 200 250 300 350
n 0
1
x(n-D)
0.5 D -2
0
-4
-0.5
-1
0 50 100 150 200 250 300 350 400 -6
n 0 100 200 300 400 500 600
n
1 6
x(n) y(n) = x(n-D) + w(n)
0.5 x(n-D)
4
0
-0.5
2
-1
0 50 100 150 200 250 300 350
n 0
1
x(n-D)
0.5 D -2
0
-4
-0.5
-1
0 50 100 150 200 250 300 350 400 -6
n 0 100 200 300 400 500 600
n
6
y(n) = x(n-D) + w(n)
x(n-D) 0.35
4
0.3
2 0.25
0.2
0
0.15
-2
0.1
-4 0.05
0
-6 0 50 100 150
0 100 200 300 400 500 600
n