Chapter 3 Difference Equation
Chapter 3 Difference Equation
2
3.1 Linear time invariant (LTI) system
• By the principle of superposition, the response 𝑦[𝑛] of a discrete-time
LTI system ℎ[𝑛] is the sum of the responses to the individual shifted
impulses making up the input signal 𝑥[𝑛].
𝑦 𝑛 = 2𝑥[𝑛 − 5]
𝑦 𝑛 = 𝑥 2 [𝑛]
13
3.2 Difference Equation - Categories
• An important class of Linear Time Invariant (LTI) of discrete-
time systems is one that is characterized by a linear
difference equation with constant coefficients.
• Difference equation can be divided into two different
types:
– Non-recursive difference equation
– Recursive difference equation
14
3.2 Difference Equation – General form
• A causal LTI system can be described by a difference equation
of the following form:
σ𝑁 σ𝑀
𝑦[𝑛] = − 𝑖=1 𝑎𝑖 𝑦[𝑛 − 𝑖] + 𝑗=0 𝑏𝑗 𝑥[𝑛 − 𝑗] (3.1)
ℎ 𝑛 = 0.5𝛿 𝑛 + 0.25𝛿[𝑛 − 1]
I.e. we have an impulse response of
0.5 𝑛=0
ℎ 𝑛 = 0.25 𝑛=1
0 𝑒𝑙𝑠𝑒𝑤ℎ𝑒𝑟𝑒
3.2 Difference Equation – Example 2
• The block diagram can be drawn as follow:
𝑦 𝑛 = ℎ 0 𝑥 𝑛 + ℎ 1 𝑥[𝑛 − 1]
3.2.1 Non-recursive difference equation
• A non-recursive LTI discrete-time system can be characterized by a linear
constant coefficient difference equation of the form below (for causal
and non recursive):
𝑦[𝑛] = σ𝑁
𝑚=0 𝑏𝑚 𝑥[𝑛 − 𝑚] (3.2)
𝑦[𝑛] = 𝑏𝑚 𝑥[𝑛 − 𝑚]
𝑚=0
𝑦 𝑛 = 𝑏0 𝑥 𝑛 + 𝑏1 𝑥[𝑛 − 1] + 𝑏2 𝑥[𝑛 − 2]
22
3.2.2 Recursive difference equation
• The response of a discrete-time system depends on the present and
previous values of the input as well as the previous values of the output.
• A LTI, causal, and recursive discrete-time system can be represented by
the following Nth-order linear recursive difference equation:
𝑦[𝑛] = σ𝑁 𝑏
𝑚=0 𝑚 𝑥[𝑛 − 𝑚] − σ𝑁
𝑚=1 𝑎𝑚 𝑦[𝑛 − 𝑚] (3.3)
2 2
𝑦 𝑛 + 𝑎𝑚 𝑦[𝑛 − 𝑚] = 𝑏𝑚 𝑥[𝑛 − 𝑚]
𝑚=1 𝑚=0
24
3.3 Signal Flow Graph
• Signal flow graph (SFG) represents digital system signal
processing routine in the illustration/graphical form.
• There are basic components generally used to illustrate the
SFG which are
Multiplier Adder Unit Delay
x(n) kk k
x(n)
x(n) kx(n)
kx(n)
kx(n) x(n) x(n)
x(n) y(n)=x(n)+w(n)
y(n)=x(n)+w(n)
y(n)=x(n)+w(n) x(n)
x(n)x(n) Z
-1 -1 -1 x(n-1)
Z Zx(n-1)
x(n-1)
25
3.3.1 Signal Flow Graph-FIR
• A 2nd order FIR can be represented as:
2
y[ n]
b[ ]x[ n ]
0
x[n]
y[n]
26
3.3.2 Signal Flow Graph-IIR
• A 2nd order IIR can be represented as:
2 2
y[n] a[ ]y[n ] b[ ]x[n ]
1 0
y[n] a[1] y[n 1] a[2] y[n 2] b[0]x[n] b[1]x[n 1] b[2]x[n 2]
• The Type I (Direct Form I) signal flow graph for this is:
z 1 b[1] a[1] z 1
b[2] a[2]
27
3.3.2 Signal Flow Graph-IIR
• A 2nd order of IIR can be represented as:
2 2
y[n] a[ ]y[n ] b[ ]x[n ]
1 0
• The Type II (Direct Form II) signal flow graph for this is:
a[2] b[2]
28
3.3.2 Signal Flow Graph-IIR
A digital filter is canonic if the number of delays in the block
diagram representation is equal to the order of the difference
equation.
Otherwise it is referred as non-canonic structure.
p0
x[n] + y[n]
It is assumed that the input 𝑥[𝑛] is valid for n 0, and zero for
n<0. The input is an impulse function
𝑥 𝑛 = [1 0 0 0 0 0 0 … ]
It is assumed that the input 𝑥[𝑛] and output are valid for n 0,
and zero for n<0. The input is an impulse function
𝑥 𝑛 = [1 0 0 0 0 0 0 … ]
Note that the output does not reach zero but approaches a small value as n
increases
33