You are on page 1of 26

Chapter 2 Solutions

2.1 Derive the discrete-time model of Example 2.1 from the solution of the system differential equation
with initial time kT and final time(k+1)T.

The volumetric fluid balance gives the analog mathematical model

d h h qi
+ =
d t τ C
where t = R C is the fluid time constant for the tank. The solution of this equation is

−( t−t 0 )/τ 1 t −(t −λ )/ τ


h(t )=e h(t 0 )+ ∫e
C t0
qi ( λ ) dλ

Let qi be constant over each sampling period T, i.e. qi(t) = qi(k) = constant, for t in the interval
[kT, (k+1)T). Then

(i) Let t0 = kT, t = (k + 1)T

(ii) Simplify the integral as follows with ν :=( k +1)T −λ


1 ( k+1 )T −[( k+1)T− λ ]/τ
C ∫kT
e q i (kT )dλ

{
1 ( k+1)T
¿ ∫kT e−[( k+1)T −λ ]/τ dλ qi ( kT )
C }
1 0
{
¿ ∫T e−ν/τ (−dν) qi (kT )
C } d  ν :=−d  λ
τ
¿ {1−e−T /τ } qi ( kT )
C
ν= {
T , λ=kT
0 , λ=( k +1 )T

We thus reduce the differential equation to the difference equation

h( k +1)=e−T /τ h(k )+R [ 1−e−T /τ ] qi ( k )

2.2 For each of the following equation, determine the order of the equation then test it for
(i) Linearity. (ii) Time-invariance. (iii) Homogeneousness.

(a) y(k+2) = y(k+1) y(k) + u(k)


(b) y(k+3) + 2 y(k) = 0
(c) y(k+4) + y(k-1) = u(k)
(d) y(k+5) = y(k+4) + u(k+1)  u(k)
(e) y(k+2) = y(k) u(k)

The results are summarized below

Problem Order Linear Time-invariant Homogeneous


(a) 2 No Yes No
(b) 3 Yes Yes Yes
(c) 5 Yes Yes No
(d) 5 Yes Yes No
(e) 2 No Yes No

1
2.3 Find the transforms of the following sequences using Definition 2.1
(a) {0, 1, 2, 4, 0, 0,...} (b) {0, 0, 0, 1, 1, 1, 0, 0, 0,...}
(c) {0, 20.5 , 1, 20.5 , 0, 0, 0, ... }


U ( z )   uk z  k
From Definition 2.1, {u0, u1 , u2 , ... , uk , ... } transforms to k 0 . Hence:

(a) Z { 0,1,2 ,4 ,0 ,0 ,... }=z−1+2 z−2+4 z −3 (b) Z { 0,0 ,0,1,1,1,0 ,0 ,... }=z −3+z−4 +z−5

(c) Z { 0 ,2−0.5 ,1 ,2−0.5 , 0, 0 ,. .. }=2−0.5 z−1+z−2+2−0.5 z −3

2.4 Obtain closed forms of the transforms of Problem 2.3 using the table of z-transforms and the time
delay property.

Each sequence can be written in terms of transforms of standard functions

(a) {0, 1, 2, 4,0,0,...} = {0, 1, 2, 4, 8, 16,...}  {0, 0, 0, 0, 8, 16,...}={f(k)}{g(k)}

{ {
k −1 k −4
f ( k )= 2 ,k>0 g(k )= 8×2 , k >4
where 0 , k ≤0 0 , k≤4

−1 z −4 8 z z 3 −8
Z { 0, 1, 2 , 4 ,0 , 0 ,. .. }=z −z = 3
z−2 z−2 z ( z−2)

(b) {0, 0, 0, 1, 1, 1, 0, 0,...} = {0, 0, 0, 1, 1, 1, 1, 1,...}  {0, 0, 0, 0, 0, 0, 1, 1, 1, 1,...}


= {f(k)} {g(k)}

where
f ( k )= {10 ,, kk≤3
>3
g( k )= {10 ,, kk >≤66
−3 z −6 z z 3 −1
Z { 0, 0 , 0, 1, 1, 1, 0 ,0 , .. . }=z −z = 5
z−1 z−1 z ( z−1)

(c) {0,2-0.5,1,2-0.5,0,0,...} = {0,2-0.5,1,2-0.5,0,-2-0.5,-1,-2-0.5,0,...}+ {0,0,0,0,2-0.5,1,2-0.5,0,-2-0.5,-1,-2-0.5,0,...}

= {f(k)} + {g(k)}

where
{
f ( k )= sin( kπ / 4 ) , k >0
0 ,k ≤0 {
g( k )= sin( k π / 4 ), k > 4
0 , k≤4

sin( π /4 ) z sin( π /4 ) z 2−0 .5 ( z 4 −1 )


Z { 0 ,2−0. 5 ,1 ,2−0. 5 , 0, 0 ,0 , .. . }= −z −4 =
z [ z −2 z+1 ]
2 2 3 2 0. 5
z −2cos( π /4 ) z+1 z −2 cos( π /4 ) z+1

2.5 Prove the linearity and time delay properties of the z-transform from basic principles.

To prove linearity, we must prove homogeneity and additivity using Definition 2.1,

2
(i) Homogeneity: Z { αf ( k ) }=α Z { f (k ) }

Z { f (0),f (1),f ( 2),...,f (i ),... }=f (0 )+f (1) z +f (2) z +...+f (i) z +...=∑ f (i) z
−1 −2 −i −i

i=0


Z { αf ( 0),αf (1),αf (2),...,αf (i ),... }=αf ( 0)+αf (1) z +αf ( 2)z +...+αf (i)z +...=α ∑ f (i) z
−1 −2 −i −i

i=0

(ii) Additivity Z { f (k )+ g(k ) }=¿ Z { f ( k ) }+ ¿ Z { g(k ) } ¿ ¿

Z {f (k)+g(k)}=¿ Z {f (0)+g(0),f(1)+g(1),f(2)+g(2),...,f(i)+g(i),...} ¿=(f (0)+g(0))+( f (1)+g(1)) z−1+ (f (2)+g(2)) z−2+...+( f (i)+g(i)) z−i+...
∞ ∞ ¿
¿ ∑ f(i)z +∑ g(i)z =Z {f (k)}+¿ Z {g (k)}
−i −i

i=0 i= 0
To prove the time delay property, we write the transform of the delayed sequence

Z { 0,f(0 ),f (1),f (2),...,f (i),... }=f (0) z−1+f (1) z−2+f (2) z−3+...+f (i) z−i+1 +...

¿ z−1 ∑ f (i)z −i =z−1 Z { f (k ) }
i=0

2.6 Use the linearity of the z-transform and the transform of the exponential function to obtain the
transforms of the discrete-time functions.
(a) sin(kwT) (b) cos(kwT)

(a)

1
Z { sin( kωT ) }= ¿ ¿ ¿ ¿
2j
¿
e jk ωT +e− jk ωT
cos (kωT )=
(b) 2

1
Z { cos( kωT ) }= ¿ ¿ ¿ ¿
2
¿
2.7 Use the multiplication by exponential property to obtain the transforms of the discrete-time functions.

3
(a) eakTsin(kwT) (b) eakTcos(kwT)

−k
The multiplication by exponential property with a
−k
=( e α T ) =e−α kT gives

Z {  e−α kT f (k )}=F (eα T  z)

sin( ωT ) ( e α  T z ) sin( ωT )e−α T z


Z { e−α  kT sin( kωT ) }= 2
=
2 −α T −2 α T
(a) ( e α  T z ) −2cos (ωT ) ( eα T z ) +1 z −2cos( ωT )e z+e
2
( e α T z ) −cos(ωT ) ( e α T z ) z 2−cos(ωT )e −α  T z
Z {e−α  kT
cos( kωT ) }= α  T 2 = 2 −α T −2 α T
(b) ( e z ) −2cos( ωT )( e α T z ) +1 z −2 cos(ωT )e z+e

2.8 Find the inverse transforms of the following functions using Definition 2.1 and, if necessary, long
division
(a) F ( z)=1+3 z−1 +4 z−2 (b) F ( z)=5 z−1 +4 z−5
z z−0 .1
F ( z )= 2
F ( z )= 2
(c) z +0 .3 z +0 . 02 (d) z +0 . 04 z+ 0 .25

Use Definition 2.1 to obtain

(a) Z { 1+3 z −1 +4 z−2 }={1 ,3 ,4 ,0 ,0 ,0,..} (b) Z { 5 z −1 +4 z−5 }={0,5,0 ,0,0 ,4 ,0,0 ,..}

−1 −2
(c)
¿  0.07z +0.0 6z ¿
F ( z )=
z
=z−1−0 . 3 z−2 +0 . 07 z−3 +. .. ..
2
z +0 .3 z +0 . 02 {f ( k)}={0,1,−0.3,0.07,....}

−1 −2
(d)
¿  −0.24 z +0.035z ¿
F ( z)= 2
z
=z −1 −0 . 14 z−2−0. 244 z−3 +.. ..
z +0 . 04 z+0 .25

{f ( k)}={0,1,−0.14 ,−0.244,....}

4
2.9 For Problems 2.8.(c), (d), find the inverse transforms of the functions using partial fraction expansion
and table look-up.

(c)
F( z)
z
= 2
1
z +0 . 3 z +0 . 02
=
( z +0 . 1
1
) ( z +0 . 2 )
=10
1
z+0{.1

1
z+0 .2 }
F ( z )=10 { z +0z .1 − z +0z .2 } {f ( k )}=10 [ (−0 . 1) −(−0 .2 ) ]
k k

F( z) z−0 .1 0.4 0 . 4 z +1. 016


= 2 =− + 2
(d) (i)
z z ( z + 0 .04 z+ 0. 25 ) z z +0 . 04 z +0 .25
2
0 . 4 z +1 . 016 z
F ( z )=−0 . 4 + 2
We obtain z +0 .04 z +0 . 25 and use the identities
e−α sin (ω d ) z
Z { e sin (kωd ) }= 2
−αk

z −2 e−α cos (ωd ) z+ e−2α


z[ z−e−α cos( ωd )]
Z { e cos(kωd ) }= 2
−αk

z −2e −α cos( ωd )z+e −2 α


e = √ 0.25=0.5
−α
cos ( ωd )=−0.04 ⇒ ω d=1.611rad

0 . 4 z 2 +1. 016 z 0 . 4 ( z 2 +0. 02 z ) +1. 008 z 0. 4 ( z 2 +0 . 02 z ) +2 . 018 ( 0 . 4996 ) z


= =
z2 +0 . 04 z+0. 25 z 2 +0 .04 z+0. 25 z 2 +0 . 04 z +0 . 25
{f ( k)}=−0.4 δ(k )+ ( 0 .5 )k [ 0 .4 cos(1.611k )+2 .018 sin (1.611k )]
k
¿−0.4 δ (k )+2.057 ( 0.5 ) sin(1 .611k+0.196)

2.057=√ ( 0.4 ) + ( 2.018 )


2 2 0 . 196=sin−1 ( 20..0574 )
sin(A+B) = sin(A) cos(B) + cos(A) sin(B)

(ii) Using MATLAB


>> num=[1,-0.1]; den=[1,0.04,0.25,0];
>> [r,p,k]=residue(num,den)
r=
0.2000 - 1.0088i
0.2000 + 1.0088i
-0.4000 + 0.0000i
p=
-0.0200 + 0.4996i
-0.0200 - 0.4996i
0.0000 + 0.0000i
>> abs(r(1))
ans =
1.0284
>> angle(r(1)) % Should be equal to 0.196−π /2 (see answer obtained earlier)
ans =
-1.3751
>> abs(p(1))
ans =
0.5

5
>> angle(p(1))
ans =
1.6108
k
Use the formula f ( k )=2| A|| p| cos ( θ p k +θ A )
k
f ( k )=−0.4 δ ( k )+ 2.057 ( 0.5 ) cos ( 1.611k −1.375 )
2.10Use the complex differentiation property and the transform of the unit ramp to obtain the z-transform
of the parabolic

{
2
f ( k )= k , k ≥ 0
0 , k <0
Solution
The transform of the ramp is
z
Z { k }=
( z−1 )2
Using the complex differentiation property, we have

( )( ( )
2

)
d z ( z−1 ) −2 z ( z−1 )
Z { k }= −z
2
2
=(−z )
dz ( z−1 ) ( z−1 )4
z−1−2 z
¿ (−z )
( z−1 )3
z ( z +1 )
¿
( z−1 )3
2.11Solve the following difference equations
(a) y(k+1)  0.8 y(k) = 0, y(0) = 1
(b) y(k+1)  0.8 y(k) = 1(k), y(0) = 0
(c) y(k+1)  0.8 y(k) = 1(k), y(0) = 1
(d) y(k+2) + 0.7 y(k+1) + 0.06 y(k) = d(k), y(0)=0, y(1)=2

(a) y(k+1)  0.8 y(k) = 0, y(0) = 1


z-transform
z
zY ( z )−z−0 . 8 Y ( z )=0 ⇒Y ( z )=
z−0 . 8 f (k )=( 0.8 )k , k=0,1,2,...
(b) y(k+1)  0.8 y(k) = 1(k), y(0) = 0
z-transform
z z
( z−0 . 8)Y ( z)= ⇒ Y ( z)=
z−1 ( z−0. 8 )( z−1)

Y ( z)
z
=
1
( z−0 . 8)( z−1 )
=5
[ 1

1
z−1 z−0 . 8 ]
f (k )=5 [ 1−( 0.8 ) ] ,k=0,1,2,...
k

(c) y(k+1)  0.8 y(k) = 1(k), y(0) = 1


The solution is the sum of the solutions from (a) and (b)
f (k )=5 [ 1−( 0.8 )k ] + ( 0.8 )k , k=0,1,2,...

(d) y(k+2) + 0.7 y(k+1) + 0.06 y(k) = d(k), y(0)=0, y(1)=2


z-transform

6
2 z+1
( z 2 +0 . 7 z+0. 06 )Y ( z)=1+2 z⇒Y ( z)=
( z+0 .1 )( z+0. 6 )
Y ( z) 2 z+1 16. 667 16 0 . 667
= = − −
z z( z+0 .1 )( z+0 .6 ) z z+0 .1 z+0 .6
16 z 0. 667 z
Y ( z)=16 .667− −
z+0. 1 z+0 .6
y(k )=16 . 667 δ (k )−16 (−0 .1 )k−0. 667 (−0 . 6 )k
Without dividing by z we get
k−1 k−1
y ( k )=0.4 (−0.6 ) +1.6 (−0.1 ) , k =1 ,2 , 3 , …∧zero k <1
2.12 Find the transfer functions corresponding to the difference equations of Problem 2.2 with input u(k)
and output y(k). If no transfer function is defined, explain why.

(a) and (e) are nonlinear and (b) is homogeneous. They have no transfer functions.

(c) y(k+4) + y(k1) = u(k)


z
4 −1 G( z )=
Z-transform ( z −z )Y (z )=U ( z)
5
z +1
(d) y(k+5) = y(k+4) + u(k+1)  u(k)
z−1 1
5 4 G ( z )= = 4
z-transform ( z − z )Y (z )=( z−1)U ( z)
5 4
z −z z

2.13 The following difference equation describes the evolution of the expected price of a commodity 1
pe ( k +1 )=( 1 γ ) p e ( k ) + γ p ( k )
where pe ( k ) is the expected price after k quarters, p ( k ) is the actual price after k quarters, and γ is a
constant in the range 0< γ <1 .

(a) Obtain the transfer function of the system with input p ( k ) and output pe ( k )
(b) Assuming a zero initial estimate, obtain the price estimate using the transfer function (i) for a
fixed actual price of one unit, (ii) for an exponentially decaying price p ( k )=0.1+ ( b )k .

2.14 The Fibonacci sequence is a set of numbers generated by the difference equation
f ( k +2 )=f ( k +1 ) + f ( k ) , f ( 0 )=0 , f (1 )=1
The sequence { 0 , 1 ,1 , 2 ,3 , … } describes many phenomena in nature. Show that the sequence is given by

{( ) ( ) }
k k
1 1+ √ 5 1−√ 5
f ( k )= −
√5 2 2
The number ϕ=(1+√ 5)/2=1.618 is known as the golden ratio. Show that it is the positive solution of
the equation
ϕ +1 ϕ
=
ϕ 1
Solution
z-transforming the difference equation gives
[ z 2 F ( z ) −z 2 f ( 0 )−zF (1 ) ]−[ zF ( z ) −zf ( 0 ) ]−F ( z )
1
Gujarate, D.N., 1988. Basic Econometrics. McGraw-Hill, NY, p. 547.

7
¿ [ z 2−z−1 ] F ( z )−z=0

{ }
z 1 z z
F ( z )= 2 = −
z −z−1 √5
z−
1+ √5
2
z− (
1−√ 5
2 ) ( )
The inverse z-transform is

{( ) ( ) }
k k
1 1+ √5 1−√ 5
f ( k )= −
√5 2 2

The characteristic equations, z 2−z−1=0, has the roots


1± √ 5
z 1 ,2=
2
The characteristic equation, z 2−z−1=0, is the same as the equation governing the golden ratio and its
positive is the golden ratio.
2.15 Test the linearity with respect to the input of the systems for which you found transfer functions in
Problem 2.12.

(c) y(k+4) + y(k1) = u(k)

The transfer function of the system is

z
G( z )= 5
z +1
For inputs u1(k) and u2(k), we have outputs
z
Y i ( z )=G( z )U i ( z )= 5 U i ( z ), i=1 ,2
z +1

We now as input try the linear combination


u( k )=αu1 (k )+ βu 2 (k )
z z
Y ( z )=G( z )U ( z )=α 5 U 1 ( z )+ β 5 U 2 ( z )
z +1 z +1
¿ αY 1 ( z )+ βY 2 ( z )

(d) y(k+5) = y(k+4) + u(k+1)  u(k)

Repeat above steps using the transfer function of (d).

2.16 If the rational functions of Problems 2.8.(c), (d), are transfer functions of LTI systems, find the
difference equation governing each system.

z
F ( z )=
(c) z 2 +0 .3 z +0 . 02

y(k+2 + 0.3 y(k+1) + 0.02 y(k) = u(k+1)

z−0 .1
F ( z )=
(d) z 2 +0 . 04 z+ 0 .25

8
y(k+2 + 0.04 y(k+1) + 0.25 y(k) = u(k+1)  0.1 u(k)

2.17 We can use z-transforms to find the sum of any series { a ( k ) }. This is accomplished by first
recognizing that the sum
k
f ( k )=∑ a ( k )
i=0
is the solution of the difference equation
f ( k )=f ( k 1 )+ k
where a(k) is the k th term in the series. Show that the z-transform of the sum is given by

z
F ( z )= A( z)
z−1
then evaluate the following summations

n n
∑k ∑ k2
(a) k =1 (b) k =1
Solution
The z-transform of the difference equation is

( 1−z −1) F ( z ) =A ( z )
Solving for F ( z ) gives the expression
z
F ( z )= A( z)
z−1
(a) The z-transform of the series is
z
A ( z )=
( z−1 )2

The z-transform for the sum is

F ( z )=
z
z−1
A ( z )=
z2
=
[
1 z ( z +1 )
+
( z−1 ) 2 ( z−1 ) ( z−1 )2
3 3
z
]
Inverse z-transform
k
k ( k +1 )
∑ k= 2
i=0

(b) The z-transform of the series is


z ( z +1 )
A ( z )=
( z−1 )3

The z-transform for the sum is

F ( z )=
z
z−1
A ( z )=
( z−1 )
4
=
6 ( z−1 ) [
z 2 ( z +1 ) 1 2 z ( z 2 +4 z+1 ) 3 z ( z +1 )
4
+
( z−1 )
3
+
z
( z−1 )
2
]
9
k

∑ k 2= 16 [ 2 k 3 +3 k 2+ k ]= 16 k ( k +1 ) ( 2 k +1 )
i=0

2.18 Given the discrete-time system


y ( k +2 ) − y (k )=2 u(k)
find the impulse response of the system g(k) :
a. From the difference equation
b. Using z-transformation

Solution
a. We consider the difference equation with the impulse input (k ) and the initial
conditions y ( 1 )= y ( 0 )=0. Substituting in the difference equation, we have

k =0 : y ( 2 )= y ( 0 ) +2=2
k =1: y ( 3 )= y (1 )=0
k =2 : y ( 4 ) = y (2 )=2
In general, we have the impulse response

g ( k ) = y (k )= {02,,otherwise
k >0 even

b. We z-transform the difference equation to obtain the transfer function

2
G ( z )= 2
z −1
1 1
¿ −
z−1 z +1
−1 −1
z z z z
¿ −
z−1 z+1
Inverse z-transforming gives the impulse response

{
k−1
( ) 1−(−1 ) ,k > 1
gk=
0 , otherwise
The above form is identical to the one obtained in part (a) as can be verified by substituting values
of k .

2.19 The following identity provides a recursion for the cosine function
cos ( kx )=2 cos ( ( k−1 ) x ) cos ( x ) −cos ( ( k−2 ) x ) ,k integer

To verify its validity, let f ( k )=cos ( kx ) and rewrite the expression as a difference equation. Show
that the solution of the difference equation is indeed f ( k )=cos ( kx ).

Solutions

We write the difference equation corresponding to the identity

10
f ( k )=2 f ( k −1 ) cos(x )−f ( k−2 )
or equivalently
f ( k +2 )−2 f ( k+ 1 ) cos (x )+ f ( k ) =0

We z-transform to obtain
z F ( z ) −z f ( 0 )−zf (1)−2 [ zF ( z ) −zf ( 0 ) ] cos(x )+ F ( z )=0
2 2

then solve for F ( z )


z f ( 0 ) + z [ f ( 1 )−2 f ( 0 ) cos ( x ) ]
2
F ( z )= 2
z −2 cos (x) z+ 1

Substituting for the initial conditions f ( 1 ) =cos ( x ) , f ( 0 )=1 , gives


2
z −z cos ( x )
F ( z )= 2 ¿
z −2 cos( x)z +1 ¿
From Appendix I, we have the inverse transform
f ( k )=cos ( kx )
Note that the formula works for negative arguments since cos ( kx )=¿ cos (−kx ) ¿

2.20 Repeat Problem 2.19 for the identity

sin ( kx ) =2sin ( ( k−1 ) x ) cos ( x )−sin ( ( k −2 ) x ) , k integer

Solutions
We write the difference equation corresponding to the identity
f ( k )=2 f ( k −1 ) cos ( x )−f ( k−2 )
As in the solution of Problem 2.x, we have
f ( k +2 )−2 f ( k+ 1 ) cos ( x )+ f ( k ) =0
Since the difference equation is identical to that of Problem 2.16, we have

z f ( 0 ) + z [ f ( 1 )−2 f ( 0 ) cos ( x ) ]
2
F ( z )= 2
z −2 cos (x) z+ 1

Substituting for the initial conditions f ( 1 ) =sin ( x ) , f ( 0 )=0 , gives


z sin(x)
F ( z )= 2
¿
z −2 cos( x)z +1 ¿

From Appendix I, we have the inverse transform


f ( k )=sin ( kx )
Note that the formula works for negative arguments since the substitution sin ( kx ) =−sin(x ) gives
the same identity multiplied by 1.

2.21 Find the impulse response functions for the systems governed by the following difference equations

(a) y(k+1)  0.5 y(k) = u(k)


(b) y(k+2)  0.1 y(k+1) + 0.8 y(k) = u(k)

(a) y(k+1)  0.5 y(k) = u(k)

11
G( z)=
1
z−0 . 5
=z−1
z
z−0 .5
g( k )=
{
( 0. 5 )k−1 , k ≥1
0 , k <1
(b) y(k+2)  0.1 y(k+1) + 0.8 y(k) = u(k)
1 −1 z Ae−α sin(ω d ) z
G( z)= 2 =z 2 =
z −0 .1  z+0. 8 z −0. 1  z+0 . 8 z2 −2 e−α cos(ωd ) z+e−2 α
Equating coefficients, we solve for e and d then use the tables and the delay theorem
k
g ( k ) =1.1198|0.8944| sin ( 1.5149 ( k−1 )) , k =1 ,2 , 3 , 0 , 0 ,… (zero elsewhere)
Using MATLAB
>> [l1,l2,l3]=residue(1,[1,-0.1,0.8])
l1 =
0.0000 - 0.5599i
0.0000 + 0.5599i
l2 =
0.0500 + 0.8930i
0.0500 - 0.8930i
l3 =
[]
>> abs(l1(1)), abs(l2(1))
ans =
0.5599
ans =
0.8944
>> angle(l1(1)), angle(l2(1))
ans =
-1.5708
ans =
1.5149
>> pi/2
ans =
1.5708
k
g ( k ) =1.1198|0.8944| cos 1.5149 k− ( π
2 )
, k=1 , 2 ,3 , …(zero elsewhere)

2.22 Find the final value for the functions if it exists

z z
F ( z )= 2
F ( z )= 2
(a) z −1 .2 z +0 . 2 (b) z +0 .3 z +2

z z−1 z−1 1
f (∞ )= × |z→1 = |z→ 1= =1.25
(a) z −1.2z+0.2 z
2 ( z−1 )( z−.2 ) 0.8

z z
F ( z )= =
z 2 +0 . 3 z+ 2 z 2 −2 e−α cos(ω d ) z+ e−2α
z
¿
(b) ( z −e−α + jω ) ( z−e−α− jω )
d d

The denominator has complex conjugate poles with magnitude 2 greater than unity. √
Therefore the corresponding time sequence is unbounded and the final value theorem does not
apply.

12
2.23 Find the steady-state response of the systems due to the sinusoidal input u(k) = 0.5 sin(0.4 k)

z z
H ( z )= H ( z )=
(a) z−0 . 4 (b) z 2 + 0. 4 z+ 0. 03

Sinusoidal input u( k)=0.5sin(0.4 k)

z 1
H ( z)= =
(a) z−0 . 4 1−0 . 4 z−1
1
H ( e j 0. 4 ) = =1 .537 ∠−0 . 242
1−0 . 4 e− j0 . 4
u(k) =0.5  1.537 sin(0.4 k  0.242) = 0.769 sin(0.4k  0.242)

z
H ( z )= 2
(b) z + 0. 4 z+ 0. 03
1
H ( e j 0. 4 ) = j0 . 4 =0 . 714 ∠−0 .273
e +0 . 4+0 . 03 e− j 0. 4
u(k) =0.5  0.714 sin(0.4 k  0.273) = 0.357 sin(0.4 k  0.273)

2.24 Find the frequency response of a noncausal system whose impulse response sequence is given by

{ h (k ), h(k )=h (k +K ), k =−∞ , .. . ,∞ }


Hint: Express the periodic impulse response sequence with period K as

K−1 ∞
h (t )= ∑ ∑
¿
h(l+mK )δ (t−l−mK )
l=0 m =−∞

Then Laplace transform it.

Laplace transform the sequence then let s = j

K−1 ∞
H (s )= ∑ ∑
¿ −( l+mK )s
h(l+mK )e
l=0 m=−∞
K −1 ∞
H ( jω)= ∑ ∑
¿
h(l+mK )e− j(l+mK )ω
l=0 m=−∞

2.25 The well known Shannon reconstruction theorem states that:


Any bandlimited signal u(t) with bandwidth s/2 can be exactly reconstructed from its samples at a
rate s = 2/T. The reconstruction is given by

13
u(t )= ∑

u(k )
sin [ ωs
2
( t−kT ) ]
k=−∞ ωs
( t−kT )
2
Use the convolution theorem to justify the above expression.

By the sampling theorem, the signal can be recovered from its samples using a LPF of bandwidth s.
Multiplication in the frequency domain is equivalent to convolution with the inverse transform, the
sinc function in the time domain. Convolution of the samples and the sinc function yields the
expression.

2.26 Obtain the convolution of the two sequences {1,1,1} and {1,2,3}
(a) Directly (b) Using z-transformation.

Convolution of the two sequences {f(k)}={1, 1, 1} and {g(k)}={1, 2, 3}

(a) Directly y(0) = f(0).g(0)= 1´1=1


y(1) = f(1).g(0) + f(0).g(1) = 1´1+1´2=3
y(2) = f(2).g(0) + f(1).g(1) + f(0).g(2) = 1´1+1´2 + 1´3 = 6
y(3) = f(2).g(1) + f(1).g(2) = 1´2 + 1´3 = 5
y(4) = f(2).g(2) = 1´3 = 3
y(k) = 0, k > 4

(b) Using z-transformation

F(z) = 1 + z-1 + z-2 G(z) = 1 + 2z-1 + 3z-2

Y(z) = F(z).G(z) = 1+ 3z-1 + 6 z-2 + 5z-3 + 3z-4

{y(k)} = {1, 3, 6, 5, 3, 0, 0, ...}

2.27 Obtain the modified z-transforms for the functions of Problems (2.6) and (2.7).

e jk ωT−e− jk ωT
sin ( kωT )=
For 2.6-(a), 2j

Zm {sin(kωT)}=¿Zm { }{
2j
¿= jωT − −jωT = 2
2j z−e z−e z −2cos (ωT ) z+1 }
e jk ωT −e−jk ωT 1 e jmωT e−jmωT sin ( mωT ) z+sin [ ( 1−m)ωT ]

e jk ωT +e− jk ωT
cos ( kωT )=
For 2.6-(b), 2

14
Zm {cos(kωT)}=¿Zm
2 { }{
e jk ωT +e−jk ωT 1 e jmωT e−jmωT cos (mωT ) z−cos [ ( 1−m)ωT ]
¿= jωT + −jωT = 2
2 z−e z−e z −2cos (ωT ) z+1 }
For 2.7-(a) ,

Z m {e−akT sin ( kωT ) }=Z m { e jk ωT −akT −e− jk ωT −akT


2j }
¿
{
1 e jm ωT −maT

e− jm ωT−maT
2 j z −e jωT −aT z−e− jωT−aT }
sin ( mω T ) z +e−aT sin [ ( 1−m ) ωT ]
¿ e−maT 2
z −2 e−aT cos ( ωT ) z + e−2 aT
For 2.7-(b),

Z m {e −akT
cos (kωT ) }= Z m { e jk ωT −akT + e− jk ωT −akT
2 }
¿
{
1 e jm ωT −maT e− jm ωT −maT
+
2 z −e jωT −aT z−e− jωT −aT }
cos ( mω T ) z +e−aT sin [ (1−m)ωT ]
¿ e−maT 2
z −2 e−aT cos ( ωT ) z + e−2 aT
2.28 Using the modified z-transform, examine the intersample behavior of the functions h(k) of Problem
2.21. Use delays of (1) 0.3T, (2) 0.5T, and (3) 0.8T. Attempt to obtain the modified z-transform for
Problem 2.22 and explain why it is not defined.

Solution for 2.21

For 2.21(a)

F ( z, m)=1. 25 [ 1

( 0 .2 )m
z−1 z−0 .2 ]
⇒ F (k , m)=1.25 [ 1−( 0 .2 ) ( 0 . 2 ) ] ,k=1 ,2 ,3 ,. ... and zero elsewhere
m k−1
For any value m

(i) 0.3T, m = 0.7 (ii) 0.5T, m = 0.5, and (iii) 0.8T, m = 0.2.

15
z z
F ( z)= =
z 2 +0 . 3 z+2 ( z+0 .15− j 1 . 406 ) ( z+0. 15+ j1 . 406 )
z
¿
For 2.21(b) ( z− √2 e j 1. 677 )( z−√ 2 e− j 1. 677 )
F ( z ) 3 . 5556 e− jπ 3 . 5556 e jπ
= +
z z−√ 2 e j1 .677 z−√ 2 e− j1 . 677
k
f (k )=0 .7111 ( √ 2 ) sin ( 1.6771 k )
Use the results of problem 2.21 to obtain the answer.

sin ( mω T ) z+e−aT sin [ (1−m)ωT ]


Z m {e −akT
sin (kωT ) } =e−maT 2
z −2 e−aT cos ( ωT ) z+e−2 aT
sin ( 1 .6771 m ) z+ √2 sin [ 1. 6771(1−m ) ]
Z m {0 . 7111 ( √2 )k sin (1 . 6771 k ) }=0. 7111 ( √2 ) m 2
z +0 . 3 z+2
2 √ 2cos (1 . 6771 )=−0 . 3

F ( z , 0 .7 )=0. 7111 ( √2 )
0. 7 sin ( 1 .1740 ) z + √ 2sin [ 0 . 5031 ]
2
z +0 . 3 z+2
0 .7 0 .9223 z +0 . 6819
¿ 0 . 7111 ( √ 2 ) 2
(i) m = 0.7 z +0 .3 z +2
f (k ,0.7)=0.7111 ( √2 ) ( √ 2 ) sin [1.6771 ( k−1 ) +1.1740 ] ,k=1,2,3,.... and zero elsewhere
0 .7 k−1

(ii) m = 0.5 Similarly


0 . 5 sin ( 0 .8386 ) ( z+ √2 )
F ( z, 0 .5 )=0 . 7111 ( √2 ) 2
z +0 . 3 z +2
0 .5 0. 8844 ( z + √ 2 )
¿ 0 . 7111 ( √ 2 ) 2
z +0 .3 z +2
f (k ,0.7)=0.7111 ( √2 ) ( √ 2 ) sin [ 1.6771 ( k−1 ) +0.8386 ] ,k=1,2,3,.... and zero elsewhere
0 .5 k−1

(iii) m = 0.2

F ( z , 0 .2 )=0 . 7111 ( √2 )
0 . 2 sin ( 0 .3354 ) z + √ 2 sin ( 0. 0839 )
2
z +0 .3 z +2
0 .2 0. 3528 z+1. 4762
¿ 0 . 7111 ( √ 2 ) 2
z +0 .3 z +2
f (k ,0.7)=0.7111 ( √2 ) ( √ 2 ) sin [ 1.6771 ( k−1 ) +0.3354 ] ,k=1,2,3,.... and zero elsewhere
0 .2 k−1

Solution for 2.22


( 0 . 4 )m
H ( z , m)=
2.22(a) z−0 . 4

16
(iv) m = 0.7
( 0 . 4 )0 . 7
H ( z ,0 . 7 )= ⇒ h(k , 0 . 7)=( 0 . 4 )0 . 7 ( 0 . 4 )k−1 , k =1 ,2 , 3 ,. . .. and zero elsewhere
z−0 . 4
(v) m = 0.5
0 .5
( 0. 4 )
H ( z ,0 . 5 )= ⇒ h(k , 0 .5 )=( 0 . 4 )0. 5 ( 0 . 4 )k−1 , k=1 , 2 ,3 , .. . . and zero elsewhere
z−0 . 4
( 0 . 4 )0 .2
H ( z ,0 . 2)= ⇒h (k , 0. 2 )=( 0 . 4 )0. 2 ( 0 . 4 )k−1 , k =1 ,2 , 3 ,. . .. and zero elsewhere
(iii) m = 0.2 z−0 . 4
z 5z 5z
H ( z )= = −
2.22(b)
2
z + 0. 4 z+ 0. 03 z+ 0 .1 z+ 0. 3

H ( z ,m)=5 {
(−0.1 )m (−0.3 )m

z+0. 1 z+0. 3 }
⇒ h(k , m)=5 {(−0.1 )m (−0.1 )k−1 −(−0.3 )m (−0. 3 )k−1 } ,k=1,2, 3,.. ..
and zero elsewhere
(0.1)m and (0.3)m are complex numbers. Thus, the sequence is not defined between sampling points.

Obtain H(z, m) for m = 0.7, 0.5, 0.2, as in (a).

2.29 The following open-loop systems are to be digitally feedback controlled. Select a suitable sampling
period for each if the closed-loop system is to be designed for the given specifications
1
G ol (s )=
(a) s+3 Time Constant = 0.1 s
1
G ol ( s )= 2
(b) s +4 s+ 3 Undamped natural frequency = 5 rad/s, Damping ratio = 0.7

(a) For a time constant = 0.1 s


70
Let ω s=70 ω b= =700
0.1
2π 2π
T= = =0.009 s
ωs 700
(b) For ω n=5 rad/s, ζ =0.7 , we have ω d=3.57 rad/s,

2π 2π
T= = =0.025 s T =25
ω s 70 ω d Let ms.
2.30 Repeat problem 2.29 if the systems have sensor delays of : (a) 0.025 s (b) 0.03 s

(a) T = 0.025 s (b) T = 0.03 s. (cannot sample faster than the sensor delay)

Computer Exercises
2.31 Consider the closed-loop system of Problem 2.29(a)

a. Find the impulse response of the closed-loop transfer function and obtain the impulse
response sequence for a sampled system output.
b. Obtain the z-transfer function by z-transforming the impulse response sequence.
c. Using MATLAB, obtain the frequency response plots for the analog system and for
sampling frequencies s = k b, k = 5, 35, 70.
d. Comment on the choices of sampling periods of part (b).

17
1 10
G( s)= =
The closed-loop transfer function is 0.1 s+1  s+10
(a) The impulse response is

g(t )=10 e−10t


and the impulse response sequence for a sampled system output is g(kT )=10e−10 kT

(b) The z-transform of the impulse response is

10  z
G( z )=
z−e−10 T

(c) The corresponding frequency response plots for sampling periods T = 0.1, 0.05, 0.02, 0.1 s, as
well as for the analog system can be obtained using the MATLAB commands

% Exercise 2.22 Digital control text


clf
tau=0.1;% 1/wb=time constant
T=tau*[1/5, 1/35, 1/70];
num=[10,0];
w=[.1:.05:100];
for i=1:3
den=[1,-exp(-10*T(i))];
g=tf(num,den, T(i));
[mag,ang]= bode(g,w); % Frequency response
mm=mag(:); % Change mag to vector
plot(w,T(i)*mm)
hold on
end
nc=1; dc=[.1, 1];
w=.1:.05:100;
[mc,ac, w]=bode(nc,dc,w); plot(w,mc,'r')

18
G(j)
1.1

0.8

Slower sampling
0.6

0.4

0.2
Analog System


0
0 20 40 60 80 100

Frequency response plots for sampling frequencies s = k b, k = 5, 35, 70 and for the
analog system for Problem 2.25.

The frequency response plots are normalized (multiplied by T) to simplify their comparison. The
plots for the discrete time system are closer to the analog frequency response for faster sampling.
The discrete time plots are significantly different from the analog plot for T = 0.1 s and almost
indistinguishable for T = 0.1/35 and 0.1/70s. This verifies the rule of thumb for the selection of the
sampling rate.

2.32Repeat Problem 2.31 for the second order closed-loop system of Problem 2.29(b) with plots for
sampling frequencies s = k d, k = 5, 35, 70.

25 7 .0014 ´ 3. 5707
G( s )= =
The closed-loop transfer function is s +7 s+25 ( s+3 .5 )2 + ( 3 .5707 )2
2

(a) The impulse response is

g(t )=7.0014 sin(3.5707t )e−3.5 t


and the impulse response sequence for a sampled system output is

g(kT )=7.0014sin(3.5707kT )e−3.5 kT


(b) The z-transform of the impulse response is
7 . 0014 e−3. 5 T sin (3. 5707 T ) z
G( z )=
z −2 e−3 . 5T cos(3. 5707 T ) z+e−7 T
2

19
(c) The corresponding frequency response plots for sampling periods T = 2/(kd)s, k=5, 35, 70,
as well as for the analog system can be obtained using the MATLAB commands

% Exercise 2_24
clf
hold on
wn=5;zeta=0.7; % Closed-loop data
wd=wn*sqrt(1-zeta^2); % Damped natural frequency
ttt=2*pi/wd; T=[ttt/5,ttt/35, ttt/70]; % Sampling periods
w=[.1:.1:200];
gc=tf(wn^2,[1,2*zeta*wn,wn^2]); % Analog transfer function
% Plot the frequency response for the analog system
w=.1:.1:200;
[mc,ac, w]=bode(gc,w); plot(w,mc(:),'r')
% Calculate and plot discrete frequency responses
for i=1:length(T)
ti=T(i);
% numerator and denominator od z-transfer function
num=[7.0014*exp(-3.5*ti)*sin(3.5707*ti),0];
den=[1,-2*exp(-3.5*ti)*cos(3.5707*ti), exp(-7*ti)];
g=tf(num,den,ti);
[mm,aa,w]= bode(g,w);
plot(w,ti*mm(:))
end

(d) The frequency response show little aliasing in the frequency range of interest for T = 2/(70d) s,
some aliasing for T = 2/(35d) s, and unacceptable aliasing T = 2/(5d) s,. The analog plot (red)
is similar to that of the two faster rates at low frequencies and differs from the T = 2/(35d) s plot
close to the folding frequency. The results confirm that the rule of thumb gives a reasonable
estimate of the required sampling rate.

G(j) 1

0.8

0.6

0.4
Slow sampling

0.2


0
0 20 40 60 80 100 120 140 160 180 200

Frequency response plots for sampling frequencies s = k b, k = 5, 35, 70 and for the
analog system for Problem 2.26.

2.33 Use SIMULINK with a sampling period of 1s. to verify the results of Problem 2.23. Simulate the
system for 300 s then change the axes to display the last 50 s only.

20
z
H ( z )=
(a) z−0 . 4

z
(z-0.4)
Sine Wave Discrete Scope
Zero-Pole

Scope1
Simulation diagram for Problem 2.17(a) using SIMULINK.

Problem 2.23(a) gives the steady-state response

u(k) = 0.769 sin(0.4k  0.242)

0.8

0.6

0.4

0.2

-0.2

-0.4

-0.6

-0.8
250 255 260 265 270 275 280 285 290 295 300

Sampled sinusoidal input (red) and steady-state sinusoidal (blue) for Problem 2.23(a).

z
H ( z )=
(b) z 2 + 0. 4 z+ 0. 03

21
z
poles(z)
Sine Wave Discrete Scope
Zero-Pole

Scope 1

Simulation diagram for Problem 2.20(b) using SIMULINK.

Problem 2.23(b) gives the steady-state response

u(k) = 0.357 sin(0.4 k  0.273)

0.5

0.4

0.3

0.2

0.1

-0.1

-0.2

-0.3

-0.4

-0.5
250 255 260 265 270 275 280 285 290 295 300

Sampled sinusoidal input (red) and steady-state sinusoidal (blue) for Problem 2.23(a).

2.34 Consider the model of the evolution of the expected price of a commodity of Problem 3.12
pe ( k +1 )=( 1 γ ) p e ( k ) + γ p ( k )

where pe ( k ) is the expected price after k quarters, p ( k ) is the actual price after k quarters, and γ is a
constant in the range 0< γ <1 .

22
a. Simulate the system with γ = 0.5 and a fixed actual price of one unit, and plot the actual and

expected prices. Discuss the accuracy of the model prediction.

b. Repeat part (a) for an exponentially decaying price p(k) = (0.4)k.

c. Discuss the predictions of the model referring to your simulation results.

pe(k+1) = (1  ) pe(k) +  p(k)

where pe(k) is the expected price after k quarters, p(k) is the actual price after k quarters, and  is a
constant.
a) Simulate the system with  = 0.5 and a fixed actual price of one unit and plot the actual and
expected prices. Discuss the accuracy of the model prediction
b) Repeat part (a) for an exponentially decaying price p(k) = (0.4)k.
c) Repeat part (a) for an exponentially decaying price p(k) = (0.95)k.
d) Discuss the predictions of the model referring to your simulation results.

The recursion describing the solution can be easily simulated using a discrete state-space block.
Although discrete state-space equations are introduced in Chapter 7, they reduce to the simple
recursion of our model for the case of scalar vector x(k), where x(k) is the price pe(k). We could
also avoid the use of state-space blocks by z-transforming to obtain the corresponding transfer
function.

a) Simulate the system with  = 0.5 and a fixed actual price of one unit and plot the actual and
expected prices. Discuss the accuracy of the model prediction.

y(n)=Cx(n)+Du(n)
1
x(n+1)=Ax(n)+Bu(n)
Constant Discrete State -Space Scope
Simulation diagram for constant price using SIMULINK.

The model converges to the correct estimate after a few sample points. At k = 5, the error is less
than 5%.. This is a reasonable estimate assuming that the sampling period is small relative to the
time after which the price estimate is used.

23
1

0.9

0.8

0.7

0.6

0.5

0.4

0.3

0.2

0.1

0
0 1 2 3 4 5 6 7 8 9 10

Time response of price estimator for a constant price.

b) Repeat part (a) for an exponentially decaying price p(k) = (0.4)k.

We use a state space block with unity initial condition and A=0.4.

y(n)=Cx(n)+Du(n) y(n)=Cx(n)+Du(n)
x(n+1)=Ax(n)+Bu(n) x(n+1)=Ax(n)+Bu(n)

Discrete State-Space1 Discrete State-Space Scope

Scope1
Simulation diagram for exponentially decaying price using SIMULINK.

The dynamics of the model are too slow to track the exponentially decaying price. The
actual price decays much faster than the model predictions.

24
1

0.9

0.8

0.7

0.6

0.5

0.4

0.3

0.2

0.1

0
0 1 2 3 4 5 6 7 8 9 10

Time response of price estimator for a fast exponentially decaying price.

c) Repeat part (a) for an exponentially decaying price p(k) = (0.95)k.

We use a state space block with unity initial condition and A=0.95 and with the same
simulation diagram as part (b).

The dynamics of the model are able to track the exponentially decaying price since the
decay is very slow.

25
1

0.9

0.8

0.7

0.6

0.5

0.4

0.3

0.2

0.1

0
0 2 4 6 8 10 12 14 16 18 20

Time response of price estimator for a slow exponentially decaying price.

d) Discuss the predictions of the model referring to your simulation results.

The price estimator dynamics are able to estimate a constant price but are unable to
estimate a decaying exponential if the rate of decay is fast relative to the filter dynamics. If
the price decay is very slow, then the estimator is able to track the price with some error.

2.33 Write a MATLAB program that calculates the step response of the system of Example

2.21 by using the step response coefficients and formula (2.28).

SOLUTION
Hz=tf(1,[1 -0.5],1);
[g,t]=step(Hz);
n=length(g);
u=ones(1,n);
y=zeros(1,n);
y(1)=0; % u(0)=0
for k=2:n
y(k)=y(k)+g(1)*u(k-1);
for i=2:k-1
y(k)=y(k)+(g(i)-g(i-1))*u(k-i);
end
end

26

You might also like