100% found this document useful (1 vote)
2K views164 pages

Discrete-Time Control Systems: Solutions Manual

This document provides information about a solutions manual for the textbook "Discrete-Time Control Systems" by Katsuhiko Ogata. The solutions manual contains solutions to all problems in the textbook that were left unsolved. It includes 8 chapters that cover material that can be taught in one or two academic quarters or semesters, depending on the course structure. The preface explains that the instructor has flexibility in selecting which topics from the textbook to cover in a semester-long course while still addressing most of the important subject material.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
2K views164 pages

Discrete-Time Control Systems: Solutions Manual

This document provides information about a solutions manual for the textbook "Discrete-Time Control Systems" by Katsuhiko Ogata. The solutions manual contains solutions to all problems in the textbook that were left unsolved. It includes 8 chapters that cover material that can be taught in one or two academic quarters or semesters, depending on the course structure. The preface explains that the instructor has flexibility in selecting which topics from the textbook to cover in a semester-long course while still addressing most of the important subject material.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 164

Solutions Manual

Second Edition

Discrete-Time
Control Systems
Katsuhiko Ogata
University of Minnesota

PRENTICE HALL, UPPER SADDLE RIVER, NJ 07458


© 1995 by PRENTICE-HALL, INC.
A Pearson Education Company
Upper Saddle River, New Jersey 07458

All rights reserved.

1098765

ISBN 0-13-317190-6

Printed in the United States of America


Table of Contents

Preface ......................... V

Chapter 2 1

Chapter 3 18

Chapter 4 ........................ 44

Chapter 5 74

Chapter 6 91

Chapter 7 111

Chapter 8 135

iii
Preface

This solutions manual for Discrete-Time Control


Systems, second edition, contains solutions to all B
problems (unsolved problems in the text).
All the materials in the text may be covered in
two quarters. In a semester course, the instructor
will have some flexibility in choosing the subjects
to be covered. If the student has an adequate back-
ground in the vector-matrix analysis, then by leaving
approximately 10 percent of the text material to the
student's self study, most of the important subjects
of the text may be covered in one semester. In a
quarter course, a good part of the first six chapters
may be covered.

Katsuhiko Ogata

V
CHAPTER 2

B-2-1.
1
-aT -1)
1 - e z

B-2-2.
Method 1: Noting that

0
[ l- = z
~ k2
(
-1(
l + z )
-1)3
-1

1 - z
it can be expected that J[k3] will involve a term (1 - z- 1 ) 4 in the denomi-
nator. Since

g-[k3] = z00

k=O
k3z-k = z-1 + 23z-2 + 33z-3 + 43z-4 + • • •

= z-l + 8z- 2 + 27z- 3 + 64z- 4 + •


and
(z-l + 8z- 2 + 27z- 3 + 64z- 4 + • · ·)(1 - z- 1 ) 4

= (z-l + ?z- 2 + 19z- 3 + 37z- 4 + • •, )(1 - z- 1 ) 3

= (z-l + 6z- 2 + 12z- 3 + l8z- 4 +. - . )(1 - z- 1 )2


= (z-l + 5z- 2 + 6z- 3 + 6z- 4 +,, 0 )(1 - z- 1 )

= z -1 + 4z -2 + z -3
we find
z -1( 1 + 4z -1 + z -2)
= --'-------,---''--
( 1 - z-1)4

Method 2:

? [k3] = J [k•k2] z
dX(z)
dz
where
-1 -1
X(z) = 9' [k2 ] = z (1 + z
(1 - z-1)3
)

Since

1
we have

------------------------------------------------------------ -
B-2-3.
Method 1: Noting that

we have

Method 2:

k=O
= T2 [(eaTz)-1 + 4(eaTz)-2 + 9(eaTz)-J + 16(eaTz)-4+··J

Referring to Problem A-2-2, we have


2 -aT -1 -aT -1
% [ t2e -at ] = T e z (1 + e z )
( 1 - e -aT z -1)3

B-2-4.

_ _1_ _ _ + ----'3"--_

1 - 2z-l 1 - z-l

B-2-5. Referring to Problem A-2-4, we have

1 -1 X(z)
1 - z
where

X(z) = ~ [ah] = _ 1___


1
0 1 - az

2
Hence

1 -1
)
1 - az

~
0 [ k(k - l)a
k-2]
= '}
[
oa a ) = od a [ (z z- a)2 ]
(kak-1]

= 2z = (2! )z
(z - a) 3 (z - a) 3
} - [k(k - 1) • • • (k - h + l)ak-h]

