150
SIGNALS AND SYSTEMS
14. Z TRANSFORM SOLUTION TO DIFFERENCE EQUATIONS
This material is from U of I EE350 Signals and Systems, the one sided Z transform
applied to the solution of difference equations as obtained from sampled systems that can
be described by ODE’s. This approach is in contrast to the finite difference technique that
offers solutions via recursion, as this approach provides a closed form solution. It can be
said that the Z transform is to sample systems as the Laplace transform is to continuous
systems. As we go through the approach you will note the similarity to Laplace. We will
define the Z transform by examining the sampling process as applied to causal systems
(what happens now can’t change the past).
Consider the sample function made of impulse functions (this makes the derivation
easier):
s(t ) (t nT )
(1)
n 0
Where: (t ) is the unit impulse
T is the sample period
This function, as seen in Figure 1 looks like a picket fence starting at time zero with T
separations between pickets.
Figure 1 the sample function.
Now consider a continuous well behaved (Laplace transformable) time function f (t ) not
unlike Figure 2.
151
Figure 2 an example of a typical continuous function of time .
Let f (t ) be converted into a sampled function sf (t ) by sampling it with s(t ) :
sf (t ) f (t ) s(t ) f (t ) (t nT )
(2)
n 0
Notice that sf (t ) as seen in Figure 3, also looks like a picket fence with T between
pickets and the envelope of the amplitude of the fence follows the function f (t ) .
Figure 3 the sampled function sf (t )
Now let’s take the Laplace transform of sf (t ) :
L{sf (t} f (t ) (t nT )e st dt
0 n 0
We do the usual trick of reversing the summation and integral (as engineers we leave it to
the math majors to prove it):
n 0 0
n 0
n 0
L{sf (t )} f (t ) (t nT )e st dt f (nT )e snT f (nT )(e sT ) n
Let:
ze
sT
(3)
152
Drop T in f (nT ) to become:
F ( z ) f ( n) z n
(4)
n 0
Note that f (n) is the discrete time function sf (t ) (Figure 3) with samples at T time
steps and equation 4 is the Z transform of f (n) . Also the independent variable is now n ,
an integer, unit-less but referred to as discrete time. Equation 3 is a mapping from the s
plane to the z plane. Both are complex planes with the “x” axis real and the “y” axis
imaginary. Observe that Equation 3 will be a complex function because s is complex
(s j) where the if we map the imaginary axis, s 0 j , from the s plane into the
z plane, in the z plane it becomes the unit circle. If we map a line in the s plane that is
parallel and incrementally to the right of the j axis, s j where is a positive
real number to the z plane it forms a circle encompassing the unit circle with a slightly
larger diameter. If we do the same thing with a line parallel to the j axis but in the left
half of the s plane where is a negative real number then, the new circle in the z plane is
inside the unit circle and encompassed by it. Thus the right half plane, from s, maps
outside the unit circle in z and the left half plane from s maps inside the unit circle in z.
This observation has great significance to stability assessment of digital control systems.
Obtaining Z transforms of discrete functions involves evaluating summations. Two useful
relations to help with this are:
x
k
k 0
N 1
xk
k 0
1
, x 1
1 x
(5)
1 xN
, x 1
1 x
(6)
For the sake of completeness the inverse Z transform is given by:
f ( n)
1
F ( z ) z n 1 dz
2j
(7)
Not to worry about this because we will use a look up table for the common functions
like we did with Laplace. Consider now the discrete time impulse function, (n) and the
discrete time step function
u (n) . Figure 4a and 4b shows plots of them.
153
Figure 4a the discrete time impulse function
Figure 4b the discrete time unit step function
The non-delayed discrete unit impulse function (n) has unit amplitude in a single line
located at the origin, n 0 . This is contrasted with the unit impulse in continuous time,
(t ) which has unit area, zero pulse width and infinite amplitude and is located at the
origin. The non-delayed discrete unit step function, u (n) consists of the collection of all
the discrete impulses each located at a discrete time integer n starting at 0 and going to .
In continuous time the unit step function u (t ) in negative time is zero and jumps, with
zero rise time, to a unit amplitude at t=0 and holds that value until t=.
Consider the Z transform of right shift functions:
Z f (n 1)u (n)
f (n 1) z
n
n 0
m n 1, n m 1
m 1
f (m) z ( m1) f (1) z 1 f (m) z m
m 0
Z f (n 1)u(n) f (1) z 1 Z f (n)u(n)
Z f (n 2)u (n)
f (n 2) z
n 0
n
m n 2, n m 2
f (m) z
m 2
(8)
( m 2 )
f (2) z 1 f (1) z 2 f (m) z m
Z f (n 2)u(n) f (2) z 1 f (1) z 2 Z f (n)u(n)
m 0
(9)
154
In the general case for right shift:
m 1
Z f (n m)u (n) f ((m k ) z k z m Z f (n)u (n)
(10)
k 0
In a similar way left shift functions yields:
Z f (n 1)u (n)
f (n 1) z
n 0
n
m n 1, n m 1
m 1
m 0
f (m) z ( m1) zf (0) z f (m) z m
Z f (n 1)u(n) zf (0) zZ f (n)u(n)
Z f (n 2)u(n) z 2 f (0) zf (1) z 2 Z f (n)u(n)
(11)
(12)
In the general case for left shift:
m 1
Z f (n m)u (n) z mk f (k ) z m Z f (n)u (n)
(13)
k 0
Equations 8 through 13 are similar the Laplace transforms of time derivatives. In
Laplace, a factor of s is the first derivative. In Z, the factor of z-1 is the unit delay and z+1
is the unit advance. Also they both account for initial conditions. Now let’s apply this to
difference equations.
Difference equations (DE) can be obtained from differential equations (DEQ). Consider
calculus 101 and the definition of the first derivative of a time function expressed in
terms of the discrete function with time step T :
df (t )
f (t t ) f (t ) f (n 1) f (n)
lim t 0
dt
t
T
(14)
The second derivative is obtained by letting a discrete function g (n) equal the
approximate derivative of f (n) given by Equation 14 and taking the derivative of g (n)
by plugging it back into Equation 14:
d 2 f (t )
f (t 2t ) 2 f (t t ) f (t ) f (n 2) 2 f (n 1) f (n)
lim t 0
2
dt
t 2
T 2
(15)
the third derivative:
d 3 f (t ) f (n 3) 3 f (n 2) 3 f (n 1) f (n)
dt 3
T 3
Now let’s make some DE’s from DEQ’s. Consider the following examples:
(16)
155
Example 1: Step response of an RC low pass filter
We obtain the DEQ by the node equation where vout (t ) is the voltage across the capacitor
C:
u (t ) vout (t )
dv (t )
C out
R
dt
(17)
We have the initial condition of vout (t 0) V0
We clear the fraction and convert the DEQ into a difference equation (DE) by using the
sampled function and approximating the first derivative:
u (t ) RC
dvout (t )
v (n 1) vout (n)
vout (t ) u (n) RC out
vout (n)
dt
T
We clear the fraction in the DE and take the Z transform:
u(n)T vout (n 1) RC vout (n)(T RC ) U ( z)T zVout ( z) RC zV0 RC Vout ( z)(T RC )
zV0
U ( z )T
U ( z )T zV0 RC Vout ( z ) zRC T RC Vout ( z )
T RC
T RC
RC z
z
RC
RC
Just like with the Laplace we need a look-up table for the inverse Z transform. In
addition, from the look-up table we obtain the transform of the forcing function, the unit
step u(n). Table 1 gives the transform pairs of common discrete functions:
Table 1 Z Transforms Z{f(n)u(n)} (All referenced to origin unless otherwise stated)
f(n)
F(z)
1.
Z f (n 1)
f (1) z 1Z f (n)
2.
Z f (n 2)
f (2) z 1 f (1) z 2 Z f (n)
3.
Z f (n m)
f ( ( m k ) z
m1
k
z m Z f (n)
k 0
4.
Z f (n 1)
zf (0) zZ f (n)
5.
Z f (n 2)
z 2 f (0) zf (1) z 2 Z f (n)
156
6.
m1
Z f (n m)
z mk f (k ) z m Z f (n)
k 0
7.
(n k )
8.
u (n)
9.
n1u(n 1)
10.
n u(n)
11.
nn1u(n)
12.
n 2 n u(n)
13.
n(n 1)(n 2)......(n k 1) n
u ( n)
k k!
14.
p cos( n )u (n)
n
z k
z
z 1
1
z
z
z
z
( z ) 2
z ( z )
(z )3
z
( z ) k 1
z ( Az B)
z 2 2az
2
A 2 B 2 2 AaB
2
p
a2
2
a
cos 1
, tan 1
Aa B
A a2
2
To solve DE’s with the Z transform we also use partial fraction expansion as was done in
Laplace. There is one important difference. In order to obtain the solution referenced to
discrete time n=0, it is essential that the partial fraction expansion be performed
F ( z)
upon
. We will not include the details on how to do partial fraction expansion
z
(PFE). The reader is referred to the review material on Laplace that was done previously.
Let’s finish the last example and do some more examples. We left off with:
Vout ( z )
zV0
U ( z )T
T RC
T RC
RC z
z
RC
RC
(18)
From Table1, the Z transform of a discrete step function is given by:
Z{u (n)}
z
z 1
Equations 18 & 19
(19)
157
zV0
T
z
Vout ( z )
z 1 RC z T RC z T RC
RC
RC
V ( z)
Now forming out :
z
(20)
T
Vout ( z ) 1
V0
V0
T
RC
z
z 1 RC z T RC z T RC z 1 z RC T z RC T
RC
RC
RC
RC
Doing the finger method for PFE on the first term, we obtain:
T
A
RC
A
1
z 1
RC T
1
RC
Now the second term:
T
B
RC
B
1
RC T
RC T
1
z
RC
RC
Putting it all together:
Vout ( z )
V0
1
1
RC T
RC T
z
z 1
z
z
RC
RC
Now going back to Vout (z ) :
z
z
Vout ( z )
V0
z 1 z RC T
RC
z
RC T
z
RC
(21)
(22)
We are ready to take the inverse transform using the table. Note that by doing the PFE on
Vout ( z )
rather than Vout (z ) all terms are referenced to discrete time n=0 (i.e. multiplied
z
by u (n) ) rather than referred to some delayed time.
RC T n
vout (n) 1
V0 1u (n)
RC
(23)
158
Example 2: Second order low pass filter
Consider a passive LRC low pass filter. Using Laplace notation and the voltage circuit
law the output voltage across C is given by:
VOUT
VIN
s LC sRC 1
2
(24)
Let’s toss in some initial conditions to make it more complicated:
VOUT (t 0) V0 , I L (t 0) I 0
IL C
dVOUT
dV (t 0)
, I 0 C OUT
dt
dt
Thus:
VOUT (t 0) V0
dVOUT (t 0) I 0
dt
C
(25)
Equation 24 yields the following DEQ with the input a unit step:
LC
d 2VOUT
dV
RC OUT VOUT u (t )
2
dt
dt
(26)
Now the DE where the time step is T :
LC
VOUT (n 2) 2VOUT (n 1) VOUT (n)
V (n 1) VOUT (n)
RC OUT
VOUT (n) u (n) (27)
2
T
T
Some algebra before taking the Z transform:
LCVOUT (n 2) (2LC TRC )VOUT (n 1) ( LC RCT T 2 )VOUT (n) T 2 u(n) (28)
Now the Z transform:
Z(V O UT (n + 2)) = z2VOUT (z) – z2VOUT ( n = 0) – zV OUT ( n = 1)
(29)
Z(V OUT (n + 1)) = zV OUT (z) – zV OUT ( n = 0)
(30)
Z (VOUT (n)) VOUT ( z )
(31)
Z (u (n))
z
z 1
Where: VOUT (n 0) V0 , but we need VOUT (n 1) :
(32)
159
dVOUT (t 0) I 0 VOUT (n 1) VOUT (n 0)
dt
C
T
I T
VOUT (n 1) V0 0
C
(33)
Now the Z transform of the DE:
VOUT ( z)[ z 2 LC z(2LC TRC ) ( LC TRC T 2 )]
z
T 2
z 2 LCV (0) zLCV (1) zV (0)(2 LC RCT )
z 1
VOUT ( z)[ z 2 LC z(2LC TRC ) ( LC TRC T 2 )]
I T
z
z 2 LCV0 zLCV0 0
zV0 (2 LC RCT )
z 1
C
V ( z)
Now OUT
:
z
T 2
VOUT ( z )
LC
z
(
2
LC
TRC
) ( LC TRC T 2 )
2
( z 1)[ z z
]
LC
LC
T 2
(34)
I 0 T V0 (2 LC TRC )
C
LC
(2 LC TRC ) ( LC TRC T 2 )
2
[z z
]
LC
LC
zV0 V0
The next step is a PFE and inverse Z via the table. Consider the case of under damped
and no initial conditions thus: V0 0, I 0 0 . Now equation 33 becomes:
T 2
VOUT ( z )
LC
z
(
2
LC
TRC
) ( LC TRC T 2 )
( z 1)[ z 2 z
]
LC
LC
(35)
Because it’s under damped the inverse transform pair of Equation 8 from Table 1 will
apply. The method of quadratic PFE will apply and it was covered in detail on the review
material for Laplace. The mechanics of quadratic PFE will be used here with out
explanation.
160
T 2
LC
(
2
LC
TRC
) ( LC TRC T 2 )
2
( z 1)[ z z
]
LC
LC
D
Az B
z 1
(2 LC TRC ) ( LC TRC T 2 )
[z 2 z
]
LC
LC
We need to find constants A, B, D:
T 2
LC
D
1
(2 LC TRC ) ( LC TRC T 2 )
2
[z z
]
LC
LC
z 1
T 2
(2 LC TRC ) LC TRC T 2
z2 z
( z 1)( Az B)
LC
LC
LC
T 2
(2 LC TRC ) LC TRC T 2
z 2 (1 A) z[ B A
]
B
LC
LC
LC
LC TRC
A 1, B
LC
Now the results of PFE:
LC TRC
VOUT ( z )
1
LC
z
z 1
(
2
LC
TRC
)
( LC TRC T 2 )
[z 2 z
]
LC
LC
z
Now obtaining VOUT (z ) :
LC TRC
z z
z
LC
VOUT ( z )
z 1
(2 LC TRC ) ( LC TRC T 2 )
[z 2 z
]
LC
LC
(36)
The first term in the PFE of the solution, equation 35 is the unit step. The second term is
given by Equation 8 from Table 1 repeated here:
p cos( n )u (n)
z ( Az B)
n
z 2az
2
2
161
A 2 B 2 2 AaB
2
p
a2
2
cos 1
a
, tan 1
Aa B
A a2
2
The final solution will be:
VOUT (n) 1 p cos( n ) u(n)
n
(37)
The parameters to fit Equation 8 can be picked out of Equation 35:
A 1
LC TRC
LC
1 (2 LC TRC )
a
LC
2
B
2
LC TRC T 2
LC
The solution involves tiny differences between large numbers. To proceed, a tool like
Matlab running in double precision is recommended for number crunching, as your
pocket calculator is probably not good enough.
Let’s look at some 2nd order examples with numbers, the same examples worked in the
hand-out “Classical Solution of Difference Equations Obtained from DEQ’s”. Consider
the general form of a 2nd order DEQ:
V 2 O V O2 V f (t )
(38)
This is converted into a difference equation:
V (n 2) 2V (n 1) V (n)
V (n 1) V (n)
2 O
O2 V (n) f (n)
2
t
t
V (n 2) (2 O t 2)V (n 1) (1 2 O t t 2 o2 )V (n) t 2 f (n)
(39)
The Z transform is taken:
z 2V (2 O t 2) zV (1 2 O t t 2 o2 )V z 2V (n 0) zV (n 1) z (2 O t 2)V (n 0) t 2 F ( z)
162
V z 2 (2 O t 2) z (1 2 O t t 2 o2 ) z 2V (n 0) zV (n 1) z(2 O t 2)V (n 0) t 2 F ( z)
V
z 2V (n 0) z V (n 1) (2 O t 2)V (n 0) (40)
t 2 F ( z )
z 2 (2 O t 2) z (1 2 O t t 2 o2 )
z 2 (2 O t 2) z (1 2 O t t 2 o2 )
The next step is plug in numbers, PFE and inverse Z. The key is factoring the discrete
characteristic polynomial:
z 2 (2 O t 2) z (1 2 O t t 2 o2 )
(41)
The MATLAB syntax, where TBD means to be determined, is:
% Roots of characteristic polynomial
wo=TBD;
z=TBD;
dt=TBD
A=1;
B=(2*z*wo*dt-2)
C=1-2*z*wo*dt+dt^2*wo^2;
r=roots([A, B, C])
The 3 cases of the roots determine how the PFE proceeds:
Example 3: 2nd order real distinct roots, 1
z 2 (2 O t 2) z (1 2 O t t 2 o2 ) ( z 1 )( z 2 )
(42)
Given the following characteristic polynomial that factors into 2 distinct real roots:
(s 3)(s 2)
(43)
The DEQ that this characteristic polynomial could come from is given by:
V 5V 6V 6u (t )
(44)
Boundary conditions are given by:
V (0) 1, V (0) 2
5
, O 6
2 O
Use the same time step: small relative to
(45)
1
O
, t .02
The discrete boundary conditions are found using:
163
x(0) x(t 0)
x(t 0)
(45a)
x(1) x(0)
t
x(1) x(t 0)t x(0)
The roots of the Z transform characteristic polynomial are obtained:
% roots of Z polynomial
wo=6^.5;
z=5/(2*wo);
dt=.02;
A=1;
B=(2*z*wo*dt-2);
C=1-2*z*wo*dt+wo^2*dt^2;
r=roots([A, B, C])
% r = [ 0.9600 0.9400]
Thus the factored polynomial is:
( z 0.96)( z 0.94)
(46)
Also using Equation 45a, the discrete boundary conditions are:
V (0) 1.0, V (1) 1.04
(47)
Substituting Equation 46, 47 and the rest of the parameters into Equation 40:
V
z 2 z 1.04 (2 O t 2)
6z
t 2
( z 1) ( z 0.96)( z 0.94)
( z 0.96)( z 0.94)
(48)
Equation 48 is prepared for PFE:
z 1.04 (2 O t 2)
V
6
t 2
z ( z 1) ( z 0.96)( z 0.94)
( z 0.96)( z 0.94)
(49)
Plugging in all the numbers and PFE:
V
.0024
z .86
z ( z 1)( z 0.96)( z 0.94) ( z 0.96)( z 0.94)
(50)
V
a
b
c
aa
bb
z ( z 1) ( z .96) ( z .94) ( z .96) ( z .94)
(51)
MATLAB for PFE:
164
% roots of Z polynomial
wo=6^.5;
z=5/(2*wo);
dt=.02;
A=1;
B=(2*z*wo*dt-2);
C=1-2*z*wo*dt+wo^2*dt^2;
r=roots([A, B, C]);
% r = [ 0.9600 0.9400]
% PFE1 a/(Z-1)+b/(Z-.96)+c/(Z-.94)
Z=1;
a=6*dt^2/((Z-.96)*(Z-.94));
Z=.96;
b=6*dt^2/((Z-.94)*(Z-1));
Z=.94;
c=6*dt^2/((Z-.96)*(Z-1));
% a=1.0
% b=-3.0
% c=2.0
% PFE2 aa/(Z-.96)+bb/(Z-.94)
Z=.96;
ZZ=Z+1.04+(2*z*wo*dt-2);
aa=ZZ/(Z-.94);
Z=.94;
ZZ=Z+1.04+(2*z*wo*dt-2);
bb=ZZ/(Z-.96);
% aa=5.0
% bb=-4.0
V
1
3
2
5
4
z ( z 1) ( z .96) ( z .94) ( z .96) ( z .94)
(52)
Combining and putting in the form for inverse Z:
V
z
2z
2z
( z 1) ( z .96) ( z .94)
(53)
And the final result:
V (n) 2.9600 2.9400 1 u(n)
n
n
(54)
This is the same result as Equation 40 in the hand-out: “Classical Solution of Difference
Equations Obtained from DEQ’s”
165
Example 4: 2nd order real repeated roots, 1
z 2 (2 O t 2) z (1 2 O t t 2 o2 ) ( z ) 2
(55)
Observe that when 1 , Equation 55 becomes a perfect square:
z 2 (2O t 2) z (1 2O t t 2o2 ) z (1 o t )
2
(55a)
Given the following characteristic polynomial that factors into 2 repeated real roots:
( s 2) 2
(56)
The DEQ that this characteristic polynomial could come from is given by:
V 4V 4V 4u (t )
(57)
Boundary conditions are given by:
V (0) 1, V (0) 2
(58)
For this case:
1, O 2
The roots of the Z transform characteristic polynomial are obtained:
% roots of Z polynomial
wo=2;
z=1;
dt=.02;
A=1;
B=(2*z*wo*dt-2);
C=1-2*z*wo*dt+wo^2*dt^2;
r=roots([A, B, C])
% r =[ 0.9600, 0.9600]
Thus the factored polynomial is:
( z 0.96) 2
(59)
Also using Equation 45a, the discrete boundary conditions are the same:
V (0) 1.0, V (1) 1.04
Substituting Equation 46, 47 and the rest of the parameters into Equation 40:
(60)
166
V
z 2 z 1.04 (2 O t 2)
4z
t 2
( z 1) ( z 0.96) 2
( z 0.96) 2
(61)
Equation 61 is prepared for PFE:
z 1.04 (2 O t 2)
V
4
t 2
2
z ( z 1) ( z 0.96)
( z 0.96) 2
(62)
Plugging in all the numbers and PFE:
( z 0.88)
V
.0016
2
z ( z 1)( z 0.96)
( z 0.96) 2
V
a
b
c
bb
cc
z ( z 1) ( z .96) 2 ( z .96) ( z .96) 2 ( z .96)
MATLAB for PFE:
% roots of Z polynomial
wo=2
z=1;
dt=.02;
A=1;
B=(2*z*wo*dt-2);
C=1-2*z*wo*dt+wo^2*dt^2;
r=roots([A, B, C]);
% PFE1 a/(Z-1)+b/(Z-.96)^2+c/(Z-.96)
Z=1;
a=4*dt^2/((Z-.96)^2);
Z=.96;
b=4*dt^2/(Z-1);
Z=.96;
c=-4*dt^2/((Z-1)^2);
% a=1.0
% b=-.04
% c=-1.0
% PFE2 aa/(Z-.96)^2+bb/(Z-.96)
Z=.96;
ZZ=Z+1.04+(2*z*wo*dt-2);
aa=ZZ;
% aa=.08
bb=1;
Plugging the results into Equation 64 and preparing for an inverse Z:
(63)
(64)
167
V
1
.04
1
.08
1
2
2
z ( z 1) ( z .96)
( z .96) ( z .96)
( z .96)
V
1
.04
z ( z 1) ( z .96) 2
z
.04 z
V
( z 1) ( z .96) 2
(65)
Taking the inverse Z on Equation 65:
V (n) 1 .04n(.96)n1 u(n) 1 .0417n(.96)n u(n)
(66)
This is the same as the results of Equation 47 in the hand-out: “Classical Solution of
Difference Equations Obtained from DEQ’s”. That Equation, with the same equation # is:
VTot (n) .0417n(.9600) n 1
(47)
The plot of the classical solution same as Z solution (Equation 47 above), as taken from :
“Classical Solution of Difference Equations Obtained from DEQ’s” is given by Figure 5.
Figure 5 plot of classical difference equation solution of Example 4 .
168
As the time step goes to zero the discrete solution will converge with the ideal continuous
solution.
Example 5: 2nd order real complex roots, 1
z 2 (2 O t 2) z (1 2 O t t 2 o2 ) ( z j )( z j )
Given the following characteristic polynomial, that factors into 2 complex conjugate
roots:
(s 2 j 2)(s 2 j 2)
(67)
The DEQ that this characteristic polynomial could come from is given by:
V 4V 8V 8u (t )
(68)
Boundary conditions are given by:
V (0) 1, V (0) 2
(69)
For this case:
1
2
, O 2 2
The roots of the Z transform characteristic polynomial are obtained:
% roots of Z polynomial
wo=2*2^.5;
z=1/2^.5;
dt=.02;
A=1;
B=(2*z*wo*dt-2);
C=1-2*z*wo*dt+wo^2*dt^2;
r=roots([A, B, C])
% r =[ 0.9600 + 0.0400i, 0.9600 - 0.0400i]
Thus the factored polynomial is:
( z 0.96 0.04 j )( z 0.96 0.04 j )
(70)
Also using Equation 45a, the discrete boundary conditions are the same:
V (0) 1.0, V (1) 1.04
For complex roots, the polynomial is kept as a quadratic for the PFE:
(71)
169
z 2 1.92 z .9232
(72)
Substituting Equations 71, 72 and the rest of the parameters into Equation 40:
V
z 2 z 1.04 (2 O t 2)
8z
t 2
( z 1) ( z 2 1.92 z .9232)
( z 2 1.92 z .9232)
(73)
Equation 73 is prepared for PFE:
z 1.04 (2 O t 2)
V
8
t 2
2
z ( z 1) ( z 1.92 z .9232)
( z 2 1.92 z .9232)
(75)
Plugging in all the numbers and PFE:
V
.0032
z .88
z ( z 1)( z 2 1.92 z .9232) ( z 2 1.92 z .9232)
(75a)
V
C
Az B
z .88
2
2
z ( z 1) ( z 1.92 z .9232) ( z 1.92 z .9232)
(76)
The MATLAB code:
z=1;
C=.0032/(z^2-1.92*z+.9232);
A=-C;
B=A+1.92*C;
% C = 1.0000
% A = -1.0000
% B = 0.9200
Plugging the results into Equation 76 and combining terms:
V
1
.04
2
z ( z 1) ( z 1.92 z .9232)
V
z
.04 z
( z 1) ( z 2 1.92 z .9232)
The inverse Z is Formula 14 from Table1:
14.
p cos( n )u (n)
n
A 2 B 2 2 AaB
2
p
a2
2
(77)
z ( Az B)
z 2 2az
2
170
cos 1
a
, tan 1
Aa B
A a2
2
MATLAB to compute constants:
% Inverse Z
A=0;
B=.04;
alph=.9232^.5
a=-.96;
p=(B^2/(alph^2-a^2))^.5
beta=acos(-a/alph)
Theta=atan(-B/(A*(alph^2-a^2)^.5))/(2*pi)*360 % Theta in degrees
% alph = 0.9608
% p = 1.0000
% beta = 0.0416
% Warning: Divide by zero, Yep, it's - infinity
% Theta = -90 , this is degrees thus the cos is a sin
Plugging in the numbers for the final result:
V (n) (.9608) n (sin(0.0416n 1)u(n)
(78)
This is the same result of Equation 54 in the hand-out: “Classical Solution of Difference
Equations Obtained from DEQ’s”. That Equation, with the same equation # is:
VTotal (n)
(0.96)
2
n
0.04
(0.04) 2 sin(n tan 1
) 1
0.96
(54)
For a more thorough treatment of this subject, I suggest that you, if you are an EE, dust
off your text for your undergraduate Signals and Systems course or consult references
such as:
Analysis of Linear Systems by David K. Cheng, published by Addison-Wesley, 1961
Linear Systems and Signals by B. P. Lathi, published by Berkeley-Cambridge, 1992
Signals and Systems, 2nd Edition by Oppenheim and Willsky, published by Printice Hall,
1997
Maintain sanity at all costs…
171
Appendix A
SOME PROPERTIES OF THE Z TRANSFORM
Assume causal functions, for discrete time e.g. x(n), n 0
Convolution
F ( z ) Z x(n) y (n) x(n) y (n) z n
n 0
F ( z ) x( ) y (n ) z n x( ) y ( n ) z n
n 0 0
0
n0
n , n
0
n0
0
n0
F ( z ) x( ) y ( ) z n z x( ) z y ( ) z n X ( z )Y ( z )
F ( z ) Z x(n) y(n) X ( z )Y ( z )
(1)
Convolution in time is multiplication in frequency and just as with Laplace, Fourier series
and transform the converse is also true.
First Forward Difference
F ( z ) Z x(n 1) x(n) zx(0) ( z 1) X ( z )
(2)
This comes directly from Equation 4 from Table 1 Z Transforms in the Z Transform
hand-out
First Reverse Difference
F ( z ) Z x(n) x(n 1) x(1) (1 z 1 ) X ( z )
Z x(n) x(n 1) (1 z 1 ) X ( z )
(3)
This also comes from Table 1, Equation 1 and the assumption of causality.
Summation
n
n
f (n) x(m) F ( z ) x(m)z n u (n m) x(m)z n
m0
n 0 m0
F ( z ) u ( n) x ( n) z n
n 0
n 0 0
z
X ( z)
z 1
This comes from the assumption of causality, Equation 1 and Table 1 Equation 8 from
the Z hand-out.
Differentiation in Z
Given x(n) X ( z) :
(4)
172
d
d
d n
n
( n 1)
1
X ( z ) x(n) z x(n) z x(n)(n) z
z nx(n) z n
dz
dz n 0
dz
n 0
n 0
n 0
Thus we can say:
nx(n) z
d
X ( z)
dz
(5)
Final Value
limn x(n) limz 1 ( z 1) X ( z )
(6)
Initial Value
x(0) limz X ( z )
(7)
© Copyright 2026 Paperzz