Course 05 - Linear Systems and Difference Equations
Course 05 - Linear Systems and Difference Equations
for all n0. That is, when the input is delayed (shifted)
by n0, the output is delayed by the same amount.
Linear Time-invariant (LTI) System
• It can be easily verified that the FIR filter of the
form
is a time-invariant system.
• A system that is both linear and time-invariant is
referred to as an LTI system.
– So, FIR filter is an LTI system.
IIR System or IIR Filter
• IIR filter: Linear system using both current and
finite previous inputs as well as previous
outputs.
• General form:
x n x k n k
k
Impulse Response
• So
by Time-
y[n ] x k h n k invariance
k
Impulse Response
y[n ] x k h n k
k
y[n ] x k h n k
k
k m
• Let us further investigate the operation above.
• Basically, for the time index n, the above
equation computes the sum of products of all of
the pairs x[k] and x[m] as long as k+m=n.
• This operation is called convolution for the
discrete-time signals.
Convolution
• Definition:
y[n ] x[n ] h[n ]
x k h n k x n k h k
k k
• Convolution is commutative
y[n ] x[n ] h[n ] h[n ] x[n ]
• Similar to the definition for the continuous-time
signals, but summation is used instead of
integration.
Example
Example
• h1[n] * h2[n]
Analogous to the arithmetic
multiplication
• In fact, convolution has an intuitive
explanation: it is very similar to “arithmetic
multiplication”
0 , 0, 5 , 2, 3, 0, 0, ...
• Eg., *) 0, 0, 1, 4, 3, 0, 0, ...
x[n] = 0, 0, 5, 2, 3, 0, 0…
0, 0, 5 , 2, 3, 0, 0, 0
h[n] = 0, 0, 1, 4, 3, 0, 0…
x[n] h[n]: 0, 0, 0, 20, 8, 12, 0, 0
0, 0, 0, 0, 15, 6, 9, 0
0, 0, 5, 22,26,18, 9, 0
Convolution result
Interpreted as Polynomial Multiplication
• Property
• Output of an LTI system is the convolution of the input
sequence and the impulse response of the LTI system.
• Convolution is commutative and associative:
Equivalent Systems
• Hence, we have the following equivalent systems:
Equivalent Systems
x[n] y[n]
h1[n] h2[n] h3[n]
Accumulator 0 otherwise
1 n0
h n
0 otherwise
h n n 1 n n 1
n 1 n 1 n
n n 1
Equivalent Cascading Systems
h n u n n n 1 u n u n 1 n
Causality
• Recall: A system is causal if it does not
dependent on future inputs.
• That is, if x1[n]=x2[n] when n<n0, then the
output y1[n]=y2[n] when n<n0 for all n0.
– or equivalently, the output y[n0] depends only the
input sequence values for n n0.
• What is the property of the impulse response of
a causal system?
Property: An LTI system is causal if and only if
y[n ] h k x n k
k
y[n ] h k x n k
k 0
FIR Filter M
(namely, Finite
Impulse Response)
y[n ] h k x n k
k 0
IIR Filter
M N
(namely,
Infinite
Impulse
y[n ] a k x n k b k y n k
k 0 k 1
Response)
Difference Equation
• From the above, we can find that both FIR and IIR
filters are causal LTI Systems.
• They are both difference equations.
• Difference equation: (variables are functions.
y: unknown function; x: given)
N M
a k y n k b m x n m
k 0 m 0
• Both FIR and IIR filters are solutions of difference
equations.
• IIR filter is the case when a0=1. Difference equation
is merely a more general form.
Realization of an LTI System
• Difference equation is an LTI system.
• Another important property is that difference
equation is realizable by recursion:
– To realize or implement an LTI system, we cannot but
exploit previously appeared (available) inputs and/or
outputs.
• Question: Are all the LTI systems able to be
implemented by using difference equations?
Illustration: (infinite-long) Matrix Vector
• A General LTI system is of the form:
y[n ] h k x n k
k
y[n L ] a k x n k b k y n k
k L k 1 L
Let H e jw h k e
jwk
k
we can see
y n H e e jw jwn
Frequency Response
Hence, ejwn is the eigenfunction of the LTI system;
The associated ‘eigenvalue’ is H(ejw).
We call H(ejw) the LTI system’s frequency response
The frequency response is a complex function
consisting of the real and imaginary parts, H(ejw) =
HR(ejw) + jHI(ejw)
Physical meaning: When input is a signal with
frequency w (i.e., ejwn)), the output is a signal of
the same frequency w, but the magnitude and
phase could be changed (characterized by the
complex amplitude H(ejw))
Frequency Response
Another explanation of frequency response
• Recall the discrete-time Fourier transform
(DTFT) pair:
• Forward DTFT
• Inverse DTFT
Frequency Response
• By definition, the frequency response:
H e h k e
jw jwk
k
Y(ejw) = X(ejw)H(ejw)
Multiplication in Frequency Domain
• In sum, the output sequence’s spectrum is the
multiplication of the input spectrum and the
frequency response.
equivalent to
Knowing its
Knowing an
impulse
LTI system
response
equivalent to equivalent to
Knowing its
frequency
response
Application Example of Eigenfunctions
• Sinusoidal responses of LTI systems:
x n A cos w 0 n x1 n x 2 n
A j jw 0 n A j jw 0 n
e e e e
2 2
– The response of x1[n] and x2[n] are
y1 n H e
jw 0 j ( w n )
A / 2 e 0
y2 n H e
jw 0 j ( w n )
A / 2 e 0
0 otherwise
M
M 2
1
e
jw jwn
H e
1 M 2 1 nM
1
Geometric Series Formula
So m m n
k n k
k n k 0
m 1
n
, m n
1
Frequency Response of the Moving-
average System
M2
1
M M 1 e
jw n
H e
jw
1 2 n M1
jw M 2 1
e
jw M 1
1 e
jw
M1 M2 1 1 e
jw M 1 M 2 1 / 2 jw M 1 M 2 1 / 2
1 e e jw M 2 M 1 1 / 2
jw
e
M1 M2 1 1 e
jw M 1 M 2 1 / 2 jw M 1 M 2 1 / 2
1 e e jw M 2 M 1 / 2
jw / 2
e
M1 M2 1 e
jw / 2
e
Frequency Response of the Moving-
average System
Further evaluation
jw M 1 M 2 1 / 2 jw M 1 M 2 1 / 2
1 e e jw M 2 M 1 / 2
H e
jw
M M 1 jw / 2
e
e
jw / 2
1 2
e
sin w M 1 M 2 1 / 2 jw M M / 2
1
e 2 1
M1 M2 1 sin w / 2
H e
jw
jw j H e
exp
Amplitude
response
Phase
response
Example: Discrete-time Ideal Low-pass
Filter
• Ideal low-pass filter in DTFT domain
1, | w | w c
)
jw
H low pass ( e
0, w c | w |
1 wc
h low pass [ n ]
jw n
e dw
2 wc
1 1 jw c n
e
jw n wc jw c n
e | wc
(e )
2 jn 2 jn
sin w c n
n
Uniform samples of Sinc function
Approximation of Discrete-time
Ideal Low-pass Filter
• In other words, the forward DTFT of the sampled sync
function recovers the ideal low-pass filter:
sin w c n
jw n
)
jw
H low pass ( e e
n n
Time reversal
DTFT of (n)
n
n e
jwn
e 1
jw 0
n
DTFT of n k is e , DTFT of n k is e
jwk jwk
Hence
DTFT of n k n k is e 2 cos wk
jwk
e
jwk
DTFT of x(n) = 1 (for all n)
x(n) can be represented as
We prove that its DTFT is
Hence
jwn
w 2 k e dw
k
w 2 k dw
k
w dw
w dw w dw w dw
w dw 1 for all n
From another point of view
According to the sampling property: the DTFT of a continuous
signal xa(t) sampled with period T is obtained by a periodic
duplication of the continuous Fourier transform Xa(jw) with a
period 2/T = ws and scaled by T.
Since the continuous F.T. of x(t)=1 (for all t) is (t), the DTFT
of x(n)=1 shall be a impulse train (or impulse comb), and it turns
out to be
0 n0
n
y n h k x n k
jwk e jwn
h k e n0
k
k 0
Suddenly Applied Complex
Exponential Inputs (continue)
We consider the output for n 0.
y n h k e h k e
jwk e jwn jwk e jwn
k 0 k n 1
H e e
jw jwn
h k e
jwk e
jwn
k n 1
Hence, the output can be written as y[n] = yss[n] + yt[n],
where
y ss n H e
jw
e
jwn
Steady-state response
y t n h k e
jwk jwn
e Transient response
k n 1
Suddenly Applied Complex
Exponential Inputs (continue)
If h[n] = 0 except for 0 n M (i.e., a FIR system),
then the transient response yt[n] = 0 for n+1 > M.
That is, the transient response becomes zero
since the time n = M. For n M, only the steady-
state response exists.
For infinite-duration impulse response (i.e., IIR)
y t n h k e h k Q n
jwk jwn
e
k n 1 k n 1
For stable system, Qn must become increasingly
smaller as n , and so is the transient response.