= } [ / a k(k - 1) 6 - "(k - h + 2)ak-h+l]

= 0~ a X(z, a)
where

(h - 1)! z
X ( z, a) = h
(z - a)
Hence

= (h - 1)! zh(z - a)- h - 1 = h! z


( z - a ) h+l

----------------------------------------------------------------------------
B-2-7. From Figure 2-8 we have
x(O) = O, x(l) = 0, x(2) = O, x(J) = J1
2
x(4) =-y, x(k) = 1 fork= 5, 6, 7, ...
Then
00

X(z) = L x(k) z
-k

k=O

3
Z -3 + z -4 + z -5
1 - z -1

-----------------------------------------------------------------------------
B-2-8. By dividing both numerator and denominator by z4, we have
X(z) = 5 + 4z-l + 3z-2 + 2z-3 + z-4

This last equation is already in the form of a power series in z-l. By inspec-
tion, we have
x(0) =5
x(l) =4
x(2) =3
x(3) =2
x(4) =1
x(k) =0
Note that the given X(z) is the z transform of a signal of finite length.

B-2- 9.
1. Partial-fraction-expansion method:

X(z) = z-l(0.5 - z-1). = __z~(.....0_._5z_----"'l_._)_ _


(1 - 0.5z-l)(l - 0.8z-l)2 (z - 0.5)(z - 0.8)2
Hence,
X(z) 8.3333
z + -8.3333
--'-- 2
z - 0.5 z - 0.8 (z - 0.8)2.
or
X(z) - - 8.3333
__,;,,._,.;;..;c..;;..;;;_ _
+ 8.3333 2z-l
1 - 0.5z-l 1 - 0.. 8z-l
Thus,
x(k) = -8.3333(0.S)k + 8.3333(0.8)k - 2k(0.8)k-l, k = 0, 1, 2, ...
2. Computational solution with MATLAB:

4
»% MATlAB Program for Problem B-2-9
»
»% ----Finding inverse z transform-----
»
»num = [0 0.5 -1 0];
»den= (1 -2.1 1.44 -0.32];
»u = [1 zeros(l,40)];
»x = filter(num,den,u)

x=

Columns 1 through 7

0 0.5000 0.0500 -0.6150 -1.2035 -1.6257 -1.8778

Columns 8 through 14

-1.9875 -1.9899 -1.9177 -1.7977 -1.6505 -1.4910 -1.3296

Columns 15 through 21

-1.1733 -1.0265 -0.8915 -0.7694 -0.6606 -0.5645 -0.4804

Columns 22 through 28

-0.4074 -0.3443 -0.2902 -0.2440 -0.2046 -0.1713 -0.1431

Columns 29 through 35

-0.1193 -0.0993 -0.0825 -0.0685 -0.0568 -0.0470 -0.0389

Columns 36 through 41

-0.0321 -0.0265 -0.0219 -0.0180 -0.0148 -0.0122

5
·----------------------------------------------------------------------------
B-2-10.
-1
z
x(0) = lim X(z) = lim - - - - - - - - - - - - - = 0
z-oo z -co (1 - z- 1 )(1 + 1.Jz-l + 0.4z- 2 )
-1
x(oo) = lim [(1 - z- 1 )X(z)]= lim -~ -2 = 2~7
z -1 z ... 1 1 + l.Jz + 0 .4z
Notice that
-1
X(z) = _ _ _ _ _ _z_ _ _ _ _~ -
(1 - z- 1 )(1 + 1.Jz-l + 0.4z- 2 )
2
z
= ---,---..,......,----.,--,------,--
( z - l)(z + 0.8)(z + 0.5)

1 (. z 4z Jz )
= 2.7 z - 1 - z + 0.8 + z + 0.5
Hence
---·-
x(k) = 2~7 [1 - 4(-0.S)k + 3(-o.5)k]

B-2-11.
1. Inversion integral method:
2
X(z) = = z- -+-z ~
- 1
-
(z - l)z
Hence
( 2 k-1
X(z)zk-1 =z + z - l)z
(z - l)z
For k = 0: 2
X( z ) z
k-1 = z + z - 1
2
(z - l)z
Thus,
2
z
+ z - 1
x(0) = [ residue of 2 at pole z = 1]
(z - l)z
2
of
z + z - 1 at double pole
+ [residue 2 z = 0]
(z - l)z
z2 + z - 1 ]
= lim [(z - l)
z _,.. 1 (z - 1)z 2

1 •
+ (2 - l)!
1 im dzd [ z 2
z + 0

6
Fork= 1:
2
X(z)zk-1 = z + z - 1
(z - l)z

z2

x(l) = [ residue of (z+_z l)z
- 1
at pole z = 1]

+ [ residue of z 2(z+ _z l)z


- 1 at pole z = 0 J
= zl~ml [( z -
l) z2 + z - 1
(z - l)z
7j + z1 ~mo
• [
z
z2 + z - 1 ]
(z - l)z

=1 + 1 =2
For k = 2 , 3, 4, • I I
.
I

( 2 + z - l_z
) k-2
() k -=-
Xzz
lz
z - 1
Hence
2 k-2
. (z + z - l)z
x(k) = [ residue of->-----~'---
z - 1
at pole z =

= lim .[ ( z - 1) _,.,_z_+_z
( 2 - ll)zk-2
___ .___ _-I = 1
z-+l z-
Therefore,
x(o) =1
x(l) =2
x(k) =1 fork= 2, 3, 4, ...

2. Computational solution with MATLAB:

»% MATI.AB Program for Problem B-2-11


»
»%----Finding inverse z transform-----
»
»num = [1 1 -1];
»den= [1 -1 O];
»u = [1 zeros(l,40)];
»x = filter(num,den,u)

7
x=

Columns 1 through 12

I 2 I I 1 I 1 1 I I 1 I

Columns 13 through 24

1 I 1 I I I 1 I I I 1 1

Columns 25 through 36

I I I I I I 1 1 l I 1 1

Columns 37 through 41

I 1 1 I 1

----·------------------------------------------------------------------------
B-2-12.
-3 1
X(z) z = -~-~--.,,...,--
- -1 -1 z(z - l)(z - 0.2)
(1 - z )(1 - 0.2z )

= -2_ + 1.25 6.25


z z - 1 z - 0.2
Hence
fork= 1, 2, 3, ...

That is,
x(k) =0 fork= 0, 1, 2

= 1.25 ( 1 - 0.2 k-2) fork= 3, 4, 5, ...

B-2-13.
6 -2 -3 3
X(z) = 1 + z + z
-1 -1
= -z~+-6z ~+-1-•~
(1 - z )(1 - 0.2z ) z(z - l)(z - 0.2)

X(z)zk-1 _z( 3 + 6z + 1 ) zk-1


- z(z - l)(z - 0.2)

8
Fork= 0:
X(z)zk-1 = _ _z_3_+_6_z_+_l_ __
z 2 (z - l)(z - 0.2)
Hence
.
x ( O) = [ residue z 3- +
of - 2- - --6z- +
--1 - - - at double pole z = 0]
z (z - l)(z - 0.2)
3
+ [ residue o f - z- -+ -6z-+-1- - - at pole z = 1 ]
z 2 (z - l)(z - 0.2)

+ [ residue of z 3 + 6z + 1 at pole z = 0.2 ]


2
z (z - l)(z - 0.2)

lim d rl z 3 + 6z + 1 ]
dz (z - l)(z - 0.2)
z -o
+ .
1 im
Z ➔ l
[ z 32 + 6z + 1 _, + 1 im
z(z-0.2)
.
z...;,.0,2
j
[3
z + 6z + 1 ]
2
z(z-1)

= 60 + 10 - 69 = 1
Fork= 1:
z 3 + 6z + 1
X( z ) z k-1 =
z(z - l)(z - 0.2)
Hence
z 3 + 6z + 1
x(l) = [ residue of z(z - l)(z - 0,2) at pole z = 0]

z 3 + 6z + 1
+ [ residue of at pole z = 1]
z(z - l)(z - 0.2)

z 3 + 6z + 1 ]
+ [ residue of z(z _ l)(z _ 0 . 2 ) at pole z = 0.2

= 1. - l
z 3 + 6z + 1
z ~mo (z - l)(z - 0.2)
J 1. z + 6z + 1
-l3
+ z ~ml z(z - 0.2)
J
+ lim [z 3 + 6z + 1 ] = 5 + 10 - 13.8 = 1.2
0
z ...... 2 z(z - 1)

Fork= 2, 3, 4, ... :
-----'--"~--=----

() k-1 (z 3 + 6z + l)zk- 2
Xz z = (z - l)(z - 0.2)

. (z 3 + 6z + l)zk- 2
x(k) = [ residue of (z _ l)(z _ 0. 2 ) at pole z

l.
-
+ residue of
3
(z + 6z + l)z -
(z _ l)(z _ 0 . 2 )
k 2
at pole z = 0 ._2]

9
= lim [(z3 + 6z + l)zk-2] + lim [(z3 + 6z + l)zk-2]
z....,. 1 z - 0.2 0
z + . 2 z - 1

= 10 - 2,76(0.2)k- 2

In summarizing, we have

x(o) = 1
x(l) = 1.2

x(k) = 10 - 2,76(0.2)k- 2 fork= 2, 3, 4, ...

B-2-14.
1. Direct division method:

Hence
x(o) = o, x(l) = 1, x(2) = 0, x(J) = -3

x(4) = 0, x(5) = 5, x(6) = 0, x(?) = -7,


2. Computational solution with MATLAB:

»% MATLAB Program for Problem B-2-14


»
»%-----Finding inverse z transform-----
»
»num =[O 1 0 -1 O];
»den= (1 0 2 0 1];
»u = [1 zeros(l,40)];
»x = filter(num,den,u)

x=

Columns 1 through 12

0 1 0 -3 0 5 0 -7 0 9 0 -11

Columns 13 through 24

0 13 0 -15 0 17 0 -19 0 21 0 -23

10
Columns 25 through 36

0 25 0 -27 0 29 0 -31 0 33 0 -35

Columns 37 through 41

0 37 0 -39 0

B-2-15.
2
X(z) = o.368z + o.478z + 0.1..54
(z - l)z 2

( 6 __
X(z) zk-1 = _0_.~3_8z 2 +_0_.4~7_8_z_+_0_.1__54
__ ) z k-1
__
(z - 1)z2
Fork= 0:
2
X( z ) z k-1 = o.368z + o,4?8z + 0.1_54
(z - 1)z3

x(O) = [residue of 0 •368z 2 + o. 47 sz + O,l..54 at triple pole z = o]


3
(z - l)z

+ [ resi"due of o.368z 2 + o.478z + 0.1..54 a t po1 e z = 1]


3
(z - l)z

= 1 lim d 2 [ O.J68z 2 + 0,4?8z + 0.1_54]


(3 - 1)! O d 2 z - 1
z - z

.
+ 1 ].ffi [ o.368z 2 + 0,4?8z + 0.1_54 ] -
-
_
- 1 + 1 - 0
z -+ 1 z3
Fork= 1:
X()
z z
k-1
=
o.368z 2 + o.478z + 0.1..54
(z - l)z 2
( )
x l =
1
(2 - 1) ! z
lim
-+ O dz
l
~ - O,368z 2 + 0 ,478z + O,1_54 ]
z - 1

+ zl~ml[ 0.36Sz2 + 0~~78z + 0.154] = -0.632 + 1 = 0.368

Fork= 2: 2
k-1 o.368z + 0.478z + 0.1_54
X( z ) z = (z - l)z

11
x(2) = lim [ 0 .368z 2 +z O~4i8z + 0 .1_54 ]
z -+ 0

+ lim I- o.368z 2 + 0.478z + 0.1_54 ] = -0.l.54 + 1 = 0 _846


z -1[ z

For k = 3, 4 , 5, ....
X(z)zk-1 = (o.368z 2 + 0.478z + 0.1_54)zk-3
z - 1

x(k) = lim [<o.368z 2 + o.478z + 0.1_54)zk- 3] = 1


z -1

In summary, we have

x(0) = 0

x(l) = 0.368
x(2) = o.846
x(k) = 1 fork= 3, 4, 5, ...

B-2-16.
Case 1:
u(k) = 1 fork= 0, 1, 2, ...

= 0 fork< 0
The z transform of the given difference equation is

z2x(z) - l.3zX(z) + 0.4X(z) = U(z) = __z__


z - 1

or
X(z) = - - - - - - = z ' - - - - - - - __ 16.6666z + 6.6666z + lOz
(z - 0.8)(z - 0.5)(z - 1) z - 0.8 z - 0.5 z - 1
Hence
x(k) = -16.6666(0.8)k + 6.6666(0.5)k + 10 fork= 0, 1, 2,

Case 2:
u(0) = 1
u(k) = 0 fork~ 0
The z transform of the given difference equation is

(z2 - l.3z + 0.4)X(z) = U(z) = 1


or
X(z) = - - - - - '1~ - - - - = 3.3333 3.3333
(z - 0.8)(z - 0.5) z - 0.8 z .:. . 0.5

12
Hence,
x(O) = 0
x(k) = 3.3333(0.S)k-l - 3.3333(0.S)k-l, fork= 1, 2, 3, ...

Computational solution with MATLAB:

»%MATLAB Program for Problem B-2-16 (Part 1)


»
»%-----Unit-step response-----
»
»num = [0 0 1];
»den = [1 -1.3 0.4];
»u = ones(l,41);
»v = [0 40 0 15];
»axis(v);
»k = 0:40;
»x = filter(num,den,u);
» plot(k,x,' o ')
»grid
»title('Unit-Step Response')
»xlabel('k')
» ylabel('x(k)')

Unit-Step Response
15r----r-._----r----.-----,..___;;;.._-.----.------.----.
.

10 - ••••• '' ' ••• -:· ••• '' ••••••• -~. ··• ·.. ·····-~ ·······o· ·· ·i11'0"0 "Cl -0- e·o·o ·o 'O" ~- o·o ·0-0- $· 0·0·0-0-°')
: : oooo o. . . .

! 0 0 + 0 0 0 l ! ! ! !
:
: 0
O
.
j
.
!
:
i
.
!: i
.
5 .............. -~- .......... --~ ............ -~ ............ ·? ........... ··?···· ...... ·--~-- ......... ··! .............

0 °
0
! : I I l I
1

O0 - ~ 1~ 1~ 2~ 2~ 3~ 3~ 40
k

13
»% MATLAB Program for Problem B-2-16 (Part2)
»
»% ---- Response to Kronecker delta input - -
»
»num =[0 0 l};
»den= [l -1.3 0.4];
»u = [1 zeros(l,40));
»v = [0 40 -1 2];
»axis(v);
»k=0:40;
»x = filter(num,den,u);
»plot(k,x, 'o' ,k,x,'-')
»grid
»title('Response to Kronecker Delta Input')
»xlabel('k')
» ylabel('x(k)')
»

Response to Kronecker Delta Input


2

. .
1.5 · ·· ·· ·· · ·· ··r ··· · ·· ·····-r ·· ·· ··· ·· ····r ·· · ·· · ·· ··· -r··· ···· ···· ··r ······· ···· · ···· ·· ·· ··· ·· ······ ····· ·

.-
.
.. - .
.-
- .
1 - ••••••• ··-: . . . . . . . . . . . . . -~. - ■ ■

.--
• - ......... -:- ••••••••••• -: ••••••••••••• - .................... - •••

... -- --
--- -.- ..- ..-
-
:2 0.5
>II
: : :
..
..
..
:
-···············=··············=··············=··············
.-
..-
..
············· ........... .

0 ......... ~--·· ..........:•............. -~-~~~~e-:e~;i.e.~~½EHre-E~e-e--e-&-4


............. .
: : : :
-
~
-
.


-
-


.

:- .: .: .:
-0.5 •• ■
.
• • • • • • • • -:· • • • • • • • • • • •
. . .
■ -:· ■ ■ • • • ■ • • • • • • ·:- • • • • • • • • • • • • · : - . ■• ■
- -
• • • • • • • • ·:- • • • • • • • • • • • • ·:-. - ••••
-
■ ••••• ·: •••••••••• - •

-1
0 5
I 10
I l l I l l
15 20 25 30 35 40
k

14
B-2-17.
x(k + 2) - x(k + 1) + 0,25x(k) = u(k + 2)
The z transform of this difference equation is

[z 2x(z) - z2x(O) - zx(l)] - [ zX(z) - zx(O )] + 0 ,2_5X(z)


= z2u(z) - z2u(O) - zu(l)
Substituting the initial data into this last equation, we get

2 z3
(z - z + 0,25)X(z) = -z---1-
or
z3
X(z) = ------=-----
(z - 1)(z2 - z + 0,25)

=
4z Jz o.5z
z - 1 z - 0.5 (z - 0 .5)
2

Hence
x(k) = 4 - (3 + k)(o.5)k fork= O, 1, 2, ...

Computational solution with MATLAB:

»% MATLAB Program for Problem B-2-17


»
»%----Unit-step repone -----
»
»num = [I O O];
»den= [1 -1 0.25];
»u = ones(l,41);
»v = [O 40 0 5];
»axis(v);
»k= 0:40;
»x = filter(num,den,u);
»plot(k,x,'o')
»grid
»title('Unit-Step Response')
»xlabel('k')
»ylabel('x(k)')

15
Unit-Step Response
5------------------.....---.....---
:

. . .
4 - •·•···••···~.····ti,:,· o·C!·O-& e- G· O·O•O-e- e• G·O·O .a, e-Q•O·O •oe- ~. O·O •o-e--ii• 0·0·0-1:>◄ ~
o t O
.I. -I.. .- l
I-. I-. -. l
0 : : : : : : :
3 - -............ ~...............; ...............; ............. -~- ............; ................ ; ..... ·-. -...... ; ......... ·-. -·-
-- . -. - .- .. -

.-.
- • • - - -

.-. .-..
0
- - -. .-
. -

..
. •


- •

-
. -
..

-
-

..
. ■


- -

-
• ■ - • • - -

2 -O·········~··············'.•·············~·············~·············~·············i·············i············-
.
--.
..
.-
-..- .---.. ...-- -
...-
.
..--. .....
- ... -. .- .-. .
.. ... . .. .. - ..-
1 ! .............. ---~-. ■ .......... -S:- .............. -~ ..... -.... -. -~ .............. ; ......... ■ •••• ; ••••••••••••• ; ............. --

0 . :
0 5 10 15 20 25 30 35 40
k

---------------------------------------------------------------------------r
B-2-18.
x(k + 2) - 1.3679x(k + 1) + o.3679x(k) = o.3679u(k + 1) + 0.2642u(k)
The z transform of this equation is

z2X(z) - z2x(0) - zx(l) - 1.3679 [zx(z) - zx(o)J + o.3679x(z)


= 0,3679 [zu(z) - zu(o)J + 0.2642 u(z)
Noting that x(0) = 0 and x(l) = 0 . .5820, we have

(z 2 - 1.3679z + o.3679)x(z) = (o.3679z + 0.2642)U(z)


or
-1 -2
~ = o.3679z + 0.2642z
~
1 - 1.3679z -1 + o.3679z -2
Since
U(z) = l . .5820 - 0,5820z-l
we have
2 3
X(z) = 0 . .5820z-l + 0.2038z- - 0.1538z-
1 - l.3679z-l + 0.3679z- 2

= 0.5820z-l + z- 2 + z-3 +. • •

16
Hence
x(0) = 0
x(l) = 0,5820
x(k) = 1 fork= 2, 3, 4, ...

Computational solution with MATLAB:

»% MATLAB Program for Problem B-2-18


» .
»%-----Response to arbitrary inpt-----
»
»num = [0 0.3679 0.2642];
»den= [1 -1.3679 0.3679];
»u = [1.582 -0.5820 zeros(l,24)];
»v = [O 25 0 2];
»axis(v);
»k =0;25;
»x = filter(num,den,u);
»plot(k,x,'o')
»grid
»title('Reponse of System to Arbitrarily Specified Input')
»xlabel('k')
»ylabel('x(k)')

Reponse of System to Arbitrarily Specified Input


2.------...-------,-------.-------------.

. .
1.5 -····················i·····················~······················i·····················~·····················-
-.-. --.. .
--. ..-
.
- - - .-
..-. ..-- --- --
.- -. .-. .--
. - - .
1 -······•::<··G··••:••·i··O··•!l-··O·•-e••~··G···O··G···•::C··i··O·•,e,.••O·••':,••~··G···•::C··G···•:<··•
-- -- .. --
.... ..-- .-
--. ..-
... .-
. -. --.
0 .- .
• .- .-
0.5 -··················••i••···················~················ ... •·•i• .................... ~......................

O w - - - - - - - - - - - - - - -.......·---------'-----~
0 5 15 20 25
k

17
CHAPTER 3

B-3-1, When the switch is closed, the input voltage is transmitted to the
output. Assume that the switch stays closed for a period kT ~ t < kT + Li ,
where l:,. is very small compared to the sampling period T. The transfer
function for this closed period is

--11.(tl_ Ro . 1
E(sf = Ro(R.Cs
J.
+ 1) + R. ~ -R-.C-s_+_l
J. J.

The charge up time constant RiC must be very small so that the capacitor will
be charged to voltage e(kT) almost instantaneously.

When the switch is open, the hold capacitor C will start discharging
through the resistor R0 . The output voltage will decay exponentially, but
if R0C is large compared to the sampling period T, the circuit will appear
to hold the voltage e(kT) for the time period kT ~ t < (k + l)T. Thus,

m(t) :§: e(kT) kT ~ t < (k + l)T


Hence the circuit acts as a zero-order hold.

B-J-2. The differential equation for the circuit is

RCx + X = e

For kT ~ t < (k + l)T, e(t) = e(kT) = constant. Thus, we have

RCx + X = e(kT) kT ~ t < (k + 1 )T

Taking the Laplace transform of this last equation and considering t = kT to


be the initial time, we obtain

RC [ sX(s) - x(kT)] + X(s) = e(~)


or
( ) _ 1 [e(kT) ( )] _ e(kT) RC [x(kT) - e(kT)]
Xs - RCs + 1 s + RCx kT - s + RCs + 1

The inverse Laplace transform of this last equation is

x(t) = e(kT) + [x(kT) - e(kT)] e- R~ (t - kT) kT ~ t < (k + l)T

Substituting t = (k + l)T - 0 into this last equation, we obtain the desired


difference equation as follows:

T T
x((k + l)T-) = x(kT)e- RC+ (1 - e- RC)e(kT)

18
B-3-3. For the unit-ramp input x(t), the output y(t) of the first-order
hold can be sketched as shown in the figure below. The equation for the
curve y(t) is
y(t) = (t - T)l(t - T) + Tl(t - T)
y(r)

0 T 2T 3T 4T ST ST

The Laplace transform of this last equation gives

Y(s) = _1_ e-Ts + __L Te-Ts= e-Ts 1 + Ts


s2 s s2

The Laplace transform of the pulsed unit-ramp function


00

x*(t) = L kT d(t - kT)


k=O
is
X*(s) = z
00

lt=-o
kTe-kTs = Te-Ts + 2Te-2Ts + 3Te-3Ts + • • •

Te-Ts
=------
(1 - e-TS)2

Hence, the transfer function of the first-order hold is

= Y(s) = e-TS(Ts + l)/s2 =


Ts+ 1
X*(s) Te-TS/(1 _ e-TS)2 T

B-3-4.

L Residue method:
X() X(s)z
z = [ residue of -----'-T_s_ at poles=
z - e
-1]
+ [residue of
X(s)z
at poles= -2]
z - e Ts

19
=
s
lim
-+ -1
[(s + 1)
s + 2
(s + l)(s + 2) z - e
z
Ts ]
+ lim
s ...,.. -2
[<s + 2)
s + 3
(s + l)(s + 2) z - e
z
Ts ]
2z z 2 1
= =
-2T -2T z -1
z - e -T z - e 1 - e -T z -1 1 - e

-T( -T) -1
= __l_+_e__~l_-_2_e_~z_ __
( 1 - e -T z -1)( 1 - e -2T z -1)

2. Method based on impulse response function:

s + 3 2 1
X( s ) = ~(_s_+_l~)~(~s_.c..+_2~)- = _s_+_l_ s + 2

The inverse Laplace transform of this e~uation gives

x(t) = 2e-t - e -2t


Hence
2 1
X(z) = - - - - -
-T -1 -2T -1
1 - e z 1 - e z

B-3-5.
- -
X( s) = --,-(s-+-a~)~(s-+-b-)-

1. Residue method:

X(s)z
X(z) = [residue of at poles = a]
Ts
z - e

+ [residue of
X(s)z
z - e
Ts
at poles = - b]
K
= lim [cs + a) (s + a)(s + b) z eTs ]
s --a z -

+
s
lim
-o- -b
[<s + b) K
(s + a)(s + b) z - e
z
Ts ]
K z K z
= + -bT
b - a -aT a - b
z - e z - e

=
b - a
K
( 1 - e -aT z -1
1
1 - e
1
-bT z -1 )
20
2. Method based on impulse response function:

Hence

X(z) = b ~a (
1 - e
l -aT
z
-1 -
1 - e
1- bT -1 )
z

B-3-6.
-Ts 1
X(s) = 1 - e
s

X(z)

1 1
s + a a

1 1
2 -aT -1
a 1 - e z

B-3-7,
y(k + 1) + 0,5y(k) = x(k), y(0) = 0
The z transformof this equation is

z
zY(z) - zy(0) + 0.5Y(z) = X(z) =---
z - 1

Solving this equation for Y(z), noting that y(0) = 0, we obtain

() z • 1 z 1 z
y z = (z + o.5)(z - 1) = - 1.5 z + 0.5 + 1.5 z - 1
Hence

y(k) = - 11. 5 (-0.5) k + 11_5 = J2 [ 1 - (-0,5) k]

Computational solution with MATLAB;

21
»% MATIAB Program for Problem B-3-7
»
»%-----Unit-step response ---
»
»num = [O l];
»den= [1 0.5];
»x = ones(l,41);
»v = [0 40 0 1.2];
»axis(v);
»k = 0:40;
»y = filter(num,den,x);
»plot(k,y ,'o')
»grid
»title('Unit-Step Response')
»xlabel('k')
»ylabel('y(k)')

Unit-Step Response
1.2...---....----.----..---.--------------..-----,
.

- - . .
1 -o ......... ~· ............ ·:· ............ ·:· ............ ·:· .............~ ............. ~ ............ ·I· .......... ·-
....
..
..- .-
.-
.-
.-
..- --
.-
..-
-.
• - ■ • • • -

. ..,
. - .
- -
0.8 -···········;············;············~·············~·············~·············~·············~·············
o : : : : ; : :
? O O O O $ 0 0 0 0 $ 0 0 0 0 $ 0 0 0 0 ¢, 0 0 0 0 $ 0 0 0 0 ¢, 0 0 0 0 ·~
~ 0.6 -········9·t············(···········-(···········t·············~···········--~·············(··········-
0 .: -
:-
. .: - - .:
. .: . :. :. .
0.4 -···········;·············~·············~·············~·············~·············~·············~············-
- --.
...
...
.-
.-
.. .... - .
.-
..- ..--. .-
...
. . - . .
0.2 l-••·········~··············~·············~·············~···········••i••···········~···········••i••··········-
: -
:
:
; ; ;
0
0 5 10 15 20 25 30 35 40
k

-----------------------------------------------------------------------------
B-J-8.
y(k + 2) + y(k) = x(k), y(k) = 0 fork< 0

22
Since x{k) is a unit-step sequence, we have

X{z) = z ~ 1

The initial data are

y{O) = x(-2) - y(-2) = O, y(l) = x(-1) - y(-1) = 0


Hence
z
z - 1
or
-1
y (z) = - ~ l_ _ _ _z__
z2 + 1 z - 1 = -+( 1 + z
1 + z
-2
1
1 - z -1
)
from which we obtain

Y{k) = - +( cos k f + sin \'lt - 1) k = O, 1, 2, ...

Computational solution with MATLAB:

»% MATI.AB Program for Problem B-3-8


»
»%-----Unit-step response-----
»
»mnn == [O O 1];
»den== [l O 1];
»x = ones(l,41);
»v =[O 40 0 1.2];
»axis(v);
»k =0:40;
»y =filter(num,den,x);
»plot(k,y ,'o')
»grid
»title('Unit-Step Response')
» xlabel('k')
» ylabel('y(k)')

23
Unit-Step Response
1.2

- - . . . .
1 .. -0-G· • •• ·:· ·0 ·0 • •• •• ·1'?·0 • •• • • ·G· S,·· •• •• -0- El-·:···· ·0 ·0 • ···:· ·O·O • • •• • • ?· O·· •• •• -0 ?· •• • • • ·0 ·0-
. . . . - - .
.. .. .-. .-- .. ..- .-
• • ■ • - - -

..- ..
- .
. -- .-
. .. .-
0.8 .
.. ·········-······· - - . . .-
.................................................................................................. .

2 0.6 ··········••:••············=·············-=··············=··············=··············=············•·:'•···········
~ .
--.
... ..-
- .
--. .---. ... .-
..
-. .. . - .- .-
. . . . .
-- . - .. .. .. .. --
0.4 ........... .:..............................
.. . :-...............:. ............. :.- ............. .; ............. .; ............ .
..- -.. ..
--
.-
-. ..- .
..-
..- -- -. - . .
.- .- .- -- -. .-- ..-
0.2 . . .... . .. .. -:·- ........... -·:·. ............ ·:·- ............ ·:-- ............ ·:-. ............ ·:. ............. .: ........... .
.. ... ... .. .. ... ..
-
..- ..- .. ..- ..- .. -
...
.- .- .- .. .- .. -
. . . . .
01!:
0 5 15 20 25 30 35 40
k

B-3-9.
y(k) - ay(k - 1) = x(k) -1 <a< 1

The z transform of this equation is

Hence
y ( z) = _X_,_(z.. . . ,_)___l_
1 - az
Then
G(z) = ~ = l
~ 1 - az -1

and the weighting sequence g(k) is given by

g(k) = ak

If two systems which are described by the given difference equation are
connected in series, then the weighting sequence g0 (k) of the resulting
system can be obtained as the inverse z transform of

or

24
B-3-10. The z transform of the given difference equation is

from which we get

G(z) = Y( z) = ---=l:.........:...+_;z=---l_ __
X(z) 1 - z-l + 0.24z- 2

8 ?
= ---=----
-1 -1
1 - o.6z 1 - 0.4z
Hence, the weighting sequence g(k) is

g(k) = 8(0.6)k - 7(0.4)k

For the unit-step sequence input we have

X(z) = _ __;:;l__
1 - z -1

and the output Y(z) becomes

Y(z) = 1 + z -1 1
-1 + 0.24z -2
1 - z 1 - z -1
14-
-- 1 12 25- 1
+-
3 1 - o.4z -1 1 - o.6z -1 3 1 - z
-1
Thus,

where k = O, 1, 2, ....

Computational solution with MATLAB:

»% MATLAB Program for Problem B-3-10


»
»% ----- Unit-step response ---
»
»num = [1 1 O];
»den= [1 -1 0.24];
»x = ones(l,41);
»v = [O 40 0 10];
»axis(v);

25
»k = 0:40;
»y = filter(num,den,x);
»plot(k,y ,'o')
»grid
»title('Unit-Step Response')
» xlabel('k')
» ylabel('y(k)')

Unit-Step Response
10..---..-------....----.-----.-----.---.-----.

: o (i-, o o o o o o o o o 6 o o o o 6 o o o o 6 o o o o o o o o o 1D
8 .............. l•,:;-a-•O····t····· .. ·····-r············-r·············~·············~·············~············-
0 : ...- --.
.
..
-.
..
.- ...
.
.-...
--
. .. .. -. .. .- .
6 t---••·· .Q. ··-~---···
. ••••••••; .••••••••••••; •••••••• ····-~-- ••••.•••••• ; ........................ ~. •·•••• • ., ..... ; •••••••••• ··-
- . . . . .
..
.. . ■
.. -
-. -

.. - ■

.-
..
-.
..
. . ..
. ..
- ..
- - ■
. -

...
0 -.. -.. .. -.. ..
. -..
4 ............. ~·············~·············~·············?·············?·············?·············i············-
.. . ... --
.-.
... ... ..
-.
..-. ..
0 .. -... .-- .
.. .. .. ..
.- .. .. -. .. .. ..
2 ~ .......... --~- ■ ·=· ..............; ..............;............. -~ ...............;.............;... ■
•••••••••• - ........ ·-

I~

0 . . . .
0 5 10 15 20 25 30 35 40
k

B-3-11.

where

X(z) = -1 --
1 - z-l
The output Y(z) is given by
-1
Y(z) = 1 - 0,5z 1
( 1 - 0 . Jz -1)(
. +
1 0 . ?z -1 ) 1 - z -1

26
Hence
__i_ k 42 k 50
y(k) = 35 (0.3) + 735"° (-0.7) + 119

Computational solution with MATLAB:

»% MATLAB Program for Problem B-3-11


»
»%-----Unit-step response-----
»
»num = [I -0.5 0];
»den= [I 0.4 -0.21];
»x = ones(l,41);
»v = [O 40 O 1];
»axis(v);
»k=0:40;
»y = filter(num,den,x);
»plot(k,y ,'o')
»grid
»title('Unit-Step Response')
» xlabel('k')
»ylabel('y(k)')

Unit-Step Response
1---------~----.-----.---------,.----T"------,

- - . -
0.8 -···········~··············~·············~·············~·············~·············i·············!············-
..

-. -
- - • • • •

.. . --.

.
..
- - - • • •

- . .- .. -
0 : : : : : : :
0.6 -···········~··············(
- ...............;-.............;. .............;.............. ;. ............. .; ............-
0: :- :- :- :
-
:- :-
: 0 : : : : : :
. 0 . . . . . .
0.4 -· ...........~. .........
0 0 .2
.
.a .?..o5!. 9.~.9.
.
.9.R.9S!
.
.9..9..9. 9.\'
.
.? .9..9. .9.9.. R.9. .9..9.!?.R.Q
.
.9. .9.J.)
0. : :. :- : :- :-
.. ... -. -- .-- .
. -.
0 : : : : : : :
0.2 - -
i,... • • • • • • • • • • • ~- • • • • • • • • • • • ••; • • • • • • • • • • • ••; . • • • •• • . . . . . . . ;
-.. ...
• • • • • •• • • • • • . ; • • • • • • • • • • • • -~ · - • • • •• • • • • • • ; • • • • • • • •• • · · -

..-. .. .-. .-.. ..


--.
0. -. -

.-
- . -.
- •
.-

--
• - ■

-. . - .- -.. ..
0-----··_ _ _;_ ____.·_ _ _.....
· _ _.......· _ _ _:____ . _ ___,
- • • ■ •

0 5 10 15 20 25 30 35 40
k

27
B-3-12.
1 1 1
Y(s) = (s + l)(s + 2) X*(s) = ( s + 1 - s + 2 )X*(s)

By taking the starred Laplace transform of this last equation, we obtain

1
Y*(s) = ( s+l 1
)*X*(s) - ( s+2 )*X*(s)
Hence

Y(z) = J[ ! s 1 ] X(z)

Since
X(z) = - - - 1- = -
1 - z-l
we have
1 1 1 1
Y(z) = - - - - - = -
1 - e -T z -1 1 - z
-1
1 - e
-2T -1
z 1 - z
-1

-T 1
e 1 1
= --=---
-T -1 + -T -1
e-T - 1 1 - e z 1 - e 1 - z

-2T
e 1 1 1
e-2T - 1 -1
1 - z
Hence
-T
y(kT) = -Te
e - 1
For T = 0.1 we have

y(k) = - 9,508J(0,9048)k + 4.5167(0.8187)k + 4,9917

B-3-13.
3 2
H(z) = o.5z + 0.4127z + o.1747z - 0.0874
z3
= 0.5 + o.4127z-l + o.1747z- 2 - 0.0874z- 3
Hence
h(0) = 0,5
h(l) = 0.4127
h(2) = 0,1747

28
h(3) = -0.0874
h(k) = 0 fork= 4, 5, 6,
Noting that
u(k) = 1 fork= 0, 1, 2, ...
and
k
y(k) = I: h(k - j)u(j)
j=O
we have
0
y(O) = L h(O - j)u(j) = h(O)u(O) = 0.5 x 1 = 0,5
j=O
1
y(l) = L, h(l - j)u(j) = h(l)u(O) + h(O)u(l)
j=O
= 0,4127 X 1 + 0,5 X 1 = 0,9127
2
y(2) = L h(2 - j)u(j) = h(2)u(O) + h(l)u(l) + h(O)u(2)
j=O
. = 0.1747 X 1 + 0,4127 X 1 + 0,5 X 1 = 1.0874
3
y(3) = L h(3 - j)u(j) = h(3)u(O) + h(2)u(l)
j=O
+ h(l)u(2) + h(O)u(3)

= -0,0874 X 1 + 0,1747 X 1 + 0,4127 X 1 + 0,5 X 1


=1
4
y(4) = .L h(4 - j)u(j) = h(4)u(O) + h(3)u(l) + h(2)u(2)
j=O
+ h(l)u(3) + h(O)u(4)

=0 X 1 - 0,0874 X 1 + 0,1747 X 1 + 0,4127 X 1


+ 0.5 X 1 =1

y(k) = 1 fork= 5, 6, 7, ...

29
B-3-14. Since
00

Y*(s) = - 1- ~ G(s + j tu sk)X*(s + j uJ sk)


and T
k=-!70
r:,()

X*(s) = - 1-
T
Z X(s + j tv sh) + _!_ x(O+)
2
h=-c»
we have
X* ( s + j aJ sk) = ~ z"° X(s + j Wsh + j Wsk) + l x(O+)
2
h=-oo
By letting h + k = m, we obtain
0,,

X* ( s + j tt) sk) = ~ I: X(s + j (,,t) sffi) + _Lx(O+) = X*(s)


2
m=- oo
Substitution of this last equation into the expression for Y*(s) gives
CIO

Y*(s) = _!_
T
Z G(s + j lVsk)X*(s)
k=- oo
Since G*(s) can be given by
00

G*(s) = _!_
T
Z G(s + j aJsk)
k=-ClO
we obtain
Y*(s) = G*(s)X*(s)

B-3-15. From Figure 3-67 we obtain

C(s) = G(s)E*(s)
E(s) = R(s) - H2 (s)M*(s)
M(s) = H1 (s)G(s)E*(s)
By taking the starred Laplace transforms of the preceding equations, we
obtain

C*(s) = G*(s)E*(s)
E*(s) = R*(s) - H2*(s)M*(s)
M*(s) = [GH1 (s)]*E*(s)
Hence
E*(s) = R*(s) - H2*(s) [ GH 1 (s)] *E*(s)
or
R*(s)
E* ( s ) = -----'-'-"--- --
1 + H2* ( s) [ GH1 ( s ~ *
and

30
Thus,

or

B-3-16.

-a)
( - e
K ( 1 - e -aT) z -1 _ _JLl z -1 (T = 1)
= a 1 - e-aT z -1 - a 1 - e -az -1
Then
C(z) _ G( z) _ K( 1 - e z -1
-a)
R(z) - 1 + G(z) - a + [ K _ (K + a)e -aJ z -1

B-3-17.
C(s) = G2(s)M*(s)
M(s) = G1 (s)E*(s) - G2(s)M*(s)
E(s) = R(s) - H(s)G 2(s)M*(s)
Hence
M*(s) = G1*(s)E*(s) - G2*(s)M*(s)
E*(s) = R*(s) - [HG (s)l*M*(s)
2 -
Thus,

or

G1*(s)R*(s)
M*(s) = -------==---------
1 + G1*(s) [HG 2(s)]* + G2*(s)
Since
C*(s) = G2*(s)M*(s)
we have

31
G1*(s)G 2*(s)R*(s)
C*(s) = - - - - - - - - - - - - -
1 + G1*(s) [ HG 2 (s)J * + G2*(s)

or
G1 (z)G 2 (z)R(z)
c(z) = 1 + G1 (z)HG 2 (z) + G2 (z)

The continuous-time output C(s) can be given by

Thus

B-3-18.

Since T = 1, we have
-1
Kz
G(z) = - - -
1 - z-l
Hence
Kz-l
= --------=-
1 + (K - l)z:-l
Since
1
R(z) = - - -
1 - z-l
we have

C(z)

1 + - - 1_ _
1 + (K - l)z-l 1 - z-l

The inverse z transform of C(z) gives


k
c(k) =- (1 - K) + 1
The output sequence c(k) will converge to 1 if O < K< 2. Otherwise, c(k)
approaches infinity ask approaches infinity.

32
Continuous-time output c(t): From Figure 3-70 we have

C(s) =( ! 1 -se-Ts) E*(s)

E(s) = R(s) - C(s)


Thus
E*(s) = R*(s) - C*(s)

or
R*(s)
E*(s) = -----'-'--'--- --
1 + (-!-
_l_-_s_e_-_Ts ) *

Hence
-Ts
1 - e
K
C(s) = _ _ _ s _ _ _s_ _ _ _ R*(s)
l+ ( l~/·! -Ts)*

Since

by substituting z = eTs = es into this last equation, we obtain

* = _K_e_-_s__
)
1 - e-s
Therefore,

C(s)

= zK [ 1 - Ke -s + K(K - l)e -2s - K(K - 1) 2 e -3s + • • • ]


s
The inverse Laplace transform of this last equation gives

c(t) = Kt - K2 (t - l)l(t - 1) + K2 (K - l)(t - 2)1(t - 2)

- K2 (K - 1) 2 (t - 3)1(t - 3) + • ft ~

B-3-19. Since T = 1, we have

G(z) = i[
33
-1 -1 -1 -2 -2
e z - 2e z + z
=
( 1 - z -1)( 1 - e -1z -1)
Hence
C(z) = G(z) =
R(z) 1 + G(z)

For a Kronecker delta input


R(z) = 1
Hence
C( z) = _z_-_1__,(_e_-1_-_2e_-_1_z_-_
1 _+_z..,,..-1~)~ = z -l ( 0 . 3679 + 0. 2642z - l)
1 - z-l + (1 - e- 1 )z- 2 1 - z-l + 0.6321 z- 2

+ 0. 7250z -1 ( 0 .6182z -1 )
-1 6 -2
1 - z + 0. 32lz

The inverse z transform of this last equation gives


c(k) = 0.3679 (o.7951)k-l cos(0.8907(k - 1))

+ 0.7250 (o.7951)k-l sin(0.8907(k - 1))

Notice that
c(O) =0
c(l) = 0.3679
c(2) = 0.6321

c(3) = 0.3996

B-3-20. From Figure 3-72 we obtain


C(s) = G(s)E(s)
E(s) = R(s) - B(s)
-Ts
B(s) = 1- e C*(s)
s
Thus
1 - e-Ts
C(s) = G(s) [R(s) - B(s)] = G(s)R(s) - G(s) s
C*(s)

34
Hence

or
C*(s) = [aR(s)] * - [G(s) l -: -Ts r C*(s)

[GR(s)] *
C*(s) =
J
----=---"'-------

1 + [ G( s) 1 - s e -Ts *

Note that for T = 0.2 we have

-1 ~j 1 ] 0.181Jz-l
= (1 - z ) .0 [ s(s + 1) = -l---0-.8"-1-87-z--l-

and

or
GR(z) = _ _ _ 0.181Jz-l
_ .....=;,.._ _ _ __

(1 - z- 1 )(1 - 0.8187z- 1 )
Hence
= 0.181Jz-l
C(z)
1 - l.6375z-l + 0.6375z- 2
= 0 .181Jz -l + 0 .2968z - 2 + 0 .3705z - 3 + 0 .4174z - 4 + • • •

The final value c(oo) can be obtained as follows:


c( oc) = lim
z -1

B-3-21.

c(z) = G(z)M(z)

= G(z) KI _1 R(z) - G(z) [ KI -l + ~ + ISJ(l - z -l)] C(z)


1 - z 1 - z

Thus

35
B-3-22.
1. Direct programming: The z transform of the given difference equation
becomes

Thus

- - - - - - - Y(i)

2. Standard programming:

* = b 1 + b 2z
-1

-------------iI],--
X{z.)

J. Ladder programming:

___1__(_tl__
~= l+

36
-- A0 +
Bz + 1
1

where

1
Bl= b2 - albl

b2 - albl
A =
1 a b1
2 + a1
b2 - albl

B2 =-

-1
--~b2- ---albl + bl

a2bl + al
b2 - albl

37
B-3-23.
Series scheme: -1 -1
1 + 0.lz 1 + z
G(z) = 2 -1 -1
1 - 0.2z 1 + o.6z

Parallel scheme:

G(z)
+
= - __j_ - - - - - - + ___2_ __
9
3 1 + o.6z-l 1 - 0.2z-l

Ladder scheme:
2z 2 + 2.2z + 0.2
G(z) = 2
z + 0.4z - 0.12

38
+

-----------------------------------------------------------------------------
B-3-24. From Figure 3-63, we have
V(z) = ~ (1 - z-l)x(z)

When the input x(k) is a unit-step sequence,


1
X(z) = . l
1 - z-
Hence,
V(z) = __!_ (1 - z-1) 1 1
T 1 - z-l T
The inverse z transfonn of V(z) gives
v(O) = __!_
T

v(k) = 0, k = 1, 2, 3, ...
The output v(k) versus k is shown below .

..L
T

0 i 2 3

39
B-3-25. From Figure 3-73 we have
Y(z) T
=
X(z) 1 - z-l
or
Y(z) =T X(z)
1 - z-1
Note that in Problem A-2-4 we showed that

1
1 - z-1 X(z)

Hence

Y(z) = - 1- __
Tz__-1- X(z) = T ; } [lo x(hT)]

The inverse z transfonn of this last equation gives


k
y(kT) = T L x(hT)
h=O
= T[x(O) + x(T) + • ,, 0 + x(kT)]

Thus, y(kT) approximates an area made by the input. [Note that y(O) is Tx(O).J
The system acts as an integrator.
When the input x(kT) is a unit-step sequence,
y(kT) = T[x(O) + x(T) + • • • + x(kT)]
= T(l + 1 + • ~ .. + 1) = T(k + 1)

A plot of the output y(kT) versus kT is shown below.

3T 0

2T 0

0 T kT

B-3-26. From Figure 3-74, we obtain

40
Y(z)
X(z) = T ( 1 - z-1
z-1
)

Hence,
Y(z) = T z-l X(z)
1 - z-l
In Problem A-2-4 we showed that

Hence,
Y(z) = T _
_.;;z;;._-_l_ X(z) = T ~. [~l
z-1
1 - 0 L-.,
h=O
The inverse z transfonn of this last equation gives

y(kT) = T rLk-1

-h=O
= T[x(O) + x(T) + • • ~ + x((k - l)T)]
or
y(O) =0
y(T) = Tx(O)
y(2T) = T[x(O) + x(T)]
y(3T) = T[x(O) + x(T) + x(2T)]

The output approximates the area made by the input. The output y(kT) versus
kT when the input x(kT) is a unit-step sequence is shown below.

2T

0 T 2T

41
B-3-27. From Figure 3-75 we obtain

Y(z) _ l(_ 1 +
X(z) - 2 \1 - z~l
Hence,

Referring to Problem A-2-4, we have

Y(z) = ~ [ 7J [ lo
k ~
x(Irr)J + 'J' 1
lk-'-1 -,
x(Irr)J
1
j
The inverse z transform of this last equation gives

y(kT) = ~ [ E_ x(hT) + ~
x(hT)]
h=O h=O

= _!_ [x(O) + x(T) + •, • + x(kT) + x(O) + x(T)


2
+ • ·, + x( (k - l)T)]
Hence,
y(O) = ½Tx(O)
y(T) = T[x(O) + ½x(T)]
y(2T) = T[x(O) + x(T) + ½x(2T)]
y(3T) = T[x(O) + x(T) + x(2T) + ½x(3T)]

When the input x(kT) is a unit-step sequence, we have


y(O) = 0.5T
y(T) = 1.5T
y(2T) = 2.5T

y(kT) = (k + 0.5)T
A plot of y(kT) versus kT, when the input x(kT) is a unit-step sequence, is
shown on next page.

42
1(kT)

S-T

4-T

JT

2T

T

0 T 2-T 3T ?-T k.T

43
CHAPTER 4
B-4-1.
(a)

1 Re

(b)
Im.

-- .... -... ..... .....


,. ,. ' ',
/ 5'= o.S
I
/
'\
I
I
I
'\\
I \
I I
!
I
I

Re
i
I
/
I
/'
/
/
/
/
./
/

B-4-2. We shall apply the Jury stability test to this problem.

P(z) = zJ + 2.lz 2 + l.44z + O.J2

= a 0z
J + a 1z
2
+ a 2z + aJ

Thus

a = 1,
0

44
The conditions for stability are

This condition is safisfied, since lo,32] < 1.


2. P(l) >0
Since
P(l) =1 + 2.1 + 1.44 + 0,32 = 4.86> 0
the condition is satisfied.

3, P(-1)< 0
This condition is also satisfied, since

P(-1) = -1 + 2.1 - 1.44 + 0,32 = - 0.02< 0

Since
a3 ao 0.32 1
b2 = = = - 0.8976
ao a3 1 0.32

a3 a2 0.32 1.44
bO = = = - 0.768
ao al 1 2.1

the condition is satisfied.


Thus, we see that all conditions for stability are satisfied. Hence, no
roots of the characteristic equation lie outside the unit circle centered at
the origin of the z plane.

B-4-3.
~ = ----::---__::::,_1_ _ _

~ z 3 + 0,5z 2 - 1.J4z + 0.24


Define
• P(z) = z 3 + 0 ,5z 2 - L34z + 0 .24

= a 0 z 3 + a 1 z 2 + a 2z + a 3

Then
ao = 1

al = 0.5
a2 = - 1.34

45
a3 = 0.24
The Jury stability conditions are

This condition is satisfied.

2. P(l)> 0

Since
P(l) =1 + 0.5 - l.J4 + 0.24 = 0.4 > 0
the condition is satisfied.

3. P(-1) <0
Since
P(-1) = -1 + 0.5 + l.J4 + 0.24 = 1.08 > 0
the condition is not satisfied.

Since condition (3) is not satisfied (the system is unstable), it is


not necessary to test condition (4).
The conclusion is that the system is unstable.

B-4-4.

= K [e-lz-l + (1 - 2e- 1 )z- 2]


(1 - z-1 )(1 - e-lz- 1 )
Hence

~ = K [e-lz-l + (1 - 2e- 1 )z- 2 ]


~ (1 - z- 1 )(1 - e-lz- 1 ) + K [e-lz-l + (1 - 2e- 1 )z- 2 ]

Noting that e-l = 0.3679, the characteristic equation of the system becomes
z 2 - (1.3679 - 0.3679K)z + 0.3679 + 0.2642K =0
Define
P(z) = z2 - (1.3679 - 0.3679K)z + 0.3679 + 0.2642K

= a 0z 2 + a1z + a 2

Then

46
a = 1
0
a1 = - 1.3679 + 0,3679K
a 2 = 0.3679 + 0.2642K
For stability, we must have

Ia2 I< ao
P(l) > 0

P(-1) > 0
Therefore, we require

I0. 3679 + 0. 2642K I< 1


which yields

- 5,177.5 < K < 2,3925 (1)


Also, from
P(l) = 1 - (1.3679 - 0,3679K)- + 0.3679 + 0.2642K
= 0,6321K > 0
we obtain
K >0 (2)
and from
P(-1) = 1 + 1.3679 - 0,3679K + 0.3679 + 0.2642K
= 2,7358 - 0.1037K >0
we have
26.38 >K (3)
From Inequalities (1), (2), and (3), we obtain the range of gain K for
stability to be

0 < K < 2,3925

B-4-5.
P(z) = z2 - (1.3679 - 0,3679K)z + 0.3679 + 0.2642K = 0
By substituting z = (w + 1)/(w - 1) into this last equation, we obtain

(• w + l)
w- 1
2 - (1.3679 - 0,3679K) w +
w-
i + 0.3679 + 0.2642K = 0

which can be simplified to

0,6321Kw2 + (1.2642 - 0.5284K)w + 2,7358 - 0.1037K = 0

47
The Routh array becomes
2
w 0,6321K 2.7358 - 0.1037K
1
w 1.2642 - 0,5284K 0

w0 2.7358 - 0.1037K
For stability, we require

0,6321K > 0 or O<K


1.2642 - 0,5284K >0 or K < 2,3925
2.7358 - 0.1037K >O or K < 26.38
Hence
0 < K < 2,3925

B-4-6.

Since the output Y(z) is given by

Y(z) = G(z)X(z)
we have

k k
I I y(k) = L g(k - h)x(h) ~ L g(k - h)M1
h=O h=O

Since all poles of G(z) lie inside the unit circle in the z plane, the
system is stable. For such a stable system

where a is a constant, 0 < a < 1. Hence

jy(k)I~ [g(k) + g(k -1) + ••• + g(o)]M1 j

~ I (ak + ak-1 + ••• + l)Ml I


1 k+l
- a
= --1---a-- Ml

By defining

48
we have
l k+l k+l
ly(k)I~ 1--aa Ml~ M2 - ~- a Ml~ M2

Thus, the output y(k) is bounded.


------------------------------------------ -----------------------------------
B-4-7.
Stability: The system is stable if the weighting sequence g(kT) vanishes for
large k.
Instability: The system is unstable if g(kT) grows without bound ask increses
indefinitely.
Critical stability: The system is critically stable if g(kT) approaches a
constant nonzero value or a bounded oscillation for large values of k.
------------------------------------------------------------------ ----------
B-4-8.
K(z + 1)
G(z) = (z - l)(z - 0.6065)

The characteristic equation for the system is


z 2 + (K - 1.6065)z + 0.6065 + K =0
The critical value of gain K for stability can be determined easily by use
of the Jury stability criterion. Define
p(z) = z 2 + (K - 1.6065)z + 0.6065 + K
2
= a 0z + a 1z + a 2 =0
Then
a
1
= K - 1.6065, a2 = 0.6065 + K

The conditions for stability are

L la2 I< ao
2. P(l) >0
3. P(-1) > 0
Thus we require
I0 . 606 5 + K j < 1
P(l) = 1 + K - 1.6065 + 0.6065 + K = 2K> 0
P(-1) = 1 - K + 1.6065 + 0.6065 + K = 3.213 > 0

49
Hence
0 < K < 0,3935
The critical value of gain K for stability is 0.3935.
Since
( = K{z + 1)
G z) (z - l)(z - 0.6065)
we have
/G(z) =/ z + 1 - / z - 1 - / z - 0.6065
Define

The angle condition is

/Q-+ j0 + 1 - /cr-+ jlu - 1 - /o-+ jtu - 0.6065 = 180°


Hence

W C -1 u)
0-- - 1 = 180 + tan -o----0-.6~0~6~5,,_

Taking the tangent of both sid.es of this equation and simplifying, we get
U} =0 and

Thus, the root loci consist of a part of the real axis (between -1 and - OQ )
and a circle with center at cr- = -1, u) = 0 and the radius equal to 1. 7925, as
shown below,
Jw
z plane

K = 0.3935
/
✓-­
/
I
I
1.7925 I

-1
\
\
\

The value of gain K that will yield the damping ratio t of the closed-
loop poles equal to 0.5 can be determined from Equations (4-29) and (4-30).
Since Tis given as 0.1 sec, we have

50
-0,1 X 0,_54) -0.05tJ
e n = e n

i '7. = 0, l
'-=-
X u)
n
✓1 - 0, 52 = 0, 0866 t<)
n

By trial and error we find that the point that corresponds to 5 = 0.5 and
(,,J = 4 rad/sec, that is, the point for which
n
lz I= e-0.05 x 4 = 0.8187
f.3:_ = 0,0866 X 4 = 0,3464 rad= 19,847°

is on the root locus. This point is

z = e- 0 • 05 X 4 / 19,847°= 0.8187 / 19,847°

= 0.7701 + j0.2780

The value of gain K that corresponds to this closed-loop pole is found from
the magnitude condition

K(z + 1)
= 1
(z l)(z - 0.6065) z = 0.7701 + j0.2780

as follows:
K_ 0,3606 X 0,3226 64 9
- 1.7918 = o.o
When gain K is set to 0. 0649, or K = 0. 0649, the damping ratio $ of the
dominant closed-loop poles is 0.5. With this gain value, the damped
natural frequency tu d is found as

W d = l<J n ✓1 - 52 = 4 ✓1 - 0 . 52 = 3. 464

The number of samples per cycle of the damped sinusoidal oscillation is

360° = 18.14
19,847°

or 18.14 samples per cycle.

B-4-9.

Since T = 0.1 sec, G(z) becomes

51
G(z) = 0.0048J7z- 1 (1 + o.9674z- 1 ) =
0.0048 7 z + 0.9674
(1 - z- 1 )(1 - o.9048z- 1 ) z - 1 z - 0.9048

Since the number of samples per cycle of damped sinusoidal oscillation is


specified as 8, one of the dominant closed-loop poles must be on the line
having an angle of 4.5° and passimg through the origin. Thus, the desired
dominant closed-loop pole location in the upper half z plane can be deter-
mined as the intersection of the line having an angle of 4.5 c and the .5 = 0 . .5
locus. The equations for the constant> locus are

and

Hence for 5" = 0 . .5 and ~ = ¼1t'. , we have

{£; d 1
--=--

and
Iz I = exp (- 2 '7C. X 0.,5
2 81) = exp ( - 0 _1C
866 81 ) = 0.63.54
✓1 - 0 . .5

The desired dominant closed-loop pole in the upper half z plane is located at

z = 0.63,54 L!±J... = 0
o.4493 + j0.4493
In order to have a closed-loop pole at this location, we need to add a phase
lead angle of 78 . .59°. The digital controller must give this necessary phase
lead angle.
We shall choose the digital controller GD(z) to be

G ( z) = K z + o< = K z - 0 • 9048
D z+(J z+p
(Here we chose o< = - 0. 9048.) Then, from the angle condition we find that
the controller pole must be located at z = 0.1.5.54, or fJ = - 0.1.5.54. (See
the diagram next page.)

The controller Gr)(z) is now given by

G (z) =K z - 0,9048
D z - 0.1,5,54
The open-loop pulse transfer function becomes

0.0048 7 z + 0.9674
GD(z)G(z) = K (z - 0,l.5.54)(z - 1

52
jw

o .4493

0
\ 0,4493

0.1554

Using the magnitude condition, the gain K can be determined as follows:

K o.oo48J7(z + o.9674~ =1
(z - o.15.9+)(z - 1 z = o.4493 + j0.4493
or
K = 53,08
Thus, the digital controller has the following pulse transfer function:

z - 0.9048
GD(z) = 53.08 z - 0.1554
The static velocity error constant K is determined as follows:
V

1 - z-l ( 53 _08 ) z - 0.9048 (0.0048J7t(z + 0.9674)


Kv = zl:_m1 0.1 z - 0.1554 (z - 1) z - 0.9048)

= 5.98

We shall next obtain the unit-step response sequence. Since the open-
loop pulse transfer function is

(z - 0.1554)(z - 1)
the closed-loop pulse transfer function becomes

____g_(_tl__z = _.,.._ _ _o_.-:--'25,'-6,-'7__,__z_+--,--0_.___


96~7_4..,__,..----,-------,-....,......-
~ z - 0.1554) z - 1) + 0.2567 z + 0.9674

0.2567z-l + 0.2483z- 2
= --~~---------
1 - 0.8987z-l + 0.40J7z- 2

53
Since the input is
1
R(z) = --'-'---
1 - z-l
we obtain

= o.2567z-l + 0.248Jz- 2
1 - l,8987z-l + l.J024z- 2 - 0.4037z~J

= o.2567z-l + 0,7357z- 2 + l.0625z- 3 + l.1629z-4

+ l,1212z- 5 + l.0431z- 6 + 0,9898z-? + 0,9735z- 8

+ o.9803z- 9 + 0,99J0z-l0 + l.OOl?z- 11 + l.004Jz- 12 +•••

Computational solution with MATLAB:

»% MATLAB Program for Problem B-4-9


»
»%-----Unit-step response-----
»
»mnn = [O 0.2567 0.2483};
»den= [1 -0.8987 0.4037};
»r = ones(l,41);
»v = [O 40 0 1.4];
»axis(v);
»k = 0:40;
»c = filter(num,den,r);
»plot(k,c,'o')
»grid
»title('Unit-Step Response')
»xlabel('k')
»ylabel('c(k)')

54
Unit-Step Response
1.4.-----------.-----=-r-____,;;.._---.------r---,-----,

1•2 .......... o·i···········"t-··········-f"···········{··········t···········f············!············-


o : : : : : : :
} .,. • • • •• • • • • • • ~ ij·6•0 .0 .0.0• $·0·E> & '3· $·0 ·0 -0 <3- $·0·0 ·O -0- $·0·0·0 -0- $· O·O·O ·E>~ D
• • '?.-c:,. • •
: 0 : : : : : :
:: • : : : :
0.8 .......... ... ) ... ·..........~ ·....... ···..~ .......... ·..~. ······· ..... ~ .... ··.. ·... ·~···· ·..... ·.. ; ·... ··..... ·-
o j j [ j j [ j
0.6 .............. ~..............(.............. ~·············~·············i·············i·············!·············
~ ~ [ ~ ~ ~ ~
0.4 ............... ~·············~·············~·············~·············~·············i·············!·············
: : : : : ~ ~

0 -2 _'?.·········1·············-r············-r·············r·············r·············i·············1············-
= : : : : : :
0o·~----l~'----1·~--....11~'----2·~--....i~'----3......~----3~'"'.:-----'40

B-4-10. Assume that the digital controller is of proportional-plus-


integral type.

GD(z) = IC +
--p 1
~ -1
=
- z

(¾, + K1 )(z - ¾, + ~ )
=
z - 1

Noting that the sampling period Tis 0.2 sec, we obtain

G(z) = q_ [ 1 - s e -Ts 10 ]
0 (s + 1) (s + 5)

(1 -1) [ 10 ]
= - z } s(s + 1) (s + 5)

= ---.---=-0.;;.,;.1=3'-b,7;_;_2<~z~+. . .:o;. :.'. .: . .67.!. ,;o;_:_6-4-).. . ., . . ,_


(z - 0.8187)(z - 0.3679)
Hence, the open-loop pulse transfer function becomes

¾,
(~ + KI)(z - ¾,+KI )
o.1372(z + 0.6706)
z - 1 (z - 0.8187)(z - 0.3679)
Let us choose the controller zero to cancel the plant pole at z = 0.8187,
or

55
(1)

Then
z - 0.8187
z - 1
and

o.1372(z + 0.6706)
(z - 0.8187)(z - 0.3679)
Referring to the root-locus plot for this system shown on next page, the
circular locus intersects the>= 0,5 locus at point P, where

z = 0,7099 /Y+ 0

= 0.5885 + j0.3970
The number of samples per cycle of sinusoidal oscillation is

Since this number is greater than 8, the requirement is satisfied.. Thus,


point Pis satisfactory as a closed-loop pole location.
The magnitude of gain K"p + KI can be determined from the magnitude
condition.

(K"p + KI)(o.1372)(z + 0.6706)


(z - l)(z - 0.3679) =1
z = 0.5885 + jo.3970
or
(2)
From Equations (1) and (2), we have

~ = 1.1738 and KI= 0,2599

Hence the open-loop pulse transfer function becomes

z - 0.8187 0.1372 z + 0.6706


z - 1 z - 0.8187) z - 0.3 79)
-1(l + 0.6706z -1)
= 0, 1967 _ _z __,...;;;;:l_....:...;;..:.....,....;;.~__,_---=
1:---
( 1 - z- )(1 - o.3679z-)

The static velocity error constant K is obtained. as


V

-1
1 - z
0.2

= 2.599
56
jw

-0.6706

\ 0.8187

B-4-11. Let us choose the sampling period T to be 5 sec. Then

G(z) = '}tl -s•-Ts s =-:.4 ]= (1 - z-l)z-l}[s(s ! o.4)]


2.1617
= z(z - 0,1353)

The PI controller has the following pulse transfer function:

z - 1

The location of the dominant closed-loop pole in the upper half z plane may
be determined from
Iz I = exp (•- 272::5

/1 -5 2

For ~ = 0,5 and ~ = 21r/10 we have


(U
_d_ - _1__
tt)s - 10

Hence

57
I z I = exp (- 2 '7r'. x O•5 i6 \ = exp(-0 .3628) = 0 .6958
/1-0.5 2 /

Thus the desired. location for the dominant closed-loop pole in the upper half
z plane is

z = 0.6958 !...1£.= 0.5629 + j0.4090


The open-loop pulse transfer function is

2.1617
z - 1 z(z - 0.1353)

The angle contributions of the poles at z = 0, z = 0,1353, and z = 1 at the


closed-loop pole at z = 0.5629 + j0.4090 are -36.002°, -43.726°, and -136.902~
respectively. Thus, the total angle contribution becomes

-36.002°- 43.726°- 136.902°= -216.63°

Hence, the angle deficiency is 36.63°. To add the phase lead angle of
36.63° to the system, we need to choose the zero of the controller at z =
0.0127. That is, we choose

(1)

Then, the open-loop pulse transfer function becomes

z - 0.0127
z - 1 z(z - 0,1353)

and the magnitude condition becomes

z - 0.0127 2.1617 =1
(KP+ KI) z - 1 z(z - 0,1353)
z = 0.5629 + j0.4090

or
(2)

From Equations (1) and (2) we find

~ = 0.002 and K = 0.1643


I

The open-loop pulse transfer function now becomes

z - 0.0127
(z - l)z(z - 0.1353)

and the closed-loop pulse transfer function is

58
_Q_{_tl_z = --.--------.,---,--0_.=-3=59"""5'-"-z<--_0_.0_1_2_,_7.,__,__ _ _--.-_
~ z - 1 z z - 0.1353) + 0.3595 z - 0.0127)

=
o.3595z - 0.004566
-------"'-:..a...='-------="-------

z3 - 1.1353z 2 + 0.4948z - 0.004566

= ___ o_.=3=59'--=5'-z_-2_-_o_.0_0_4=-56_6_z_-3_ _ _ __
1 - 1.1353z-l + 0.4948z- 2 - 0.004566z- 3
For the unit-step input
R(z) = -1- -
1 - z-l
we have
2 3
C(z) = - - - - - - =o.3595z-
= - ' ~ -- 0.004566z-
----=---------
(1 - 1.1353z-l + o.4948z- 2 - o.oo4566z- 3 )(1 - z- 1 )

o.3595z- 2 - 0.004566z- 3
= -------=-~---'--------"------=-------
.1 - 2,1353z-l + l.6301z- 2 - 0,4994z-j + 0.004566z-4

= 0.3595z- 2 + 0.7631z- 3 + l.043l.J-z-4 + 1.1636z- 5


+ 1.1631z- 6 + l,1045z- 7 + l,0386z- 8 + 0,9929z- 9
+ 0.9733z-lO + 0,973l.J-z-ll + 0.9830z- 12 + 0,9937z- 13

+ l.0012z -14 + , . ,

B-4-12.
Wd = Wn✓ 1 - 52 = 4 ✓1 - 0,52 = 3.4641

uJ = 2 '1t = 2 ,t: = 62.832


s T 0.1
Thus

The dominant closed-loop pole in the upper half z plane is at

Iz I = exp (- 2 ·?t: x O•5 x 0 .05513) = exp(-0 .2000) = 0 ,8187


/1 - 0.52

~= 2 7t lJd = 2 it x 0,05513 = 0.3464 rad = 19,847°


ws
The PD controller has the following pulse transfer function:

59
z

The pulse transfer function of the plant is

2 -1 -1
= (0.1) z (1 + z ) = 0.005 z + 1
2
2(1 - z - 1 )2 (z - 1)

Thus, the open-loop pulse transfer function is

z + 1
2
(z - 1)
The location of the desired closed-loop pole in the upper half z plane is

z = 0.8187 /19.847°= 0.7701 + j0.2780


The total angle contribution from the zero at z = - 1, the pole at z = 0,
and the double pole at z = 1 is -270,10°. Hence, the controller zero must
contribute 90,10~. This requires that the zero be located at z = 0.7719.
That is,

(1)

The open-loop pulse transfer function becomes

z - 0.7719 (0.005) z + 1
z (z - 1)2

The magnitude condition is

z - 0.7719 (0.005) z + 1
z (z - l) 2 z = 0.7701 + j0.2780

=1
or
K_p + KjJ = 42,779 (2)

From Equations (1) and (2) we have

60
~ = 9,758 and 1<"n = 33.021

and the desired digital controller is given by

GD(z) = 42,779 z - ~· 7719

= 42.779(1 - o.7719z-1 )

The number of samples per cycle of damped sinusoidal oscillation is

360°
n = 19.8470 -
- 18.14

B-4-13. In order to increase the value of static velocity error constant


-1
Kv to 12 sec , we modify ~(z) as follows:

A Z - 0,8187 z - 0.96
GD(z) = K z - 0,1595 z - 0.99
Since the added pole and zero are close together, the closed-loop pole loca-
tions will not be changed very much. The open-loop pulse transfer function
becomes

The magnitude condition is

K (z - o.96)(0.01873)(z + 0.9356) =1
(z - 0,1595)(z - 0,99)(z - 1) z = 0.4493 + j0.4493
from which we obtain

K = 14.40
Thus
A 8 8 -1 1 - 0,96z-l
G (z) = 14.40 1 - O. 1 7z
D 1 - 0,1595z-l 1 - 0,99z-l
The static velocity error constant K is obtained as
V

1 -1 ,/\
K = lim __-_z_ GD(z)G(z)
V Z-+l T

= lim 1 - z- 1 (l4 . 40 ) (1-- 0.96z- 1)(0.01873)(1 + o.9356z-1 )


z ..... 1 0 •2 (1 - 0,1595z- 1)(1 - 0,99z-1)(1 - z- 1 )
= 12.42
-This value of K is satisfactory.
V

61
The closed-loop pulse transfer function can be obtained as

~ 1_-_____,;o...c.•..:..0_:_06;;_;6c..;;:z..:..-_
= _o_._2_6..:.,.97"--z_-_ 2 _--,-:.o..:...2..:. 4.:.:.:2:. :. :2.;: .z-_3_ _
~ 1 - l,8798z-l + l,3008z- 2 - 0.400lz-J

The unit-step response and unit-ramp response of the system can be obtained by
use of MATLAB as shown below.

»% MATLAB Program for Problem B-4-13 (Part 1)


»
»%-----Unit-step response-----
»
»num =[0 0.26crJ -0.0066 -0.2422];
»den= [l -1.8798 1.3008 -0.4001];
»r = ones(l,41);
»v = [O 40 0 1.4];
»axis(v);
»k=0:40;
»c = filter(num,den,r);
»plot(k,c,'o')
»grid
»title('Unit-Step Response')
»xlabel('k')
»ylabel('c(k)')

Unit-Step Response
1.4.----...----r------.-----------------
. - . . .
1.2 -········R·~············f ············+············+·············~·············~·············:·············
0 :0 : : : : : :
I -···········~·····9.o.o.$.~.?..9.R.$.~.9..9..9.~.\=!.o..o..o.½.Q.O..o..o.,;,.o.o.a.o.~.o.o.a.o.J~
- . - - .
-.
.. - • ■ •
. • ■

. ..

-
. ..

-
. •


- .
-


..


. ..

• •

0.8 -········ ... ~..............~ .............~ .............~ ............. ; ............. ; ............. :.............
~ O i i ! i ( ( i
1:( : : : : : : :
0.6 1-·· ·········~········· ····~····· •••••••• ~ ••••• ········~·· ........... ~ ............. ~ ••••••••••••• ; ......... • ··-
..-
. -..- ..- .-
..
.
...
-
.-. ...
- .. - ... - .
0.4 ............... ~.............. ~. ..............~ .............-~·············~········ .. ···~·············!············-
.. ..
0
-... --
-
.-
-
..
-
.--- -- --
0.2 ..... · ........ -~......... -....[. ··-..........~ -............ ~ .............~ ............. ~ ............. \.............
..

..
..
-- ■

.. •
-. ■

..- -- - -

.. . - .- - .- .-
Oe---_,;____.,_·_ ___,;____.,_·_ ___.:____.,_·_ ___.·"------'
0 5 10 15 20 25 30 35 40
k

62
»% MATLAB Program for Problem B-4-13 (Part 2)
»
»% ----- Unit-ramp response ---
»
»mun= [0 0.2697 -0.0066 -0.2422];
»den = [1 -1.8798 1.3008 -0.4001];
»v = [0 50 0 10];
»axis(v);
»k =0:50;
»r =[0.2*k];
»c = filter(num,den,r);
»plot(k,c,'o' ,k,c,'-' ,k,0.2*k,'--')
»grid
»title('Unit-Ramp Response')
» xlabel('k')
»ylabel('c(k)')

Unit-Ramp Response
10...-----....-----....-----....-----....------:..

8 ····················:-----······ . ·········-=······················:·····················

6 ........................ .!··· .. ·················-::.···· .................... .


.. ..
.. ...
. .
... ...
.
4 ·········· ............. :......................... • ······································· .
. -....................... .

. . .
2 -···············-::··
... . •·••······ . ········?···········
... ............ -:,-·,-·-··············
..
..
..
..
..
.
..
.
.. .. ..
0•1'1111:'o,,a::::_ _ _.,___ _ _ _.,__ . _ _ _ _.,__ . _ _ _ _.,__ .. _ _ ___.
0 10 20 30 40 50
k

63
B-4-14.

G(z) = 't[KG(sl] = ~ [1 -:-Ts s(s ~ 10)] = (l - z-1) v-[sz(s K+ 10)]

= 0,01 K
0,2642z- 2 + O.J679z-l = 0,t679 KJz + 0,7181)
(1 - z-1)(1 - 0.3679z-l) 100 z - 1 (z - 0.3679)
Since T = 0,1, we have

1 + ½Tw 1 + 0.0_5w
z = ----.-- =
1 - ½Tw 1 - 0.0_5w
"
Then, G(w) becomes as follows:

0.3679 K ( 11 + 0,05w + 0.7181)


- 0.0_5w
G(w) = ( 1 + 0,0_5w
- 1)( 1 + 0,0.5w - 0.3679)
lOO 1 - 0.0_5w -; 1 - 0 ,0_5w j
= 0,1 K(l - 0.0_5w)(0.0082w + 1)
w(0.1082w + 1)

1 1
0.1 K (l - 20 w)( 121,94 w + l)
=-----------"-----
w( 9.2t21 w + l)

The Bode diagram of G(j JI) with K ::i: 1 is _shown below. At J/ = .5 rad/sec
the phase angle is -13oc and the magnitude le(j.5)1 is -34,8 dB. Hen~e, to
obtain the phase margin of _50°, we need to increase the magnitude of G(j.5)
by 34,8 dB. (That is, the entire magnitude curve must be raised by 34,8 dB.)
20 r---,---,----,---,-,--r----.......,..---"T-:---,---,----r------,----,
I

1
!. '
dB ' •
i

I l i:
! •
'i
: :. i

-80 t----'-----'----+----'--,--+--+--"~-------'-+-----'---1 -180"'


I.
I

;.__ _ _ _ _..........______I_______._ _ _ _ _ _ ....L.-_ _ ___, -2700


0,1 1 .5 10 100 )/

64
Thus, we require that the gain K be set such that

20 log K dB= 34.8 dB


or
K = 55.0
With this gain value, the gain margin is 13 dB, The static velocity error
constant K is obtained as
V

Kv -_ 1im
. .~() _ 1 .
"""w - im w
5.50(1 - o.05w)(o.0082w + 1) _ 5 50
w(0.1082w + 1) - '
w -o w --o

B-4-15.
1 - e -Ts K ] -1 K
G{z) =J [ s s{s + 0,5) = (1 - z ) l' [ s2{s + 0,5)
]

=K 0.004918z-l + 0,004836z- 2
(1 - z-1 )(1 - 0,9512z- 1 )

z + 0.9835
= 0.004918 K (z - 1)(1 - 0.9512)

Noting that T = 0.1 sec, we have


1 + ½Tw 1 + 0,05w
z = 1
1 - 2TW
= 1 - 0,05w
Hence
K ( 1 + o.o 5w + 0,9835)
G{w) = 0,004918 _ _ _ _ _ l_-_O_.o-=5'-:w_ _ _ _ _ __
( 1 + 0,05w _
\1 - 0,05w
+ 0,05w _ 0 , 9512 )
1 - 0,05w
i)(l
1 1 )
2K{l - 20 w)( 1 + 2404 w
= 1
w(l + 0,5002 w)

Assume that the controller GD(w) has the unity gain at w = O, or

~(o) =1
-1
Then, using the requirement that K
V
= 20 sec , we determine gain K.

Kv = lim -wc;D(w)G(w)
w -+- 0

2K(l - -½a w)(l + 2to4 w)


= lim
1
= 2K = 20
w -+ 0 w(l + 0,5002 w)
Hence
K = 10
65
A Bode diagram of
1 1
20(1 - 20 w)(l + _2_40_4_ w)
G(w) = - - - - - - - - - - -
w(l + -0-.5-~-o--=-2- w)

is shown below.

dB

60

40

20

-20

-40

-270°
0.01 0.1 1 10 100

By use of the conventional design technique, we find that the following lag-
lead network will satisfy the requirements:

1
(1 + o\s w) (1 + o3 w)
Gn(w) = - - - 1 - - 1
(l + 0.01 w) (1 + 4 w)

The gain crossover frequency is J/ = 2,3 rad/sec. The phase margin is


approximately 53° and the gain margin is 18 dB.
Next, we transform GD(w) into GD(z). Since
2 z - 1
w=------= 20 ~
T z + 1 z + 1

66
we have
1
( 1 + o.08 z - 1)(1 + 'o3
20 z+l 1 20 z+l
z - 1)
G (z) =
D (1 1 z - 1)( 1 20 zz +
- 1)
+ 0.01 20 z + 1 1 + T 1

= 0.8572

Noting that
() 49 8 z + 0,9833
G z = O.O 1 (z - l)(z - 0,9512)
we have
' 83=3~)----.--
r~ (z )G( z) = o . 0421_6 --,--~(_z---0--:-•_,,.99~2-0~)(~z...,..+.,..,.....,o'""'9,.....
-D (z - o.999o)(z - o.6667)(z - 1)
The characteristic equation of the closed-loop system is

(z - o.999o)(z - o.6667)(z - 1) + 0.04216(z - o.992o)(z + 0.9833)

=0
This is a third degree equation. One root is located near z = 0.999. The
other two roots are obtained from
z 2 - 1.6245z + 0.7080 =0
Thus, the dominant closed-loop poles, which are the roots of this last equa-
tion, are located at

z = 0 .812 ± jO. 220 = 0. 841 / 15.2 °

Hence, the number of samples per cycle of damped sinusoidal oscillations is

3600 -
15.20 - 23.7

B-4-16. For T = 0.1 sec, we have

G(z) = if [ 1 -.. -Ts (s + 15(s + d= (l - • -l) 1 [scs + 1f(s + 2)]


_ 0.0226 z + 0.9061)
- z - 0.9048 z - 0.8187
Using the transformation

z = 1 + ½Tw = 1 + 0,05w
1 - ½Tw 1 - 0.05w
we have

67
0 02263 ( l + o.o 5w 0 9061)
G(w) = - - -•- - ' -_ 1 - 0.05w
_.,.___+_ _• _ _ __
( 11 + 0.05w - 0.9048)( 1 + 0.05w - 0.8187)
- 0,05w 1 - 0.05w

2.500 (1 - --½o w)(1 + ~ w)


=
( 1 + w) ( 1 + 1. ~94 w)

-1
Notice that in order to have the static velocity error constant Kv = 5 sec
we need the controller GD(w) to include an integrator.
Using the conventional design approach, we find the following GD(w) will
satisfy the requirements that the phase margin be 60°, the gain margin be not
less than 12 db, and K be equal to 5 sec- 1 .

a;
V

GD(w) = +l 1 + w J{_
1 +1 w )
\1 + 0.01 w}\1 + 10 w

Then the open-loop pulse transfer function becomes

_ 5 (1+~w)(1--½o-w)(1+~w)
- w (1 + o\1 w) ( 1 + io w)( 1 + 1. ~94 w)
From the Bode diagram of GD(w)G(w) (see next page), we find the phase margin
to be approximately 60° and the gain margin to be approximately 22 dB. The
gain crossover frequency is )I= 0.5 rad/sec. The phase crossover frequency
is J,/ = 3.5 rad/sec.
Next, using the following transformation:

we obtain GD(z) as follows:

2 (1 + -1:._
0.1 20 ~
z +) 1( 1 + 20 ~
z + )1
20 ( zz +- 1)( 1 z - 1)( l z - 1)
1 l + 0.01 20 z + 1 l + 10 20 z + 1

(z + l)(z - o.99oo)(z - 0.9048)


= 0.07035
(z l)(z o.999o)(z 0.3333)
The digital controller GD(z) defined by this last equation satisfies all the
requirements of the problem and is, therefore, satisfactory.

68
0.01 0.1 0.5 1 3.5 10 50
J)

B-4-17. Noting that T = 0.1 sec, we have

G(z) K(2s + 1) ]
s(s + 1)(0.2s + 1)

= (1 - K(2s + 1) ]
2
s (s + 1)(0.2s + 1)
(z - o.9512)(z + 0.832~
= 0,0419 K (z - l)(z - o.9048)(z - 0~65J~

Using the transformation


1 + ½w 1 + 0.05w
z = 1 - ½Tw
=
1 - 0.05w
we obtain
K ( 1 + 0 •05w - 0 . 9512)· 1 + 0 •05w + 0 . 8 328)
1 - 0,05w 1 - 0.05w
G(w) = o.0419 ( i + 0,05w _ 1
0,05w
)(1
+ 0,05w _ 0 9048
1 - 0.05w •
)(1
+ 0,05w _ 0 6065 )
1 - 0.05w •

69
=
K (1 - -½o w)(1 + ~ w)(1 + ill:z w)
w(l + w)(1 + 4: 90 w)

Asswne that the digital controller GD(w) to be designed here has the low-
frequency gain of unity, or

-1
The requirement that the static velocity error constant be 10 sec deter-
mines the value of gain K,
K = lim wGD(w)G(w) = K = 10
V
w -+- 0
Thus
K = 10
A Bode diagram for the following G(w) is shown below.

10 (1 + ~ w)(1 - -½o w)(1 + ill:z w)


G(w) =
w(l + w) ( 1 + 4: 90 w)

dB

20

-20

-40

0.1 1 10 100

70
Using the conventional design approach we find the following GD(w) will
satisfy all the requirements of the system:

Noting that
2 z - 1 z - 1
w=---=20--
0.1 z + 1 z + 1
we obtain

_ 0 6748 z - 0.8182 z - 0.6065


- ' z - 0.9512 z - 0.0101

The gain crossover frequency is JI= 5,2 rail/sec and the phase margin is 51,8~
The phase crossover frequency is ;/ = 21 rail/ sec and the gain margin is 12 .1
-1
dB, Also, K = 10 sec . Thus, all requirements are met. Since
V

() () _ (z - 0.8182)(z + o.8328)
GD z G z - o, 2827 (z - O.OlOl)(z - l)(z - 0,9048)

the characteristic equation for the closed-loop system is

(z - O.OlOl)(z - l)(z - 0,9048) + 0.2827(z - 0.8182)(z + 0.8328)

=0
or
z 3 - 1.6322z 2 + o.9282z - 0.2018 = 0
which can be factored as follows:

(z - o.761)(z - o.4361 + j0.2741)(z - 0.4361 - j0.2741) = O

Notice that the real closed-loop pole at z = 0.761 is close to a zero at z =


0,8182. The zero nearby at the closed-loop pole effectively cancel the
effects of this closed-loop pole. Therefore, a pair of complex conjugate
poles at z = 0 .4361 ± jO. 2741 can be considered dominant. The closed-loop
pole at

z = o.4361 + jo.2741 = 0.5151 /32.15°


is located on a line having an angle of 32.15°. Hence, the number of
samples per cycle of damped oscillations is

360° -
32,15"- ll. 2

71
B-4-18. Since T =1 sec, we have

G(z)

0.4J23z-l
=--~~"----
1 - 0,1353z-l

Define the closed-loop pulse transfer function as F(z), or

(1)

If G(z) is expanded into a series in z-l ,then the first term is 0.4J23z- 1 .
Hence, F(z) must begin with a term in z- 1 , or

(2)

where N ~n and n is the order of the system.


Since the input is a unit-step function, from Equation (4-48) we have

Notice that G(z) involves neither zero nor pole outside the unit circle.
Therefore, there is no requirement on 1 - F(z) from the stability viewpoint.
Since the system should not exhibit intersampling ripples after steady-
state is reached, we require U(z) to be of the following type of series in
-1
z
U(z) = b + b z -l + • . • + b z -N+l + b(z -N + z -N-l + .. , )
0 1 N-1

Because the plant transfer function G (s) does not involve an integrator, b
must not be zero. From Figure 4-75, p

U( z) = ___Q__(_tl_ = ___g__(_tl_ ___R_W_ = F ( z ) ___B_(_tl_


G(z; 7fw cf(zY ~

1 1 - o.1353z- 1
= F(z) 1 - z -1
(3)
0.4J23z-l

Since U(z) should be of an infinite series, F(z) should not be divisible by


-1
1 - z
In the absence of other requirements on F(z), we may choose N(z) = 1,
or
-1
1 - F(z) =1 - z

Then

72
F(z) = z-1 (4)

Thus, in Equation (2), a 1 = 1, a2 = a3 = • .. • = aN = O. Clearly, F(z) is not


divisible by the factor 1 - z-1.

From Equation (1) we obtain

( ) F(z) = _______ z_-1_ _ __


GD z = G(z) [1 - F(z)] 0.4J23z -l (l _ z-1)
1 - 0.1353z-l
-1
= 2.3132 1 - o.1353z
1 - z -1

Note that from Equations (3) and (4) we have


-1
U(z) = 2.3132 1 - 0.1353z
1 - z-l

The sequence u(k) in the unit-step response is constant fork= 1, 2, 3,


The system output stays constant at unity and there is no intersampling
ripples after the settling time is reached.

73
CHAPTER 5

y(k) = [2

B-5-2,
x1 (k + 1) 0 0 -6 x1 (k) 4

x2 (k + 1) = 1 0 -11 xik) + 1 u(k)

x/k + 1) 0 1 -6 x/k) 0

x1 (k)
y(k) = [o 0 1] x 2 (k)

x/k)

B-5-3.
-1 -2 2
~ = 1 + 6z + 8z = z + 6z + 8 = 1 + ~ + ~
7f("z; 1 + 4z-l + Jz-2 z2 + 4z + 3 z + 1 z + 3

Referring to Equation (5-112), we have p1 = -1, P2 = -3, bo = 1, c1 = 1.5, and


c2 = 0.5. Hence

B-5-4.
Y(z) 1 _+_2z_-_2_ ~
= _ _z_+_2___ = _ _z_-_
U(z) z 2 + z + 0.16 1 + z-l + 0.16z- 2

Direct programming:

74
y(k) = [2

Nested programming:

y(k) = [o
Partial-fraction-expansion programming:

B-5-5.
x1 (k + 1) 0 1 0 x1 (k) 0

x 2 (k + 1) = 0 0 1 x 2 (k) + 0 u(k)

x/k + 1) a3 -a2 -a x 3 (k) 1


1
x1 (k)

y(k) = [b3 + a3b0 b2 - a2b0 l bl - albO] x 2 (k) + b 0u(k)

x3 (k)

B-5-6. From the block diagram we obtain

x1 (k + 1) = x 2 (k)
x2(k + 1) = x3(k)
x3(k + 1) = -0.2x1(k) - x2(k) - 0.5x3(k) + u(k)
and

Hence,

75
-
X1(k + 1) 0 1 0 X1(k) 0

x2(k + 1) = 0 0 1 x2(k) + 0 u(k)


-0.2 -0.5 x3(k) 1
-x3(k + 1) -1
x1(k)
y(k) = [0.6 2 l] x2(k) + 2u(k)

x3(k)
(This is in a controllable canonical fonn.)

B-5-7. From the block diagram we obtain

and
x1(k + 1) = u(k)
x2(k + 1) = X1(k)

x3(k + 1) = x2(k)

Thus, the state-space representation for the system becomes


,...
x1(k + 1) 0 0 .. . 0 0 x1(k) 1
x2(k + 1) 1 0 0 0 x2(k) 0
= + u(k)
.
.. .
~

Xn(k + 1) 0 0 1 0 Xn(k) 0

x1(k)
x2(k)
y(k) = [h(l) h(2) . . . h(n)] + h(0)u(k)

Xn(k)

-------
B-5-8. From Figure 5-14 we obtain the following discrete-time state space
equations:
X1(k :+_ 1) = x2(k) + u1(k)

x2(k + 1) = 3x1 (k) + 2x3(k)

76
x3(k + 1) = -12x1 (k) - 7x2(k) - 6x3(k) + u2(k)
y1 (k) = 2x2(k) + 2u1 (k)

Y2(k) = x3(k) + u2(k)


Rewriting in the form of vector-matrix equations, we obtain
x1(k + 1) 0 1 0 1

x2(k + 1) = 3 0 2

x3(k + 1) -12 -7 -6

2 ] x1(kfj·
01
x2(k) +
0
x3(k)
These two equations are state-space equations for the system being considered.
To diagonalize the state matrix, let us define

0 1 0

3 0 2

-12 -7 -6
Then, the characteristic equation becomes

Ii\~ - ~!= < i\ + 1)( >-. + 2)(>-.. + 3) =o


The characteristic roots are Al = -1,
1\ 2 = -2, and A 3 = -3. The matrix ~
can be diagonalized by use of the following transformation matrix!'._:

1 2 1

P = -1 -4 -3
-1 1 3

(For information on obtaining such a diagonalizing transformation matrix P, see


Appendix A. ) The inverse of matrix P is ""'
""'
-4.5 2.5 1
!-1 = l -3 -2 -1
2.5 1.5 1
Thus,
r
0 0

p-lGP =
\,v\""""
l'-: -2 0
0 0 -3

77
Now let us define a new state vector xas follows:
1M

/\
X = Px
VVli t.,,vv,\

Then, in terms of the new state vector, state space equations can be written as
follows:
I\
x1(k + 1) -1 0 0 4.5 1
:1 (k)-j
I"\ u1(k)-J
x2(k + 1) = 0 -2 0 x2(k) + -3 -1 ~
i'
u2(k)
x3(k + 1) 0 0 -3 x3(k) 2.5 1
/\
x1(k)
Yl (k)] = [-2 -8
[
Y2(k) -1 1 -:J -"
x2(k)
i3(k)
+ [:
0 ](u1(k)-j
1 u2(k)

A 1\.
Notice that the initial data ~1 (0), x2(0), and x3(0) are obtained from
A
x 1 (0) 4.5 2.5 1 x 1 (0)
;,..
x2(0) = p-lx(0) = -3 -2 -1 x2(0)
,... ""' """'
x3(0) 2.5 1.5 1 x3(0)

-
B-5-9.
x1 (k + 1) 0 0 -0.2 x1 (k) o.6
xik + 1) = 1 0 -1 x 2 (k) + 2 u(k)

x3 (k + 1) 0 1 -0 . .5 x3(k) 1

x1 (k)

y{k) = [o 0 1] x 2 (k) + 2u(k)

x/k)

B-5-10.

Hence

78
.1.T2z-l + .1.T2z-2
= ------=------=-----~----=,-
1 - (2 - ½r 2 )z-l + (1 + ½T 2 )z- 2
2 b = 1 T,
Notice that for this system, b0 = 0, b1 = 21 T, 2 a = - 2 + 1 T,
2 and
2 2 1 2
2
a 2 = 1 + 21 T.

Direct programming:

Nested programming:

y(k) = [ 0

B-5-11.
-1 +_z
= ___z__ 2_
-2_ _ _ = 2
Z
-1 -2
2 z +
1 + o.7z + 0.12z z + o.7z + 0.12
17 16
= z + 0.J - z + 0.4
Hence

B-5-12.
0.5 0.5
~=
1
(z + l)(z ! 2)(z + 3) -
- z-+-1 - -
z +-2+z-+- J

79
Also,
zY(z) = -0.5
- - + 2- - - -
1.5-
u(z) z + 1 z + 2 z + 3
2
z Y(z) _ 0.5 4 4.5
U(z) - z + 1 - z + 2 + z + 3

Hence
Y(z)/u(z) 0.5 -1 0.5 1/(z + 1)
zY(z)/U(z) = -0.5 2 -1.5 1/(z + 2)
2
z Y(z)/u(z) 0.5 -4 4,5 1/(z + 3)

Define
X1 (z) 1 x3(z) = 1
1
u(z) =z + 1 ' =z + 2 ' u(z) z + 3
Then
zx1 (z) = - x1 (z) + U(z)

zX 2 (z) = -2X 2 (z) + U(z)

zx3 (z) = -3x 3 (z) + U(z)

Therefore,
x1 (k + 1) -1 0 0 x1 (k) 1
x 2 (k + 1) = 0 -2 0 x 2 (k) + 1 u(k)

x/k + 1) 0 0 -3 x/k) 1

x1 (k)

y(k) = [0.5 -1 0.5] x2 (k)


x3 (k)

The initial data are obtained as follows:

x1 (o)
x 2 (o)

x3 (o)
0.5
= -0.5
0.5
-1
2

-4
0.5 -1 y(O)
-1.5
4,5
y(l)

y(2)
=
6

3
2
5
4

3
1
1

1
l
-y(O)

y(l)

y(2)

B-5-13. We shall assume that n = 3, (It is a simple matter to extend


the derivation here to the case of an arbitrary positive integer n.)

80
y(k + 3) + a 1 (k)y(k + 2) + a 2 (k)y(k + 1) + a 3 (k)y(k)

= b0 (k)u(k + 3) + b1 (k)u(k + 2) + b2 (k)u(k + 1) + bJ(k)u(k)

Define

and
xl(k + 1) = x2(k) + hl(k)u(k)
x 2 (k + 1) = x3 (k) + h2 (k)u(k)

x3 (k + 1) =- a 3 (k)x1 (k) - a 2 (k)x 2 (k) - a 1 (k)x 3(k) + h3 (k)u(k)

where h0 (k), h1 (k), h2 (k), and hJ(k) are undetermined functions at this stage.

Then
y(k + 1) = x 1 (k + 1) + h 0 (k + l)u(k + 1)

= x 2 (k) + h1 (k)u(k) + h0 (k + l)u(k + 1)

y(k + 2) = x 2 (k + 1) + h1 (k + l)u(k + 1) + h 0 (k + 2)u(k + 2)

= x 3 (k) + h2 (k)u(k) + h 1 (k + l)u(k + 1)

+ h 0 (k + 2)u(k + 2)

y(k + 3) = x3 (k + 1) + h 2 (k + l)u(k + 1) + h1 (k + 2)u(k + 2)

+ ho(k + J)u(k + J)
=- a 3 (k)x 1 (k) - a 2 (k)x 2 (k) - a 1 (k)x 3 (k) + hJ(k)u(k)

+ h2 (k + l)u(k + 1) + h 1 (k + 2)u(k + 2)

+ ho(k + J)u(k + 3)
and we have
y(k + 3) + a 1 (k)y(k + 2) + a 2 (k)y(k + 1) + a 3 (k)y(k)

= [h3(k) + al(k)h2(k) + a2(k)h1(k) + aJ(k)ho(k)Ju(k)

+ [ h2 (k + 1) + a 1 (k)h 1 (k + 1) + a 2 (k)h 0 (k + 1)] u(k + 1)

+ [h1 (k + 2) + a 1 (k)h0 (k + 2)Ju(k + 2)

+ ho(k + 3)u(k + 3)
= b3 (k)u(k) + b 2 (k)u(k + 1) + b1 (k)u(k + 2)

+ bo(k)u(k + J)

81
Hence we obtain
[h3 (k) + a 1 (k)h2 (k) + a 2 (k)h1 (k) + a 3 (k)h 0 (k) - b 3 (k) J u(k)
+ [h2 (k + 1) + a 1 (k)h1 (k + 1) + a 2 (k)h0 (k + 1) - b2 (k)] u(k + 1)

+ [hl(k + 2) + al(k)ho(k + 2) - bl(k)] u(k + 2)


+ [ho(k + 3) - bo(k)] u(k + 3) = o
This last equation must hold for any u(k), u(k + 1), u(k + 2), and u(k + 3),
Hence, each of the coefficients of u(k), u(k + 1), u(k + 2), and u(k + 3)
must be equal to zero. Thus, we obtain

ho(k + 3) = bo(k)
hl(k + 2) + al(k)ho(k + 2) = bl(k)
h2(k + 1) + al(k)hl(k + 1) + a2(k)ho(k + 1) = b2(k)
h3 (k) + a 1 (k)h 2 (k) + a 2 (k)h1 (k) + a 3 (k)h 0 (k) = b 3 (k)

It follows that

ho(k) = bo(k - 3)
hl(k) = bl(k - 2) - al(k - 2)bo(k - 3)
h2(k) = b2(k - 1) - a2(k - l)bo(k - 3) - al(k - 1) [ bl(k - 2)

- al(k - 2)bo(k - 3)]

h 3 (k) = b3 (k) - a 3 (k)b 0 (k - 3) - [a2 (k) - a 1 (k)a1 (k - 1)]

0 [b1 (k - 2) - al (k - 2)bo(k - 3)]

- al(k) [b2(k - 1) - a2(k - l)bo(k - 3)]


The initial conditions are given by

x 1 (o) = y(O) - h0 (o)u(o)

x2(0) = y(l) - ho(l)u(l) - hl(o)u(O)

x 3(o) = y(2) - h0 (2)u(2) - h1 (1)u(1) - h2 (o)u(O)

B-5-14. Note first that

g (G)
2 =
= ""G - z I
kw-.
g2(zl) = zl - zk

g2(z2) = z2 - zk

82
Thus,
gl(~) = gl(zl)~l + gl(z2)!2 = ~l + !2

g2(~) = g2(z1)!1 + g2(z2)~2 = (zl - zk)!1 + (z2 - zk)!2

Rewriting, we have

I
1M
= x1""'
+ x2
...

The eigenvalues of the given Gare


""'
z
1
= o,
Now choose zk = z1 . Then

I
..,,. = ...x1 x2
+ .,..

from which we obtain

...X1 = [: 0/J X2 =
... [: -0/]
Hence
2

...
(zI - G)
......
-1
= z
k=l
~k
z - zk
=z ~l
- z1
+
!2
z - z2
~l
=-+--
z
~2
z + 2

z(z ! 2)]
1

z + 2

B-5-15. Note that


-1
z + a1 a2 a3
-1
(zI - G)
... - = -1

0
z

-1
0

83
z2 -(a2z + a 3 ) -a3z
1 z z 2 + a1 z
== -a
z3 + alz2 + a 2z + a 3 3
2
1 z + a1 z + a 1z + a 2

Hence
2
z

1
Thus,

2
C(zI - G)-lH z
""" W\, ""' """"

== [bl - albO z

1
and

== (b1 - a 1 b0 )z 2 + (b 2 - a 2b0 )z + (bJ

z 3 + a 1 z 2 + a 2z + a 3

== b0z3 + b1 z 2 + b2z + bJ
z 3 + a 1 z 2 + a 2z + a 3

B-5-16. The pulse transfer function F(z) is given by


F(z) == C(zI - G)-lH + D
"--i..v, w'\ \I\,\

z -1
0 z

First note that

and
-1
z + a1 -1 0 z2 z 1
z -1 1
a2 == -(a 2 z + a3) (z + a 1 )z z + a1
a3 0 z
lz~ - ~I -a3z z(z + a1) + a2
-a3

84
Then, F(z) can be written as follows:

F ( z) = z l] + bo

=
z3 + a 1 z2 + a2z + a3
Thus, the pulse transfer function for the system is

F(z) = - - - - - - - - - - - - - - - - - - - - - - - -
z3 + a 1 z2 + a 2 z + a3

bo + ( a1bo + h1) z -l + (a2bo + h2)z-2 + (a3bo + h3)z- 3


=------------------------
-----------------------------------------------------------------------------
B-5-17.

-1
Y2 ( z ) = 1 -1 Ul ( z ) + 1 + z 1 U (z)
1 + o.6z 1 + o.6z- 2
Hence
z () z+l ()
Yl ()
z = z - 1 u1 z + z - 1 u2 z

z ( ) z + 1 ( )
Y2 ( z ) =z + o.6 u1 z + z + o.6 u2 z

which can be modified to

Y1 (z) = u1 (z) + z =1 u1 (z) + u2 (z) + z: 1 u2 (z) (1)

Y2 (z) = u1 (z) - z ~-~. 6 u1 (z) + u2 (z) + z ~-~. 6 u2 (z) (2)

Now define state variables x1 (z) and x2 (z) as follows:

85
Then

In terms of the state variables x1 (z) and x2(z),Equations (1) and (2) become,
respectively, as follows:

Y1 (z) = x1 (z) + u1 (z) + u2(z)


Y2(z) = x2(z) + u1(z) + u2(z)
Hence, the state equation and the output equation for the given system are

-----------------------------------------------------------------------------
B-5-18. The state transition matrix is given by

Since

(zI - G)-l = [ z
""' ~ 0.24 :]
we have

Jz 2z
z + o.4 - z + o.6 z +5zo.4 - z +5zo.6 l
l.2z l.2z 2z 3z
- z + o.4 + z + o.6 - z + o.4 + z + o.6
Hence
k k
3(-0.4) - 2(-0.6) 5(-o.4) - 5(-o.6)
k [ k k]
~(k) =G =
""' "' k k
-1.2(-0.4) + 1.2(-0.6) -2(-0.4) k + 3(-0.6) k

86
B-5-19. Define steady-state vectors of x(k) and y(k) as -e
x and y,
... e
respect-ively. Then, we have ""' ""'

X
"""e
= ~l,\\e
Gx Hua
+ ,.,..,,""'

where ~O = constant vector. By solving these two equations for ..,e


x and ..,e
y,
we obtain
~e = ( !.
- ~)- 1t!~o
le=£(! - £)-l~~o + ~~o

B-5-20. Since

we have
i)O 0()

J = l I [~t~(o)]*§. ~k~(o)]
k=O k=O

Define

z
iX)

k=O
Although matrix ....
Pis the sum of an infinite series, it is a finite matrix
because G is a stable matrix. (See Problem A-5-19.) The matrix P can be
written as follows:
00 0() 00

l
k=O
2.
k=l
2
k=O

• = 3:_ + 9_*
k=O
[i (~*)k~k] 9_ = ~ + £*!£

Using this matrix P, we have


""'

J = t*(O) [ i
k=O
(9_*/s~t] ~(O) = ~(O)~(O)

87
B-5-21. In the Liapunov equation

G*PG - P
~ """"""' H;\
=- Q
......,,

let us choose Q to be I. Then


""' ""'

[ -[j
1

-1.2
0.5

0
PU

P12
P12]

P22 L
I l

0.5
-1. 2j-, _ jPll

0 lP12
or

-Pl2 + o.25pzz
l = [-1 OJ
-l.2P11 - l.6p1z 0 -1

which yields
p12 + o.25pzz = -1
-l.2P11 - l.6p1z = 0

l.44P11 ~ P22 = -1
Solving these three equations for P11, P12, and P22, we obtain

P11 _ 10 p - 5 P22 = 17.52


- 3.12 I
12 - - 2.08 3.12

-
Hence, matrix Pis given by

10 5
3.12 2.08
p =
W"
5 17.52
2.08 3.12
Clearly, matrix Pis positive definite.
"""
A Liapunov function V(x{k)) is given by
""'
V(x(k))
.......
= ""'
x*(k)Px(k)
"""'

B-5-22. Define
3 0

-2 -3
0 0

Then

88
Define

Then

The first requirement of Jury stability test

is not satisfied. Therefore, the origin of the system is unstable.

B-5-23. Define
cos T sin T]
G=[
i-. -sin T cos T
Then, the characteristic equation becomes

z - cos T -sin T
lz! - ~1 =
sin T z - cos T
= z2 - 2z cos T + 1

= (z - cos T + j sin T) (z cos T - j sin T) =0


Thus, two roots of the characteristic equation lie on the unit circle in the
z plane. Thus, the system is stable in the sense of Liapunov, but is not
asymptotically stable. [Note that if T = 7t , 2 ·7( , 3 ·7(. , ... , then the
state variables x1 (k) and x2 (k) are uncoupled.]
-----------------------------------------------------------------------------
B-5-24. Since the system equations are

x1 (k + 1) = x1 (k) + 0.2x2 (k) + 0.4

x2(k + 1) = o•.5xl(k) - 0.5


the equilibrium state can be determined from

x 1e = x1e + 0.2x2e + 0.4

x2e = o.5x1e - 0,5


as follows:
xle = -3, x2e = -2
Define
\(k) = x1 (k) - X
le = x1 (k) + 3

x2'k) 2e
= x 2 (k) + 2
= x2'k) - X

Then, the original system equations are modified into

89
~(k + 1) = x1(k) + 0.2x2(k)
x2(k + 1) = 0,5\(k)
or

Define
1
G- [
""' 0.5
Then, the eigenvalues of Gare
w,
found as

Since jz1 1 > 1, the equilibrium state of the system is unstable.

90
CHAPTER 6

B-6-1. For complete state controllability, we require

rank [!!. ; Ill!.] = rank [: a+ b] = 2


C + d

Thus, the condition is a+ bf c + d.


For complete observability, we require

rank [ £* : :!.*E.*] = rank [: :] = 2

The condition is bf 0.

B-6-2. Note that ....


x(2) is given by

x(2) = G2x(0) + GHu(0) + Hu(l)


IN\. """' MA """""" """"

or

-1 ] [X1 ( 0 )] + [ 0 , 5 ] u(o) + [ 1 ] u(l)


o.84 x 2 (o) -o.66 0.5
Hence
x1 (2) = -1 = -0.16x1 (o) - x 2 (o) + o.5u(0) + u(l)
x 2 (2) = 2 = 0.16x1 (o) + 0.84x2 (o) - 0.66u(0) + 0,5u(1)

Since x1 (o) = 1 and x 2 (o) = -1, we find

u(0) = - 3,9560, u(l) = 0,1380

Notice that

-0.8]
rank fH : GH] = rank [ l = 1
L---- • """"' -0.8 o.64

Since the rank of the controllability matrix is 1, the system is not comple-
tely state controllable. However, some state can be controllable. That
means some states can be brought to some other states. Notice that

x(2) = G2x(0) + GHu(0) + Hu(l)


~ 1,1\,\~ 'VV\,.1 """'

or

-1
o.84
][x 1 (o)] + [-0.8] u(0) + [
x 2 (o) o.64
l ] u(l)
-o.8

91
1.)

0 ] [-0.16 -1 ] [ l] + [-0 .8 ] u(0) + [ 1 ] u(l)


[
-0.008 = 0.16 o.84 -1 o.64 -o.8
or
-0.8 u(0) + u(l) =- 0.84

0.64 u(o) - 0.8 u(l) = 0.672

These two equations can be satisfied by an infinite number of combinations


of u(0) and u(l). For example,

u(O) = 0, u(l) = -0.84


will satisfy the two equations. Hence it is possible to bring the given
initial state to

2.)
[_0.:08]
[
-1] = [-0 .16 -1 ] [ l] [-0 .8 ] + [ l ] u(l)
2 0.16 o.84 -1 + o.64 u(o) -0.8
or
-0.8 u(0) + u(l) = -1.84

o.64 u(0) - 0.8 u(l) = 2.68


There is no set of values u(0) and u(l) that satisfies these two equations.
Hence, it is not possible to bring the given initial state to

1
rank [H
W\.
: GH : G~]
I ~I""'""""
= rank [~ 0
0 b

Hence, the system is not completely state controllable.


given by
Note that
-x(3) is

L)
b a 0 0
x1 (3) 0 a -T 1 1 u(o)
2 2
a 0 b+~ 1 + b 0
x2 (3) = 0 = -T 1 u(l)
3 b2 2
x3(3) 0 ab+~ b2 - b b + -a )
a ( 1 0 b 0 u(2)
b2 b2

92
or
0 =a+ b - ~ + u(l) (1)
2 2
0 = - ~ + b + a 2 + bu(O) + u(2) (2)
b
a3 2 a3
0 =ab+ 2 + b a - - + bu(l) (3)
b b3

From Equation (1) we have


u(l) = - a - b + ~ (4)

By substituting Equation (4) into Equation (3), we have

This last equation is satisfied if a= O, orb= 1, or a= 0 and b = 1.


If a= 0 orb= 1, then Equation (2) can be written as

bu(O) + u(2) - - b if a= 0 (5)


u(O) + u(2) - - 1 if b =1 ( 6)
There exist infinitely many sets of u(O) and u(2) that satisfy Equation (5)
or (6). Thus, if a= 0 orb= 1 or a= 0 and b = 1, then it is possible
to bring :iC3) to the origin. Otherwise, it is not possible to oring x(J)
to the origin. ""
2.) If the initial state is ....
x(O) = ....
O, then

x(J) = G2Hu(O) + GHu(l) + Hu(2)


\N\ """'"""' ~ ........

or
1

or
m" [~ 0
b
1o][u(o)]
0
u(l)
u(2)

1 = u(l)

1 = bu(O) + u(2)

1 = bu(l)
If b = 1, then there are infinitely many sets of u(O) and u(2) that satisfy
the last three equations. Hence, if b = 1, then it is possible to bring
the initial state x(O) = 0 to the given state x(J); otherwise it is not
possible. - ,AA """

93
Note that

y(o) = x1 (o) and y(l) = x1(1)


Thus,
and

Also, from the state equation,

Thus,

Therefore,

State ....
x(l) is obtained as follows:

[::::;] = [-0~16

and state x(2) is


""'

l]
-1
rl-a 2.16 ] [ 0] [-0 •16]
+ 1 c-iJ = -1.16
[::::;] - [-0~16

B-6-6. Define H = GC*. Then the state equation becomes

x(k + 1)
--""'
= Gx(k)
~
+ GC*u(k)
""""""'
= Gx(k)
~
+ ..,_
Hu(k)
Notice that

0 0 0 1

0 1 0
1 0 0

1 0 0 0
Hence
rank [a i 8i : !llf. : £3g] = 4
Therefore, the system is completely state controllable.
The observability matrix becomes as follows:

94
1 0 0 0

0 1 0 0
[£* G*C*
..... 1M
(G*) 2C*
... 1M
(G*) 3a*] =.
.... W\
0 0 1 0

0 0 0 1
Hence

rank [ £* : £*£* : (~*) 2£* (~*)3£.*] = 4


and the system is completely observable.

Next, we shall show that every initial state can be brought to the
origin in at most 4 sampling periods if and only if the control signal is
given by

Noting that for the system


u(k) =-
-
Cx(k) (1)

x(k + 1)
-
= Gx(k)
""""'
+ GC*u(k)
W"'

we have

+ G(GC*)u(2) + GC*u(J)
""'WW, """"'

4 4 3
= "'°"'""""
G x(O) + G C*u(O) + G C*u(l)
"""""" WI"""

Let us set x(4) = 0. Then, we obtain


.... ""'

which may be solved for x(O) as follows:


""'

or

x1 (o) 1 0 0 0

x/0) 0 1 0 0
- - u(O) - u(l) - u(2) - u(J)
x3 (o) 0 0 1 0
x4 (o) 0 0 0 1

Hence we get

95
x1 (o) u(o)

xiO) u(l)
- - (2)
xio) u(2)
x4 (o) u(J)

Everv initial state can be brought to the origin, that is, x(4) = 0, if and
only if Equation (2) is satisfied. Equation (2) can be written in the form
of Equation (1) as derived below.
From the state equation we have
x1 (k + 1) = x2(k)
x 2(k + 1) = x3(k)
x3(k + 1) = x4(k)
x4 (k + 1) = x1 (k) + u(k)

Therefore, Equation (2) can be written as follows:

u(o) = - x1 (o)
u(l) = - x2 (o) = - x1 (1)
u(2) = - x3(o) = - x1 (2)
u(J) = - x4 (o) = - x1 (3)

which can be combined into one equation as follows:

x1 (k)

xik)
u(k) - - [1 0 0 a]
xik)
x4 (k)

= - ....Cx(k)
._ (3)

The control law given by Equation (3) is the only control law for this system
that will bring any given initial state x(O) to the origin in at most 4 sampl-
ing periods. ""'

96
B-6-7.
1 -3T sin 4T
Te
AT
G(T) = e"" =
1M

- t
2 e-3T sin 4T

1
4 e-Jt sin 4t
dt
e-3t(cos 4t - 4 sin 4t)

1 -3T ( -3 sin 4T - 4 cos 4T) + 1


100 e 25
=
1
4 e-3T sin I.JJT

If T = ?rn/4, then

J_~n
0 e- ~ cos n ?t

and

r
I
l J?Cn

H(~,ni = l 25 (1 - e -
0
4 cos n 1t)

Using G(?t.n/4) and H('iCn/4) thus obtained, we have

rank [ti ; ~]< 2


and
rank [ £* : 9_*£*] < 2
Thus, the system is uncontrollable and unobservable if T = ?r.n/4.

97
B-6-8.
1. Controllable canonical form:

x1 ( k + 1 )] [ 0 1
[ ] lxl (k)] + [OJ u(k)
x 2 (k + 1) = 0,25 0 x 2 (k) 1

y(k) = [i i] [xl (k)J


x 2 (k)
2. Observable canonical form:

[
x1 (k + 1)] = [o 2
O- 5] lxl (k)] + [l] u(k)
x 2 (k + 1) 1 0 x 2 (k) 1

y(k) = [o l] [xl (k)]


x 2 (k)

3. Di§:gonal canonical form:

x1 (k + 1)] = r-0 ,5
0 ] rx1 (k)]
[
x 2{k + 1) O 0,5 x 2 (k) + [l]
1 u(k)

y(k) = [-o .5 1. 5] [xl (k)]


x 2 (k) .

B-6-9.
1, Controllable canonical form:

y(k) = [-0.5 1,8] [ xl (k)] + u(k)


xz(k)

2. Observable canonical form:

y(k) = [o

98
3, Diagonal canonical form:

j0,5 0

0.5 +

y(k) = [0.9 + j0.4

B-6-10. The system equations in the controllable canonical fonn are


x(k + 1)
""'
= Gx(k) ~
+ Hu(k)
,.....

y(k) = ...,....,.
Cx(k) + Du(k)
By use of the transfonnation x(k)
WI
= Qk(k),
c,,._.
these two equations become
,. I\
x(k + 1)
""'-
= o-lGQx(k)
~ \I\.-.....'""'
+ o-lHu(k)
.......,, \.""\
A
y(k) = CQx(k) + Du(k)
where
0 0 -a3 b3 - a3bo
,. ,,..
-0-lGQ
..._, =G =
,N\
1
0
0
1
-a2
-a1
, o-1H = ..,.
""'
H = b2 - a2bo
....
b1 - a1bo
A
Referring to Section 6-4, the transfonnation matrix Q that will give this G
matrix can be given by ""' W\

where

1
~
1 0

1 0 0

and

Define

b3 - a3b0
C* = b2 - a2b0
""'
bl - albO
Then

99
a2b3 - a3b2 alb3 - a3bl b3 - a3b0

-
WN* = al b3 - a3bl

b3 - a3bo
alb2 - a2bl + b3 - a3b0

b2 - a2b0
b2 - a2b0

bl - albO

The desired transformation matrix Q is given by


""'

B-6-11. First note that the rank of the controllability matrix[~:£!!]


is two. So, arbitrary pole placement is possible. Define •

Then

and we have

or

- Tk
1
The characteristic equation becomes
1 2
- T + 2 T k2
z - 1 + Tk2

The desired characteristic equation is


2
(z -Fi)(z - //4-2) = z - (f•1 +f<z)z + /L1/A-2 = O

By equating the coefficients of the corresponding terms of the two character-


istic equations, we obtain

f'- 1 + r2 = 2 - ½T2kl - Tk2


- 1 2
~ iflz - 2 T kl - Tk2 + 1

from which k1 and k2 are determined as follows:

100
Thus,

B-6-12. First note that the rank of the controllability matrix is 3 and,
therefore, it is possible to determine the necessary state feedback gain
-
matrix K for deadbeat response.
Referring to Equation (6-65) and noting that for deadbeat response «1 =
o< 2 = 0( 3 = 0, we have

! = [ex 3 - a3
-1
= [-a3 : -a2 -a ] T
1 \M

where
a
1
= 0,
and
T = MW
""" ..........
Matrices .....
Mand W\
Ware given by

1
M = [H : GH '. G2H] = [~ 1 o\s]
""" """''"""""•"""~
1 o.68 o.68

l]
Hence
0
0
=
[-0.84
0
1
0
1
0 ~]
and
1M
[
0.16
.T =MW= -0.16
""""

-0.16
1
1
o.68 ~]
3.12.5 -3,12.5
[
T-l = 0 3.12.5
.... _/12.5]
0 . .5 -2.62.5 3.12.5
Thus
3.12.5 -J.12.5
!_ = [-0.16 0.84 [
o] o 3.125 _/125]
O.5 -2.62.5 3.125
3.12.5 -2.62.5]
----------------------------------------------------------------------------

101
B-6-13. First, notice that 1M
G is a nonsingular matrix. Then check the
observability condition.

1 -0 .16]
rank [c*:
"""" •
G*C*]
\N"-
= rank l- =2
1 0

Hence the eigenvalues of£ - !~<lQ. can be arbitrarily placed in the z plane
by a proper choice of fe· Referring to Equation (6-137), we have

For the deadbeat response, ~(z), the desired characteristic polynomial of the
.
error d ynaI11J.cs, • z.
is 2 Hence

...
~(G) = .....G2
Since

CG= [-0.16 CG 2 = [o
we obtain .....
Ke as follows:

K = G2
... e ""'
ICG J-1 [OJ= [-0.16
lcG2 1 0.16

6.25]
[
- -5,25
The desired current observer is then given by

B-6-14. Note that for this system

G
aa
= O, G =
-ab [o -0.25], Gba = [:]

£bb = [:

Referring to Equation (6-153) we have


o~J H = 1,
a H = [O]
..,_b 1

102
K
.,,,.e
= ¢(G
w.bb
[ j
G
) ... ab
G G
... ab-bb
...,
-1

where for deadbeat response

Since

-0.125]

we have

0
K = [
....e 0,5

The equations for the minimum-order observer are

and

~ (k + 1)
/V
= [o o]
l ~ (k) +
O .-v [1]
O y(k) + [o]J u(k)

B-6-15.

MATLAB Program for Problem B-6-15

% ---------- Pole placement (Deadbeat response) ----------

% ***** This program determines state feedback gain matrix


% K for deadbeat response using Ackermann's formula*****

% ***** Enter matrices G and H *****


G = [O 1;-0.16 -1 ];
H = [O;l];

% ***** Enter the controllability matrix Mand check its


% rank*****

M= [H G*H];
rank(M)

103
ans=

% ***** Since the rank of M is 2, the system is completely


% state controllable and thus arbitrary pole placement is
% possible *****

% ***** For deadbeat response, the desired characteristic


% polynomial becomes Phi= GA2 *****

Phi= GA2;

% ***** State feedback gain matrix K can be given by *****

K = [0 1]*inv(M)*Phi

K=

-0.1600 -1.0000

k1 = K(1), k2 = K(2)

k1 =

-0.1600

k2 =

-1

------------------------------------------------------------------------------
B-6-16.

MATLAB Program for Problem B-6-16

% - - - Design of state observer - - -

%*****This program determines state observer gain matrix Ke


% by use of Ackermann's formula*****

% ***** Enter matrices G and C *****

G = [0 -0.16;1 -1 ];
C=[0 1];

104
% ***** Enter the observability matrix N and check its rank *****

N = [C' G'*C');
rank(N)

ans=

% ***** Since the rank of the observability matrix is 2, design


% of observer is possible *****

% ***** Enter the desired characteristic polynomial by defining


% the following matrix Jand entering statement polyO) *****

J= (0.5+0.S*i 0
0 0.5-0.S*i];

JJ = polyO)

JJ =
1.0000 _, .0000 0.5000

% ***** Enter characteristic polynomial Phi *****

Phi = polyvalm(polyO),G);

% ***** The observer gain matrix Ke is obtained from *****

Ke= Phi*inv(N')*[0;1)

Ke=

0.3400
-2.0000

-----------------------------------------------------------------------------
B-6-17. The system equations are

x(k + 1) = 0.5 x(k) + u(k)


y(k) = x(k)
v(k + 1) = v(k) + r(k) - y(k)
u(k) = 1S_v(k) - K2x(k)

105
Thus,
u(k + 1) = -K2x(k + 1) + IS_v(k + 1)

=- K2[0.5 x(k) + u(k)] + K1 [v(k) + r(k) - y(k)]


= (0.5 K2 - Kl)x(k) + (1 - Kz)u(k) + Klr(k)
Hence, the state equation in terms of x and u becomes

(1)

and the output equation becomes

o] [x(k)]
u(k)
Define
x (k)
e
= x(k) - x( oo)

ue (k) = u(k) - u( oo)


Then

[
xe(k +
u (k +
1)] [
1) - 0,5
0.5
K2 - Kl
1 ]-lx (k)]
e 1 - K2 u:(k)

The characteristic equation is


-1

The desired characteristic equation is

z2 = 0
Hence we choose K1 =1 and K2 = 1.5. Thus, the integral gain constant K1 is

K
1
=1
and the state feedback gain constant K2 is

[It is noted that Equation (6-193) must be modified if it is to be applied to


this problem, since the configuration of the integral controller is different
from that shown in Figure 6-18.]

106
To determine the output y(k), notice that

y(k) = x(k)
By substituting K1 = 1, K2 = 1,5, and r(k) = 1 into Equation (1), we obtain

[:;:: :;] -[_:::5 -0,5


1 ] [x(k)]
u(k) +
[o]
1

Assume that the initial state is

[ x(O)] = [a]
u(O) b

where a and bare arbitrary. Then

-x(l)
lu(l) =
][ 0 .5
-0.25 -0.5
1 J[a]b +
[ = [o. a
O]
1
5 + b
-0.25 a - 0,5 b + 1
]

[
x(2)] [ 0 .5 1 l [o .5 a + b ] [o] = [ 1 ]
x(2) - -0.25 -o.5J -0.25 a - 0,5 b + 1 + 1 0.5
and

x(k)] [ 1 ] fork= 3, 4, 5, ...


[
u(k) - 0,5

Hence
y(0) = x(0) = a
y(l) = x(l) = 0.5 a+ b

y(k) = x(k) = 1 for k = 2, 3, 4, ....

y(k)

~ arbitrary points
a

0,5 a+ b
{

• • • • •

0 1 2 3 4 5 6 k

A sample response plot is shown above.

107
B-6-18. The system equations are

x(k + 1) = 0,5 x(k) + u(k)

y(k) = x(k)

u(k) = - K2x(k) + K1v(k)


v(k) = v(k - 1) + r(k) - y(k)
Hence
u(k + 1) = - K2x(k + 1) + K1v(k + 1)

= - K2 [ 0 .5 x(k) + u(k~ + K1 [v(k) -· y(k '+ 1) + r(k + 1)]

= (0,5K 2 - 0,5K1 )x(k) + (1 - K1 - K2 )u(k) + K1r(k + 1)

Considering x(k) and u(k) to be new state variables, we can obtain the
following state space equations:

x(k + 1)] [ 0,5


[ (1)
u(k + 1) = 0,5K2 - 0.5K1

where r(k) = 1 fork= 0, 1, 2, .... Define

xe (k) = x(k) - x(oO)


u e (k) = u(k) - u(oa)
Then

Define

"
G
,..
= [G0

Note that Equation (6-193) applies to this system, since the configuration of
the integral controller is the same as that shown in Figure 6-18. Matrix K
can be detennined from

! = [o 1] [i gfrJ-1 p(?)
where
p(c) = 22
... W'

108
Thus,

1 l [o 1] -1 [0.25 0.5]
O = [ 0.25 0.5]
- 1 0 0

Then constants K1 and K2 are determined from Equation (6-193).

-0.5. 1 'j-l -
1.5 ] [ 1 = Lo.5
0.5
That is,

K
1
=1 and

The output y(k) can be obtained as follows: First note that

y(k) = x(k)
By substituting K1 = 1, K2 = 0.5, and r(k) = 1 into Equation (1), we obtain

l x(k +
u(k + 1)
1)]
=
[ 0.5
-0.25 -0.5
1 -j [x(k)]
u(k)
rO j~
+ _l

Now assume that the initial state is

[ x(O)-j = [a]
u(O) b

where a and b are arbitrary constants. Then

[
x(l)l
=
[
0.5
-0.25
1 ]

-0.5. b + 1
[ a] [o] = [ -0.25 a -
O . 5a + b

0.5 b + 1
]

u(l)_

l-x(2)]
u(2)
10.5
- L-0.25
1 ] [
-0.5 -0.25 a - 0.5 b
o•5 a + b
+ 1
] [o
+. 1
l[
=
1 ]
0.5
and

~lx(k)] l- 1 ] fork= 3, 4, 5, ...


u(k) = 0.5
Hence,

y(O) = x(o) = a
y(l) = x(l) = 0.5 a+ b
y(k) = x(k) = 1 fork= 2, 3, 4, ...

109
The output sequence y(k) for a unit step input is shown below.

y(k)
arbitrary points

1
a

1 0 • •
0,5 a+ b

I

0 1 2 3 4 5 6 k

110
CHAPTER 7

B-7-1. For this problem

Thus,

A1 A.2 0 -bA3 0

-(~1 +,\2) A1 X2 b -bA3


E =
1M
1 -< A1 +.>..2> 0 b

0 1 0 0

The determinant of E can be expanded as follows:


\M

III=
J\, )\ t.

-0,+)q,) ~,,\2
0 0
0
b
0
I
.1
A1h 0
-0.,+).z.) 1: -<>o>.i/

,\A2 0 b -bAJ !-(~,+,h. ) ),..\2 • -bA3 0


+ +I
0 1 0 b \ 1 -(A,-t) .. ) 0 0

-(),-l'"L) -A,Az... -bA3 0 1 -(~,+~2) ·r;b ~3 0


+
0 1 0 b 0 1 i b -b.X3 •

= Ai.A 2b2 - l:>2(A1 +>...2)A 3 + 1:>2;,f

= l:>2( .\ 1 - ~ 3) ( A2 - >- 3)

B-7-2. Sylvester matrix Eis given by


....
0.1 0 -0.24 0

-0.7 0.1 0.2 -0.24


E
1M
=
1 -0.7 1 0.2

0 1 0 1

-
Define matrices D and Mas follows:
""'

111
0( "'1
1 1
d31 0
dz 0 o(

....D = d1
I
0
,
-
M=
plj
do J 0 fa
Then Mis obtained from
--
A MATLAB solution for determining Mis shown below.
"""

E =

0.1000 0 -0.2400 0
-0.7000 0.1000 0.2000 -0.2400
1.0000 -0.7000 1.0000 0.2000
0 1.0000 0 1.0000
./ inv(E)
ans =
-29.5455 -12.2727 -4.6364 -2.0182
-51.1364 -19.3182 -8.4091 -2.8545
-16.4773 -5.1136 -1.9318 -0.8409
51.1364 18.3182 8.4091 3.9545
../D = [1;0;0;0];
/ M = (inv(E))*D

M =

-29.5455
-51.1364
-16.4773
51. 1364

Thus, o({z) and (3 (z) are determined as follows:


o( (z) = -51.1364z - 29.5455

(3(z) = 51.1364z - 16.4773

112
B-7-3. The following Diophantine equation

((z)A(z) + f (z)B(z) = F(z) [H(z) - A(z)]

can be written as
[ r (z) + F(z) ]A(z) + (3 (z)B(z) = F(z)H(z)

Define
r(z) + F(z) = o( (z)
Then
((z) = o< (z) - F(z)

and
O<. (z) - F(z) U( ) - /3 (z)
U(z) F(z) z
Y(z)
ii-(z)

t:l{. (z) + 1] U(z) - ,B (z) Y(z)


F(z) F(z)
which can be simplified to

U(z) = -
6 (z)
Y(z) b( (z)
The block diagram for this system is shown below.

- --
A@)
;.

j(c.)
-
tx{~)

Note that .,a(z)/Gl((z) is the observed-state feedback regulator. The block


diagram shown above is the same as that shown in Figure 7-3 which represents
an observed-state feedback regulator system.

[Note that in Example 6-11 we designed an observed-state feedback regulator


system. The block diagram for the system was shown in Figure 6-13. The feed-
forward transfer function was the plant transfer function and the feedback
transfer function was an observed-state feedback regulator.]

113
···········---·-·-------------

B-7-4. From Figure 7-6(a) we have

U(z) = 8R(z) - [-u(z) + 24z; 16 Y(z) + z +z0.32 U(z)]

Hence
U(z) = -0.32z-lu(z) - 24Y(z) + 16z-ly(z) + 8R(z) (1)
By taking the inverse z transform of this last equation, we obtain

u(k) = -0.32u(k - 1) - 24y(k) + 16y(k - 1) + 8r(k)


k = 1, 2, 3, ...

u(O) = -24y(O) + 8r(O)

To find u(k) versus k for the unit-step input r(k) = 1, we need to find
U(z)/R(z). From Figure 7-6(b), we have
Y(z) 8(0.02z + 0.02)
=
R(z) z2 - 1.2z + 0.52
Hence,
Y(z) = 8(0.02z + 0.02) R(z) (2)
z2 - l.2z + 0.52
Equation.. (1) can be written as
(z + 0.32)U(z) = -(24z - 16)Y(z) + 8zR(z) (3)

By substituting Equation (2) into Equation (3), we obtain

(z + 0.32)U(z) = -(24z - 16) 8(0.02z + 0.02) R(z) + SzR(z)


z2 - l.2z + 0.52
= 8z3 - 13.44z2 + 2.88z + 2.56 R(z)
z2 - l.2z + 0.52

By dividing both sides of this last equation by (z + 0.32), we obtain

U(z) = 8z2 - 16z + 8 R(z)


z2 - l.2z + 0.52
Hence,

U(z)
= -8z2
- -- -
16z + 8
----
R(z) z2 - l.2z + 0.52
The same equation as above can also be obtained as follows:
U(z) U(z) Y(z) (z - 1)2 8(0.02z + 0.02)
R(z) =
Y(z) R(z) = 0.02(z + 1) z2 - l.2z + 0.52

= 8(z - 1)2 sz2 - 16z + 8


=
z2 - l.2z + 0.52 z2 - l.2z + 0.52

114
The following MATLAB program will give u(k) versus k for the unit-step sequence,
r(k) = 1 (k = O, 1, 2, ... ).

»% MATLAB Program for Problem B-7-4


»
»%----Plot of u(k) verus k when r(k) is a unit-step function-----
»
»num = [8 -16 8];
»den = [1 -1.2 0.52];
»r = ones(l,41);
»v = [0 40 -10 10];
»axis(v);
»k = 0:40;
»u = filter(num,den,r);
»plot(k,u,'o')
»grid
»title('Plot of u(k) versus k')
»xlabel('k')
»ylabel('u(k)') •

Plot of u(k) versus k


10...----------------....-.---------.!---.-----,
.
0

. - . .
5 - ............(............ --~ .............~ .............~ .............~ ............. ~ ............ ·?·· ......... ·-

0
.. - . - .
0 ...............).....o..':'.~.~.0.E>-o-o·~·O·O-G-o!!•6•o•0-€><:1•6•0·0·&-0-6'·CH)•Oe-6•0•0·0-€>~~
: 0 : : : : : :
.- - .- . .- --
.-.. -.- ..... ..- .. --
. - . -
--. --- ..- -- --- -..
• - ■ - - -

.. . - . -
-5 .............. ; .............~ .............~ .............~ .............~ ............. ~ ............. j .............
:
: :

-10 ; : : .
0 5 10 15 20 25 30 35 40
k

115
B-7-5.
C(zI
F(z) = ..,.., ......
- G)-lH + D
""' w,.

z -1 0 -1

= [1 0 O] 0
0.16 -0.84
z -1
z :]
=
1
z3 - 0.84z + 0.16
Hence,
Y(z) 1 B(z)
U(z) = z3 =
- 0.84z + 0.16 A(z)
where
A(z) = z3 - 0.84z + 0.16
B(z) = 1
Next, solving the following Diophantine equation:
o((z)A(z) + (3(z)B(z) = H(z)F(z)
or
ot(z)(z3 - 0.84z + 0.16) + (3 (z) = z5
we obtain
o( (z) = z 2 + 0.84
(3 (z) = -0.16z2 + O. 7056z - 0.1344

Referring to Figure 7-4, we have

Y(z) «(z)B(z) z2 + 0.84


- - = Ko
R(z) H(z)F(z) z5

To determine gain Ko, we set y(oo) = 1 for the unit-step input.

lim y(k) = lim (1 - z-l)Y(z) = lim (.z - l)fK0 z2 + 0.84)(~\


k--+OO Z-+1 z ~ 1 \. z \ z5 z - 1/
= 1.84Ko = 1

from which we get


Ko = - 1- = Q.5435
1.84
Hence
Y(z) = 0.5435(z2 + 0.84)
R(z) z5
To obtain the unit-step response, we may enter the next MATLAB program into the
computer.

116
»% MATLAB Program for Problem B-7-5 (Part 1)
»
»%-----Unit-step response-----
»
»num = [0 0 0 0.5435 0.4565];
»den= [1 0 0 0 0];
»r = ones(l,41);
»v = (0 40 0 1.6];
»axis(v);
»k =0:40;
»y = filter(num,den,r);
»plot(k,y ,'o')
»grid
»title('Unit-Step Response')
»xlabel('k')
» ylabel('y(k)')

Unit-Step Response
1.6--------------------- . -------
. .
1.4 .............. ~..............~ .............~ ............. ~ .............~ ............. ~ ............. i .............
... .. .. .. .. .
. -- .. .. .. ..- --"'
-
1.2 ... ··... ······.~. . ····.. ·.... ·.~. · · · .. · · · .. · .~ ... ·· .. · · · · .. ~ ·.... ·.... ··.~ ..... ··.... ·.~ .. ·... ··.... ·! .. ··.. ···....
. --. -. ... -. ...
..- -... - -- . -- .
1 ,- ··.. ····O·"?·O ·E> G-O·,;<·O •&-e-O•(?·O·E>-0-G·(?·O·O-ID-<3-(?·0·0 ·E> -e- ~·0·0 ·0-E> ~·O·O·O ·E>◄ ~
.. .- .- .. .. .- .
2 .. -- -. -- .. -. ...
~ o.s .............. t···· .........l" ........... t .............I............. ~ ............. ~ ............. !.............
.. .. .. .. .. -- --
0.6 """" --....... ·-·=·. -.. --..... ··=···· ........ · =· ... ,... --....;. -...........;.... -·---.. ·.;. ·..... -... -.; .. ·-....... --
o :- : .:. :- :. :. .:.
.. - . -
0.4 .............. ; .............~ .............~ ............. ~ ............. ~ ............. ~ ............. \.............
... . .... -- .. ...- -.
. .-. -- .. .-
0.2 ............. ~............. ~ .............~ .............~ ............. \ ............. ~ ............. \.............
... -
.... -.. - .- .--. --
:- . : .-. ..: . :.
0 - -
5 15 20 25 30 35 40
k

117
To obtain the unit-ramp response, the following MATLAB program may be entered
into the computer.

»% MATLAB Program for Problem B-7-5 (Part 2)


»
»% ----- Unit-ramp response ----
»
»num = [0 0 0 0.5435 0.4565];
»den= [1 0 0 0 O];
»v = [0 40 0 40];
»axis(v);
»k = 0:40;
»r = [k];
»y = filter(num,den,r);
»plot(k,y ,'o' ,k,y ,'-' ,k,k, '--')
»grid
»title('Unit-Ramp Repone')
» xlabel('k')
» ylabel('y(k)')

Unit-Ramp Repone
40...-----.------.-------....,.;..-..;;.___,______......,.._____,
,,,.
,,,. ,,,.
35 · · ....... ··:· .. · · · · · · ... ··~· · · · · · · · · · .. ·:· ...... · · · · ··~···· ... · · .. · ·~· .... · · ..... ·=· · · · · · · · .. · .). :-:'.. .. .
. . : _,,,.
: ...
30 ........... ~..............: .............: .............: ............. : ............. ,,,. .:i'-'•••••.
,,,. ,,,. .
25 ........... ·:·· ............ ·:·· ............ ·:• .... ....... ..:•........ -;,,; ~·: ✓.... .. .·;·• ........... ·;• ........... .
.. .
. ..
,,,..
20 ············=··············:--·· . ·········:-·········-···~-~--- . ·=·. .
■ • • • • • • • • • • -~ • • • • • • • • • • • • - : • • • • • • • • • • • •
. ..
,. ,,,. : .
...
.
...
. ...
15 ........... ~..............~ ........... ._;.:".'.... . .- . .
: : -- : .
• ·:-. -

-.
• • • • • • • • • • -~ • • • • • ■ •• ■

..
• • • -~ • • • • ■ ••••••• ·? .•.•• ■
-- •••• - •

.-- ..- .- --.


■ : .,,, - - - ■

10 ........... .:.. ............ ~."."." ..


:
,. ,,,. ,,,. .:
• ... • • • • • • • • ■ ■ ............................. ■ .......................... ■ •••••••

:
5 .......... ;:".'.. .. .. . . .
... : ..-
...... ••••• .................... ··-··· ............................. ■ ......................... .

.

...
-
- •

-...
■ •

-... .
-..
-.
-.
0~""8-@IIISi....,..---...1·....__ _..&,·_ _ _••- - - 1 . . . ·- - - . . . 1 · . . . , __ _..&.·----1
0 5 15 20 25 30 35 40
k

118
B-7-6. Referring to the solution to Problem B-7-5, Y(z)/U(z) can be obtained
as
Y(z) = 1 B(z)
=
U(z) z3 - 0.84z + 0.16 A(z)
where
A(z) = z3 - 0.84z + 0.16
B(z) = 1
The solution to the following Diophantine equation
CX (z)A(z) + f3 (z)B(z) = H(z)F(z)
where

H(z) = z3

F(z) = z2
was obtained in the solution to Problem B-7-5 as
0( (z) = z 2 + 0.84
~ (z) = -0.16z 2 + O. 7056z - 0.1344
Referring to Figure 7-5, we have

Y(z) KoB(z)
R(z)
=
H(z) =

To determine constant Ko, we require y(oO) in the unit-step response to be


unity, or

=Ko= 1

Hence
Y(z)
R(z)

The system has three closed-loop poles at the origin. Hence, the system is a
dead-beat system.
To obtain the unit-step response, we may enter the following MATLAB pro-
gram into the computer.

119
»%MATLAB Program for Problem B-7-6 (Part 1)
»
»%----Unit-step reponse ----
»
»num = [0 0 0 l];
»den = [l 0 0 0];
»r = ones(l.41);
»V = [0 40 0 1.6];
»axis(v);
»k=0:40;
»y = filter(num,den,r);
»plot(k,y ,'o')
»grid
»title('Unit-Step Reponse')
»xlabel('k')
»ylabel('y(k)')

Unit-Step Reponse
1.6---------------------------------
1.4 ,.. ........... ;. ............ ~. ..............~. ..............~ ............. .(..............~ ............. .(............-
-.. ..
. -.. -... -
.-
.-
. .-.
1.2 - .. ··.•. · ···.\.. ····· ··.. ··· .~. ········· ·· ·.~. ·····•· ·····.~-.. ·····.. ···.~. ·····.. ·.. ···!. .. ··········.~. ············-
-
.

-- .
.
-
-. -.

.
. ..
-. - ■ ..

l -·····G·O·!?·O-O<l.l-O·~·O·E:>G-O·t?·0•0-0-G-~·0·0-0<l.l-'?·0·0·€:tG-~·0·0·0-0-~0·0·0-E>~
-.
-. .. .. .. .. ..
~ .
-
.

.

.

.
..
.

.

):; 0.8 -············j··············j·············t"'·"·······t·············~--···········j·············j············-


-. -- .. .. .. .. ..
0.6 --· ·-·.. ·····=·. ........... -·=. · -·... ·.... ·..-:....... ·.. -...;. -...........; -. .. --..... -... ; ..... ····· --.;
.. .... --... ·---
... .. -
. ... .
.
-
-
. . - . . -.
0.4 -···········~··············~·············~·············~···
.. .. -- .. .. ········~·············~···········••i••····
.. .. -. .......
-. .. .. -- -. . ..
0.2 -···········~··············~·············~·············~············•;•············i·•···········i•···········-
0
0 -- -- 5 10
.
15 20 25 30
.
35 40
k

120
To obtain the unit-ramp response, the following MATLAB program may be entered
into the computer.

»% MATLAB Program for Problem B-7-6 (Part 2)


»
»%-----Unit-ramp response-----
»
»num = [O O O 1];
»den = [1 0 0 0];
»v = [O 40 0 40];
»axis(v);
»k = 0:40;
»r = [kJ;
»y = filter(num,den,r);
»plot(k,y, 'o' ,k,y, '-' ,k,k,'--')
»grid
»title('Unit-Ramp Response')
» xlabel('k')
» ylabel('y(k)')

:l + +:r•·=F·~1 : L<+~✓:✓ 1
25~ >/<~: ... :.. .
. 1 _ l. l.
20 ••• .. ······-l-············r············I···· .. -;-;;-r-~··· ····f ·············i ............. i ........... .
15 : : : ., .,
. . . . . . . . . . . -~- . . . . . . . . . . . . -~- . . . . . . . . :.:.· ~ - - . - . .
·
. .. 'f ............. I: ............ -~: ..... -.-.....[:........... .
: : .,,,,,. : : : :
10 ............[....... ·; ·;; ·(-.. ... ... t ............ ·t ............ ·j ............ ·j ........... ··j .......... ..
5 j.,., : : : : :
· · · · ·· · · · ·:,:· · · · · · · · · ·· -r · · ···· · ·· ·· · -r · · · ··· · · ·· · · -r··· ·· ······· ·r ··· ···· ·-··-·t · - - - - - ·-- - - --1 ··----···· ··
Or!i'l!!::e.--9""9,::.:;.....___ ___.__ _ __.___ ___.__ _ __.___ _.....i._ _ _~_ _...J
0 5 10 15 20 25 30 35 40
k

121
B-7-7. First, we determine the transfer function Y(z)/U(z).

Y{z) = C(zI - G)-lH


U(z) 1M .... ... """

z 0 0.25 -1 1

= [1 0 O] -1 z 0 0

0 -1 z - 0.5 1

= _ _z_2_-_0__.__7___5___
z__ = B( z)
z3 - 0.5z2 + 0.25 A(z)
Hence
A(z) = z3 - 0.5z2 + 0.25
B(z) = z2 - 0.75z
Thus,

Next, we solve the following Diophantine equation:


~ (z)A(z) + (3 (z)B(z) = H(z)F(z)

or
o< (z) (z3 - 0.5z2 + 0.25) + ~ (z) (z2 - o. 75z) = z 5

where
0( (z) = oCoz2 + o( 1z + o<2
(3 (z) = f oz2 + (31z + (3 2
p (z)
To determine cx.(z) and we define Sylvester matrix E.
- -,
0.25 0 0 0 0 0 i

0 0.25 0 -0.75 0 0
-0.5 0 0.25 1 -0.75 0
E=
1M
1 -0.5 0 0 1 -0.75
0 1 -0.5 0 0 1
0 0 1 0 0 0

122
We also define matrices D and Mas follows:
"" .,.,.
d5 0 ~2
d4 0 o:' 1
d3 0 ,x 0
D = = M=
""' ;,y.
d2 f2
d1 P1
t ,,,:
I
ldo l'1 Po
Then Mis determined from
~

A MATLAB solution for determining ..,.,.


Mis shown below .

E -
0.2500 0 0 0 0 0
0 0.2500 0 -0.7500 0 0
-0.5000 0 0.2500 1.0000 -0.7500 0
1.0000 -0.5000 0 0 1.0000 -0.7500
0 1.0000 -0.5000 0 0 1.0000
0 0 1.0000 0 0 0

/ D = [0;0;0;0;0;1];
../ M = inv(E)*D

M =
0
0.0600
1.0000
0.0200
0.3600
0.4400

Thus, c( ( z) and /3 (z) are determined as follows:

0( (z) = z2 + 0.06z

15<z) = 0.44z2 + 0.36z + 0.02


The block diagram for the designed system is shown on next page.

123
U(z) Y(z)
z 2 - 0.75z
z3 - 0.5z2 + 0.25

z2 + 0.06z 0.44z2 + 0.36z + 0.02


z2 z2

The gain constant Ko is determined from the requirement that y(oo) is unity in
the unit-step response. Since

Y(z) KoF(z)B(z) KoB(z) Ko(z - 0.75)


= = =
R(z) H(z)F(z) H(z) z2

we have

lirn
k-+<x1
y(k) = lirn ( z _ 1
z -+l z )
:JLKo(z -z20.75) ]( z z 1 )
= 0.25Ko = 1
Hence Ko is determined as

Ko= 4
The designed system is of second order.

B-7-8. We shall assume that the designed system has the block diagram of
Figure 7-9. For the given plant,
Y(z) 0.6z + 0.5 = B(z)
=
U(z) (z - 1)2 A(z)
Thus,
A(z) = (z - 1)2 = z2 - 2z + 1 = z2 + a1z + a2
B(z) = 0.6z + 0.5 = boz 2 + b1z + b2
Hence,

[Clearly, there are no common factors between A(z) and B(z) and the numerator

124
B(z) is a stable polynomial.]
In the design process we choose H(z) as the desired characteristic poly-
nomial of degree 2. Let us choose a stable polynomial of degree 1 as H1 (z), or

[Choice of H1(z) is, in a sense, arbitrary as long as it is a stable polynomial.]


Now define
H(z) = B(z)H1(z) = (0.6z + 0.5)(z + 0.5)

(This is the desired characteristic polynomial for this system.) Next, we


choose
F(z) = z
[F(z) can be any stable first-degree polynomial.] Define
D(z) = F(z)B(z)H1(z)
= z(0.6z + o.5)(z + 0.5)

= 0.6z3 + 0.8z2 + 0.25z


Hence,

do= 0.6, d1 = 0.8, d2 = 0.25,


We determine first-degree polynomials 0( (z) and (3 (z) by solving the following
Diophantine equation: •
0( (z)A(z) + / (z)B(z) = F(z)B(z)H1 (z) = D(z)
or

o( (z)(z2 - 2z + 1) + ,S (z) (0.6z + 0.5) = z(0.6z + 0.5)(z + 0.5) (1)

The 4 x 4 Sylvester matrix E for this problem becomes as follows:


""'
a2 0 b2 0 1 0 0.5 0

a1 a2 b1 b2 -2 1 0.6 0.5
E= =
""' 1 a1 bo b1 1 -2 0 0.6

0 1 0 bo 0 1 0 0
Define

d3 0 o( 1

d2 0.25 0( 0
D=
w
= I M=
d1 0.8 W'

P1
do 0.6
fo
125
Then matrix M can be obtained from

The MATLAB solution for Mis


""'
0.5
0.6
M=
\M. -1
2.5
o{ (z) and (5 (z) are given by
o( (z) = o<'oz + ex 1 = 0.6z + 0.5

However, Equation (1) can be solved easily without using MATLAB. Since Equa-
tion (1) can be written as

O((z)(z2 - 2z + 1) = (0.6z + 0.5)z2 + (0.6z + 0.5)[-,B(z) + 0.5z] (2)


and f3(z) is a first-degree polynomial, the coefficients of the z2 terms must
be the same. Thus,
o( ( z) = 0. 6z + 0. 5

Then Equation (2) can be simplified to

z2 - 2z + 1 = z2 ~ /3(z) + 0.5z
from which we obtain

(3 (z) = 2 . 5z - 1
This result is the same as the MATLAB solution.
Using o< (z) and (3 (z) thus determined, Y(z)/V(z) becomes as follows:

Y(z) F(z)B(z) 1 1
= = =
V(z) F(z)B(z)H1 (z) H1(z) z + 0.5

Since V(z)/R(z) is

V(z) 1
R(z) = 8 model H1(z) = 2z - (z + 0.5)
z2

the pulse transfer function Y(z)/R(z) becomes

Y(z) = Y(z) V(z) 2z - 1


= - - - - = Gmodel
R(z) V(z) R(z) z2

The designed model-matching control system has the block diagram as shown in
the next page.

126
Y(z)
R(z) I(2z - l)(z + 0.5)
U(z)
1---,----------,----1
0.6z + 0.5
~ z2 (z - 1) 2

0.6z + 0.5
z

The unit-step response of this system can be obtained by entering the


following MATLAB program into the computer.

»% MATLAB Program for Problem B-7-8 (Part 1)


»
»%-----Unit-step response-----
»
»num=[O 2 -1];
»den= [1 0 O];
»r =ones(l,41);
»v = [O 40 0 3];
»axis(v);
»k =0:40;
»y =filter(num,den,r);
»plot(k,y ,'o')
»grid
»title('Unit-Step Response')
» xlabel('k')
»ylabel('y(k)')

127
Unit-Step Response
3 .-----.-------..----;;.....-,--.....------.----....----,

- - . - . . .
2.5 .............. ··\·. ········ .. ··!--........... ·~·· .......... ··\···· ..........?.............~ .......... ···\ ... ·········-
-. ... ... ..-. .-. ... ...
..- .. .
. . -
- -. .-
. . . . - .
2 '-&•········~············~·············~·············~·············~·············~·············\············-

. - - - -
1.5 ....... ····--·=··· ........ ···=· .............;.. ·........ ··.;... ·..... ··.. ·=··--· ... ····.. ;.. ·.... ···... ;..... ·.. ·.. ·-

0.5 .............. ~............. ; .............~ .............~ ............. ~ ............. ~ ............. j ............-

: : :
0
0 5 10 15 20 25 30 35 40
k

The unit-ramp response of the system can be obtained by entering the following
MATLAB program into the computer.

»% MATLAB Program for Problem B-7-8 (Part 2)


»
»% ---- Unit-ramp response -
»
»num = [O 2 -1];
»den = [1 0 OJ;
»v = [O 20 0 20];
»axis(v);
»k =0:20;
»r = [k];
»y = filter(num,den,r);
»plot(k,y ,'o' ,k,y ,'-' ,k,k,'--')
»grid
»title('Unit-Ramp Response')
» xlabel('k')
»ylabel('y(k)')

128
Unit-Ramp Response
20---------,-------=.-........;;~---.------~

15 ······················"·

10 ••••••••••••••••••••••••• • - • ■ ••••• ■ ••••••••• ■••••••

.. • • ■ • • • • • ■ • • ■• ■ •••••

....
■• ■ • • • • • : ■ • • ■ • • • • ■ ■ ••• - •••• ■ •• ■ ••••

..
... ..
..
... ..
.. ...
.. .
5 ..................... ■ ••••• ·: ••••••••••••••••• ..... -

...
. ...
• • • • -~ • • • • • • • • ■ • • • • • • ■ ••• ■ ••••••

.. ..
.. ..
.. ..
.. ...
. .
5 10 15 20
k

B-7-9. We shall assume that the designed system has the same block diagram
as that of Figure 7-9. For the given plant,
Y(z)
=
0.01873z + 0.01752 = B(z)
U(z) z2 - 1.8187z + 0.8187 A(z)
Thus,
A(z) = z 2 - 1.8187z + 0.8187 = z 2 + a1z + a2
B(z) = 0.01873z + 0.01752 = boz 2 + b1z + b2
Hence,
a1 = -1.8187, a2 = 0.8187
bo = o, b1 = 0.01873, bz = 0.01752

[Clearly, there are no common factors between A(z) and B(z) and the numerator
B(z) is a stable polynomial.]
In the design process we choose H(z) as the desired characteristic poly-
nomial of degree 2. Let us choose a stable polynomial of degree 1 as H1 (z),
or
H1(z) = z + 0.5
[Choice of H1 (z) is, in a sense, arbitrary as long as it is a stable polynomial.]
Now define

H(z) = B(z)H1 (z) = (0.01873z + .0.01752) (z + 0.5)

129
(This is the desired characteristic polynomial for this system.) Next, we
choose
F(z) = z
[F(z) can be any stable first-degree polynomial.] Define
D(z) = F(z)B(z)H1(z)
= z(0.01873z + 0.01752)(z + 0.5)

= 0.01873z3 + 0.026885z2 + 0.00876z

Hence,
do= 0.01873, d1 = 0.026885, d2 = 0.00876, d3 = 0

Define

o( (z) = rx oz + o( l

(3 (z) = ~ oz + f1
We determine 0( ( z) and f (z) by solving the following Diophantine equation:
ot (z)A(z) + f (z)B(z) = F(z)B(z)H1 (z) = D(z)

or
O((z)(z2 - 1.8187z + 0.8187) + (3 (z)(0.01873z + 0.01752)

= 0.01873z3 + 0.026885z2 + 0.00876z

The 4 x 4 Sylvester matrix ....


E for this problem becomes as follows:
0.8187 0 0.01752 0

-1.8187 0.8187 0.01873 0.01752


E=
IN'
1 -1.8187 0 0.01873

0 1 0 0

Define

d3 0 o{ 1
d2 0.00876 o( 0
D= = , M=
..... 0.026885
d1 f1
• do 0.01873 Po
Then matrix M can be determined from

130
A MATLAB solution for the determination of ,..,..
Mis given below.

E =
0.8187 0 0.0175 0
-1. 8187 0.8187 0.0187 0.0175
1.0000 -1. 8187 0 0.0187
0 1.0000 0 0

/ D =
[0;0.00876;0.026885;0.01873];
/ format long
=
/ M inv(E)*D
M =
0.01752000000000
0.01873000000000
-0.81870000000000
2.31870000000000

Hence
o< (z) = o( oz + o< 1 = 0.01873z + 0.01752

(3 (z) = (3oz + f 1 = 2.3187z - 0.8187


Using <X(z) and f Cz) thus determined, Y(z)/V(z) becomes as follows:

Y(z) = F(z)B(z) = 1 = 1
V(z) F(z)B(z)H1 (z) H1 (z) z + 0.5
Since V(z)/R(z) is

V(z) I"! H( ) 0.32 (z + 0 . 5 )


R(z) = '1nOdel 1 z = z2 - 1.2z + 0.52
the pulse transfer function Y(z)/R(z) becomes
Y(z) = Y(z) V(z) = 0.32 I"!
R(z) V(z) R(z) z2 - l.2z + 0.52 = '1nodel

The designed model-matching control system has the block diagram as shown in
the next page.

131
V(z)

R(z) j 0.32(z + 0.5) U(z) Y(z)


0.01873 z + 0.01752
7 z2 - 1.2 z + 0.52 z2 - 1.8187 z + 0.8187

Grnodel H1(z)

0.01873 z + 0.01752 2.3187 z - 0.8187


z z

The unit-step response of this system can be obtained by entering the


following MATLAB program into the computer.

»% MATLAB Program for Problem B-7-9 (Part 1)


»
»% ----- Unit-step repone -----
»
»num =[O O 0.32];
»den= [1 -1.2 0.52];
»r = ones(l,41);
»v =[O 40 0 1.5];
»axis(v);
»k = 0:40;
»y = filter(num,den,r);
»plot(k,y ,'o')
»grid
»title('Unit-Step Reponse')
» xlabel('k')
» ylabel('y(k)')

132
Unit-Step Reponse
1.5 ...----.....---....---.....---..;;,,..._,..;;_ __,.._ _ _ _ _ _ _ __

:o
9 0
: 0 . - . - • •
1- ·•··· ·••o•-=-: • • • • • • - • • o.,;.. • • • • • •..._. o·~·O·E> -e- e• ~·O·E:i -e e-G•O·O·E> -e-G• O·O-o -e- ~. O·O·O-&◄ ~
'!'00'-' : : : : ;
...

-
...
-

..
..

-
.-.

--
.
.-
-

-- ..-
• -

.-- ..-. -.. -.. -


.-. --.
---

- • ■ - .. -
. •

0 : : :
-.- -.- -.. ..:. :
-- .:-. :
-...
- . .. .. .. -. -. .
0.5 -··--·······~·············~·············~·····-·-·····~·············~·············i·············i············-
.- . - -. ..
-. .
..
. -- -.- .- -- .-.
. .. ... --- --. ... -.
■ • .. - • • -

0
:
-- :
.
: : : : :
.
.- . - .-- .-- .... ---
.. -... .... ..-. -.- . .-
. . . .-.
:. .. :- .. :- . ..
0 = 20 25 30 35 40
0 5 15
k

The unit-ramp response of the system can be obtained by entering the following
MATLAB program into the computer.

»% MATLAB Program for Problem B-7-9 (Part 2)


»
»% ----- Unit-ramp respone ----
»
»num = [O O 032];
»den = (1 -1.2 0.52];
»v = [O 20 0 4];
»axis(v);
»k = 0:20;
»r = [0.2*k];
»y = filter(num,den,r);
»plot(k,y ,'o' ,k,y ,'-' ,k,0.2*k,'--')
»grid
»title('Unit-Ramp Reponse')
»xlabel('k')
»ylabel('y(k)')

133
Unit-Ramp Reponse
4
... ,
...
. . ...
3.5 ......................... - .......................... ·~. .......................... ·~-....... ; ·;,: ,,,, ...........
~
,,,,,, .
: : : ,,,,,,,
3 ...................... ···-:·· ........................ ·~ ..................... ··; ;..,~··· ....... .
,, ... :
2.5 .. .- ,,
............................:..............................;, ............... -JI'.-:-: .•....... • .......................... .
.:..
:;;r
:
.. .: , , .
2 ................................:..............................;.~---······· ............... ;. .......................... .
~ :. ,, ," :. :.
1.5 ■
••••••••••••••••• ■ ■
••
. ...
• • • •: . . . . . . . . . . . . . . • , : : " :• • • • • • • • •
.:
. . . . . . . . . . . . . . . . . . . . . . . . . . . . -~ • • • • • • • • • • • • • • • • • • • • • • • • • •

.:. ,,,, ... , ..


............................ ,,,, ,, .
: .................................................................................................
: .
1 ... ,, : : :
., .. . .
,,
0.5 ··········;..,·············- ..: .: .:
,, ... ·························:···························:··························
.. ..:
,, ., :. .
0
0 5 10 15 20
k

134
CHAPTER 8
B-8-1. Referring to Equation (8-23), we have
l'.(k) = ~ + g*!:(k + 1) [f + ~-½.*f(k + 1)] -l £
. = [l OJ+ [o -0 •.5] [Pn(k + 1) P12(k + 1)]
0 1 1 1 P12(k + 1) P22Ck + 1)

l 0] [l l] [pll (k + 1) P12(k + 1)1 i-l [ O


{[
X O 1 + 1 1 P12(k + 1) P22(k + 1)jj -0.,5

The boundary condition for P(k) is

:cs)
-
= s
-
= rlo :]
1

Hence

P(7) =
...
[l :J
0 + [: -0/ J[: :Ju: :J + [: :][: :Jr
0 1]· [ l .1667 -0 .1667]
[
X -0.5 1 = -0.1667 1.6667

P( 6 ) = [l OJ [O -0.,5] r 1.1667 -0.1667]


"" 0 1 t 1 ~0.1667 1.6667

x{[: :] + [:
l] [ 1.1667
1 -0.1667
-0.1667]}-l [
1.6667
0
-0,.5

= [ 1.2.560 -0.21431

-0.2143 1.7143J

-
Similarly, we can obtain P(.5), P(4), ... , P(O) as shown in Table B-8-1.
Next we determine the feedback gain matrix K(k).
""' """
Referring to Equation
(8-27), we have ""'
!f(k) = ~-l~(~*)-1 [!'._(k) - s_J
= [i i] [O -0.,5]-l {[pll(k)
1 1 p12 (k)

l] [pll (k) - 1
= [1 1] [_:
0 P12Ck)
p 22 (k) - 1]
135
Hence, we find
K(8) =
..... [o o]
K(7) = [-0.1667
""'
!(6) = [-o .2143
-
Similarly, we get K(5), K(4), ... , K(0) as given in Table B-8-1.
.....
To compute x(k), first define
...,..
""'

Then

and

Hence
0.2114
x(l) [ 0 •2803] [2 ] [ 0 •9834-]
~ - -0.2886 0.2803 2 - -0.0166

x( 2 ) = [ 0.2114 0.2803] [ 0,9834-] [ 0.2032]


.,.. -0.2886 0.2803. -0.0166 = -0.2885
Similarly, we can obtain ....
x(3), 1M
x(4), ... , x(8).
....

Since the control sequence u(k) is given by

we find - -
u(k) = - K(k)x(k)

""' -
u(0) = - K(0)x(0) = - [-0.2114 0,7197] [:] =- 1.0166

O,9834-]
u(l) = - f(l)~(l) = - [-0.2114 0. 7197] [ = 0 .2198
-0.0166
Similarly, we obtain u(2), u(3), ... , u(7).
Finally, the minimum value of J is obtained as follows:

J. = - 1 x*(0)P(0)x(o) = - 1 [ 2 2] [ 1.2705 -0 .2114] [2]


min 2 .... ... """ 2
-0.2114 1.7197 2

= 5.134,8

136
Table B-8-1
k
1.270.5
P(k)
"""
-0.2114]
K(k)
""'
-
x(k) u(k)

0 [
-0.2114 1.7197
[-0.2114 0,7197]
[:] -1.0166

1.270.5 -0.2114] 0,9834];


1 [ [-o .2114 0.7197] [ o. 2198
-0.2114 1.7197 -0.0166

1.270.5 -0.2114] o.2033J


2 [ [-0.2114 0.7197] [ o. 2506
-0.2114 1.7197 -0. 288.5

1.2704 -0.2114] -0.0379]


3 [ [-0.2114 [ 0.0924
0,7197]
-0.2114 1.7197 -0.139.5

1.2703 -0.21131 -0.0471]


4 [ [-0.2113 0.7194] [ 0.0103
-0.2113 1.7194_ -0.0282

1.2697 -0.21181 -0.0179]


5 [ [-0.2118 0.71767 [ -0.0079
-0.2118 ....
1.7176_ 0.00.57

1.2560 -0.2143] -0. 0022]


'
6 [
-0.2143
[-o .2143 O. 7143] [ -0.0053.
i 1.7143 0.0068

[o. 001.5]
1.1667 -0.1667]
7 [ [-0.1667 0.6667] -0.001.5
-0.1667 1.6667 0.0026

0.0011]
8
[: :] [o oJ [ 0
0.0004

B-8-2. Referring to Equation (8-74), matrix P can be determined from vv,

P = Q + G*P(I + HR-lH*P)-lG
"""" '-"""'\,",'\-"' """' """'~ \,V\

By substituting the given matrices G, H, Q, and R into this last equation, we


obtain ""' "" '""'

PH P12] = l~l -0.5] [PH P12]


~ a.:]+ [:
P12

X ff: l [ P22
0
1_
0

+ oj['l
11
7

[1
OJ [
PH
1

P12
P12 P22

P121)-l [O
P22~ -0.5
OJ
1
\
137
or
Pll -0.5P12 -0.5P22] -P12 J-
[ P12] = ll [
P12 P22 0 a.:]+ P12 P22 1 +\11 [: 1 + PH

X [_:.5 :]
By simplifying this last equation,

Pn Pi2J = [1 o l+ 1 _ [-0.25p12 2 + o.25p22 (1 + Pn>


~ 1 + Pii
P12 P22 o o.51 0.5P12 2 - o.5P22<1 + P11>
.J

0.5P12 2 - 0.5P22(l + P11~


-P12 2 + P22(l + P11) J
from which we obtain
(1)

(2)

(3)

From Equation (3) we get


Pl22 = 0.5(1 + PH) (4)

By substituting Equation (4) into Equation (1), we obtain

Pll = 0.875 + 0.25P22 (5)

Substitution of Equation (4) into Equation (2) yields

P12 = 0.25 - 0.5p22 (6)

From Equations (4) and (5), we have

P12 2 = 0.9375 + 0.125P22 (7)

From Equations (6) and (7), we obtain

from which we get

P12 = - 1.1328 or 0.8828


Since Y'"
P being a positive definite matrix requires P22 > 0, we choose

P12 = -1.1328
[See Equation (6).] Then, from Equation (6),
138
P22 = 0.5 - 2P12 = 2.7656
From Equation (5) we get

Pll = 0.875 + 0.25 X 2.7656 = 1.5664


The P matrix is thus determined as

1.5664 -1.13281
p = [
"""' -1.1328 2.7656
Notice that matrix Pis positive definite.
W\
Thus, it is the desired P matrix.

Referring to Equation (8-79), the optimal control law is given by

u(k) = (R + H*PH)-lH*PGx(k)
WO, ..._ """"""' - ""'"""'"-""'

where
!. =
= - [o.2207

[o .2207
-0.4414] ~(k)

-0.4414]
=-
-
Kx(k)

The minimum value of J is given by

J. = __l_ x*(0)Px(o) = 4.1328


min 2 ..... .......

B-8-3. From Equation (8-87) we have


G*PG - P =- Q.
or """""'""""""' ~ ~

P12] [l P12] = _ [l
P22 a P22 0
which can be simplified to

This equation is equivalent to the following three equations:


2
2ap12 + a p 22 = -1
P11 + (a - 2 )P12 - ap22 = 0
P11 - 2pl2 = -0.5
Solving these three equations for the p .. 's, we obtain
J.J

139
2
(2 + 0.5a) 0.5a - 1.
a(a+ 2) a(a + 2)
p =
w-
0.5a - 1 2
a(a + 2) - a(a + 2)

Since -1 ~ a < 0, P is positive definite .


'-
The performance index J can now be written as
2
J = ...1_ x*(0)Px(0) = ...1_ -0 .5a + a - 6
2 ""' ,_,.. 2 a(a + 2) ·
To obtain the optimal value of a, we set

-5hl.... = 0
da
This yields
a= -0.8730 or 6.8730

Since -1 ~a< O, we discard a= 6.8730. Since d2J/da2 > O with a= -0.8730,


the minimum value of J occurs when a= -0.8730. The minimum value of J becomes

1 -o.5a2 + a - 6
Jmin = 2 a(a + 2) = 3.6865
a= - 0.8730

B-8-4. The optimal control law is given by

u(k) = - Kx(k)

where K is the undetermined gain constant. Hence

x(k + 1) = (0.3679 - 0.6321 K)x(k)

The performance index can be written as

J = z1 ~[2
L,
22
x (k) + K x (k)
] = z1L..
;
k=0 k=0
Referring to Equation (8-94), we have

(1 + K2 )x2 (k) = - [px2 (k + 1) - px2 (k)]

= - [p(o.3679 - 0.6321 K) 2x 2 (k) - px 2 (k)]


Hence
[ 1 + K2 + p(0.3679 - 0,6321 K) 2 - p ] x 2 (k) = 0

This last equation must hold for any x(k). Therefore, we require that

1 + K2 + p(0.3679 - 0.6321 K) 2 - p = 0
or

140
p =
1 - (0.3679 - 0.6321 K) 2
Noting that the performance index J can be given by

J = ~ px 2 (o)

to minimize this value of J [for a given x(o)] with respect to K, we set

~=0
dK
or

_S?_ _ 2K [1 - (0.3679 - 0.6321 K) 2] - (1 + K2 ) [2(0.3679 - 0.6321 K)0.6321]


dK - [1 - (0.3679 - 0 ,6321 K/] 2

=0
which can be simplified as

K2 + 5,4363 K - 1 =0
from which we obtain

K = -5,6144 or 0,1781

For K = 0.1781, we have p = 1.1037. For K = -5,6144, p becomes negative.


Hence we choose

K = 0,1781, p = 1.1037
Thus, the optimal control law is given by
u(k) =- 0.1781 x(k)
and the minimum value of the performance index is given by

J.
min
= 1
2 (1.1037)x2 (o) = 0.5518 x 2 (o)

B-8-5. Suppose that we attempt to find a positive definite matrixf for


this system. Let us assume that Q = I and R = 1. Since the given Gmatrix
is nonsingular, Equation (8-101): ~ M - """

P
V\f\
=Q IN'\
+ G*P(I + HR-lH*P)-1 G
t,,v\ jt\.,,,. V1,A \,N\- •'\A '\,\..-

can be rewritten as follows:


(G*)-lPG-1
11\A ~
= (G*)-lQG-1 IN\ VVV\
+ P(I + HR-lH*P)-1
v\,\ vVl VY - V\A VVi
(1)

Noting that

141
-0.5 -2
(~*)-1 =[
-0.5
0 J-1
1.5 -
[
-2/3 2~3]
-0.5 -0.5 -J-1 -2/3]
G-1 = [ = [-:
""' 0 1.5 2/3

Equation (1) can be written as

[
-2
-2/3
0 ]~Pll
2/3 P12
P12] [-2
P22 0
-2/3] [-2
2/3 = -2/3 2~3][: :] [-: -2/3]
2/3

....,\

+~Pll
Pl2
P12l
I
P22I..! ([: :J + [: :J [
Pll

P12 :::Jr
which can be simplified to

14P11 (4/3)P11 - (4/3)P12 ]


l(4/3)P11 - (4/3)P12 (4/9)P11 - (4/9)P12 - (4/9)P12 + (4/9)P22

4 4/3] l Pll
[ [
= 4/3 8/9 + 1 + P11 P12

from which we get the following three equations:

Pll
4Pn = 4 +
1 + Pn
4 4 4 P12
-3- Pn - 3 PI2 = -3- + 1 + P11

.....i._ P11 - - 8- P12 + .....i._ P22 = - 8- + l [-P12 2 + P22(l + P11) J


9 9 9 9 1 + Pn

Solving the first of the three equations, we obtain

P11 = 1.1328

Solving the second equation gives


Pl2 = 0.09825

142
The last of the three equations yields

P22 = -0.8428
Hence
1.1328 0.09825]
p - [
""' 0.09825 -0.8428
Clearly, Pis not positive definite. For this system no positive-definite
matrix P exists that satisfy the Riccati equation. (This means that the
quadratic optimal control approach can not be applied to this system.)

B-8-6. Consider the dual counterpart of the original system

x(k + 1) = G*x(k) + C*u(k) (1)


"""" """"""""' ~"""
Since the original system is completely state controllable and observable,
the system defined by Equation (1) is completely state controllable. The
Riccati equation considered here is

"""'
P = _,.,Q + ~
GPG* - GPC*(R + CPC*)-lCPG*
~ """' ~ ~
(2)
Consider the equation
/\ A /\ A
P =Q+
IA,'\,\,,\.."""'"""""""'
K*RK + (G - K*C)P(G* - C*K)
""""\.v-"""·-- -·~
(3)
A
Assume here that G - K*C is a stable matrix, (We shall later prove that it
is a stable matrix.) .... ""'
We shall first prove that matrixt satisfying Equation (3) is unique.
Then we show that matrix E- satisfying Equation (2) is unique. Suppose that
there exist two matrices ...P1 and \MP2 that satisfy Equation (3). Then

= ....Q + "K*RK -~ /\

--
/\
+ (G - K*C)P (G* - C*K)
"""" .._~""""'-1~
(4)
A /\ A A
R2
.....
,
Q + """"'~
= """'- K*RK + (G - K*C)P (G* - C*K)
""" ...,,.. ..... ""2 """ ...... (5)
Subtracting Equation (5) from Equation (4), we obtain
A A
P - -2
=l
P = (G
""'
- K*C)(P
""' - ....1
- ..-2
P )(G*
._.
- -C*K)
....
Define

Then
A /\ A /\
P
""""'
= (G &,I,'\
- K*C)P(G* - C*K)
~-"""' ..,..,. l,YI \,¥\
(6)
Notice that if
such that
Pf
\N1
O, then there exists an eigenvector x. of matrix (G - K*C)*
"""' 1
""""' ~ ~"""""

143
Let us define the eigenvalue that is associated with the eigenvector x. to
be A . . Then ""'l
l
/\
(G - \K*C)*Xi
~ N'-'-"'~
= A. iXi
M

Hence, from Equation (6) we have


I\ /\ A ~ /\ I\ /\
(G - ~
K*C)P(G*
~
- C*K)x.
~ """1.
Px. = (G - K*C)P .A .x. - Px.
- """*1.
"""" """"' """'1 "-
""" """ """ """' 1.""1. """'~1.

=[>...(G
1. ""'
K*C)
- """" .....,,
- r]Px.
MA MW1]_
= o
Iv\
(7)
Equation (7) implies that A
" l. - l i· s an eigenva
• 1ue of ...,
G - ..,..
K*C..,.· Since
• Ai < 1, I I
I
we have A . -l 1> 1.
l A
This contradicts the assumption that G - K*C is a stable
.._ """'"""""
matrix. Hence, P must be a zero matrix, or
IN\

£1 = !2
Thus, we have proved the uniqueness of matrix P that satisfies Equation (3).
Notice that Equation (3) can be written as follows:
-
A A A /\
P = Q + K*RK + (G - K*C)P(G* - C*K)
~ """ 1,,1,1\"""""""' """" """"'\,\,,\""""""" """"""""

AA A /\ A I'\
= Q + K*RK + GPG* - K*CPG* - GPC*K + K*CPC*K
~ """'~ ._____. ~~ ~~ """"~K,,-1

= 3. + 8E£* + [c~ + QR£*)½i - Ct+ ~*)-½2EQ,*] *

•[c~ + ~*)½! - Ct+ 92-*)-½9!£*] - gQ*(~ + ~:)-19!.Q.* (s)


If we choose
K=
~ .
(R""""- + CPC*)- 1CPG*
~ ~
(9)
I\
then Equations (8) and (2) become identical. (Note that! is the optimal gain
matrix that minimizes the performance index.). Hence, matrix VII\
P satisfying
Equation (2) is unique.
Next, we shall prove that matrix Pis positive definite.
,.. I\ I\
... Notice that

P
\,,\A
=Q+ .......
K*RK + (G - K*C)P(G* - C*K)
\A,\"'"""" W\ """"""""'""" ~ """'"""

may be written as
00
~ ,A k A /\ "'k
L..... (G - K*C) (Q + K*RK)(G* - C*K) (11)
""""" """'"""" """ """'~ """" """'"""
k=O
because

z
00
A k A A /\ k
+ (G - K*C) (Q
"""' k"'\
+ K*RK)(G* - C*K)
.,,.._""""""'
"""'VM, ........ ~ ~

k=l

144
=Q+ " " + (G - /\
K*RK K*C) [ ~ ,6. (G - "K*C) k (Q + /\K*RK) /\
......... ~~ """ """"""'" ~ ~"""" '°""- w,""""""'
k=O

-(~ - !:.*il] (£.* - ~il


=Q + /\ "
K*RK + (G - K*C)P(G* - C*K)
/\ /\

""" """"""""""' """' L,\,o"\"""'"""'"""' """'Mo,\

.... I\
Since Q + ~*_RK is a positive definite matrix, from Equation (11), matrix Pis
also positivedefinite. Hence, matrix£_ given by E~ation (10) is positive
definite.
,.,
Consequently, ,we have shown that if G - K*C is a stable matrix and IN\ \I\,\ IN\

if ..,.
K is given by Equation (9), or
A
K = (RIN' + CPC*)-lCPG*
kl\ ~ ~

then matrix ,..,.P that satisfies Equation (2) is unique and is positive definite.
Finally, we shall prove~that if Equation (3) is satisfied by positive
definite matrices P and Q + K*RK, then matrix G - ""1...,..
~
K*C is a stable matrix.
""' ~~ A \..V\

Let us define the eigenvector associated with an eigenvalue ,\ . of (G - K*C)*


as ..,..1
x .. Then ]_ """' """'"""'

(G - "K*C)*x. = A .x.
"""' ~ - ~1. 1"""1.

By premultiplying both sides of Equation (3) by Xi* and postmultiplying both


sides by ....Xi, we obtain
/\ /\ /\ "
x.*Px.
~1.
IN\l.
= x.*(Q + K*RK)x. + x.*(G - K*C)P(G* - C*K)x.
"""'l. \,'\,\ - ~ .......1. '"-1 .,_ ..,_ """".,._ """" ~""" ,....J_
Hence

or
I .1
A_ 1 2 ""'1
x. *Px.
""""'1
- -1
X. *PX.
----1
= - '""1
x.*(Q + K*RK)x.
"
'°" "".......,. -1
/\

which can be written as

.1
( I~ 1 2 - l)x. *Px.
... 1 - 1
= - -1
x. *(Q
w-
+ K*RK)x .
...,.. ..,.,.,.. ....1

Since both ....


x.*Px.
1 ......... 1
and ...1
X.*(Q + "K*RK)x. /\
are positive definite, we have
....., .............. ""1

1Ail2 - 1 < 0
or

A
Hence, we have proved that matrix (g_ - ""'""
K*C)* is a stable matrix.
~
Next, for the original system

x(k + 1) = Gx(k) + Hu(k)


\M WV' -

replace all G's by G*'s and all C's by H*'s in the Riccati equation (2) to
~
get WV,.. """' """

P = Q + G*PG - G*PH(R + H*PH)-l H*PG (12)


~ \N'<,, ~"""""" \t\A.""""""'w.. ""'~ """"'"""""""'

145
Then, by exactly the same approach, it can be proved that this Riccati
equation [Equation=(l2)] has a unique positive definite solution and matrix
G - HK is a stable matrix.
-----------------------------------------------------------------------------
B-8-7.

MATLAB Program for Problem B-8-7


% ---------- Minimum-energy control problem----------

%***** Solution of minimum-energy control problem, where


% the number of unknown ·variables is greater than that of
% equations, is obtained by use of the right pseudoinverse *****

% ***** Enter matrices G, H, and x0 *****

G = [1 0.6321 ;0 0.3679);
H = [0.3679;0.6321 );
x0 = [5;-5];

% ***** Enter matrices f1, f2, and f3 *****

f1 = inv(G)*H;
f2 = inv{G)"2*H;
f3 = inv(G)"3*H;

% ***** Enter matrix F = [f1 f2 f3) and compute the right


% pseudoinverse FRM = F'*inv{F*F') *****

F = [f1 f2 f3);
FRM = F'*inv(F*F')
FRM=

0.7910 0.7191
0.5000 0.4738
-0.2910 -0.1929

% ***~* Optimal control uopt can be given by*****

uopt = - FRM*x0

uopt =

-0.3598
-0.1310
0.4908

u0 = uopt(1 ), u1 = uopt(2), u2 = uopt(3)

u0=

-0.3598

146
u1 =

-0.1310

u2 =

0.4908

% ***** The minimum value of performance index J can be


% given by *****

Jmin = O.S*uopt'*uopt

Jmin =

0.1937

B-8-8. Notice that the rank of [H ~H] is two and the given system is
completely state controllable. We shallsolve three cases separately.
Case 1 n = 2: Using the right pseudoinverse we shall determine u(O), u(l),
and u(2). Since state x(3) can be given by

if we set w,
x(J) = .....
0, then

Define

Then
(1)

where

f = G-1H = [ll ,
w.l """ ""'' 0
f = G_2H = [o] ,
-.,2
""' ""' 1
f
. . . . .3
= G-JH =
'\,'\,-", ~ [_:]
Hence, Equation (1) becomes

0 1]
x 1 (o)] = _ [-. 1 [u(O)l
u(l)
[
x 2 (o) o 1 -l u(2)

By use of the right pseudoinverse, we obtain

147
u(O)]
[ u(l) = - fM t(O) = - ~(~*)-1
[x1 (o)]
u(2) x2(o)
where
0
F = [l
1M 0 1 _:]
and
2 1

~ J~:
3 3
-1 -1 1 2
] =
= F"'(FF"')-l = [~ 3 3
2
1 1
3 -3
Hence
2 1
u(O) -1
3 3
1 2 -1 (2)
u(l) = -
3 3 [:) =
1 1
u(2) 0
3 3
The minimum value of J is given by

J. 1
min = - 2
[2 l
u (o) + u2 (1) + u2 (2) _ = - 12 (1 + 1 + o) = 1

Notice that by using the control sequence given by Equation (2) we have

The state ?i(2) becomes Q. in two sampling periods, or .;(2) = Q• Thus, in this
case the minimum energy control is the same as the time optimal control.

Case 2 n = 3: State x(4) can be given by


""'

Substituting O for x(4) in this equation yields


(M ""

Define

Then

(3)

148
where

Hence, Equation (3) becomes

u(O)
0 1 u(l)
1 -1 -:J u(2)
u(3)
L

By use of the right pseudoinverse, we obtain

u(O)
u(l)
= - FRM x(O) = - F*(FF*)-l
\N'\ vV\ VV\ VVV'\
u(2)
u(3)
where
0 1
F = 11
"" Lo 1 -1

and

2/3 1/3
1/3 1/3
FRM = F*(FF*)-l =
"""' ""' """' 1/3 0

0 1/3
Hence
u(O) 2/3 1/3 1

u(l) 1/3 1/3 2/3


= -
u(2) 1/3 0 1/3
u(3) 0 1/3 1/3

Then, the minimum value of J, when n = 3, can be obtained as

149
Case 3 n = 4: State x(4)
,._ can be given by

Substituting O for x(5) in this last equation yields


V\,'\ """

x(O) = - G-lHu(O) - G-2Hu(l) - G-3Hu(2) - G-4Hu(3) - G-5Hu(4)


"""' \,1.-\.k'\ ~""' IN\'-'\,'\ """""" V , . \ . _...

Define

Then
(4)

where

Hence Equation (4) becomes


u(O)
u(l)
0 1 -1
[
xl (O)] = _ [l
x2(0) 0 1 -1 2 _:] u(2)
u(3)
u(4)
By use of the right pseudoinverse, we obtain

u(O)
u(l)
u(2) = - _FRMx(O) = - F*(FF*)-1 jxl(O)]
.... - ""' """"' Lx2<0>
u(3)
u(4)
where
0 1 -1
F
VV\
= [l0
1 -1 2 _:]
5/8 3/8
3/8 7/24
FRM
IA,,\
= F*(FF*)-1 =
~ 'VV'v\
1/4 1/12
1/8 5/24
1/8 -1/8

150
Hence,
7
u(O) 5/8 3/8 1

u(l) 3/8 7/24 1 2/3

u(2) 1/4 1/12 = - 1/3


u(3) 1/8 5/24 1 1/3

u(4) 1/8 -1/8 0

Then, the minimum value of J is obtained as

Note that in this case we have u(4) = O. However, this is not always the
case. If the initial state were x1(0) # x2(0), i.e.,

then u(4) would be 1/8.

B-8-9. From Figure 8-11 we obtain the following equations:

x(k + 1) = 0.5x(k) + 2u(k)

u(k) = k1v(k) - k2x(k)


v(k) = r(k) - y(k) + v(k - 1)
y(k) = x(k)
where k1 is the integral gain constant and k2 is the feedback gain constant.
In this problem, k1 and k2 are variables and must be determined such that the
system is stable and will exhibit an acceptable transient response to the unit-
step input.
Since
v(k + 1) = r(k + 1) - y(k + 1) + v(k)
= -0.5x{k) + v(k) - 2u(k) + r(k + 1)

we obtain
- 0.5
[
x(k + l)]
v(k + 1) -
l -0.5
1 v(k) -2
j
0] [x(k)] + [ 2l u(k) + [OJ· r(k + 1)
1
(1)

For k = oo , we have

151
[
x( oo )]
v(co) =
[0.5
-0.5
all~
1
-
v(oo)
-
-2
rol
x(oo)J + r2 ]u(o0) +
-
1
r(oo)
J
(2)

For any step input, r(k + 1) = r(c,0) = r. Define


Xe(k) = x(k) - x(oo)
ve(k) = v(k) - v(oo)
Ue(k) = u(k) - u(oo)
Subtracting Equation (2) from Equation (1), we obtain

(3)

Note that

Define

X1(k) = Xe(k)
x2(k) = Ve(k)

w(k) = Ue(k)

Then, Equation (3) can be written as follows:

where

Rewriting, we have

~(k + 1) = ~(k) + !:!W(k)


w(k) = -Kx(k)
""""'
where
0.5
G = [
W\ -0.5

152
B-8-10.

MATLAB program for Problem B-8-10 (Part 1)

% ---------- Design of a servo system based on minimization


% of a quadratic performance index----------

% ***** The following program solves steady-state Riccati equation and gives
% optimal feedback gain matrix K *****

% ***** Enter matrices G, H, Q, and R *****

G = [0.5 0;-0.5 1];


H=[2;-2];
Q = [100 0;0 1];
R=[1];

% ***** Start with the solution of steady-state Riccati equation


% with P = [0 0;0 0] *****

P = [0 0;0 0];
P = Q + G'*P*G - G'*P*H*inv(R+H'*P*H)*H'*P*G;

% ***** Check solution P every 10 or 20 steps of iteration.


% Stop iteration when P stays constant *****

for i = 1:20,
P = Q + G'*P*G - G'*P*H*inv(R+H'*P*H)*H'*P*G;
end
p

100.0624 -0.0115
-0.0115 10.1892

for i = 1:20,
P = Q + G'*P*G - G'*P*H*inv(R+H'*P*H)*H'*P*G;
end
p

P=
100.0624 -0.0119
-0.0119 10.5107

for i = 1:20,
P = Q + G'*P*G - G'*P*H*inv(R+H'*P*H)*H'*P*G;
end
p

P=
100.0624 -0.0119
-0.0119 10.5167

153
for i =1:20,
P =Q + G'*P*G - G'*P*H*inv(R+H'*P*H)*H'*P*G;
end
p

P=
100.0624 -0.0119
-0.0119 10.5168

for i = 1:20,
P = Q + G'*P*G - G'*P*H*inv(R+H'*P*H)*H'*P*G;
end •
p

P=
100.0624 -0.0119
-0.0119 10.5168

% ***** P matrix stays constant. Thus steady state has


% been reached. The steady state P matrix is *****

P=
100.0624 -0.0119
-0.0119 10.5168

_% ***** Optimal feedback gain matrix K is obtained from *****

K = inv(R + H'*P*H)*H'*P*G

K=
0.2494 -0.0475

k1 =-K(2)
kl=

0.0475

k2 =K(1)
k2=

0.2494

154
To obtain the unit-step response curve [y(k) versus k], we may proceed as
follows: Since
x(k + 1) = 0.5x(k) + 2u(k)

= 0.5x(k) + 2[-k2x(k) + k1v(k)]


= (0.5 - 2k2)x(k) + 2k1v(k)
and
v(k + 1) = v(k) + r(k + 1) - y(k + 1)
= v(k) + r - (0.5 - 2k2)x(k) - 2k1v(k)
= (1 - 2k1 )v(k) + (-0.5 + 2k2)x(k) + r
we get

2k1 ] rx(k)] 0]
1 - 2k lv(k) + _1 r
f (1)
1

y(k) = x(k) = [l 0] [x(k)l + [0]r (2)


v(k) _)
For a unit-step input, r = 1.
The unit-step response y(k) versus k can be obtained by first converting
the state-space equations [Equations (1) and (2)] into the pulse transfer func-
tion Y(z)/R(z):
[num, den]= ss2tf(GG,HH,CC,DD)
where
GG = [0.5 - 2k2 2k1;-0.5 + 2k2 1 - 2k1]
HH = [0;1]
cc= [1 O]
DD= [O]
and then using the command filter as follows:
y = filter(num,den,r)
where r is a unit-step function.
To obtain the response v(k), first note that

v(k) = [0 1] [x(k)-j = FF 1x(k)j-


v(k) """' I v(k)
L
where FF= [0 1]. Then use the following command:
V"W\

[numv,denv] = ss2tf(GG,HH,FF,DD)
v = filter(numv,denv,r)

MATLAB program shown next yields the response y(k) versus k and v(k) versus k.

155
MATLAB Pr~rarn for Problem B-8-10 (Part 2)

% ---------- Unit-step response of designed system----------

% ***** This program calculates the response of the system


% when subjected to a.unit-step input. The values that are
% used for kl and k2 are computed in MATLAB Program Part 1. The
% response is obtained using the method to convert the discrete-
% time state-space equations into pulse transfer function form. The
% response is then found with the conventional 'filter' command *****

% ***** Enter values of kl and k2 *****

kl = 0.0475; k2 = 0.2494;

% ***** Enter matrices GG,HH,CC,FF,DD *****

GG = [0.5-2*k2 2*k1 ;-0.5+2*k2 1-2*k1 ];


HH = [0;1];
CC= (1 0];
FF=[0 1];
DD= [OJ;

% ***** To obtain the response y(k), convert state-space equations


% into pulse transfer function Y(z)/R(z} *****

[num,den] = ss2tf(GG,HH,CC,DD);

% ***** Enter command to obtain unit-step response y(k) *****

r = ones(l, 101 );
axis([0 · 100 0 1.2]);
k = 0:100;
y = filter(num,den,r);
plot(k, y, 'o' ,k,y, '-')
grid
title('Output y(k) to Unit-Step Input')
xlabel(' k')
ylabel('y(k)')

% ***** To obtain the response v(k), convert state-space equations


% into pulse transfer function V(z)/R(z) *****

[numv,denv] = ss2tf(GG,HH,FF,DD);

% ***** Enter command to obtain v(k) *****

axis([0 100 0 12]);


k = 0:100;
v = filter(numv,denv,r);
plot(k,v, 'o' ,k,v,'-')
grid
title('Output v(k) of Integrator')
xlabel('k')
ylabel('v(k)')

156
The unit-step response y(k) versus k is shown in Figure (a). The response
v(k) versus k is shown in Figure (b).
Notice that the system is stable and exhibits nonoscillatory response
characteristics. The response characteristics depend on a set of Q dnd R chosen
in the performance index J. VV\

Output y(k) to Unit-Step Input

0.6

0.4

0.2

10 20 30 40 50 60 70 80 90 100
k
Figure (a)

Output v(k) of Integrator


12.--------r---.--------r---.--------r---.--------r---.--------r--~

0e-----'----'-----'----'-----'----'----'----'----'-------'
0 10 20 30 40 50 60 70 80 90 100
k
Figure (b)

157

You might also like