Solving Difference Equation With Z-Transform

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Individual Task: Advance Engineering Mathematics

Solving Difference Equation with Z-transform

Muhammad Ammar Asyraf – 6009211006

1. Solve the equation


𝑦(𝑘 + 2) − 2𝑦(𝑘 + 1) + 2𝑦(𝑘) = 𝑥(𝑘)
Where 𝑥(𝑘) is an input of the form 𝑥(𝑘) = cos⁡(𝜋𝑘), which the initial condition values are
𝑦(0) = 1 and 𝑦(1) = 1

ANSWER
Applying Z-transform to the equation, obtaining
𝑍[𝑦(𝑘 + 2) − 2𝑦(𝑘 + 1) + 2𝑦(𝑘)] = 𝑍[𝑥(𝑘)]
𝑍[𝑦(𝑘 + 2)] − 2𝑍[𝑦(𝑘 + 1)] + 2𝑍[𝑦(𝑘)] = 𝑍[𝑥(𝑘)]
𝑧 2 [𝑌(𝑧) − 𝑦(0) − 𝑧 −1 𝑦(1)] − 2𝑧[𝑌(𝑧) − 𝑦(0)] + 2𝑌(𝑧) = 𝑋(𝑧)
𝑧 2 𝑌(𝑧) − 𝑧 2 − 𝑧 − 2𝑧𝑌(𝑧) + 2𝑧 + 2𝑌(𝑧) = 𝑋(𝑧)
𝑌(𝑧)[𝑧 2 − 2𝑧 + 2] − 𝑧 2 + 𝑧 = 𝑋(𝑧)
𝑌(𝑧) 2 (𝑧 2 − 𝑧)
[𝑧 − 2𝑧 + 2] − =1
𝑋(𝑧) 𝑋(𝑧)
𝑌(𝑧) 1 (𝑧 2 − 𝑧)
= 2 +
𝑋(𝑧) [𝑧 − 2𝑧 + 2] 𝑋(𝑧)[𝑧 2 − 2𝑧 + 2]
Defining the Z-transform of the input
(𝑧 2 + 𝑧)
𝑍[𝑥(𝑘)] = 𝑍⁡[cos⁡(𝜋𝑘)] = 2
𝑧 + 2𝑧 + 1
Substitute the result to previous equation,
𝑌(𝑧) 1 (𝑧 2 − 𝑧)⁡(𝑧 2 + 2𝑧 + 1)
= 2 + 2
𝑋(𝑧) [𝑧 − 2𝑧 + 2] (𝑧 + 𝑧)(𝑧 2 − 2𝑧 + 2)
𝑌(𝑧) (𝑧 2 + 𝑧) (𝑧 2 − 𝑧)⁡(𝑧 2 + 2𝑧 + 1)
= 2 +
𝑋(𝑧) (𝑧 + 𝑧)(𝑧 2 − 2𝑧 + 2) (𝑧 2 + 𝑧)(𝑧 2 − 2𝑧 + 2)
𝑌(𝑧) (𝑧 2 + 𝑧) (𝑧 2 − 𝑧)⁡(𝑧 2 + 2𝑧 + 1)
= 2 +
𝑋(𝑧) (𝑧 + 𝑧)(𝑧 2 − 2𝑧 + 2) (𝑧 2 + 𝑧)(𝑧 2 − 2𝑧 + 2)
𝑌(𝑧) 𝑧2
= 2
𝑋(𝑧) (𝑧 − 2𝑧 + 2)
𝑧2 (𝑧 2 + 𝑧)
𝑌(𝑧) = 2 .
(𝑧 − 2𝑧 + 2) (𝑧 2 + 2𝑧 + 1)
Inverse the equation, obtaining
1
𝑦(𝑛) = [(−1)𝑛 + (2 + 𝑖)(1 − 𝑖)𝑛 + (2 − 𝑖)(1 + 𝑖)𝑛 ]
5

2. Solve the equation


𝑦𝑛+1 − 𝑦𝑛 = 𝑑⁡
Where,
𝑛 = 0,1,2, … , and⁡𝑦0 = 𝑎

ANSWER
Applying Z-transform to the equation
𝑍[𝑦𝑛+1 ] − 𝑍[𝑦𝑛 ] = 𝑑
𝑧[𝑌(𝑧) − 𝑦0 ] − 𝑌(𝑧) = 𝑑
𝑧𝑌(𝑧) − 𝑎𝑧 − 𝑌(𝑧) = 𝑑
𝑌(𝑧)[𝑧 − 1] − 𝑎𝑧 = 𝑑
𝑑 𝑎𝑧
𝑌(𝑧) = +
𝑧−1 𝑧−1
Inverse the equation, obtaining
𝑦(𝑛) = (𝑎 + 𝑑)(1 − 𝜃(−𝑛)) + 𝑎𝜃(−𝑛)
Where 𝜃(−𝑛) is the Heaviside step function.

3. Solve the equation


𝑦𝑛+2 = 𝑦𝑛+1 + 𝑦𝑛 ⁡
Where,
𝑦0 = 𝑦1 = 1

ANSWER
Applying Z-transform to the equation
𝑍[𝑦𝑛+2 ] = 𝑍[𝑦𝑛+1 ] + 𝑍[𝑦𝑛 ]
𝑧 2 [𝑌(𝑧) − 𝑦0 − 𝑧 −1 𝑦1 ] = 𝑧[𝑌(𝑧) − 𝑦0 ] + 𝑌(𝑧)
𝑧 2 𝑌(𝑧) − 𝑧 2 − 𝑧 = 𝑧𝑌(𝑧) − 𝑧 + 𝑌(𝑧)
𝑧 2 𝑌(𝑧) − 𝑧𝑌(𝑧) − 𝑌(𝑧) = 𝑧 2
𝑌(𝑧)[𝑧 2 − 𝑧 − 1] = 𝑧 2
𝑧2
𝑌(𝑧) =
[𝑧 2 − 𝑧 − 1]
Inverse the equation, obtaining
𝑛
2−2𝑛−1 [(√5 − 1)(2 − 2√5) + 2𝑛 (1 + √5)𝑛+1 ]
𝑦(𝑛) =
√5

4. Solve the equation


𝑦𝑛 − 7𝑦𝑛−1 + 10𝑦𝑛−2 = 0
Where,
𝑦−1 = 16⁡𝑎𝑛𝑑⁡𝑦−2 = 5⁡

ANSWER
Applying Z-transform to the equation
𝑍[𝑦𝑛 ] − 7𝑍[𝑦𝑛−1 ] + 10𝑍[𝑦𝑛−2 ] = 0
1 1 1
𝑌(𝑧) − 7 [ 𝑌(𝑧) + 𝑦−1 ] + 10 [ 2 𝑌(𝑧) + 𝑦−1 + 𝑦−2 ] = 0
𝑧 𝑧 𝑧
7 10 160
𝑌(𝑧) − 𝑌(𝑧) + 112 + 2 𝑌(𝑧) + + 50 = 0
𝑧 𝑧 𝑧
7 10 160
𝑌(𝑧) [1 − + 2 ] = −162 −
𝑧 𝑧 𝑧
162 160
𝑌(𝑧) = − −
7 10 7 10
[1 − + 2 ] [1 − + 2 ] 𝑧
𝑧 𝑧 𝑧 𝑧
Inverse the function, obtaining

1
𝑦(𝑛) = −54(5𝑛+1 − 2𝑛+1 ) − 160 (𝑍 −1 [ ] (𝑛))
7 10
[1 − + 2 ] 𝑧
𝑧 𝑧

You might also like