Linear Time-Invariant Discrete-Time (LTID) System Analysis
Linear Time-Invariant Discrete-Time (LTID) System Analysis
Lecture 21
Linear Discrete-Time Systems:
Solution of Difference Equations
by Iteration, by the Z-transform and by Convolution
Prof. Mohamad Hassoun
with the initial conditions 𝑦[−1] = 2 and 𝑦[−2] = 1. Let the input signal
be the causal signal 𝑓 [𝑘] = (3𝑘 + 5)𝑢[𝑘]. Solve for 𝑦[𝑘], 𝑘 ≥ 0
z5 5 3 2
convert parfrac z
z ( z 2) ( z 3) 6 z 2 ( z 2) 3 ( z 3)
Next, multiply by z and use the table of Z-transforms to find the inverse Z-
transform:
3 2
5 𝑧 𝑧
𝐻(𝑧) = − + 2 − 3
6 𝑧−2 𝑧−3
5 3 2
ℎ [𝑘 ] = − 𝛿 [𝑘] + (2)𝑘 𝑢[𝑘] − (3)𝑘 𝑢[𝑘]
6 2 3
The zero-state response 𝑦𝑧𝑠 [𝑘] may now be obtained using convolution
sums,
𝑦𝑧𝑠 [𝑘] = ℎ[𝑘] ∗ 𝑓[𝑘] , where 𝑓 [𝑘] = 3𝑘𝑢[𝑘] + 5𝑢[𝑘]
−1
𝑧−5 𝑧(5𝑧 − 2)
𝑦𝑧𝑠 [𝑘] = 𝑍 { }
(𝑧 − 2)(𝑧 − 3) (𝑧 − 1)2
𝑌𝑧𝑠 (𝑧)
Your turn: Apply partial fraction expansion to , multiply the result
𝑧
by 𝑧, then employ the Z-transform Table to obtain the following result,
35 13
𝑦𝑧𝑠 [𝑘] = (− − 6𝑘 − (3)𝑘 + 24(2)𝑘 ) 𝑢[𝑘]
2 2
𝑄(𝑧) 𝐼(𝑧)
Now we solve for 𝑌𝑧𝑖 (𝑧) in the form of a rational function to obtain,
and readily observe that the solution is 𝑦𝑧𝑖 [𝑘] = 4(2)𝑘 𝑢[𝑘]. It is
interesting to note that the specific initial conditions that we used have
only excited one of the natural modes of the system [due to the
cancellation of the (𝑧 − 3) term]. The complete (decoupled) response can
now be expressed as,
35 13
𝑦[𝑘] = (− − 6𝑘 − (3)𝑘 + 24(2)𝑘 ) 𝑢[𝑘] + 4
⏟(2)𝑘 𝑢[𝑘]
⏟2 2
𝑦𝑧𝑠 𝑦𝑧𝑖
Mathcad Verification
Do not forget to multiply the above Mathcad answers by the discrete unit-
step function, 𝑢[𝑘].
Suppose that we are only interested in the (coupled) complete response.
Then, the solution is obtained as
Next, we apply the Z-transform method to the advance formulation
system,
𝑦[𝑘 + 2] − 5𝑦[𝑘 + 1] + 6𝑦[𝑘] = 𝑓 [𝑘 + 1] − 5𝑓 [𝑘]
where, 𝑦[0] = 4, 𝑦[1] = 13 and 𝑓 [𝑘] = (3𝑘 + 5)𝑢[𝑘]. Remember that
the signals 𝑦[𝑘 + 𝑚] and 𝑓 [𝑘 + 𝑚] in the advance formulation stand for
𝑦[𝑘 + 𝑚]𝑢[𝑘] and 𝑓[𝑘 + 𝑚]𝑢[𝑘], respectively.
Because, in this case, one of the initial conditions depends on the input to
the system, we can only obtain the coupled solution as follows,
𝑦[𝑘 + 2]𝑢[𝑘] ↔ 𝑧 2 𝑌(𝑧) − 𝑧 2 𝑦[0] − 𝑧𝑦[1] = 𝑧 2 𝑌(𝑧) − 4𝑧 2 − 13𝑧
−5𝑦[𝑘 + 1]𝑢[𝑘] ↔ −5(𝑧𝑌(𝑧) − 𝑧𝑦[0]) = −5(𝑧𝑌(𝑧) − 4𝑧)
6𝑦[𝑘]𝑢[𝑘] ↔ 6𝑌(𝑧)
𝑧(5𝑧 − 2)
𝑓[𝑘]𝑢[𝑘] = (3𝑘 + 5)𝑢[𝑘] ↔ 𝐹 (𝑧) =
(𝑧 − 1)2
𝑧(5𝑧 − 2)
𝑓 [𝑘 + 1]𝑢[𝑘] ↔ 𝑧𝐹(𝑧) − 𝑧𝑓[0] = 𝑧 − 5𝑧
(𝑧 − 1)2
Substituting the above expressions in the difference equation we get
2 2
𝑧(5𝑧 − 2)
(𝑧 − 5𝑧 + 6)𝑌(𝑧) + (−4𝑧 − 13𝑧 + 20𝑧) = (𝑧 − 5) − 5𝑧
(𝑧 − 1)2
Solve (Your turn) for 𝑌(𝑧) as one lumped rational function to obtain
𝑁(𝑧) 𝑧(4𝑧 3 − 15𝑧 2 + 𝑧 − 2)
𝑌(𝑧) = =
𝐷 (𝑧) (𝑧 − 1)2 (𝑧 − 2)(𝑧 − 3)
𝑌(𝑧)
which, after applying partial fraction expansion to and then
𝑧
multiplying the result by 𝑧, leads to
35 13
6𝑧 𝑧 28𝑧 𝑧
2 2
𝑌(𝑧) = − − + −
(𝑧 − 1)2 𝑧 − 1 𝑧 − 2 𝑧 − 3
Using the Z-transform Table leads to the following final result
35 13
𝑦[𝑘] = 𝑍 −1 {𝑌(𝑧)} = −6𝑘𝑢[𝑘] − 𝑢[𝑘] + 28(2)𝑘 𝑢[𝑘] − 3𝑘 𝑢[𝑘]
2 2
By inspecting the above solution, we can identify the natural and forced
responses (but not the zero-state and zero-input. Why?) as
13 𝑘
𝑦𝑛 [𝑘] = 28(2)𝑘 𝑢[𝑘] − 3 𝑢[𝑘]
2
35
𝑦𝑓 [𝑘] = − 𝑢[𝑘] − 6𝑘𝑢[𝑘]
2
Your turn: Show that if you are to find 𝑦𝑧𝑠 [𝑘] and 𝑦𝑧𝑖 [𝑘] using the
advance formulation for this system it would result in the following wrong
decomposition (it does not agree with the decoupled delay formulation
solution that we obtained earlier):
𝑦𝑧𝑖 [𝑘] = 5(3)𝑘 𝑢[𝑘] − (2)𝑘 𝑢[𝑘]
35 23
𝑦𝑧𝑠 [𝑘] = − 𝑢[𝑘] − 6𝑘𝑢[𝑘] − 3𝑘 𝑢[𝑘] + 29(2)𝑘 𝑢[𝑘]
2 2
However, the total (coupled) response obtained by adding these two
signals would still be correct:
𝑦[𝑘] = 𝑦𝑧𝑖 [𝑘] + 𝑦𝑧𝑠 [𝑘] =
35 13
= −6𝑘𝑢[𝑘] − 𝑢[𝑘] + 28(2)𝑘 𝑢[𝑘] − 3𝑘 𝑢[𝑘]
2 2
Example. Consider the three-point moving average LTID system
1
𝑦[𝑘] = (𝑓[𝑘] + 𝑓 [𝑘 − 1] + 𝑓[𝑘 − 2])
3
and the discrete-time input signal shown below.
Solution:
Applying the 𝑧-transform to the given recursion formula and using Pair 1
in the 𝑧-Transform Table we obtain (note that 𝑓 [−1] = 𝑓 [−2] = 0)
1 1
𝑌(𝑧) = [𝐹 (𝑧) + 𝑧 −1 𝐹 (𝑧) + 𝑧 −2 𝐹 (𝑧)] = (1 + 𝑧 −1 + 𝑧 −2 )𝐹(𝑧)
3 3
The transfer function is then
𝑌 (𝑧) 1
𝐻 (𝑧) = = (1 + 𝑧 −1 + 𝑧 −2 )
𝐹 (𝑧) 3
The impulse response is obtained by applying the inverse 𝑧-transform to
the above expression to obtain
1
ℎ 𝑘 = ([𝛿 ] + 𝛿 [𝑘 − 1] + 𝛿 [𝑘 − 2])
[ ]
3
1
So, ℎ[𝑘] = 3 for 𝑘 = 0,1,2 and zero otherwise. Therefore, the system has
a finite impulse response (FIR).
The input is given by
𝑓[𝑘] = 𝛿[𝑘] + 2𝛿[𝑘 − 1] − 𝛿[𝑘 − 2] + 𝛿[𝑘 − 3] + 2𝛿[𝑘 − 4]
which has a 𝑧-transform given by
𝐹 (𝑧) = 1 + 2𝑧 −1 − 𝑧 −2 + 𝑧 −3 + 2𝑧 −4
The zero-state response in the 𝑧-domain is
1
𝑌(𝑧) = 𝐻 (𝑧)𝐹 (𝑧) = (1 + 𝑧 −1 + 𝑧 −2 )(1 + 2𝑧 −1 − 𝑧 −2 + 𝑧 −3 + 2𝑧 −4 )
3
1
= (1 + 3𝑧 −1 + 2𝑧 −2 + 2𝑧 −3 + 2𝑧 −4 + 3𝑧 −5 + 2𝑧 −6 )
3
Applying the inverse 𝑧-tarnsform gives the zero-state response
1 2 2 2
[ ]
𝑦 𝑘 = 𝛿[𝑘] + 𝛿[𝑘 − 1] + 𝛿[𝑘 − 2] + 𝛿[𝑘 − 3] + 𝛿[𝑘 − 4] + 𝛿[𝑘 − 5]
3 3 3 3
2
+ 𝛿[𝑘 − 6]
3
From the definition of the discrete-time unit-impulse function, we can
express the response as the sequence (starting at 𝑘 = 0)
1 2 2 2 2
𝑦[𝑘] = { , 1, , , , 1, , 0,0, … }
3 3 3 3 3
Your turn: Show that the above sequence is identical to the one obtained
using manual averaging of the input signal.
Mathcad verification session for the three-point moving average system:
The poles are at 𝑧1,2 = 1 ± 𝑗. This system is unstable since |𝑧𝑖 | = √2 > 1.
𝐻(𝑧) has complex conjugate poles. Therefore, we employ the Z-transform
Pair 12c to find the unit-impulse response ℎ[𝑘],
𝐴𝑧 2 + 𝐵𝑧
2 2
↔ 𝑟𝑏𝑘 cos(𝛽𝑘 + 𝜃) 𝑢[𝑘], 𝑏>0
𝑧 + 2𝑎𝑧 + 𝑏
where,
𝐴2 𝑏2 + 𝐵2 − 2𝐴𝑎𝐵 −𝑎
𝑟= √ −1
, 𝛽 = cos ( )
𝑏2 − 𝑎2 𝑏
−1
𝐴𝑎 − 𝐵
𝜃 = tan ( )
𝐴√𝑏2 − 𝑎2
By matching coefficients in
𝐴𝑧 2 + 𝐵𝑧 𝑧2
=
𝑧 2 + 2𝑎𝑧 + 𝑏2 𝑧 2 − 2𝑧 + 2
we obtain,
The system has an infinite impulse response (IIR). The first six output
values are
Your turn: Solve numerically for the first 10 terms of the sequence
generated by the following recursion formula, 𝑢𝑛+2 = 4𝑢𝑛+1 − 8𝑢𝑛 .
Assume that 𝑢0 = 𝑢1 = 1. Then, employ the Z-transform method to find
the expression for the 𝑛th term, 𝑢𝑛 . Note: The above recursion formula
can also be represented as the second-order homogeneous LTI difference
equation 𝑦[𝑛 + 2] − 4𝑦[𝑛 + 1] + 8𝑦[𝑛] = 0, with 𝑦[0] = 𝑦[1] = 1.
3𝑛
𝑛𝜋 𝑛𝜋
Ans. 𝑢𝑛 = 2 2 −1 [2cos ( 4 ) − sin ( 4 )] , 𝑛 ≥ 0
The Amortization Problem. If you purchase a car, or a house, and take a
loan of 𝑑 dollars, with fixed annual interest rate, 𝑅 (i.e., a rate of 𝑟 =
𝑅/12 per month), then the loan is paid back through the process known in
economics as amortization. Let us say you will be making fixed payments
of 𝑝 dollars every month. What should your monthly payment be if you
want to pay the entire loan within 𝑁 months? (Typically, 𝑁 = 48 for a car
and 𝑁 = 180, 240 or 360 for a house).
Well, the outstanding principal at the end of a given month, 𝑦[𝑘 + 1], is
equal to the outstanding principal from the previous month, 𝑦[𝑘], plus the
monthly interest accrued on that principal, 𝑟𝑦[𝑘], minus the monthly
payment, 𝑓[𝑘]. We may express the above statement analytically as a
recursive formula (difference equation):
𝑦[𝑘 + 1] = 𝑦[𝑘] + 𝑟𝑦[𝑘] − 𝑓 [𝑘]
which amounts to the difference equation
𝑦[𝑘 + 1] − (1 + 𝑟)𝑦[𝑘] = −𝑓[𝑘]
With monthly payments (system input) 𝑓 [𝑘] = 𝑝𝑢[𝑘] and initial principal,
𝑦[0] = 𝑑.
Applying the Z-transform to the difference equation we get
𝑧𝑌(𝑧) − 𝑧𝑦[0] − (1 + 𝑟)𝑌(𝑧) = −𝐹 (𝑧)
𝑝𝑧
Solving for 𝑌(𝑧) and substituting 𝐹 (𝑧) = 𝑧−1 and 𝑦[0] = 𝑑, we obtain
−𝑝𝑧 𝑑𝑧
𝑌(𝑧) = +
[𝑧 − (1 + 𝑟)](𝑧 − 1) 𝑧 − (1 + 𝑟)
𝑌 (𝑧 )
Performing pfe on , we get
𝑧
𝑌(𝑧) 𝑝 1 𝑝 1 𝑑
= (− ) +( ) +
𝑧 𝑟 𝑧 − (1 + 𝑟) 𝑟 𝑧 − 1 𝑧 − (1 + 𝑟)
𝑝 1 𝑝 1
= (𝑑 − ) ( )+( )
𝑟 𝑧 − (1 + 𝑟) 𝑟 𝑧−1
Apply the Z-transform to the above system of equations and show that the
transfer function is given by
𝑌(𝑧) 𝑧2
𝐻 (𝑧) = =
𝐹 (𝑧) 𝑧 2 − 𝑎(1 + 𝑏)𝑧 + 𝑎𝑏
Assume that the government makes a sustained expenditure of 1 (trillion
dollars), 𝑓[𝑘] = 𝑢[𝑘]. Also, assume that the consumer’s “propensity to
consume coefficient” is 𝑎 = 0.8 (i.e., consumer expenditures are 80% of
the national income). Solve for and plot 𝑦𝑧𝑠 [𝑘] for 𝑏 = 0, 0.25, 0.5 and
0.9. Discuss the effects of the induced private investment “acceleration
coefficient” 𝑏 on the national income. What will the national income be
after many years? How does 𝑏 affect that value?
Numerical Integration: Trapezoidal Rule as a LTID System
Consider the integral (for convenience, we set the lower limit to zero)
𝑡
𝑦𝑡𝑟𝑢𝑒 (𝑡) = ∫ 𝑓(𝜏)𝑑𝜏
0
This result holds for any differentiable function 𝑓(𝑡). The important thing
to realize is that the trapezoidal rule has an error that is proportional to ℎ2 ;
i.e., the error is 𝑂(ℎ2 ). It is interesting to note that if 𝑓(𝑡) is linear (its
derivative is a constant for all 𝑡) then 𝑓 ′ (𝑡) − 𝑓 ′ (0) = 0. Thus, the
trapezoidal rule is exact when integrating linear functions.
If we assume the sinusoid 𝑓(𝑡) = sin(𝜔𝑜 𝑡), then the true value of the
integral is
𝑡
1
𝑦𝑡𝑟𝑢𝑒 (𝑡) = ∫ sin(𝜔𝑜 𝜏) 𝑑𝜏 = (1 − cos(𝜔𝑜 𝑡))
0 𝜔𝑜
and it can be easily shown that
−1 { ( )}
−ℎ sin(Ω𝑜 ) −1
𝑧 𝑧(𝑧 − cos(Ω𝑜 ))
[ ]
𝑦 𝑘 =𝑍 𝑌 𝑧 =( )𝑍 { − }
2(cos(Ω𝑜 ) − 1) 𝑧 − 1 𝑧 2 − 2𝑧 cos(Ω𝑜 ) + 1
−ℎ sin(Ω𝑜 )
𝑦[𝑘] = [1 − cos(Ω𝑜 𝑘)]𝑢[𝑘] (1)
2[cos(Ω𝑜 ) − 1]
2
Example. Let 𝐻 (𝑠) = 𝑠+1 and 𝑇 = 0.1. Then, we can arrive at the
corresponding discrete-time transfer function using the substitution
2𝑧−1
𝑠=
𝑇𝑧 +1
to get
2 2
2 𝑧 + 21
21
𝐻1 (𝑧) = 𝐻(𝑠)|𝑠= 2 𝑧−1 = 𝑧−1
= 19
0.1 𝑧+1 20 (𝑧+1) + 1 𝑧−
21
Your turn:
a. Show that Euler’s integration rule
𝑦[𝑘 + 1] = 𝑦[𝑘] + 𝑇𝑓[𝑘 + 1]
1
Leads to the mapping 𝑧 = 1−𝑠𝑇.
Example. Employ convolution sums from the above Table to solve for the
zero-state response of a LTID system to the input 𝑓 [𝑘] = 2𝑘𝑢[𝑘]. Assume
1 𝑘
the system’s unit-impulse response is given by ℎ[𝑘] = 𝛿 [𝑘] + (2) 𝑢[𝑘].
1 𝑘
𝑦𝑧𝑠 [𝑘] = 𝑓[𝑘] ∗ ℎ[𝑘] = 2𝑘𝑢[𝑘] ∗ [𝛿 [𝑘] + ( ) 𝑢[𝑘]]
2
1 𝑘
= 2𝑘𝑢[𝑘] ∗ 𝛿 [𝑘] + 2𝑘𝑢[𝑘] ∗ ( ) 𝑢[𝑘]
2
1 1
(1) ( ) 1 𝑘 1−2
2 𝑘
= 2𝑘𝑢[𝑘] + 2 2 ((2) − 1 + 1 𝑘 (1)𝑘 ) 𝑢(𝑘)
1
(1 − 2) 2
1 𝑘
= 2𝑘𝑢[𝑘] + 4 (( ) − 1 + 𝑘) 𝑢[𝑘]
2
1 𝑘
𝑦𝑧𝑠 [𝑘] = (4 ( ) + 6𝑘 − 4) 𝑢[𝑘]
2
Which can be written as (due to the causal and finite nature of the input),
4
𝑦[𝑘] = ∑ 𝑓 [𝑛]ℎ[𝑘 − 𝑛]
𝑛=0
For 𝑘 = 0, we obtain
4
𝑦[2] = ∑ 𝑓[𝑛]ℎ[2 − 𝑛]
𝑛=0
= 𝑓 [0]ℎ[2] + 𝑓[1]ℎ[1] + 𝑓[2]ℎ[0] + 𝑓 [3]ℎ[−1] + 𝑓[4]ℎ[−2]
1 1 1 2
( ) ( ) ( ) ( )(
= 1 ( ) + 2 ( ) + −1 ( ) + 1 0 + 2 0 = ) ( )( )
3 3 3 3
Your turn: Finish the above example by determining 𝑦[3], 𝑦[4] and 𝑦[5].
Your turn: Employ the Table of Convolution Sums to determine the zero-
1 𝑘
state response of the system ℎ[𝑘] = (2) 𝑢[𝑘] to the following input 𝑓[𝑘]:
a. 𝑢[𝑘]
1 𝑘
b. (3) 𝑢[𝑘]
1 𝑘−2 1 𝑘−4
c. 5 (3) 𝑢[𝑘 − 2] − 4 (3) 𝑢[𝑘 − 4]
Your turn: Verify your solutions to the above problem employing the 𝑧-
tarnsform and Mathcad. Plot the responses as stem plots.
Derivation of the Convolution Sum for the Zero-State Response
We start by assuming a LTID system with unit-impulse response ℎ[𝑘].
That is, for the input 𝛿[𝑘] the system responds with ℎ[𝑘],
𝛿 [𝑘] → 𝑠𝑦𝑠𝑡𝑒𝑚 → ℎ[𝑘]
We are interested in showing that
∞
= ∑ 𝑓[𝑛]𝛿[𝑘 − 𝑛]
𝑛=−∞
Next, we employ the scaling and shift properties of linear systems and find
the response to single sample input 𝑓 [𝑛]𝛿[𝑘 − 𝑛] to be 𝑓[𝑛]ℎ[𝑘 − 𝑛].
∑ ℎ[𝑘 − 𝑛] 𝑧 −𝑘 = 𝑧 −𝑛 𝐻(𝑧)
𝑘=0
Substituting the above sum in the expression for 𝑌𝑧𝑠 (𝑧) gives
∞ ∞