Discrete-Time Control Systems: Solutions Manual
Discrete-Time Control Systems: Solutions Manual
Second Edition
Discrete-Time
Control Systems
Katsuhiko Ogata
University of Minnesota
1098765
ISBN 0-13-317190-6
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
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 -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
B-2-4.
_ _1_ _ _ + ----'3"--_
1 - 2z-l 1 - z-l
1 -1 X(z)
1 - z
where
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]
= 0~ a X(z, a)
where
(h - 1)! z
X ( z, a) = h
(z - a)
Hence
----------------------------------------------------------------------------
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:
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
Columns 8 through 14
Columns 15 through 21
Columns 22 through 28
Columns 29 through 35
Columns 36 through 41
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]
=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, ...
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 )
That is,
x(k) =0 fork= 0, 1, 2
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)
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)
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
B-2-14.
1. Direct division method:
Hence
x(o) = o, x(l) = 1, x(2) = 0, x(J) = -3
x=
Columns 1 through 12
0 1 0 -3 0 5 0 -7 0 9 0 -11
Columns 13 through 24
10
Columns 25 through 36
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
.
+ 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
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
For k = 3, 4 , 5, ....
X(z)zk-1 = (o.368z 2 + 0.478z + 0.1_54)zk-3
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
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
12
Hence,
x(O) = 0
x(k) = 3.3333(0.S)k-l - 3.3333(0.S)k-l, fork= 1, 2, 3, ...
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)')
»
. .
1.5 · ·· ·· ·· · ·· ··r ··· · ·· ·····-r ·· ·· ··· ·· ····r ·· · ·· · ·· ··· -r··· ···· ···· ··r ······· ···· · ···· ·· ·· ··· ·· ······ ····· ·
.-
.
.. - .
.-
- .
1 - ••••••• ··-: . . . . . . . . . . . . . -~. - ■ ■
.--
• - ......... -:- ••••••••••• -: ••••••••••••• - .................... - •••
... -- --
--- -.- ..- ..-
-
:2 0.5
>II
: : :
..
..
..
:
-···············=··············=··············=··············
.-
..-
..
············· ........... .
■
-
-
•
.
■
:- .: .: .:
-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
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, ...
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
= 0.5820z-l + z- 2 + z-3 +. • •
16
Hence
x(0) = 0
x(l) = 0,5820
x(k) = 1 fork= 2, 3, 4, ...
. .
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,
RCx + X = e
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
lt=-o
kTe-kTs = Te-Ts + 2Te-2Ts + 3Te-3Ts + • • •
Te-Ts
=------
(1 - e-TS)2
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)
s + 3 2 1
X( s ) = ~(_s_+_l~)~(~s_.c..+_2~)- = _s_+_l_ s + 2
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
() z • 1 z 1 z
y z = (z + o.5)(z - 1) = - 1.5 z + 0.5 + 1.5 z - 1
Hence
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
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
Hence
y ( z) = _X_,_(z.. . . ,_)___l_
1 - az
Then
G(z) = ~ = l
~ 1 - az -1
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
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
X(z) = _ __;:;l__
1 - z -1
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, ....
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
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 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)
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
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)
29
B-3-14. Since
00
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,,
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)
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)
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
32
Continuous-time output c(t): From Figure 3-70 we have
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
* = _K_e_-_s__
)
1 - e-s
Therefore,
C(s)
- K2 (K - 1) 2 (t - 3)1(t - 3) + • ft ~
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)
+ 0. 7250z -1 ( 0 .6182z -1 )
-1 6 -2
1 - z + 0. 32lz
Notice that
c(O) =0
c(l) = 0.3679
c(2) = 0.6321
c(3) = 0.3996
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 *
-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 + • • •
B-3-21.
c(z) = G(z)M(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)
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)]
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)
3T 0
2T 0
0 T kT
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,
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
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
43
CHAPTER 4
B-4-1.
(a)
1 Re
(b)
Im.
Re
i
I
/
I
/'
/
/
/
/
./
/
= a 0z
J + a 1z
2
+ a 2z + aJ
Thus
a = 1,
0
44
The conditions for stability are
3, P(-1)< 0
This condition is also satisfied, since
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
B-4-3.
~ = ----::---__::::,_1_ _ _
= 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
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.
B-4-4.
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
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
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
B-4-6.
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
By defining
48
we have
l k+l k+l
ly(k)I~ 1--aa Ml~ M2 - ~- a Ml~ M2
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
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°
= 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
360° = 18.14
19,847°
B-4-9.
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
and
{£; 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.)
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
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
= 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
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
54
Unit-Step Response
1.4.-----------.-----=-r-____,;;.._---.------r---,-----,
0 -2 _'?.·········1·············-r············-r·············r·············r·············i·············1············-
= : : : : : :
0o·~----l~'----1·~--....11~'----2·~--....i~'----3......~----3~'"'.:-----'40
GD(z) = IC +
--p 1
~ -1
=
- z
(¾, + K1 )(z - ¾, + ~ )
=
z - 1
G(z) = q_ [ 1 - s e -Ts 10 ]
0 (s + 1) (s + 5)
(1 -1) [ 10 ]
= - z } s(s + 1) (s + 5)
¾,
(~ + 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
-1
1 - z
0.2
= 2.599
56
jw
-0.6706
\ 0.8187
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
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
2.1617
z - 1 z(z - 0.1353)
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)
z - 0.0127
z - 1 z(z - 0,1353)
z - 0.0127 2.1617 =1
(KP+ KI) z - 1 z(z - 0,1353)
z = 0.5629 + j0.4090
or
(2)
z - 0.0127
(z - l)z(z - 0.1353)
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...='-------="-------
= ___ 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
+ l.0012z -14 + , . ,
B-4-12.
Wd = Wn✓ 1 - 52 = 4 ✓1 - 0,52 = 3.4641
59
z
2 -1 -1
= (0.1) z (1 + z ) = 0.005 z + 1
2
2(1 - z - 1 )2 (z - 1)
z + 1
2
(z - 1)
The location of the desired closed-loop pole in the upper half z plane is
(1)
z - 0.7719 (0.005) z + 1
z (z - 1)2
z - 0.7719 (0.005) z + 1
z (z - l) 2 z = 0.7701 + j0.2780
=1
or
K_p + KjJ = 42,779 (2)
60
~ = 9,758 and 1<"n = 33.021
= 42.779(1 - o.7719z-1 )
360°
n = 19.8470 -
- 18.14
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
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
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.
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 ····················:-----······ . ·········-=······················:·····················
. . .
2 -···············-::··
... . •·••······ . ········?···········
... ............ -:,-·,-·-··············
..
..
..
..
..
.
..
.
.. .. ..
0•1'1111:'o,,a::::_ _ _.,___ _ _ _.,__ . _ _ _ _.,__ . _ _ _ _.,__ .. _ _ ___.
0 10 20 30 40 50
k
63
B-4-14.
= 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:
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
64
Thus, we require that the gain K be set such that
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)
~(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
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)
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
=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
3600 -
15.20 - 23.7
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
-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
_ 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:
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
68
0.01 0.1 0.5 1 3.5 10 50
J)
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~
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.
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
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)
=0
or
z 3 - 1.6322z 2 + o.9282z - 0.2018 = 0
which can be factored as follows:
360° -
32,15"- ll. 2
71
B-4-18. Since T =1 sec, we have
G(z)
0.4J23z-l
=--~~"----
1 - 0,1353z-l
(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)
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
1 1 - o.1353z- 1
= F(z) 1 - z -1
(3)
0.4J23z-l
Then
72
F(z) = z-1 (4)
73
CHAPTER 5
y(k) = [2
B-5-2,
x1 (k + 1) 0 0 -6 x1 (k) 4
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
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)
x3 (k)
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
x3(k)
(This is in a controllable canonical fonn.)
and
x1(k + 1) = u(k)
x2(k + 1) = X1(k)
x3(k + 1) = x2(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)
76
x3(k + 1) = -12x1 (k) - 7x2(k) - 6x3(k) + u2(k)
y1 (k) = 2x2(k) + 2u1 (k)
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
1 2 1
P = -1 -4 -3
-1 1 3
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)
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)
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)
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)
80
y(k + 3) + a 1 (k)y(k + 2) + a 2 (k)y(k + 1) + a 3 (k)y(k)
Define
and
xl(k + 1) = x2(k) + hl(k)u(k)
x 2 (k + 1) = x3 (k) + h2 (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)
+ h 0 (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)
+ 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)
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)
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
Rewriting, we have
I
1M
= x1""'
+ x2
...
I
..,,. = ...x1 x2
+ .,..
...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
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
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
z -1
0 z
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
-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
85
Then
In terms of the state variables x1 (z) and x2(z),Equations (1) and (2) become,
respectively, as follows:
-----------------------------------------------------------------------------
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
+ ,.,..,,""'
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_ = ~ + £*!£
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
......,,
[ -[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
-
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
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
x2'k) 2e
= x 2 (k) + 2
= x2'k) - X
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
90
CHAPTER 6
The condition is bf 0.
or
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
or
-1
o.84
][x 1 (o)] + [-0.8] u(0) + [
x 2 (o) o.64
l ] u(l)
-o.8
91
1.)
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
1
rank [H
W\.
: GH : G~]
I ~I""'""""
= rank [~ 0
0 b
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
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
Thus,
Therefore,
State ....
x(l) is obtained as follows:
[::::;] = [-0~16
l]
-1
rl-a 2.16 ] [ 0] [-0 •16]
+ 1 c-iJ = -1.16
[::::;] - [-0~16
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
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
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"""
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)
u(o) = - x1 (o)
u(l) = - x2 (o) = - x1 (1)
u(2) = - x3(o) = - x1 (2)
u(J) = - x4 (o) = - x1 (3)
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)
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)
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
[
x1 (k + 1)] = [o 2
O- 5] lxl (k)] + [l] u(k)
x 2 (k + 1) 1 0 x 2 (k) 1
x1 (k + 1)] = r-0 ,5
0 ] rx1 (k)]
[
x 2{k + 1) O 0,5 x 2 (k) + [l]
1 u(k)
B-6-9.
1, Controllable canonical form:
y(k) = [o
98
3, Diagonal canonical form:
j0,5 0
0.5 +
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
Then
and we have
or
- Tk
1
The characteristic equation becomes
1 2
- T + 2 T k2
z - 1 + Tk2
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
G
aa
= O, G =
-ab [o -0.25], Gba = [:]
£bb = [:
102
K
.,,,.e
= ¢(G
w.bb
[ j
G
) ... ab
G G
... ab-bb
...,
-1
Since
-0.125]
we have
0
K = [
....e 0,5
and
~ (k + 1)
/V
= [o o]
l ~ (k) +
O .-v [1]
O y(k) + [o]J u(k)
B-6-15.
M= [H G*H];
rank(M)
103
ans=
Phi= GA2;
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.
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=
J= (0.5+0.S*i 0
0 0.5-0.S*i];
JJ = polyO)
JJ =
1.0000 _, .0000 0.5000
Phi = polyvalm(polyO),G);
Ke= Phi*inv(N')*[0;1)
Ke=
0.3400
-2.0000
-----------------------------------------------------------------------------
B-6-17. The system equations are
105
Thus,
u(k + 1) = -K2x(k + 1) + IS_v(k + 1)
(1)
o] [x(k)]
u(k)
Define
x (k)
e
= x(k) - x( oo)
[
xe(k +
u (k +
1)] [
1) - 0,5
0.5
K2 - Kl
1 ]-lx (k)]
e 1 - K2 u:(k)
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
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
[ x(O)] = [a]
u(O) b
-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
Hence
y(0) = x(0) = a
y(l) = x(l) = 0.5 a+ b
y(k)
~ arbitrary points
a
0,5 a+ b
{
•
• • • • •
0 1 2 3 4 5 6 k
107
B-6-18. The system equations are
y(k) = x(k)
Considering x(k) and u(k) to be new state variables, we can obtain the
following state space equations:
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
-0.5. 1 'j-l -
1.5 ] [ 1 = Lo.5
0.5
That is,
K
1
=1 and
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
[ x(O)-j = [a]
u(O) b
[
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
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
Thus,
A1 A.2 0 -bA3 0
0 1 0 0
III=
J\, )\ t.
-0,+)q,) ~,,\2
0 0
0
b
0
I
.1
A1h 0
-0.,+).z.) 1: -<>o>.i/
= l:>2( .\ 1 - ~ 3) ( A2 - >- 3)
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
112
B-7-3. The following Diophantine equation
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)
U(z) = -
6 (z)
Y(z) b( (z)
The block diagram for this system is shown below.
- --
A@)
;.
j(c.)
-
tx{~)
113
···········---·-·-------------
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
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)
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
114
The following MATLAB program will give u(k) versus k for the unit-step sequence,
r(k) = 1 (k = O, 1, 2, ... ).
. - . .
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
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.
Unit-Ramp Repone
40...-----.------.-------....,.;..-..;;.___,______......,.._____,
,,,.
,,,. ,,,.
35 · · ....... ··:· .. · · · · · · ... ··~· · · · · · · · · · .. ·:· ...... · · · · ··~···· ... · · .. · ·~· .... · · ..... ·=· · · · · · · · .. · .). :-:'.. .. .
. . : _,,,.
: ...
30 ........... ~..............: .............: .............: ............. : ............. ,,,. .:i'-'•••••.
,,,. ,,,. .
25 ........... ·:·· ............ ·:·· ............ ·:• .... ....... ..:•........ -;,,; ~·: ✓.... .. .·;·• ........... ·;• ........... .
.. .
. ..
,,,..
20 ············=··············:--·· . ·········:-·········-···~-~--- . ·=·. .
■ • • • • • • • • • • -~ • • • • • • • • • • • • - : • • • • • • • • • • • •
. ..
,. ,,,. : .
...
.
...
. ...
15 ........... ~..............~ ........... ._;.:".'.... . .- . .
: : -- : .
• ·:-. -
-.
• • • • • • • • • • -~ • • • • • ■ •• ■
..
• • • -~ • • • • ■ ••••••• ·? .•.•• ■
-- •••• - •
:
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) =
=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>~
-.
-. .. .. .. .. ..
~ .
-
.
■
.
■
.
•
.
..
.
•
.
■
120
To obtain the unit-ramp response, the following MATLAB program may be entered
into the computer.
: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).
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,
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
~
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
0( (z) = z2 + 0.06z
123
U(z) Y(z)
z 2 - 0.75z
z3 - 0.5z2 + 0.25
The gain constant Ko is determined from the requirement that y(oo) is unity in
the unit-step response. Since
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
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
However, Equation (1) can be solved easily without using MATLAB. Since Equa-
tion (1) can be written as
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 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
127
Unit-Step Response
3 .-----.-------..----;;.....-,--.....------.----....----,
- - . - . . .
2.5 .............. ··\·. ········ .. ··!--........... ·~·· .......... ··\···· ..........?.............~ .......... ···\ ... ·········-
-. ... ... ..-. .-. ... ...
..- .. .
. . -
- -. .-
. . . . - .
2 '-&•········~············~·············~·············~·············~·············~·············\············-
. - - - -
1.5 ....... ····--·=··· ........ ···=· .............;.. ·........ ··.;... ·..... ··.. ·=··--· ... ····.. ;.. ·.... ···... ;..... ·.. ·.. ·-
: : :
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.
128
Unit-Ramp Response
20---------,-------=.-........;;~---.------~
15 ······················"·
.. • • ■ • • • • • ■ • • ■• ■ •••••
....
■• ■ • • • • • : ■ • • ■ • • • • ■ ■ ••• - •••• ■ •• ■ ••••
..
... ..
..
... ..
.. ...
.. .
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
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)
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 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
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
The designed model-matching control system has the block diagram as shown in
the next page.
131
V(z)
Grnodel H1(z)
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.
133
Unit-Ramp Reponse
4
... ,
...
. . ...
3.5 ......................... - .......................... ·~. .......................... ·~-....... ; ·;,: ,,,, ...........
~
,,,,,, .
: : : ,,,,,,,
3 ...................... ···-:·· ........................ ·~ ..................... ··; ;..,~··· ....... .
,, ... :
2.5 .. .- ,,
............................:..............................;, ............... -JI'.-:-: .•....... • .......................... .
.:..
:;;r
:
.. .: , , .
2 ................................:..............................;.~---······· ............... ;. .......................... .
~ :. ,, ," :. :.
1.5 ■
••••••••••••••••• ■ ■
••
. ...
• • • •: . . . . . . . . . . . . . . • , : : " :• • • • • • • • •
.:
. . . . . . . . . . . . . . . . . . . . . . . . . . . . -~ • • • • • • • • • • • • • • • • • • • • • • • • • •
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)
: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
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
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:
= 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
[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
P = Q + G*P(I + HR-lH*P)-lG
"""" '-"""'\,",'\-"' """' """'~ \,V\
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,
(2)
(3)
P12 = -1.1328
[See Equation (6).] Then, from Equation (6),
138
P22 = 0.5 - 2P12 = 2.7656
From Equation (5) we get
1.5664 -1.13281
p = [
"""' -1.1328 2.7656
Notice that matrix Pis positive definite.
W\
Thus, it is the desired P matrix.
u(k) = (R + H*PH)-lH*PGx(k)
WO, ..._ """"""' - ""'"""'"-""'
where
!. =
= - [o.2207
[o .2207
-0.4414] ~(k)
-0.4414]
=-
-
Kx(k)
P12] [l P12] = _ [l
P22 a P22 0
which can be simplified to
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)
-5hl.... = 0
da
This yields
a= -0.8730 or 6.8730
1 -o.5a2 + a - 6
Jmin = 2 a(a + 2) = 3.6865
a= - 0.8730
u(k) = - Kx(k)
J = z1 ~[2
L,
22
x (k) + K x (k)
] = z1L..
;
k=0 k=0
Referring to Equation (8-94), we have
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)
~=0
dK
or
=0
which can be simplified as
K2 + 5,4363 K - 1 =0
from which we obtain
K = -5,6144 or 0,1781
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)
P
V\f\
=Q IN'\
+ G*P(I + HR-lH*P)-1 G
t,,v\ jt\.,,,. V1,A \,N\- •'\A '\,\..-
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
[
-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
4 4/3] l Pll
[ [
= 4/3 8/9 + 1 + P11 P12
Pll
4Pn = 4 +
1 + Pn
4 4 4 P12
-3- Pn - 3 PI2 = -3- + 1 + P11
P11 = 1.1328
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.)
"""'
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
=[>...(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
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
.... 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\
(G - "K*C)*x. = A .x.
"""' ~ - ~1. 1"""1.
or
I .1
A_ 1 2 ""'1
x. *Px.
""""'1
- -1
X. *PX.
----1
= - '""1
x.*(Q + K*RK)x.
"
'°" "".......,. -1
/\
.1
( I~ 1 2 - l)x. *Px.
... 1 - 1
= - -1
x. *(Q
w-
+ K*RK)x .
...,.. ..,.,.,.. ....1
1Ail2 - 1 < 0
or
A
Hence, we have proved that matrix (g_ - ""'""
K*C)* is a stable matrix.
~
Next, for the original system
replace all G's by G*'s and all C's by H*'s in the Riccati equation (2) to
~
get WV,.. """' """
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.
G = [1 0.6321 ;0 0.3679);
H = [0.3679;0.6321 );
x0 = [5;-5];
f1 = inv(G)*H;
f2 = inv{G)"2*H;
f3 = inv(G)"3*H;
F = [f1 f2 f3);
FRM = F'*inv(F*F')
FRM=
0.7910 0.7191
0.5000 0.4738
-0.2910 -0.1929
uopt = - FRM*x0
uopt =
-0.3598
-0.1310
0.4908
u0=
-0.3598
146
u1 =
-0.1310
u2 =
0.4908
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)
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.
Define
Then
(3)
148
where
u(O)
0 1 u(l)
1 -1 -:J u(2)
u(3)
L
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
149
Case 3 n = 4: State x(4)
,._ can be given by
Define
Then
(4)
where
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
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.,
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)
(3)
Note that
Define
X1(k) = Xe(k)
x2(k) = Ve(k)
w(k) = Ue(k)
where
Rewriting, we have
152
B-8-10.
% ***** The following program solves steady-state Riccati equation and gives
% optimal feedback gain matrix K *****
P = [0 0;0 0];
P = Q + G'*P*G - G'*P*H*inv(R+H'*P*H)*H'*P*G;
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=
100.0624 -0.0119
-0.0119 10.5168
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)
2k1 ] rx(k)] 0]
1 - 2k lv(k) + _1 r
f (1)
1
[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)
kl = 0.0475; k2 = 0.2494;
[num,den] = ss2tf(GG,HH,CC,DD);
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)')
[numv,denv] = ss2tf(GG,HH,FF,DD);
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\
0.6
0.4
0.2
10 20 30 40 50 60 70 80 90 100
k
Figure (a)
0e-----'----'-----'----'-----'----'----'----'----'-------'
0 10 20 30 40 50 60 70 80 90 100
k
Figure (b)
157