Sunteți pe pagina 1din 132

-""'15:... ...r4-- .:.:, ) ._r\..:..:<).5: _j?...

&'-->"

SOLUTIONS MANUAL

MODERN
CONTROL
ENGINEERING
THIRD EDITION

KATSUHIKO OGATA
Univn-~ity

ofMinn~sota
Estelh-ro~:

Benuordo Snero do Sitn Fdba


Titulo:
AClass~lo ISBN:

"''"de: ordcm

ii

:j

' j'
...,~1_)_):!"'-"'~

www.shmirzamohamm~ _i.blogfa.com

~
u

Data:

PRENTICE H:\LL Upper Saddle Ri"cr. NJ

074~8
,_i...,,'-"'~

~-----------------------

...1:"'

c:

~
0

..
>
~

N
~

0
~

~ "~ lt" lt" i tt" lt" !" l


~ il il il iJ il il 6~ 6

N
~
~

e
e

~
~

- ----------

''

"

<

'

_.;;"'?------------:-------------------
J

t~
'

~15:...

...r4-- .:.:, )

.,rl...:..:<_)lS -~ &'-->"

Preface

The third edition of Modern oont~ol Engineering contains 418 problems.


206
of them are provided with complete solutions (A Problems) and 212 of them are
given without solutions (B Problems).
This solutions manual presents soluEx~pt

tions to illl 212 unsolved B Problems .

for the. case of -Simple and

straightforward problems, all solutions given here are detailed and comprehensive.
Tile text may be used in a few different ways depending on the course objective
and time alloc:atecl to the course.
sample course coverages are shoWn below.

For one quarter course

For one semester

( 4 hours/wee){, 40 lecture

course (4 hours/week,

hours) or one semester


course ( 3 hours/week:, 42
lecture hours)

52 lecture hours)

#1

Chapter
Chapter
Chapter
Chapter
Chapter
Chapter
Chapter
Chclpter
Chclpter
Chapter

For tlltl quarters


course ( 3 hours/
week, 60 or mor,
lecture hourS)
#3

#2

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

Chapter 1
Ch01pter 2*

Chapter 3
Chapter
Chapter
Chapter
Ch01pter
Chapter
Chapter
Chapter
Chapter
Chapter

4
5
6
7
8
9
10
11
12

Chapter
Chapter
Chapter
Chapter
Chapter
Chapter
Chapter
Chapter
Chapter
Chapter
Chapter
Chapter
Chapter

* JM.Y be omitted if students have adequate background on


Laplace transform
ma.y be emitted if short in time
For the one semester course (#2) the instructor will have
flexibility in omitting certain subjects depending on the
course objective.
Katsuhiko Ogata

...;~I_)_J:!"'-""'~

www.shmirzamohammadi.blogfa.com

'

._..i...>__,...;.~

2
3
4
5
6
7
8
9
10
11
12
13

"''"
' ~-.---

-""'15:... ...r4-- .:.:, ) ..r4_)1..5: -~ &'-->"

'

CHAPTER I

".,.
\

B-1-1.

CloSed-loop control systems found in hOllies:


( l) Room temperature control system.

Room temperature is kept constant


regardless of the nl.lll'1ber or people in the roan or the outside t.arp!r,
ture.

:-'
'.,;;."_,,

'

(2)

i:-

:;.,
---

-.

Refrigerator.
regardless of

Keeps the temperature in the refrigerator constant


amount of food in 1t and the outside temperature.

the

( 3) Cooking oven temperature control.


The oven temperature is controlh
at the set point regardless of the allllunt of food in the oven and thE>

outside roam temperature.

Open-loop control systems found in homes:


(1) Washer and dryer for cloths.
{2) Dish washer.

I
I

(3} A person takes a pill (for example, cholesterol control pill) every
day to keep cholesterol level within a desired limit.
He or she doenot check the cholesterol level every day.
'The process c::<;~ntinues
without check for a few months.
It operates as an open-loop control
system.
The open-loop control system needs calibration fran time to
time.
He or she goes to a doctor to check the cholesterol level and

the doctor controls the amount of pill.


cess.)

{This is a calibration pro-

~{1) Watering a garden.


The output wanted is a certain level of satura-
tion.
The input is water and the controller is the human watching
the soil to determine whether the soil is adequately saturated. once
the required saturation is met, the controller {human) either moves
the sprinkler or turns off water, until the soil again requires watering.

{2) Driving a car.


The output is a certain speed, for example, 65 mph.
The'input is the driver's foot on the accelerator, and the controller
is the human(driver) who tris to maintain the speed by monitoring the
speedometer and either accelerates or lift foot off the accelerator
to slow d01m.
Perhaps ve can simulate a disturbance in this example.
The sudden
sighting ot a police officer which causes the controller to react by
touching the brakes.
( 3) selection of 'IV channel or TV volume by means of a remote controller.
controlled by a human.
The reference channel is ~he desired channel
1

...;~I_)_J:!"'-""'~

www.shmirzamohammadi.blogfa.com

~-.,'-""'~

-""'15:... ...r4-- .:.:, ) .,rl...:..:<_)\!l_~ &'-->"

'

and the output charmel is the channel currently showing.

ce which the tracer head must extend to reach the model is sent back to the
tracing controller.
The tracing controller in turn sends a signal to the zaxis r:c serv0010tor, causing the cutter head to rove vertically (in the z direc.
tion) by the same distance.
The height of the work at its point of contact
with the cutter head is then the same as the height of the model at its point
of contact with the tracer head.
Thus, if all possible x and y coordinates of
the model are gone over, the cutter head will cut out a copy on its work.

If the

current channel is numerically lower than the desired channel, the


human can push the '+' channel button until the desired channel is
reached.
The volume is similarly controlled.
If the volume is louder than the desired volume, the '-' volume button is pushed until the
desired VOlUII'e is reached.

------------------------------------------------------------------------------B-1-3.

''

---------------------------------------------------------------~-------------

Refer to the figure shown below.


M<0.<unn1

'"'""'"'

Feed speed 1

Feed speed 2

Motor 1
5<1 p.oinl

Consider the case When Motor 1 (on the left side of the figure) suddenly slows
down.
Motor 2 (on the right side of the figure) will be initially unaware of
the decrease in feed speed 1 and the system will compensate by raising Pulley A.
The vertical distance that Pulley A is raised will correspond to an angular
displacement of Pulley B.
This angular displacement and direction of rotation
will be measured by the measuring element and the information is sent to the
Amp.
The Amp's job is to a:npare the angular displacement to the set point
(where Motor 1 feed speed= Motor 2 feed speed} and adjustaccordingly.
The
Amp will slow down Motor 2 for rotation in the countercloclcwise direction of
Pulley B by an amount proportional to the angular displacement and speed up
Motor 2 for rotation in the clockWise direction of Pulley B.
For the case when Motor 1 feed speed is suddenly increased, the Pulley A
Then, the same_
will be lowered to compensate for the slower speed of Motor 2.
sequence of control action will take place as aboVe.

B-l.-4.
This system works similar to the machine that copies keys.
The idea
is to duplicate the model on the left side by having a tool operate at the same
length, w~dth, a~d height as the tracer head is on the model.

The movable stage is responsible for all horizontal motion of the system.
The stage is controlled by the tracing controller, and it moves in both x and
y directions in response to command input to the controller.
DC servomotors
translate the command input, causing the stage to move.

'
!

The tracer head and cutter head are housed in a device held at a fixed
height above the stage.
As the stage moves horizontally in both x and y directions, the tracer head traverses the model.
A signal that the vertical distan...;~I_)_J:!"'-"'~

www.shmirzamohammadi.blogfa.com

._..i..._J:l'-"'~

'

-""'15:... ...r4-- .:.:, ) .,rl...:..:<_.ts: -~ &'-->"


~-

CHAPTER 2

f(t)=(t-4.) !U-"-)
e-c.s

Ff<) =

.S+",-

B-2-1.

==

S+tf.

(s+,.oa. +tza.

(a)

F,(s)

<b>

f,(+J-.....:. (4~+ 7)
Sol.+~

p.

~-

Sz.+IIIS +IJt.p./4

=u.s..;_ "t +- n""" 1-r

o.sxft

F,(s) =

#,3tf.S.S

sa+9-~

s'

s:~-_,..111

B-2-2.

~ ......_

f,{t) =
F,(s)
fz.(t)

{b}

( S't+ ?.>") =

'%, IZ/ X 5""

,s-1-+Gz

IJ.P3-

2. 121 ...;. .st

2./Z/ s

tJ.()~

2./ZI s

J.t...

.s'"'+zs-

= a.r

2f' (

F{s)

II

= l. [-te-"J = (.>+)'

= 7

I (

F(s)=z

c.._ 3w't =-f: ( "-'< >vt + c.< -.Jt)

s2+2S4JI

S
)
+ sz+wz..

(:s'+/3AJ')s
= (:i''+ZS<v'')(s 1 +w")
...;~I_)_J:!"'-""'~

--

Zfi
a.J

U-)i(<-~'
'/

-<s)

a e -i-r
e
~
- -:;;:-

l-4se-f,._e-"s

~o

4"

.t { 1-A.se -.~'""-e-s)
44

/ .. c~')
~ -se-f,. +" -fe-i-s + s
t~~-+#

-=.LJh....
.S~ c-t"

= en Zwt

s,

~~

!!i
f{t)

~ 1.;.,_

:=- 2.

.Z[t']=-:fr
F(s)

Si -

- .!!:._ #....
&~ "'...,."

-;i'/2';:-;;-;= --:--7'
:s(s'+l')
~-

ll?o

= ::~'::-':_S::_'_:+,.::P~:_IZ:_:-..;.~:'.:"'~":.._'
s (s'-t f-)

s'r 9-

1-e-T.s-

~/t)~ 2a"~ t-- .!!':i(t-.9..),,.


A.z.
z
Ffs)

c.n. zt"

""3 s

F, (s) = ~

+ 2. 121 en st

/t~,lfo'?+

sz.+ s&.

= _I_
e- T.r
,sz.---

------------------------------------------------------------------B-2-7.

<>

f(t)= t 1(t)-- (t- T) i(i-T)


F(s)

2+4.P4'Ps

--------------------------------~------------------------------~-----------

t.;..

e-u

.7~ &

.;f(-se_.,.,+q .;.e-r~+.se-~
~(')

s e- ...,s + Ts
2

4-tO

e-~-.$

....

ase-.f:..s- ...~.._e

-.-

-- L .[,;,... .-/;:( .re-+'"- --e- Ts- sa.e-.u)

.I
!'

sJ. "-~"~

:. (:z-J

?-(- J.-: +s)

=.s

------------------------------------------------------------------------------www.shmirzamohammadi.blogfa.com

~-.,'-""'~

-""'15:... ...r4--.:.:,) .,rl...:..:<_)i..51.~ &'-->"

"

.!!:!.?.

~-

t.w.,
.,~...,

f(t)

= .s~.
.14.. s F(s)

F(s!=

~ s :~:t) = ;o
.T'1'"

.-1 [ S(s+t) J~ (
/Q

e-t)

(P-(P

!!:Q.

(..1..-

s~o

~+-~

-fJ J<k wt)


'X(o/ = 3

X,(,)

= 0

z[s')((s) -s:<"M-.ir"'J + 7 [sX(.<I -:"'r)] +.3)((s) ~o

(:zs'+7s+3)XfsJ=os r2/

~-

f(t) = /.:-

S F(s)

S-j-110

= .t;..,

(S-t-2JZ.

S-i>M

.l [ftf) J =

X(s)

s f'(s) - f(or) = sF(>)

f(or) = ~ S'f'(s)
~~""

= j.;.,

s'

S#'PO (S+Z)

=
=

Hen~

~1

6S+2/
2 s'+'!S r3

..

3. 6

3S+/11,,S-

(sra.s)(s+3)

S+3

S-ti.S

e-. s-t_

x(t)= 3.6

"' e_,..

-------------------------------------------------------------------------------

B-2-10.

s+!
1
s(s'-ts+l) = s-

F(s) =

s~o.,r

I
-S -

S+#,J'"-

(ST(l..$-t'+P.itl""

tJ .J-

(s-r-.s-)~+
~. .t-

~-

P.?s-

x+2x~4(t},

s X(s.! -

o .t66

+ -. -,11- ~(;-s-r_A_S:C:)'-0,'-"+~,-.~-;::<f.-;{f=

F,(.s) =
f,(t)

l{s

+3

-:a.

..L. -r --,
6

Ta.~J =

Ss+ z
a
(s+-t)(sHY_::::- s+t

t- (.r+.z.)z.+ ~

X(t)

= e- '" Ht)

-------------------------------------------------------------------------!!li

f,(t) = -Je- +Pte- ''+3 e--<


...;~I_)_J:!"'-""'~

)((s) =I

s+2

'

= + 3t

+2

X(s) = _L

_
-

:r@-)

z(o-)=O

(sr-z)XCsJ =I

;f(t) = 1-e-D,S"f cntJ.I.fltt- ;~;:,, e-~ ..rt~P.J'.I6t-

{b)

412.

7 i: + 3-t: - () '

2 Xi'

~~

(a)

=-1

i(-1)

.U... {ti-1Pe-')1ft) =to

B-2-u.

f{t) ~ -/;; ( t -

TO verity this result, note that

""

s~(s +fll)

www.shmirzamohammadi.blogfa.com

x(f)

=Q

-s~ (

,.,.-::;-

""u;.,t-.J't +

6+ a.,:w.

(i::p

IUu,. 1-:T'-

r.-=

)U...t>~.,t-P

t)

(P'i:S<I)
:l.{t)~

e-"'"-t(b+u>n")e-~""'t-

'

(S=I)

~-.,'-""'~

~15:...

'
z(t:' " -

-f - - r-~+5)

.J~~-t

2(1J..

.+{ ~(-fiei -rs '\ +

l e-l~-.fF=i)a~.r-

f?(s)

(~,./)

F~~

~ -~----------------~-----------------------------------------------------B-2-16.

"'""'"~-

f~J~\'.~
"......
~ -"~

Laplace transforming both sides of the differential equation, ve get

sX(sJ-Xf)+a.X(s)= A_!<!.
sa+"'&

.or.

-"-:0-

-..

:;~-<

A.,
(s+)X(s) =
,
$ + QJJ.

--

-~-Solving

!!::!:.!

Ja~.jfe'j J

"

i--~:'

CHAPTER 3

../s-'-1

z.

.,rl..:..:<_J.S -~ &'-->"

J -{~~ ..._,)"'"'
Jr-;
-----

...r4-- .:.:, )

T-

;;
-:;

.f!2_ =

Jt(;s)

(S+.~t)(.r'+W:~.)

A<

A~+Wa.
AAI

I
S"I-A

b
S+tA.

r!<
w
+ a."'+ul'" s&-r-IV"

1/i>)

S:a.+W&

Aw )

4.1.1"41&

q:~.

/-1-61,

C{s)

eM

I+ tiz. ( H,-ff.)

(l+(j, }t:;il
f~a,z(f-1,-Hz)

-------------------------------------------------------------------------------B-3-3.

= .C' [X(s)J

=(>+
\'

#)

s
11

CCI)

S+L

Inverse Laplace transform of X(s) gives

X(i)

1-t-(Y,+'i.)('i,- ... )

!Us)

S-"- )
-- A~<~ ( I
- 4z-rw"" ~- &"+"":a.

ttr.+cu

Tcf~

B-3-2.

Aw

=(b+

11

-------------------------------

for X(s), ve obtain

XM=

eM

..-....

e-" +

A<
(1. & -;:;;;;:

,.U:,.(lJ

AA'
t - .~+~
Ut41t"

C&)

( -t~")

...;~I_)_J:!"'-""'~

[
'

www.shmirzamohammadi.blogfa.com

'

~-.,'-""'~

-""'15:... ...r4-- .:.:, ) ._rl..:..:<_J5l.J?... &'-->"

'

R(.r)

j1,=J,,-q,~z-q.,,-.,,,.~

C(:r)

Then, state-space equations can

we

l+'i,.!lz.

+tf,~ll1 t-fi.sJ-4fl., +fi,(jz '{, + ti/93flt

r
s-. e

...lt!l._

.s"
_
U'p-) :: I+ L!:.L _/_ -

x,

S+f

s~

s+-$

sJ t- fS 2

f+ Q, J + 4a 1j T 'fa;
t~tz=/,

;s

b, ;;_ + P1 ii

~3 =l 1

S+f

k=o, b1 =oJ Pz=l, kr=i!

x, ='il-l"

x.=~-1-"- -fl;"=:i,-~u

~t

since

S+f

S+f

x,

.!.:LI x,

~--

v= u-x, ;- x,

'~=b,=o

/o
I = 1>,- "' /1 -a:, ,e. =I
...;~I_)_J:!"'-""'~

][~]

From this block disgram we get the following equations:

where
J,,-111

,_,

x8 - ;:(~ - fa "

p1 =

_, .(,

we can redraw the bloclc diagram as sho\m below.

+ A U T b., "'

Define

..

!.:t_L.., s+t+E.-f' =!+_1=....

this equation with the standard equation

4,=,,

-1

State-space r-epresentation 2 =

,-... ,~ ..-ft-iv =+"'


we obtain

-1

y=['

+ !

Which is equivalent to
~ing

+ ~l

l/f~

From Figure 3-53, we obtain

Xz

r;J=r; ; ~JrJ+r ;J~

There are infinitely many state-space representations for this system.

s1'

: . _'0

O<

shall give two of the possible state-space representations.

State-space representation l

be

,.[!. ][:]~,.~

!~

.
q,q, t;., + q, q;, li,

R(s)
B-3-4.

:t,

C(.t)

(lto7,1'1.. +(t:1:~ +II,) Ci1 11J

il.. =

given by

nr. ,. 1~'1 r~1


~~ = ~

Cj,f,((j~+H1 )

i!-1'

x, -~ ~-I'
v- x, - "+/'

=()

www.shmirzamohammadl.blogfa.com

11

~-.,.:r~

-""'15:... ...r4-- .:.:, ) .,rl..:..:<_.J.S -~ &'-->"

'

Thn

x,

i, + 3:(:s +

.
X,a. =X,
.
;rl =

u-x~+x3

lSi_- _j__
x~

ZXz.

;K,_

"'

fr0111 lihich we obtain

x, _,. /'" =(l-t)-(i!-f)X1


X,~,""' -X1+X.s

x,] [ 1
~,.=(!()
[X. I -2.

+l(

:i, = :tz
Rewriting, we have

.
.:tj = X
.i,~,

=~

1=[1

o]["'] ['] "

l:t..z+4ll

-3 :t,

1[~]

a.

=-

x. +- "f:

Xt 1"

:i, =- (-r)x, -;r, +(-!')

"

~-

1 = x,

d=[-: -I] B=[']


-1

0'

....

C!=[l
'"'

o)

The transfer function G(s) of the system is given by

.fl. = -1
P
[.:i,:i:,1 [ t-

~=[I

0I

']t"'] [ J
I

X'a.

_,

"'

Io

({(s)=~(!-dre,=[l

LL

=[I

l[~]

I
I

Define

x, ='I

Xz='..

I
[I
sz+S"s+7

-1 [ ' ]

S+/

S~+S's+7

..

[S+I
3

s::][;]

J[.:7]

(a}

The system equation is

n~;(,. = -J,,(i# -i,.)


12

-3

!!!:

.... =;
...;~I_)_J:!"'-""'~

(n'J.)(S+t)+.3

1"+3ff+2j=

[S+i' 1]

l-f'

-------------------------------------------------------------------------~-

o]

13

www.shmirzamohammadi.blogfa.com

- 6.z x
~-.,'-""'~

-""'15:... ...r4-- .:.:, ) ._rl...:..:<_)1-~ &'-->"

'

!!:!

O<

mX., + b,i, + b~~. i~


!~once

[ms'+(b,+b,)s]

b,

X~-

111;; -rKx =~

()

x.rsJ = ;,sx..rs;

The transfer function Xo(s)/Xi(s) is

,,

X,(s) -

X;(r} -

:1:.. (b)

~'f:.-;->-"

.,;;_ +~. (x-:;.) = u

equations are

Frorn the second equation,

~)

- A,:r-. -

.if.t:,~

Hi. = o
~<, r:x, -~) = b(')-x.)

':;-: ~

J, ~ = ~. (x-?)

Then the

Define the displacesnent of the lower end of spring k1 as Y

-~--e>-uystem

Then

It, Zo + b i:, = b :j

~-~

k, :ti + b

i ..

have

=*"'

~.

'--'0.-~:

""' .!~-

we

~.~+~t

or

'

--~cor

"!'+~

(b)
Define the displacement of a point between springs k 1 and k2 as y.
the equations of motion for this system beccme

b,s
= __::.bL'- 'ltfs+(b,+i.z.)
IllS a.+ ( b 1 +ba.)S

;<-

=-'

XtiJ

(T(s)

= k, ~ + b ~

or

..
"'"' +

~l~z.

:(

~~ X;(s)

x.(s) _

"UP')

Xds) (c)

o<

!!2

bs

- " + ( 1,.

z; )~s

x, ... #;

= h(i',. -X.,.)+~,cx.. -x,)


!. _:f,-

=;,
, '!', = 1z
.
:r,= Y:a.
:r..

+ ~~ ;t 1

(* +bs r k,) X, P,) = (bs + 1<,) X;(r)

The transfer function Xc,(s)/Xi(s) becomes

&1
X;~J

"'' j, H, (-j,- V,) +It, ;t, = "-t


m,;; +>, (j,- ~1 )+~:tz =tt,

Define

.t. X., -t J,:i;, + k I X"' =


Hen~

ft.ir
ff +If&
1

The system equation is

ftiltJ(o

?11Sz+

+ bsX,{s) = (k, +h) 'f(r)

k,b.
/r, ;t.z + (J1 -rlcz.)bS

lA..

..K& =

Elimdnating Y{s) from these equations, we obtain the transfer function as


!ollo~s=

~~1-~a.

!~once

( " + >s) X,fsJ = :., Y(s)

~}= k,-+*

bs+'lt 1
fr,
lc,+Jt;,. +bS = lf,+frz.
14

Then

ItI+

i;s
b

lr,+-lr2.

m,:(& +b1 (~.z.-Xt-)T~,X1 ==-tt1

7flz.

i.,. + b1 (~"- Zz)+ I,_


1 =,

X3

= v.r.
~-J:l~~

'lben

"

-""'15:... ...r4-- .:.:, ) .,rl..:4_~ -~ &'-->"


For x direction=

Hen~

:i, =

Hi+m;~

X'a

;:(~ :=-

"k[ /!If~,- r,.) +~, x,] -t- ,!;;I(,

=t.t.

JZ.

NX+"'Jt (x-r/.--1!9) =~<

Si~

~ =~;.

.,";;A4e =- (...:..t>)P '+ (CR/!9) 8'

"'=- i"[b,(x, -X,)+k, x, J +-;!;; "z


or
-ha~

i,

I~

;/a.

--"'.1 - 1'11
.,1
11t

:t,

-m"'1

""2.

I
2

:t.,.

.L
nt,

'Vz.

D
tJ
..J_

m,

~1

[~.

(M+>t) x -

()

(r-r, i') ;
Equ<~.tion

(2),

,,

I= m-;r

"'I .te - ., .t x

..

lll.t

&

Substituting this last equation into Equation ( 1), we obtain

m.L'

.. 1 '')
..
( M-rnt )(~~- r-..
' I +mit!=

For Bmall S,

mie' =- 2k4'8 _,,,,

or

(M+"') P- (M+1)Irt<-(M./'

or

+ ( m,tt.
~ +

_1:_)
b
.)

=0

Note that

"f = "'+ .t,..:.. 1!9 '


...;~I_)_J:!"'-""'~

"

J'q

=! <="

"'.t

"_
t9 -

""

Th~.

..
e=
B-3-U.

(2)

X = j6 _ I+711.f' ..

T = -2k84'-m;L~e
~

_,;; .t t:.n.{?

( I+mi' ); = 711fl..,;. d - .,'; ../""' P

where

I+ mL 1

For small e, we have

Fran

(:

For rotational motion

Thus,

"
.,. ...

+,.,;,; ="'-

-re

] "
g
XJ

-t-11f..l ( cn.II)P = u.

we have

(M+.,)X

3"=

.!!!!!

62,

For small 6 and small

111./(....:...e) II

;r; = , , ,.... ,

x,

[~']= ['

00

+ o
x,

~&
J,
-llfa.
- -:m
-

"'
-lila.

X ,.

tJ

tJ;<,

?fl.! ( "fi-m)f

"'-'
eu
(Mr,)Irl-ftn.l'
(Nr.,)I +-M111i'

Also, fcom Equation (1) we have

www.shmirzamohammadi.blogfa.com

~-.,'-""'~

(3)

-""'15:... ...r4-- .:.:, ) .,rl..:..:<_)~ &'-->"

"

(,<t-r .. )x

.,.,_t

111f/ ~ -

m./;C:

I+m,['

Next, we shall obtain a state-space representation of the system.


state variables by

=.

;(,;".
X.

0'

[MI+ 1ff(I+,<tl'}]%

-r m'i'J~

=8

= { I-t-"'L')

x,

fran which we get

..
::< =-

.:(~

11fz.(zl

MI + 111 {I+III')

er

-I+~t~l._

MI r "'{ I+t11l')

(4)

"'

s'-

state equation and output equation can be written as

>il I

:r, I

f [MI.,., {z.,.MiiJ] s- m./( M+m),1} @(.,! = -m./7ll<)

~.

Hence

V(s)

"''
[MI+"'(I+Mi')] s'-m.l(M.,..,)J

(5)

.
x,

..1(,11+..)1=

,'Z.JZ.l.
MI+r~~(I+M.t')

=-

""'
I+Jn./z.
- '-'.!_,'1'---o-o- 6)6) 7"
7J{'s)
/of,_,.., (I+H.l')
MI-t-m( I+,<f.l)

Heoce

Ml =TT(sJ

1!1~

, ./',

MI+"' (z.tMl') Z>Tr)

~-

IT-wt.l

I)

/)

ll

(J

z,

{6}

Equations (5) and (6} define the inverted pendulum control system in terms of
transfer functions

"

"

-m . (

.,..,(IrHL')

:r,

.,

I+m.l'
-'II+'t(It-1119

of
() x:

I
=R,+c~~

---~

'

f';~~~-

~i~. f-, .

Impedance Z2 is

[MI _,..,(r+M.L')] s'

...;~I_)_J:!"'--'"~

Impedance Z1 is

VrsJ = [-'II+"'(I+,./')] 51 [MTT"' (z.,..,b)] ,..__.,I(H+*')J

{)

"'

"

---'"'"''"-~~c:---,-.,-

..r.l ';-

I+m.l'
MI +"'(I+M-1')

0'
:1!2_

[~] =[;

I)

I'II +" (I+/ofl')

By taking the Laplace transform of Equation ( 4), we get

s'X(>)

Then, fran the definition of state variables and Equations (3) and {4), the

we obtain

?od ( 1'1 . .);. 8{s) = m.l


VI>
(H+M)I+,H>d
(MM)I+Mm.t'
)

(9{$) - -

.
=x

Vr =I =x,
12 =% =X3

Equations (3) and (4) describe the system dynamics in ter:ms of differential

= ;(:

and output variables by

equations.
By taking the Laplace transform of Equation (3),

Defin

_I_

Zz. = Kz.. + C":a.s

._.I

1.~ T-

'

Hence

19

~-J:lt.r~

-.

u.

~15:...

'

...r4-- .:.:, ) ._rt::.;:_J: -~ &'-->"


Since

~(1)

-------e,(r)

Zz

= z, -t-Z.z.

11, +_I_+ K:z. +


C,s

~:zG.s

~haw

_L_
c~s

+I

(ll,+Rz)Cz.S T!+~

=
bzs +frz.

,_

-----------

to l/k2 then we obtain

+!+-
~.

'nle analogous mechanical system is Shown below.

...

Iff .!If

Th~

"'=

ck- .cr
Then

I''
S"H'.llf=-o.~.:L
"' lit

=-Ni'-32 (6~-o)

'olhich can be rewritten as

;<. -(f.</f-2/3 )r =- 2./f-30


O<

41/ = ;.
"
<iQ

'

;;(f = 5: l$"08$"- z. /fl' ~~ =

fii=KIH

;1 .!"8 8?

Taking logarithm of both sides of this last equation, we obtain

c~"'
f

~ 1~ X
-:z
-,,,

+/,=11..
,.

Note that

de

"""""
!( =
...;~I_)_J:!"'-""'~

= - ~. ~~s

; (zi'_ 2 f)

'

-----------------------------------------------------------------------(!<(r,-(;.. -;.).tt'

= -(UP s,flT .tf:

o<

!!:1::Y

=(1.Y1C

He~

'

C= r 2 '1C"

,I

Assll!OO that the head n'IOVeS down from H "" 2m to x for the 60 sec period.

.~
~' '

H-3Y

(.f)' 1(' .tH

b.~. s 1-~z.

------

For this system

C!tiH=- Q,{i" .I

(b,+b,) s+ fr,+ft, - (b,s+ft,) + (hs+k,)

-._,_.

= 3"D

Time constant "' CR = 5 x 300 :: 1500 sec

;,-f.s+
(b,H,)i;_s

R1CzS+/

)(t(s)

Cz

2ff

7r

Thus,

I! we change R1 to 1>]_, R2 to Q2, C1 to 1/kl,

tJ,() 2

= .ff

,,,z..

!(=

(H,czr~t:z)s+ I+~~

X9 (s) =-

/<=:

.,,+ -I
ells

K -f
<If/ -

d'l --

.u.

~"

iJ..f-"' 11"'/

0<

<If!

V7i

z,fiT
/(
20

.,._
-------------------------------------------------------------------------------:X:

www.shmirzamohammadi.blogfa.com

/.b sz

""

~-.,'-""'~

'

~15:...

B-3-15.

From Figure 3-62 we obtain the following equations:

...r4-- .:.:, )

.,rl...:..:<_)ts:

&'-->"
Q.t(r)

liJ(sJ -!laCs) :::::.' Q (T)


1

II',

Q,{>)

Q,(J')

llz(S) ,.. Q, (.r)

K,
Q.-(i) -Q,{s)

= ~($)

~,(.r) - O:afs)

+ Qo~tsJ

c,,..

C.s

~
QJ()

=Hz4>

0,-{s)

~
J --"-

--'- I

Q,(s)

R0 C1><tl

--~

I
~

- f/1 o,prl

------u;_r-

1,<",1
~

ii

Q.t()

f-{,()

'

'

For eadh of the above equations, a bloc~ diagram can be drawn, as shown next.
~-

A>.

lf,(,s+l

Q,l(.-)

~
f c,s

~(~.

Qp)

Qi(s}

H,($)

,,

~--~}{,(:,,

( R,c, s rt)( R,c,

Jt, (,

f)~(s)

s~

f)

Combining these elements of block diagrams, we obtain a block diagram for the
system as shown below.

Q"(l)

......__.

r:J;(J)

QJ<')

R,

(R,c,

t!)(tr,c,st-f)t-/,"or,~

fH'-

'

Q,(s)

rFrom this last block diagram we obtain H2(s) as a function of Of{lS) and:.:

as follows:

H,(s) =

Simplifying this block diagram successively,


we obtain a reasonably simplified
block diagram as follows:

I
22

'-

4 2Z-

....,~1_)_):!" '-""'~

---------

(~1 C1 s +t)(K~C'~S+-1 )+Ra C'1 s

[Q;~)+(lt,0s+;;;,c'.

-----------------------------------------------------------------------------

11-3-16.

www.shmirzamohammiidi.blogfa.com

--

~.

Define

23

~-.,'-""'~

-""'15:... ...r4-- .:.:,)

'

&'-->"
S-3-17.

eo : ambient temperature

Q ::::p.pp2 .fiT ~

St = temperature of thermocouple

9z = temperature

of thermal well

Define

Rt = thermal resistance of theOJPCOUple

.\

C1 = thermal capacitance of thermocouple

Since the higher-order terms in this equation are small, neglecting' the higher
order terms, we obtain

thermal c::apacitance of thermal well

h1 ., heat input rate to thermocouple

Q-

hz = heat input rate to thermal well

lL-KL.L
2 VH =
iJH-

=It,<#

1!, o'P, = (A,-

lt)t-

Wbere ht = (9z - 6tl1Rt and hz = (eo - 9z)/Rz.

~~ C1

-z.r
'"' + It

By

eliminating

Thus we have

Q -4.#tJ3

P.<!P2

zI

_L_
Yz.z.s-

J>.z,r

O.Pa/

/.$"

=<1-o3

(J.PP/

/-$-

(lf-2-zs-)

O<

tl'.r- .9;

Q-(!l.t?Pti~#JI'J#

71,

l?z.

=P.OP/$"

This is the linearized equation about the operating point.


we obtain

equ~tions,

1!1,{<) =

------------------------------------------------------------------------------

B-3-18.

'Kt C',R.a.l'.. sz.+ (l?,c; +ifz C"z +A"2.li)s +I

Define

'J=.:zx'=j(<),

X ;:::. 2..

Then

Noting that

R1C1 = time constant of thermocouple = 2 sec

RzCz = time
w

#.112

Th~

'

9z from the last two

8oM

Q = f(lf) =

-:::= Vz

C. til.,. = 1, -.92
.z. dt

f(i1)= ;~ (lf-Ti)

where

Then, the equations for the system can be vritten as

e,.tp,

+ &(H-ii)
+-PH

11= k.fiT= f{lf) = f(lf)

Rz = thermal resistance of thermal well

Cz =

Q ~___!' t;ll) 3 '"~

i1 = z.zsm

ha~

constant of thermal well = 30 sec

c;,

..

"J = /(+)- f(x) + ~ (x->:)

'

Since the higher-order terms in this equation are small, neglecting those termS
we obtain

A'2 t!1 = Ra C.z. C!z. = 3o -;ii" = 6....,


Hence the denominator of e 1 (s)/8z(s) becomes as

,f1 ~R... <".. s~~.+

(.t'/+Xze'a. +l.z.C,)s+-1

6os'+ 39s + 1 = (/.sis + 1 )(3'6-:u-s+l)

Thus, the time constants of the system are


T1 = 1.651 sec,

+--

'J-

f(x)

=-x.'(x-x)

"
f-o-2xz' = '"' x2' (:<->)
Thus, linear approximation of the given nonlinear equation near the operating
point is

"/ = 2.f'-x- 3.:z

T2 = 36.35 sec

-----------------------------------------------------------------------------...;~l_)_..l:!"'-"'~

24

25
~-.,'--""'~

~15:...

"\

B-3-19.

...r4-- .:.:, )

._rl...:..:<_)~~ &'-->"

Define

~;I X=J, "'~P > 0


~

Kt = -

Y =><'+~x~+lt!' =f<'><,tJ)

Note that

Then

l!=f!z.y)=f<"'5)+[:; (><-'<)+

Q.lr ~AJ~

~ {1-,P] __+
"

:;!( :;!(,

t~;

--where

X= 'I,

= K, (x-X. )+ Kd tJ-

The force developed by the power piston is equal to the pressure difference
.6 P times the piston area A, or

iJ

Force developed by the power piston =

k, = ~~

a1

A~P

1, (K,x-llj;)

where

K,=1
;x :K=f, 1"'"1

Using this last

-k; (K,%-- Aj ~)

AP= i(K,>:-Q) =

:t=3

Since the higher-order terms in the expanded equation are small, neglecting
these higher-order terms, we obtain

z- f

..

where A is the piston area and ~ is the density of oil.


equation, A P can be written as follows!

= 2x+1-f = 2Xf+ f'XJ =.30


_ = f'i< +llj = f-x1+12x3 =7z

x'"'~- :t=?

Since the power piston moves a load consisting of a mass and viscous friction,
we obtain

.,:; +~>i =

or

~=X'+ r,<.Zj +ifjz. ._ 'j"- +-X !X3 +.&'X f=2fl.J

71f

Thu

:. ck,x-A.Jn

A'.P) !f. = --,r;At, X


!J + ( J, + ----;;:;:-

Hence the transfer function Y(s)/X(s) of the system can be obtained as

Z-Z5<.3

= 3o(X-?)+ 12(?-3)

_A.&.

.:l1!L =

Hence, a linear approximation of the given nonlinear equation near the operating
point is
i!-3c~

XIS)

-721 =-2{'3

------------------------------------------------------------------------------B-3-20.
Since the rate of oi-l flow 0 to the power cylinder is a f~mction of
the piston valve displacement x and the pressure difference across the power
piston dP = P1 - P2 we can write Q as follows:
0 "' f(x, A P)

Linearizing this nonlinear equation near the operating point


A.P = 0), we obtain
--

Bf

.,x

Q- Q = - (x-x)

"

o<
+-"'#AP

Q = K, :<.-- k, .<>7'

( Ll

(Q

= 0, X = 0,

P-4f)

--

-~

"'
ows'+( b+.tl!L)
k,
I
S [ ...1!!..&.
AK1

+ bK, +
IlK,

_dL.1
l<t

S(Ts+l)

where

1<.=

,I:,

I
6KI ;Ak1

AL
j< 1

T= hkz+A:,O

whm

K,= ::. 1:<:=-/ 4.,=.,;; > ()

...;~I_)_J:!"'-""'~

www.shmirzamohammadi.blogfa.com
26

"

._..i...>__,...;.~

-""'15:... ...r4-- .:.:, ) ...rl1S -~ &'-->"

'\

Noting that 2 'Silln ,. l + lOKh 4Jn2 "' 10,

CHAPTER 4

!;

= 0.5, we obtain

I+/!? K, - 2 x.s- X ,f/4 = -lib


H~~

'
'I&
!!:::!.

Time constant = 0.25 min.

!!....!...!

Define the current in the armature circuit to-be ia,.

The steady-state error is 2.5 degrees.

The

we

have

;1 _,. u, + t<, -"jf- = e,


~

II

(Ls..li.)T.,is}

"!' K,s@.(s)= .-{S)

(1)

Also, we have

J ..

JJ:

]
'

''

"

''

'

TT= T..=l(i.._

(2)

'1

'

~
:1

"

ul
u

<{if =T,_
~

t!.21o

-I

-- -

... -

r-,

I 1\

--~

--

--

-+-- ---

--

- - -

----

' '
~

Equation (2) can be rewritten as


l

T- Tli. =~7<.

f()

unit-step response curves of both systema are shown belOio'.

Then,

.Jii-/

v
"" :.":

'

'

Note that for the original system

'

(~+nh)~=~.

E',($)

or

-K(S)
=

(J~ +n ':J;.) s' lfPM= "K I. {;c)

(3)

k(s)-C1{s)

l(.(s)

.s1 .rs

= .rl+s +!()

For the tactlometer-feedbaclt" system

By substituting Equation (3} into Equation (1). we obtain

..bl1_ = ~(.\) -C',(_,

(Ls+JI) (;T.+n'J)s fiP(s) -t-/C,s ~(<) =liilr)

J(.{S)

nl<

s'+3./#s
~" +-~.;s +IO

!((s)

For the unit-ramp input, ve have

or

[(Ls +I? )(J.'t' J"L)s'+l<kb s ]61(<) =

Sz+S

i1 Kt:,.rr)

E, (r) = ( ,r1.+ S+ld

.L).L
s s =

SI:+S

&I+S'+/4S

Henee

~E;(s)

?tk

s [( L.r+J/)(J;. -r >1 'J,) s +- K K,J

------------------------------------------------------------------------------B--4-3.

(!(s}

...;~I_)_J:!"'-""'~

s'-rl./ls

s3+:J-1{&af'/~S

/o

= sa+ ( 17/~/(4 )s +10


28

..L
.r

error versus time curves [el(t) versus t and e2(t) versus tJ are shown on
next page.

The

For the system shown in Figure 4-54(b), we have

l{{s)

~
(_ s'+~./6s
!J 1
s'S) =\s'+3.//S-t/O"'ijS=

www.shmirzamohammadi.blogfa.com

"

._..i...>_J:l'-""'~

-""'15:... ...r4-- .:.:, ) .,ri...:..:<_J? -~ &'-->"

'

8-4-8.
When the mass m is set into motion by a unit-impulse force, the system
equation becomes
-

,,.,....
,,.'--,c---,--,
T---,---,---'''"""'"'"~,-,...

>\

-.

i"'

;.:

?II!< +Ax= 4rt-J


b

Define another impulse force to stop the 1110tion as A


(t - T), where A is the
undetermined magnitude o! the impulse force and t = T is the undetermined instant that this illq)Ulse is to be given to the system.
Then, the equation foe
the system when the two impulse foices are given is
\

?~tx+~x=t(tJ+At(t-_-T),

J.

2.'

~-

The Laplace transfoClll of this last equation gives

%i

.. 05

:f!:

c(t) =I- _j,_ e-t


3

+-'-- e-~
'

(t-;.o)

.1

X(.$)

-------------------------------------------------------Rise time = 2.42 sec


Peak time = 3.63 sec
Maxirmw overshoot = 0.163

!::!:2

,IQ's)

= 1 + 11 .,-T

Solving for X(s),

A e-sT

-----------------------------------------------------------------------------!!f

("'s'+J)

,.

:x(-)=o,xl!'-)=c

= m.s'+'A. +

nu'+l

Jf;

__;!__

={h

The

.[{- e-.sr

s+"- + -./t,..

S:LT-.[,

""
inverse Laplace transform of X(s) is
:x(t)-

J;;, .<4.{f; -t+ ~:,., [,..;...f,f (t-7/).i(t-T)

settling time = 8 sec (2 % criterion)

!!:::!::.

'I11e maximum overshoot of 5% corresponc:!s to ~ = 0.69.

41n

=~ = ~-

11'.6'f

If the motion of the mass m is to be stopped at t : T, then x(t) must be identically zero fort ~T.
Notice that x(t) can be made identically zero foe t ~ T if we choose

Hence

A= I 1 T=

2. fp .f.<w"'ftec

1r

,,..

VI ' 'IE '

.f';r
,

{-fc

...

Thus, the motion of the mass m can be stopped by another illq:lulse force, such as

ti..Z

<!{>-) _
k(Ts+l)
111<)- Jr-t-KTs+l<

J"{+-

[f) '

3>r )
Sir) ,. ..
t{i- "$
' ;(t-7/i

Since T = 3, KIJ = 2/9, we have

C(s) R($}-

!!::::1::2.

(JS+I)

s'+{-f-)3S +;

Hence, 2 S41n = 6/9 and Wn2 = 2/9.

For a unit-impulse input

c(t) ~- 'fe-t + .Z e -<-

Thus

(t ;;.o)

For a unit-step input

'S = "' 7"' 1


-------------------------------------------------------------------------------
...;~I_)_J:!"'-""'~

30

C(t)- 1+-

www.shmirzamohammatli.blogfa.com

te-+- e -
31

(r ;;>o)

._..i...>__,~~

'\

-""'15:... ...r4-- .:.:, ) .,rt..:..:i__l, -~ &'-->"


O<

Sl.=

YM - 2(S-1)
XI<) - (sn)(s+l)

Th~

-'

the response is given by

t(t) = -3e-~ +~e-- I

(tii1'c)

-- +++-l

I I

-'
'~
-,

-+--1
' ;
-tl l I
.uf--,JFL_J__}
,
,
.
m

i
l
~+-- : "!
' i
of--

'"

'

'

; ~:!I

--~---:-

-1
i

'

.1

----------------------------------------------------------------------~-

z:

e-.1'"""'"1

-e--"=sc~~.-(c,c,c~~T~:)

e-$W.. r

C!(;)

~il) -

s'-r2s -t- K~s -t-1<

Note that

K =W,.,_ :=. 4-&.=16


Si~

z:;....

= 2-t-K.-t.

2XP.'lX ~ = 2 +KI._ = 2+ /.51<

"'""lo
1}7
"( ,cl;c________________________________________________________________
f< = z.s________
_
2

= e>.-..,r

~-

C($) __

~= e -;T~Vt. (j~-I)T = e (-/)>~V~t T


x.
I

Logarithmic decrement = }#t

I
-,_X,
JJ-1

l#.t.

4JII=+ I

2t5-

- -./1-p

2!;01. = 2Xd.5:'-X 4- = <>.i-t-16/l

Hen~

IE=P. 2.
.2.T

x. - /t-7 =.d

}A'I-

Then

x,

'""'

1.5
s-t- (t?.li' +lhl.)s +16

From the characteristic polynomial, we find

..::!!. = ___
/ ' "'
?t-1 . f ' . -

;:: 54J11 T- >,Pn


Define

1!,(s) -

x.

4-n::'s' = A'(t- s)

The rise time tr is obtained from

tr =

7r-~

lliJ

Since

"'' = lli./1-S' =
...;~I_)_J:!"'-""'~

32

------

For the given system we have

we obtain

l<5f11110

;:(

(-

-----------------------------------------------------u.J1.

:!

-,

-~

. ~-+,++-

:---+-r-i--!~~

-~~ )(Ln ::) -'


= -.J~7C+L1~ = 1-'IC' +- (-'--)'(t....&)~
n -1
x.

.,

-~

versus t is shown below.

:(\

Az.
Hr+~z.

4-/t-.zs

= /.#

33

www.shmirzamohammadi.blogfa.com

._..i...>.J:l'-""'~

-""'15:... ...r4-- .:.:, ) ._ri...:..:<_)S:P, &'-->"

'

. -.--r-._c-~..;~~~---~~~-,
"r

~=~-~~ =~-lt7.8'/. = 'II"


3
tv.
-ha~

'!1:-

t,=

he

~-~

IJ,

6tJJ-

I -~-- ~~---I
"'1--itlc+---1-T--!-----r-.....,....

~'"

S~c

'

The peak time tp is obtained as

.. = ...2L =
'
The marlmurn overshoot

Mp

f.IJ~
is

Hr=e-~

3./fL

= P. '!P 7 .Sec

J. " '
tl,.#"

=e

XIIP.

.;,_,,zs- =-e

-f,l/,:.

=1?.//.3

D3

"

j'

=' ~

f<.

= -~=-~:'-::)(-;;,_:- -=

2. .u.c..

"

'

;_t

'

'

MA.TLIUl programs to obtain unit-step response, unit-ranp response, and

unit-il!lp\llse response of the given system are shown below, together with the

resp::mse curves.

'

% Unit-step response

'

num = [0 0 10];
den = (1 2 101;
t = 0:0.02:10;
step{num,den.t)

r! I

..

/;

'A"i

'

I J

% Unit-ramp response

'

numr = {0 0 0 10);
denr = (1 2 10 OJ;
c = step(numr,denr,t/;

xlabel('t Sec')
ylabeH'c(t/'1

impulse(num,den, I)
grid
tit!e('Unit-Jmpulse Response')

www.shmirzamohammadi.tblogfa.com

'

'

-I

'

i
'

'
'

0
I

'

"

'

'

'

'

% Unit-impulse response

""

'

grid
title(' Unit-Ramp Response')

'

'
..

p/otlt,c, . ,t,t, '--'1

''

i
I

1/

"

ylabell'clt)'J

0'

'A

xlabell't Sec'/

34

:I :
1

-~

,/

grid

...;~1_)_):!-"'--"'~

title('Unit-Step Response')

xlabel!'t Sec')
ylabel('c(tl')

--

.
i

4-

1'

"tl41111110

------------------------------------------------------------------------------.!!::!1.

1.

The settling time t 5 is

t.

''

I'

'

I
'

I ! I
'
I
'''
'
i
-,--;

'

I -

' ' ~
35

'

'

"
._..i...__,.:r~

-""'15:... ...r4-- .:.:, ) ,_rd.l.:<_f: -~ &'-->"

"

tJ= ~-I~
= A - I P,~J'I
rv.
w "'~

1<-hc

t,=

1.~.

=1

IJ. ~(J,J- S~

"
3./ft.

J, f'l

IJ~

"

t;IJ 7 .sec

; The wax!= overshoot Mp is

Mr = e-7r-f'

-"'

.,
'

The peak time tp is obtained as

?rt, = -;;;:;
=

,,$" Xl/1'

.;,_,,zs- =-

-/.l/f:.

=ll./#.3

A\ I
I \I '
I

~-~~

----.-I ---L. . ...:.. ___]_


.
i I --i I :
'

--t

'

2. ....,c..
,.sxP. =
-------------------------------------------------------------------------------~

t, = ..L=
J'tP,

!!::::!!

MATIJI.B programs to obtain unit-step response, unit-ramp response, and


unit-impulse response of the given system are shown J::elov, together with the
response curves.

I!

" lc--

- __

% Unit-step nlSJlOnse
num = [0 0 TO];
den= (1 2 10/;
t = 0:0.02:10;
steplnum,den.t)
grid
title['Unit-Step Response')
xlabeU't Sec')

ylebelf'cltl'l

numr .. [0 0 0 10];
denr "" {1 2 10 OJ;
c = step[numr,denr,t);

plotlt,c, '.',t,t, ''/

grid
title!' Unit-Ramp Response')
xlabel{'t Sec')
ylabe)('c(t)'J

% Unitimpulse response

impulse(num,den,t)
grid
title('Unit-lmpulse Response')
xlabel('t Sec')
ylabelf'clti'J

,/
.

'
:

/I

""'
!

"""

.--

I
' ,/
I
I
/
'0
I
I
' "

..

% Unit-ramp response

/
I

-.--1-,-I
.

"

'

--r---+-----.
.

.R=FR=
,

.,..

The settling time t 5 is

_ _;____!_:,J.__l_j_ j_
I : I ! I i

- -

.1
u

i .

i
!

I
I
'

I I I
f"'l

I HI

: v

oJ~

:
'
!

I
.

'
I IIi '
II
,o

35
._;~I_)_J:!"'--"'~

34

._..i.,._J:l'--"'~

-""'15:... ...r4-- .:.:, ) .,rl..:..:<_)~~ &'-->"

'
8 4 JS.

A MATIAB program to obtain a unit-step response of the given system


is goiven belov, together with the unit-step response curve.

A = [-1 -0.5;1
B [0.5;0);

c .. ,,

!:c----.
-~17
l
' I lc" I
f"-~-,

% Unit-Step Response

OJ:

0[;

D =[OJ;
plotlt,y)
grld

tltle['Unit-Step Response')

!"

ylabeU'Output'l

0~

-I I

ri
1\
\

"

.Q.O&i

'

I'

Ii

!o"

"'

I'

+'

'

I
I

'-.:

~'

I
'

I
'
'

'

'!""

,_

.1- .

% Unit-Impulse response

A= [-1

-0.5;1

0};

B "" [0.5;01:

c ..

11 0);
0 = 101;

lmpulse(A,B,C,D)

Finally, a MATLAB program to obtain a unit-impulse response of the system


is given next, together with the unit-impulse response curve.

0/
0 .

\!!_

'

1----c

'~-

:K111beU't Sec')

-j-=+-

--~

[y,x,t] - step(A,B,C,DI;

--~--

'

'

"

r ---,---,---,--="";:"'"===r'""""==:;=-.,---.---.---,

"

A MATLAB program to obtain a unit-ramp response of the given system is


presented below, together with the unit-ramp response curve.

i
+___;,,

"' Unit-ramp response

A 11
-0.5;1
B [0.5;0);
C .. [1 OJ;
D

I
I

01;

[0);

'II. Enter matrices AA. 88, CC, and DO oltha new enlarged state

-1

'I

% equation and output equation

DO"' IOJ;

text\11,3, 'Output')

-------------------------------------------------------------------------------

% ' ' mer step-response command l,x.t) "' stepiAA,BB,CC.DDJ

..s~I_)J:!"

~ ' '"

AA "' lA leros(2, TJ;C 0);


BB (B;OJ;
cc "'(0 0 11;

lz.x,t) "' st<!piAA,BB,CC,ODJ;


x3 ~ 10 0 TJ'x'; plo!l!.xl.t.t,'--'1
llfid
titlei'Uni!-Ramp Response')
xlaball't Sec')
ylabeii'Output and Unit-Ramp tnpu!'l

'

The required, modified version of MA'I'I..AB Program 4-14 is given below


The resulting impulse-response curves are also given.

.!!:!&

.
1

irzamohammad .blogfa.com

"

~-J:l''-""'~

J\

..

I~r---,---,-:,--,----,-,o
..
'

-1 .. I

-----'-----:--

"LI

"
"
!

"~

'

!]

"o

'.~i

'

i.

~d

-'li
.

::

.: " "'
!.

g::.

~
,Q

""

2111 It 5 :!l*'ttM'tz11UH'P'I'!19'fM1Mf'f'NMS' 'P"bi'M't'tr'

;:

"
,~

...

-.;:;-I

~'21:~

{l~{l.g

"

...
u u "

'
.........
..,

'

1'
'
]

'

-""'15:... ...r4-- .:.:,)

"-::'.
-~-
!4~

11.5: __y?... &'-->"

CHAPTER 5

"""

'1i

~~
~-

consider the system shown below.

.:i

'"'

--{

:.x~

<fM

C()

~
~l

c~
-~

Fran the diagram we obtain

P(s)

~I!

For a ramp clisturbance d(t) = at, we have D(s} "'a/s2.

c(o) = fk s C(s)
~

sgM

/+- &}(J)t!fds)

:s~

= R.;...

"'

"

s (i,(s)

'

'

'

'f

1./(t)"'

t:(>}

...;~I_)_J:!"'-""'~

...

( )

(S>=s-:s

w{f)

'r~J

'f /',.,

1.
'>

'

1/

' '
.J&l
K;
::z.

*f:.t;~fL

"""

'"

'

t:,.{ ~r-..L) ='{Il-L)


r.
.n

' '

J>-5-3.

The elosed-loop transfer function is

J's 1 -t-Bs

For a Unit-ramp input, R(s) = l/s2.


~)
I<~)

n.~.

R(s)-C{1-)

=
{r)

!?~)

=-

+K

JSt+8s

= Js'..- 8s + K
Js ... +Bs

?"

e.,= e{) =h...s(s)


H

=-f-

We see that we can reduce the steady-state error e 55 by increasing the gain K
or decreasing the viscous-friction coefficient B.
Increasing the gain or
decreasing the viscous-friction coefficient, however, causes the damping ratio
to decrease, with the result that the transient response of the system will
beCCIIIE! more oscillatory.
Doubling K decreases ess to half of its original
value, while~ is decreased to 0.707 of its original value since~ is inversely
proportional to the square root of K.
on the other hand,decreasing B to half
of its original value decreases both e 55 and t to the halves of their original
values, respectively.
Therefore, it is advisable to increase the value of K
rather than to decrease the value of B.
After the transient response has
died out and a steady state is reaehed, the outpUt velocity becomes the same as
the input velocity.
However, there iS a steady-state positional error between
the unit-ramp response of the system for
three different values of K ace illust~-"
rated to the right.
<I"
( /~- ..

'"'!

,()

'"'

'

~
= K1 ( n- T.is) = t(/t,.n)
E()

40

H.Zs)

The steady-state error is

corresponds to the unit-ramp response.

"''.I

1+

;,...

JS ...-t-8.$ Tf::.

In the following diagrams, (a) denotes the unit-step response and {b)

,.,

l.f

-------------------------------------------------------------------------------

~~
"'

lll,._r,t

:
.. tl' (
.,is 'f'T.s) ft.( i7
_________________________________ ________ _

t:

Hence,

c{ ,o) becomes zero if Gc(s) contains double integrators.

B-5-2.

q{>)
t+-q(s)f$c;{J)

C'{s) -

..

'"

;:;:

./)_

,...L-..... ~

'

www.shmirzamohammadi.blogta:.corrr-----------------------------------------------~JEF~-----------

'

'

.........

-""'15:... ...r4-- .:.:, ) .,ru.&_)


~ closed-loop transfer function of System I is

Cz{J)
R(.s}

,0._..; ~"-loop

~-

:.+o.zs+f

j.
-;:

/tP,f.r

~
~

"

s~+S+/

R(s)

P=

'-' ._l_

-....... '

u~

--:T '

I.
.~

'<<

41

.!!

' -

l_.______;__-!'----o

'

Figure 3

--------

'

--

~.e :r.:::-:.lr;:dse response curves for the three systems are shown in Figure 2.

~h-A----------,-~------'-------

:; ol

!~~~~u .. .oo

..

.0.2:

'

'
"'"o

...;~1_)_):!"'--"'~

:&'

..

r-

-~00
-11
'

''

iff"'"

1/,'~ 0~

v&,'
''

o"'

10

i
-+------+
i i i
I

Ll:J

~-"'

!
--i------1--------

o ,j

'

'

"

% Unit-step reSJIOnses of three systems


numl - ro 0 1]:
dent = 11 0.2 1];
num2 = ro 0.8 1 J:
den2 = 11 1 11:
num3 = [0 0 TJ;
den3 ,. [1 1 1];
c1 = stepjnum1,den1,tl:
c2 "" steplnum2,den2,t);
c3 = steplnum3,den3,tl;
pfotlt,cl, '.' ,t,c2, 'x', t,c3, 'o'J
grid
titlei'Unit-Step Responses')
xlabeH't Sec')
ytabelf'cl, c2, c3'1
textj4.2,1. 7, 'System 1 'I
text(4.2,1.3,'System 2'1
textj3,0.9, 'System 3'1
% Unit-impulse responses of three systems

~-.;-""?

..

%-----Obtaining unit-step, unit-impulse, and unit-ramp responses

'

'

'

. . :.,&
~ ....

ThE! MA.TIAB program that used to obtain Figures 1, 2, and 3 is shown below.

''

---

--

'

'!

r ----~-

1.21

!:~

"

il

S 1 +St-/

~ m:i:.-ste;~ response curves for the three systems are shown in Figure 1. The
...,.._ Ei1iting proportional-plus-derivative control action exhibits the short.-. r..a ti.JE.
The system with velocity feedback has the least maximum overaa;,:., rc ~best relative stability, of the three systems.

1.1

The main reason why the System II that utilizes proportional-plus-derivative control action has superior response chracteristics is that derivative
control responds to the rate of change of the error signal and can produce ear
ly corrective action before the magnitude o! the error becares large.
Notice
that the output of System I l l is the output of system II delayed by' a firstorder lag term 1/(1 + o.as).

transfer function of System III is

C._(s) :=

xl = impulsejnuml,denl,t)
x2 '"' impulse(num2,den2.t]
x3 = impulse[num3,den3,1)

!~<fo>o
42

Sy

tern I I has the advantage of quicker response and less steady error in following
a ramp input.

.,_ ~lcop transfer function of System II is

CJrM
-=
Kf.sJ

f~ &'-->"
The unit-ramp response curves for the three systems are shown in Figure 3.

www.shmirzamohammadi.blogfa.com

43

._..i..._J:l'-"'~

-""'15:... ...r4-- .:.:,) ~

'\

; , )1.5:

-~

&-..Y'

1\ MA.TLA.B program to obtain the unit-ramp response curve is given below.


plot(t,x1.'-',t,x2.'x',

grid

:~

title('Unitlmpulse Responses')

JCiaDel!'t Sec')

~-

:.,.,.

ylabel('xt, K2, xJ'J


text(3,0.5,'System 1'1

ut-+~,~-+~-f-___;-

te)(t(O.S,-0.1, 'System 2'1


textl4. 1,0. 1, 'System 3'1

denlr

[1

0.2

1];

01;

1i

num2r = 10 o o.a 1];


den2r ~ [1 t 1 OJ;
num3r = [0 0 0 1];
den3r = [1 1 1 0];
yt .. step(numtr,dentr,t)
y2 = steplnum2r,den2r,t)
y3,. steplnum3r,den3r,t)
plotft,t.'' ,t,yl, '-' ,t,y2, 'x', t,y3,'o'l
grid
title('Unit-Ramp Responses')

!;

numr = [0 0 0 0 40];
denr - [0.1 1 10 40 OJ;
t = 0:0.01 :2;
vt = step(numr,denr,t);
plotlt,t, .. ,t,y1, ' 'J
grid
title('Unit-Ramp Response']
xlabef('t Sec')
ylabei('Ramp Input and Output xl'J

The

f
'

/!

:~;:
'"~'
..J..I

'

'

~oo.o

Noting that

1'

xz

ft. x1, we have

Xz.(r} _
K(f)

~-

j1

';;:

-~

-'1.2-----r--
:. i ---,~~-t--_j
.
. ~'
V
i -+---;----'-- ~y -;-~6 ' -

f.

xlabel!'t Sec')
ylabel('yl, y2, y3')
text(2.5,5.5,'System 1'1
text(6.2,4.5,'System 2')
taxt(4.8,2.5,'System 3')

'

-------~

"'~

:C

'if

0 0

% Unit-ramp response

% Unit-ramp respor>ses of three systems


numtr = (0

The

resulting unit-ramp response curve is also shown.

t,~J,'o')

.i

: -------I

....

...

..

...

f.QS

o.t sJ -+

or

/0 S'

+-

f&O

------------------------------------------------------------------

The response xz(t) for the unit-step input and that for the unit-ramp input
The resulting response
can be obtained by using the following MA.TLAB program.

closed-loop transfer function of the system is

curves x 2 (t) versus t curves are shown below.

_&jJ_ Rr.tJ -

o.fs-1

+ s ""1l.

l'.r+- ~

MATLAB program to obtain the unit-step response curve is given below, together
with the unit-step response curve.
~---c~----~"r='"'~~c_~-c--;-,

% Unitstep response
num .. {0 0 0 401;
den ~ [0.1 1 10 401;
I - 0:0.01:2;

x1 .. step!num,den,t);
plot(t,xl,'-'1
grid
title!'UnltStep Response']
xlebel('t Sec')
vlabel/'x1'1

.
;;ool

'1:

----

--+--------

,.

-- - - - - -

% MATLAB program to obtain responses x2 to inputs rft)


% r(tJ .. t.1(tJ

tit) end

num2 - [0 0 40 OJ;
den2 ... i0.1 1 10 401:
I = 0:0.02:3;
:o;2 .. step!num2,den2,tl;
plot(t,x2J
grid
title!'Response :o;2 to Jnout r(tJ = Ill)')
xlabel{'t Sec')
ylabel('x2'J
num2r "'" (0 0 0 40 OJ;
den2r = 10.1 1 10 40 OJ;
v2 .. step(num2r,den2r,tJ;
plot(!, I,' .. ' ,t,y2, 'o');
grid
'
title(' Response :o;2 to input rJtJ = 1.1 (t)'J
xtabel!'t Sec']
ylabei('Jnput Unit-Ramp and Response :o;2'J

0.20<MU11.2UU10

~
...;~1.).):!-"

'-"'.lo/<-

www.shmirzamohamniadi.blogfa.com
44

"

._..i...>_., .:_...lo/<-

-""'15:... ...r4-- .:.:, ) .,ri...:Wi__.l -~ &'-->"

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

Hence, the following MATLAB program can be used to obtain resporlses XJ(t) to
inputs r(t) = l(t) and r(t) "'tl(t). ,The response curves are shown below.

~..,.._>2.,~'11JI~I

~-

;;.
.,,__ " 1 - \ - - -

j-

..

-----, --

"'~

=: =- ___
~
.:t=t-_
~Err
j
'o

_>2. . . .

'

"

00

i'

1i

,,

oll).~""

grid

title I' Response x3 to Input r(t) "" 1.1 !II')


xlabel{'t Sec')
ylabel{'lnput Unit Ramp and x3')

"'r------,--~-'":"'":e:-:oe;...
,,.,.,."'"~-----------,

-"

'I ,

'

l""
'

-----------~

OJi

! '

' ..."'

~----------- ...- - 'o

num3r "' 10 0 4 40 OJ;


den3r (1 10 100 400 OJ;
y3 .. step{num3r,den3r,t);
plotlt,t, '' ,t,y3, 'o'l

---------

"
~

-------

..,,.._._____,__

>0

Next, we shall obtain x3 (t) versus t curves for the unit-step input and
unit-ramp input.
Noting that

Xz(S)

<1.20

"

l$o<

'

'

- -......... '(1)<1~1

/0

;:::

to inputs

'il UH---f. --

~3

num3 = 10 4 40 0];
den3 "' 11 10 100 400];
l .. 0;0.01 :3;
x3 -.. step{nurn3,den3,t';
plot!t,x3';
grid
.
title1'ResPonse x3 to InpUt r(ll "' 1!tl'l
xlabeH't Sec' I
ylabel('x3'J

,.,

'lb - - M" 1l.AD program 10 obtain re$ponse


% r(t) .. 1 (I) end rttl '"' t.1 (t)

+-\---- - . ---

'

o.rs +I

);3 (s)

ond

.. s

X 1 (s) =-

~./ S 1 ;- SZ.

R(s)

i
/QS

+ 9-o

+---~___:____

---

----------'-----/--

___ __
,

J, .

we have

JiJjQ_ _ .XJfJJ.
/((!) -

Xa.{s)

Xz(s)

0.1.~

R{$)

10

+- I

f<JS
0./S:J-t s l

+ (tJ$

If--

--

T ~
oo:

'1-s:
~

...;~1_)_):!"'--"'~

-r

(t.Ps

'

S;-t-/QS~ -t-IP(}S+ WO

46

Ok

41

www.shmirzamohammadi.blogfa.com

"
~-.,,__,.~

'

-""'15:... ...r4-- .:.:, ) .:r~t-~ &'-->"

Ji'c;.
~--

~- '-~

Plots of e(t} versus


Finally, we shall obtain the error versus t curves.
curves when the input r(t) is a unit step or unit ramp can be obtained by use
of the following MATLAB program.

..... o!!!---!111<1(11

15~--~-r

i_

% ----- MATLAB program to obtain e[t) versus t curves

.#...;_--

num ..- [0 0

"" -

den,. [0.1

0
1

t~

40];

0: 0.01 :3;
xt =-step{rrum,den,t);
plot It, 1 - xl);
grid
titleCPlot of eltl versus 1 when rltJ = 11ti'J

ylabel!'eltl = Htl x1ftl'l

% Unit-ramp response

0 0 0 40];
denr = 10.1 1 10 40 OJ;
yl "" step(numr,denr,tJ;
plot[t,t,'--',t,t'- y1.'o'J

""'

f{J)

'

,.

'~~

42

,_,

I'

,.

-----~

1- K

For stability we require 6

'

, !

The Routh array becomes

...
~

sJ+J'Sa-t-ZS+ /( =0

""i

'

The characteristic equation is

s'

-r ,

K
S(S1-1)('+ ~)

C{r) -

,...,""1......,,-.ml'l'l
~~~~--------

J>-S-<;.

grid

M;

-- - ,_.

-------------------

numr "" [0

'!be error e(t) versus t curves are shown below.

1/

.?:1

xtabel('t Sec')

titlei'Piot of e(t) versus 1 when rhl ,.. t.lltl'l


:dabel('t Sec')
ylabel('eltl .. !.1[11 xl!U'J

:!

___ _j ____ ....!.. - - -

~u'

40);
10

t =

"~

-1

% Unit-step response

> K and

K > o, or

~>K:>O

o~'1U215l

---------------------------~------------------------------------------------

!t2::1

Ctr)

/0

;:::

S(S-I)(U+J) +IO

R(I)

The characteristic equation is


2 5 3 -r s~-3s t-

;o = o

The Routh array becomes


...;~I_)_J:!"'-""'~

48

49

._..i...>_J:l'-""'~

...

-""'15:... ...r4-- .:.:, ) ._r!.Sfj_y?...


&'-->"
.._,_

~,

'

,.

----

-23

."'"if

J'

/0

-_--

-~:,

Hence

:.1!1

~-

/sr- ~/ ~

,,

---

-I

-I

b,

1he Routh array is

;' k ...X(s} = k[P.N- ~ XIJ]

~;;;

-----------------------------------------------------------------------------

St- b,

b,. to J, .J

b,

b, b,J

>'

b,

s'

., b..J

XIs}:_ _ __:_l_ _
llM - CR< s <

II

~+A

D:;;;:!Q.

Pct>)

.,.
c

r.,r,-)

-~

r(r)

Thus, the first column of the Routh array of the characteristic equation consists or 1, b1, b2, and b1b3-

------------------------------------------------------------------------For this system we have

...;~1_)_):!"'--"'~

_4__ A
c:i+!> A

k,
Thus, the controller

is a proportional controller.

-------------------------------------------------------------------------------

B-5-11.

'-t-

Define the pressure of air in the bellows as

(' "'' ~ 3 ,(t

!=

'

i(

Pc

+ Po

Then

-~..

ii'

i&. __ If - P.
(' -tr
-- R

'

'

.1-t-

"' - I:.

c ,It"'& =

I+ K, I(~

The control action of this controller is proportional.

'7

Heo~

K,kz

Hence

(F "'f) A = k(<. -r x_)

J=

PA = k.r.,

c "I' ~ t

-----------------------------------------------------------------------------

ro:-

~-

T
CRs-t-/

s.J-t-b 1 sz.+(b~.+~~)s+btb.J

,.,

0'

~'

The-system is unstable.

I<

~- -;::qX

ft::::
..f'.~
.tr
A

-~~

(0

Noting that pc}l " lex, we obtain

;>}i

-3

"

"'

RC

;9 ,_ /',

f~

(1)

Define the area of .bellows as A and the displacement of the bellows as Y + Y


Then, noting that pcJ!."' ky, Equation {1) becomes as

t. -I'..

k:f:-

RcA

"
50

,tf

+l:t~l',
5I

www.shmirzamohammadi.blogfa.com

~>'-"-"'~

'\

-""'15:... ...r4-- .:.:, ) ._rl..:..:<_,Jts:l?-- &'-->"

.,
-'
KC'-+~

+ u

~ -v

It' r'<...

J>~M

TY)

___!_
a+b

K, kif.

I+-

_7.;_

YM =
l'CM

-(bk)(
I
~~~
'/i'(;)

I?Cs

-;.j::"b I( ~ Cs -r I

'
.,.;;,

"'"'

K,t:
A

:-:--

The controller is a proportional-Plus-integral controller.

.;);
_,,,

l?c $" t- I

.ck
_.,.

A block diagram for this system is shown below.

B-5-13.

~it
t:t:s

~GEJ

"'' .1.--:l

XfsJ

-G?l

fc(.t)

I' 1--1

~
~;~.

~
f;;{f)
E(s)
Assurre that

KtK~

1.

t+K,K

q
A+],

a-t-b

1
'

'
'1.

Jil!.2..
== ~~
e(r)
+-I-

A/t
Res+ J

Then

?.if!= _b_ <t-b


EM

'!f
F:i

K,/(

b
tt+b

If KtK

~1,

"'
..d. Jf, cl.$
a-tb 1e K,_cJs-H

+-Jr;., k

T;{s) _ _
b _

4A)
The

E&; -

controller is

---------------------------------------------------------------------

B-5-12

a+ b

~C::~A~~"~.;Jc';:.:;:,:::-:::;::::2;=
a+b

aA

,..

I+

.A\IK<1
c>.+b

If KtKl, then

...;~1_)_):!"'--"'~

(.A-L
,f

--Y

il ('l s +

R,c,.s)

Define

Output pressure :

52

R,c, + _!_
.ftc~

Thus, the control action is proportional-plus-integral-plus-derivative.


controller is a PID controller.

x,~

=----

N,c.,,+J R1 c1 s<t-l

R:r./Cls)( J?,c,s+t)

_H_ {I-t

E(s)

(.l.!L)Ur.a;
-\l,c,, +- 1)
t~~A \ {(,('~. s /
: : ( /+

~{>-)

cc-:'-'-:-:-:
~c,s +!

then

RCs+-/ = ( M_\(!?c st--l)

Thus, the control action is proportional-plus-derivative.


a proportional-plus-derivative controller.

k,K

www.shmirzamohammadi!blogfa.com

P0

+ Po

53

~-.,:,;.~

The

-""'15:... ...r4-- .:.:,)

'\

Displacement of point A ; nozzle-flapper distance ~


Displacement of point B = Y+ y

f~

Displacement of bellows =

X+

oc

+ z

Displacement of point C = W+ w

Thus,

where P0 , X, 'Y, Z, and Ware steady-state values.


ilre indicated in the figure shown below.

c) PQ

c.= -~c("
..
;;:;; Kz. T

.&AI

Po (change in the output pressure} is proportional to i {change in the

current).

The positive directions

------------------------------------------------------------------------------B-5-15.
Referring to the figure shown below, we Can obtain the following
eqUations:

TN

,,

--

~ci'l3::/
q.!;

),

lu

4t-A'-
Jl

nn.r . '

II I
I o~ "~'~"

""

p..... ,.

001 ond<f

Frcm this figure we obtain the following equations;

f,- k.,x. ..

F
4+-e
T=-.{-

f-:Klfl))

For the diaphragm and spring assembly,

Note that

Change in magnetic force due to change in current = Ki


Change in spring force = k(y - w)

'

The displacement x and w are related by

-.:r ::::

~y

dt

A;JI

oc

Z(s}

4-H!!

k ( d:e k, +

_..!5!_

A;f~.S

A; j, ""1 = J, .tt ,

b~,) f,

For the pilot valve,

"-"kl'

d+e

...J!!!L -

(1)

into Equation ( 1) , we get

A;f, du

"" ~ _1_= ~f
llj .f

By substituting

!!=

p~ K,'

Ki(Hb) = k{~+-.!j;-x)

Ki(A+b)

:=

For the jet pipe.

So the torque balance equation becomes

K,

2tr-J
X(s)

*!;-oc =Ki (a+h)

p,

f<

oc

The torque balailce equation is

;;(o::;-)

,A.i:< ~

!'L C-

.-lt__
d:t - A!Jl-.

j,=kz.

K, u

AI f,
<;:;

....,~1.).):!"......-~

"

._..i...>__, ...... ~

'

-""'15:... ...r4-- .:.:, ) ...r'~----~ &'-->"


0'

YM
lfts)

x~

___

Arft.s

@(s)

-~?

Y(.r) Xts) -

'Y(J") lT/rJ Z(.s)

_L ~

;=

Atfzs ~-,,s

Z{IJ .Xfl}

lJ(f)

/(

,E

'l1le controller is a double integrator.

X~J

{f] ZM~~~
A~J:'

--------

k~

ZTfs)_j

A1 /,.s

YfSJ

-----------------------------------------------

;f.

B-5-17.

"'~
1

For the system

!.ll =

!!

i-~

iJ=KJx.tt-,
Yfr) = _!_
s

"'~

Uu'

]I

YfsJ _ .5_ XM _
t:~J - P,M -

jiii

![ -,

II//

kll

UuK)

z,

Z1 =- R, +c;Zz =Rz

<>-t-1

Ep{s)
!

"'

,,
--,
! .. '

'-- J

E".-1) = ( R, + c~)

From the block diagram we obtain the transfer function Y(s)/@(s) as follows:

r-
,c~

Thn

Yt~'

1-

kll

s< (~> -1f-)

Efs!l ~ J
L ---j
+;.

...;~1_)_):!"'--"'~

f[xfs) + YM] = ;,(tt-: ))(!'s)

B-5-18.

'

From this figure we can construct a block: diagram as shown below.

8{1) , QJL

YM=-Zfr!

Therefore,

/h(

J.l~

)((>!,

llP..(sJ = k [XM-Zis)]

"''""'

!~

'j= _,

Thu

:T

Odod"

ux -e!

where A is the area of the bellows and z is the displacement of the lower end
of the spring.
Also,

Define displacements e, x, and y as shown in the figure below.

Q+-b

4-t;b

of the control lever.


Also, fra:n the system diagram we see that for eac:h
value of y, there is a corresponding value of angl!;! 111 .. Therefore,_. for eact;
angle a of the control lever, there is a corresponding steady-state el~tor
angle !If.

_A._

-~

A simplified block diagram is shmm.

l:elow.

+b = _( _!,_
.._
\

K2k 1 At~

AtJa.Aj.!'.lt.

/b

;::

We see that the piston displacement y is proportional to the deflection ;mgle 9

~'

K=

/+" k

:"'-

A,.

vhere-

B->16.

Y!s) : '~s

,;.::

H~~

J,

,,

==-

'

<,

J(s)

R2 Ifs-J

Ee&J,_

t,

=-

RzCS

j
e;lfJ
.?1 +~
l?,cs+/
www .sh mi rza mo ham mad i. bloQfa.COifi ___________________
.c________ ~:--------------~-;.:;..~------------

"'

'

~15:...

B-5-19.

...r4-- .:.:, ) ......... ~.~_)1..5: -~ &'-->"


for the unit-ramp input r{t) = t,

The voltage at point A is

eA = f{e,- -r e.,)

,,

0'

E.4(s) ~; [ E,-(.r) + E,{rJ}

l?z.C.s
K,cst-1

. +a, --a s 1

s"+4,s"-'-t- +a .. -ts t-.:t,.

S(s"-rti,S 11 _,T- ... 1-a..,-i!.\S')


( $ .. Tif,S' ,_, + ... -f-II,_,.S+4,).F:z.

,!;:!

we must have EA(s) = Ea(s).

"~2.,("~ 1

f [ Ei(J') + E,{s)].::::::

ars_.!!_-l +

i(s)

K 1,

E0 (s) and

-r

= 1J..-,
e., = ,;-..sE(.$)
s..,,
s7P

#,

E1 (s) =

S"

Tho

-~

The voltage at point B is

Since [Ea(s) - EA(s) )K

Elf)=

"'-'

Th~.

~:0

=0

--------------------

------------------------------------------------

Elfs)

lienee

(;_-

f(,Cs

Rlcs+!

"
i'{"'

E;M =-f-"{5)

""

>

E-p(s}
6j'(s) =

;'!

RzCs- I
/(lCs +I

----------------------------------------------------------------------------!!::2:::12.
~{sJ

CM
l?(s-) =:

Ks+-b

lt-t;{s)::: s'"+a.F+b

Hence

(<+ M+-~) </'JJ

= ( ks+ >) [t+ <if-'J]

0'

C;(s)

Kst-b
s(st-~- k)

The steady-state error in the unit-ramp response is

eu -_
~-

_j_ _

f!l. =
J?(s)
t=(s) -

Rts-J ...;~I_)_J:!"'-"'~

Kv

17.

_1__ _

_JMy.

.s-u S~(s)

11,-t 5

S"+ t:11 S

11

RM-C{s)
:
II{>!

1,

-...w.....
s.;.."

S(S+-~-k)

-k

s(Ks+b) =-b--

+a,.
1 + t-tt.,. srlf,
1

.s"t-q,s"-1 + +tl,-z.sl

s"
58

-rq 1

s"- 1 +

+n,_,;s; +4,
www.shmirzamohamm~di.blogfa.com

<O

~-.,'-""'~

-""'15:... ...r4-- .:.:, ) -r-r: -~ &'-->"

'

B-6-2.

CHAPTER 6

I((Stf)

:,~

'
.i{
!!::::::!.

"

The open-loop transfer function

K
s(s+t)(s 1 -t-f'.1+S)
has the poles at s = 0, s = -1, s = -2 ~ jl and no zeros.
The asymptotes have
angles 45~ and t 135~,
'lbe asymptotes meet on the negative real axis at
O'a. = -1.25.
Two branches of the root loci cross the imaginary axis at s =

'i~)HfS)=

jl.

The angle of departure fran the complex pole in the upper half s plane
is -198.

,it
~
~

."

A MATLAB program to plot the root loci and asymptotes is given belov,together with the resulting root-locus plot.

:f,

num"' [o"-0 o o 11;


den = [1 5 9 5 01;
numa"' 10 0 0 0 11;

9.375

7.8125

~
~

2.4414];

:_~

r .. rlocuslnum,den);
plotlr,'-'J
hold
Current plot held
plotlr,'o'/
rtocus(numa,dena/
v = [-4 2 -3 3]; axis(v); i'l.llisl'square'J;
grid
tittet"Piot of Root loci and Asymptotes']

has the poles at s = O, s = -2 . j .[7 and the zero at s = -9.


The asyq>totes
have angles+ go and meet the reat.axis at ct"a = 2.5.
The complex branches
cross the iJMginary axis at s =;!; j' 4.45.
The angle of departure fl:"OOI the
complex pole in the upper half s plane is -16.s.
The dominant closed-loop P.Oles-l)aving the damping ntio !;: = 0.5 can be
located illS the intersection of the root loei and lines from the origin having
angles 60.
The desired dominant closed-loop poles ;~re found to be at

% Root-locus plot
num = [0 0 1 9];
den=ll 411 OJ;
rlocvs{num,den]
hold
Current plot held
x"' [0,-3]; y .. [0,5.19GJ; llne(x,y);
v- [-15 5 -10 tOJ; existvJ; alli~('squere'J
grid
tit!e('Root-locus Plot uf GlsJHisJ .., K(s + 9/[sls 2 +4s + 11)'1

.'~
L
L I
~ o

r"iu~
I

I~

r-"'"'''

.,

:'-~~t--4---.=~ ___I

,,

_,

--2

--.
1

50

----

f-----+---+--= -. -

-t~i".--:.:/o,.-~.--iJ--=-=-=-

------------------------------------------------------------------------

'-'"'.lo/<-

2-S'Pi

~PlotatG()H()I<(~~tf)

'

...;~I_)_J:!"

X.j

'"

= -/.S"

The third pole is at s "' -1.


The gain value corresponding to these daninant
closed-loop poles is K = 1.
A MATIAB program to plot the root-loci is shoWn
below, together with the resulting root-locus plot.

-afA<:>clli.J:x:>-~

'

s(rz +~s t-!1)

% Roo Hocus plot

[1

C:rPJit(S}=

\1!

10

dena~

The open-loop transfer function

_,-;_

--

'

I.
------------------------------------------------------------www.shmirzamohammaai.blogfa.com
._..i...__, '-'"'.lo/<61

'

-""'15:... ...r4-- .:.:, )


Note that the locations of the dominant cl~sed-loop poles and the corresponding value of K can be determined as follows:
Since~ is specified as 0.5,
define

cr:rjfix

-~&'-->"
B-6-3.
A MATLAB pr-ogram to plot the r-oot loci and asymptotes for the following system:

-,J

Kst-

~
--~

is given below and the resulting r?'t-locus plot is shown below.

' i'

9K =0

1..

(j._(s)H~(s) = ($f"'/1.t?s-f

;.;.

+II (

x +)fix.)+ K ( ><':J'fi<)+/1:'<1 'i

By equating the real part and the imaginary part to zero, respect! vely,

::c~-

"""

rx .. -;-1; x

+t< x

we get
(1)

+ fk =o

'IX .. +//xT-I<.x=cJ

sJJ. .,. t.t J" J #- "' fl.rJ ?.s- s:o. -r o.e'l' 11.17'-1 s t- "'' 1'71/'1

-8:r~- B' .:C" +-//X+ k .r t- 'fl< + j f i ( ?::t +1/X f- /<X) =0


2

- f

~~--~----~K~--------~

"'

this equation, we obtain

(2)

Note that the equation for the asymptotes is

-;~

S~lifying

S(S+ e'.S)(S~+ 0./.S+IO)

-~

Then, we obtain

(:uj.fix_)' + f- ( X+)fi X)'

/(

{j($) l{(s) =

,.;;,;

Substitute s "' x + j .{3x into the characteristic equation

SJ+ 9-St+//J" t

.....:i~",

% RooHucus plot

it

num = 10 0 0 0 1];
den .. 11 1.1 10.3 5 OJ;

nl.fTlll ..

]0 0

1];

dena If 1.1 0.45375 0.0831874 0.00571911:


r - rtucus{num,dunt;
ptottr."-'1
hold
Current plot held

Fran Equation (2), noting that x # o, we have

plotlr,'o'J

rtocuslnuma,donal

3X-t-//t- k

= 0

v .. [-5

-5

5); axisfv); axis('square');

grid

or

tftle!'Plot of Root Loci and Asymptotes

I<= -J'X -II

-
'"'""'-"

Substituting this value of K into Equation (1),

-8z 1 -i'.:r

a.

+II X T- {-l-1/) X

r {-3-X -/;) = 0

'
'
,_

rx 1 -rdx,+7Z x +?? =o

'
I'

Solving this cubic equation for x, we obtain x = -1.5.


(Disregard other
values of x.)
Thus, the doodnant closed-loop poles are located at

K = -N-I.r-)-11 = /.

/_/

------------------------------------------------------------------------------62
._;~I_)_):!"

"-"'.lo/<o

/ // /
'\

: /
:'/"'.
.

Then, the value of K is determined as

- ......
- ......-... "'.. ------ .,
...

"'- "'"-! / / /
"'-

J
'

s-= :rxj{Jx = -;.s:L.j zN"s

(Problem B-6-3)')

/"'

"'-

.....................

-"

"""-"'-

'
----------------------------------------------------------------------------I

www.shmirzamohammadi.blogfa.com

63

~>'- .......lo/<o

'

........

-""'15:... ...r4-- .:.:, ) .,rl..:..:<_. -~ &'-->"


~

A MATIAB program to plot the root loci and asymptotes for the system

---~.7 (1) If(r) =

(s'+Zs--t- z)(S" 1 -tZs+~)

[r;w)'~ 2jwr>][6"'!'+2jw~s-] r

I<

% RooHocus plot
0 0 0 1);
4 11 14 10];

I..

j
I

-~

hold

-~-

Current plot held


plotlr,'o'J

S=-

PICII of ROC!Ii.o<i -

It" I<.

Aoym;ll<>lllo

+Ill+

ltJk=O

1-tK

Y=

/K'+-1'1-K+?
I+K

xa. + Y' = ( J+:JK.)


I+ I< -t

K"'-t-11-K. +f'

(!+I<)'

/P { /CN)~ ::; /0

= (1+1<).

This indicates that the root loci are on a circle about the origin of radius

.(10"'

----

---------------------------------------The open-loop transfer function

<j(>)#(s)

/((s+P.>)

s'( St"3.6)
has the zero at s = -0.2 and the double POles at s =
s "' -3.6.
The asyroptotes haw angles of :!: go. The
real axis at ct"8 = -1. 7.
The breakaway or break-in
0, s "" -0.43155, and s = -1.6665.
A MATUJl program
plot is shoWn below.
The resulting root-locus plot

(Prell...., 11-6-<1;

(k"-t-I?-K+9

then

(Problem B-6-4)')

'
'
~

/i-:JK

X=- !.!:E.. '


1-t"

grid

'

s""+2s+lo

(2+-6~)-S

51: ax1slvJ; axis('square');

title("Piot of Root Loci and Asymptotes

,(t+K)s' r(z-rttc)s T/l)t-/~K.

If we write s =X + jY, that is

!!_.

rlocuslnuma,denal

4 -5

has two roots at

!
I

0 0 0 11;
4 6 4 1];

r ,. rlocus(num,den);
plotlr,'-')

v "' [-6

-~

(t+l<)'z.+

By equating the imaginary part equal to zero, we obtain tJ= 1.8708.


By
equating the real part equal to zero, we get the gain value at the crossing
point to be 9.25.

dena"' [1

"#
'
"'' """'

The characteristic equation

= (w'~>-"ft.I)L +ltJ+ 1<:) +j{-'1-~+IP.w) =0

den"' [1

HPJ::

-~

solving the following equation

numa = 10

I+ Q(T)

is shown below.
The resulting root-locus plot is also shown below.
The
root loci cross the imaginary axis at tJ"' 1.87.
This point is obtained by

num"' [0

!!::::::

-''

0 and a single pole at


asy~~~ptotes meet on the
points are located at s =
to obtain the root locus
is shown on next page

% Root-locus plot

num = [0 0 1 0.2/:
den .. [1 3.6 0 OJ;
rlocus[num,den[
-4 4]; axislvl: axis['square'l
v .. 1-6 2

'
0

grid

tiUe('Root-Locus Plot

'

'

--

'

---:~=~:)=:;~:;.-----------------------------------------------------------M

[Problem B-6-6[')

www.shmirzamohammadli.blogfa.com

"

~-J:l~~

,1.5: -~ &'-->"

'

RooH.= Mot

'
'

'

'

~~-

~-

"\

-6

-II

..)

RMJ-2NJI, ,1 -

1!

------------------------------------------------------------------!!!

.
"

;;l!i-

'

'

'

% Root-locus plot

num.-[0 0

2];

den= [1

10

OJ;

numa = 10 0 0 1];
dene = ]0.5 3 6 4);
r .. rlocuslnum,den);
plottr,'-'1
hold
Current plot held
plot(r,'o')

% Root-locus plot

rlocuslnuma,den<~J

1 0.5]:

v ""1-10 10 -10 10]; axislvl; !lllisl'squere');


grid
titJe('Piot of Root Loci 0111d Asymptotes
\Problem B-6-81'1

11 1 0 11;
rlocu5lnum,den)
v = !3 3 -3 3]; axis[v); axisl'square')
den~

grid

title!'Root-locus Plot

\Problem B-6-7)')

...;~I_)_J:!"'-""'~

66

www.shmirzamohammadi.blogfa.com

"

----------

A MATLAB program to obtain a root-locus plot is shoWn below.


resulting root-locus plot is shoWn on next page.

K(J+~.s-)
sJ+.s .. +/

has the poles at s = 0.2328 + j 0.7926 and s = -1.4656.


The zero is at s =
-0.5.
A MA'l'lAB program to plot the root loci is shown below.
The resulting
root-locus plot is shown on next page.

num = 10

--'

----------------------------

The open-loop transfer function

~(.r)fi(r);:::

lL

'

I I H--i-1-1

r---+-1

--- j----

'

'

f----

l'

--

~)

----- -

''

:;'!,_

1---- ---

...

'

'f

J
l'

-1----

"

~-~--

'

{Prolllom a-e.e)

~-.,'-""'~

....

-""'15:... ...r4-- .:.:, ) ...r\i'.t:


-~ &'-->"
.![

'"

-f!

r- ---I - --

'

---

! '

'

'"

-"

.:t;

num = 10 0 0 2 'l.];
den = [1 7 10 0 0);
grid

title(' Root-Locus Plot near the Origin

...;~I_)_J:!"'-""'~

i
0

1\

......

2j:;..

2k

as fottows:
21<.

21'

?tJ-P::.

7
{!-")/!;

-14' K
7
?o- zl::.

7
~K

K~o

--

Thus, the range of K for stabilitY is

;o.> ;;- K. ;> o


------------------------------------------------------------------------ll-{>::9

The ctJaracteristic equation for the system is

s'o~- f-S' ... +" B"S +- K :::::o

I .

If K is set equal to z, then the characteristic equation

.s 1 -r

~s

9-Sz.+FS +2 =0

The closed-lOOP pates are 1ooated as fottows:

68

f-2.- 9-tt >0

.,..__,

t (__I_._ I~

...

2/<5

7tJ 7 Zl<

I I 17

Il

;o

s'

{PIOblem B-6-8)')

-r

For stabilitY we require

il

'

~s

:~

rlocus(num,den)
v = (-3 3 -3 3]; axis(v); axis(' square');

'

s'

~-

"

'

% .. RooHocus plot ..

Flllci-I.DCtlll't:ll.--- ongn

s'

_fit

A root-locus plot near the origin can be obtained by entering the followThe resulting root-locus plot near the

'

s'

,}.

ing MATIAB program into the computer.


origin is shovn next.

Routh array of caefficients

Jj;

'\

-t- 7SJ -t-IOS'"

s+?sJ rf()$ 2 +z'KS' t- zt. ::o

~.&::
i

'\..
'\

s"

characteristic equation for the system is

'j'

'

-i
-1
_:)i;
l.,

runction is

z/< (S+ f)

~{$)

~;:::;.-

i:

I
\

'

C(sJ

~-

__ J'~---

I!

r-I

't'he range of K for staDU.l.~J ........ --* .&tt.erion


Since the closed-lODP transfer

,...,.,._,,......,......,

'~'"""""'L""...,...,.._

69

www.shmirzamohammadiiblogfa.com

~-.,'-""'~

'

-""'15:... ...r4-- .:.:,F


s = -1.8557 + j1.8669
s " -1.8557

-..:,)'

P"' 11

rootslp)

:~:
~~-

21:

ans ""

-1.8557-1.8669i
-0.2887

A MATIAB program to plot the root loci is shown below.


lccus plot is also shown below.

The resulting root-

II

s'"+I'K11 s+k =(s+t+-j'..ff)(s+I-Jfi) = s"-tzs '+f


we obtain KKh z 2 and K = 4.

To plot a root-locus diagram for the system vith Kh = 0.5, we need to


rewrite the open-loop transfer function such that it contains a multiplying
factor K.
Since the characteristic equation for Kh: 0.5 is

Hence, Kh

1
f""""'.
~
E:

'('I

_,,

OJ;

=0

I+ _~_,_(_':-c'"::-S-'-+'--'1)'--

=O

"

II

and consider K(O.Ss + l)/s2 as the open-loop transfer function, or

Gt(r)

rlocuslnum,den)
a>;isl'squaro'J
grid
title('Root-Locus Plot of Gis) = l(/(sls'2+4s+81/'l

k(P.!"r4/)

s'
'Thus, the system will have an open-loop zero.
(This zero is not a closed-loop
zero. )
A MATLAB program to obtain the root-locus plot is shown below.
The
resulting root-locus plot is also shown below.

Rccl.locus F'lolof Gs) ~ K.ts(r'2~J


~

:[UJ/1
-. I I I I
7

% Root-locus plot '

1I

grid
titlei'Root-Locus Plot

_,

~---t-+------1

-2~---L._

I ------'--~i---Lj
'

--

2--

_,
}--,--j,c--:_,f--.!-~+--~-~
0

'

'

--

(Pn;>bl.m a.&. I D)

- '

I'

ii

I'

!__J_____L\~-i
I
I
!
II
I

___j

--~-'
I

-----;- -;

'
_____ j _____ .i~

'

--

'>',___J,_--,_,!---,---J,,---,,!--~,

-------------------------------------------------------------------------------...;~I_)_J:!"'-""'~

_,

:---,--~-~

--l

!Protl!em B-6-10)')

flr 0

I I
.II -r--

I'

Plr:ll

-r-----tc
I

rlocuslnum.den)
v = [-5 1 -3 3[; axis[v); exis!'square')

-r- -t--,!

num"' [0 0.5 11;


den .. 11 0 OJ;

www.shmirzamohammadi.blogfa.com

71

I
111

we rewrite this equation as

I.
1:

s +k

5 -t-P.S"K

II
II'

= o.s.

~l

':iii.

1):

II[

Noting that

% Root-locus plot
4

II\

k.
/?{rj = -,-,-,-:-+-"K-:-K::-,-:-,-:-t-:-K~

-~7.:

+ 1.8669i

-1.8557

den "" !1

'I

~-

,----

'":l'

o\

&'-->"

C(:r)

See the following MATLAB program for finding the Closed-loop poles.

-~

jl-8669

s = -0.2887

num"' (0

;,_)1.5:

~-.,'---"'~

1:
I
I

-""'15:... ...r4-- .:.:, ) .,ri...:.Ui)-l-~ &'-->"

'

To obtain the unit-step response of this system. we first substitute K =


1.268 into the closed-loop transfer function and then enter the following MAY-

The closed-loop transfer function is

K
C($)
R(s)
s[(s-tt)(s+Z)+O.ZK]+K =
The dominant. Closed-loop poles may be written <IS

LAB program into the computer:

k
s.t

Js~-r2S TP-2K~+I<

.....

% Unit-step response

.j;

.'
-~r
.>

s =-X :tjffX
SUbstituting s = x

+ j

~ into the characteristic equation, we obtain

(X+)ff.r.) 1 + 3(X r )fix)"+ 2 (X


or

By

t-jo/J .x) +-

"'

-'j;(~-0-;ta.+2Xf-o.zK.t.-tk + 2ffj(.J.:tl-+Xt-P-IKX) =0
equating the real part and imaginary part to zero, respectively, we obtain

-axJ-

tfA:.'"

zx +o.2 KX

~::e'"+x+ o.tk.:r

+ K=o

(1)

=o

(2)

Fran equation (2), noting that x f. 0, we get

l.:r+!+ 0./K. =0

I.
I

The

~~

'

!
I'

'

Jo

tor;

ans ,.
-0.5622 + 1.7354i
-0.5622. 1.7354i
-0.3756
The value of x l!lllst be real.

Hence, ;;e take x = -0.3756.


closed-looP poles are located at
S = - ~-?7.>6

'

. .

10

Thus, the dominant

u<fi182D

A MATLMI program to plot the root lOCi for the given system is given
% Root-locus plot

--._/ .7,/.)1/,{

I<= -/0(3cr-l)

= -10{- 3'X .:".Jp.>tf+l) = / 263"

num = 10 0 0
<.len= !1 4 11
K1 .. o-.o.s:2;

1<2 = 2:0.01:2.5;
K3 = 2.5:0.5:10;
1<4 = 10:10:50;
K5 = 50:50:800;
K"' [K1 K2 K3

1);

14

1<4

10);

1<5];

r = rlo~:us(nunl.<.len.KI;
plotrr,'-'1

73

72

12

belOW.

The value of K for the dominant closed-loop poles is obtained as

...;~IJ----'*"' '--"'.lo/<-

''
------------------------------------------------------------------------------"0

<

roots[p)

I'

'

'j

I
I

-~'

program into the computer,


12

To find the roots of this cubic equation, we may enter the following MATLI\B
1,. ra

"'
i'

By substituting this equation into Equation (1}, we obtain

~8-6-11)

r !'---

.,

k = -10(3X +-1)

Sx 3 +!2Xz.+3vx+tP =0

(Problem 86-11)')

resulting unit-step response curve is shown below.

-~

or

0:0.05:20;

c = step(num,den,t);
plot(t,cl
grid
title('UnltStep Response
xlabel('t Sec'!
ylabel('Qutput c(tJ'I

di

x+jlT.x)+-K=o

num ,. 10 0 0 1.268!;
den "'11 3 2.'2536 1.268);
I ~

www.shmirzamohamma i.blogfa.com

._..i..->.J;l '--"'.lo/<-

-""'15:... ...r4-- .:.:, ) ._.,J.<i.f_)ts: -~


&'-->"
Hence, we

"

v = !5

-4

enter the following numerators and


the system,

4!; axis(v); axisl'square'J

grill
tltlo('floul-locus Plot ul G(s) = K/J(s'2+2s+211s"2+2s15)]')
xi;IIJeii'Real Axis')

--

ylabell'lmag Axis')

~;;'
'
,:;;;

i,ti'

Root-loc:ul Plot of G(o)

''-..

"
/

.,

-2

-1
RaBIA>cla

K(s-o./d'J'?)

( j,J'f~+P./61"7)

~
~~
'
2:

.."' it

'

74

., -1 0 1 2

""'""
------------------------------------------------------------------------------~

s.J+ 'f,NJ llS._-t t;o,Jf'IS'S T2.39lS"

'

..

K
(>+/.3Jst) 3

...;~I_)_J:!"'-""'~

'
i
l'

(st- 3-J'H';o-1!67)3

VI

'
'

S'L+

-~ l'li>l r.-..8-f-131

-4"

K
S 1+

(Problem B-6-13!'1

:?.

'i:r

.S" + j. ]fl.tJS.J -t- 7. P,72S I~

The equation for the asymptotes may be obtained as

ClaMH.,(.s) =

llfid

tltle!'Root-locus Plot
xlabell'Real Axis')
ylabell'lmng Axis']

<

The open-loop transfer function is given by

C,(s)/tfs)

K2 "' 50:5:200;
K .. [Kl K2];

"

------------------------------------------------------------------------------!!:::=ll.

The

r "' rlocus(num,den,K);
e = rlocuslnuma,tlena,K);
plotlr,'o')
v = (-6 2 -4 4]; axlslvl; axist'square'l
hohJ
Current plot held
plotfa.'-'J

._:-

'

2.3825]

5.3515

num = [0 0 0 1 -0.66671:
den .. [1 3.34 7.0325 0 OJ:
nume"' [0 0 0 11:
dena"' [1 4.0068 5.3!>15 2.38251;
Kl - 0:1:50;

.~

'

.,

% Root-locus plot

I
"-..

0)

I )

4.0068

'g.

"

o'

dena= [l

7.0325

1
I

-'-

3.340

numa = [0

'

den= (l

Fo'

-0.6667}

in the program.

/1. M/I.TL/I.B program to plot the root loci_and asymptotes is given OOlow.
resulting root-locus plot is also given below.

40.

I'

#--

'
'
'
'
'
'

-~

KI((J"2~2o+2)( ..2+Zo+5))

For the asymptotes,

;~-

The root-locus plot is shown below.

num :: (0

denominatc~s

75

www.shmirzamohammadi.blogfa.com

._..i..._J:l'--"'~

'

-""'15:... ...r4-- .:.:, ) ~uJ_)ts: -~ &'-->"


!!:!..1

By substituting s =

'--"

and rewriting, we obtain

a-

+ jW

8-6-15.

into

/~/

K =

((J"&+a--w:z.. )~ -r

= [a-(0'-ti)

~
~

o--w'_tj~(l+ZD"-)1

jo-2.+

w._(J+a6")

,.

% Roo !-locus plot

num = [0

.~

rlocuslnum,denl

~.

,:,:.s_

+ 9-a-')

= [fJ'(rr-+t);-w']' ;-w~

below.

'
'
'

lt

""'

_,

,,

i
I

I
tt--

,a

'

\
The follow~ng

(l'l'tlt>ltm B-6-15)

Roai-UJc:ul Plot

1<'

The constant gain loci forK = 1, 2, 5, 10, and 20 on the s plane are shown

.[5.

Warning: Divide by zero


v .. 1-5 3 -4 41; axislv); axis(' square']
grid
litle('Root-locus Plot
(Problem 8-6-151'1

l
I

5(S,._T-2s+t)

0 0 1[;
2 6 OJ;

den= [1

-:1~

The reduced

- I + ---"'-K-----, =0

5+/

The open-loop poles of G(s)H(s} is at s = 0 aml s = -1 .:!:: j


MATLAB program produces the root lOCUS plot sholm below

-)l!

-w]' -t- cf(1+ ~ 6'

/:;(.HI)

J+tj($}fl(s)= /+ S(S"t-~ST{)

1<~ J!~j'-')(~+)"'+t)J ~ Jco--r)"')'+~Ju!l


Thus,

The term (s + 1) in the feedforvard transfer function arul the term

"'("S+"l"j in the feedback transfer function cancel each other.


characteristic equation is

I
.,

-~

--._

. .

-2

--1

r
!

' . '.

'

To find the closed-loop poles when the gain K is set equal to 2, we may enter
the folloWing MATLAB program into the CQI!IPUter.

- /4.
= 11 2
roots(p)

2);

ans "'

------------------------------------------------------------------------------._;~I_)_J:!"'--"'~

'"

i
www.shmirzamohammadi.blogfa.com

-0.6147 + 2.1754i
-0.8147. 2.1754i
0.3706

"

._..i..._J:l'--"'~

...

-""'15:... ...r4-- .:.:, )l._rt..:..:<_)S: -~ &'-->"

Thus, the closed-loop poles are located at

s : -0.8147

j 2.1754,

''r--,--~...._~~--~~(~Po~--~,..
~,.~-r,--;

s " -0.3706

,~--- + --i--- 1-~~-

The characteristic equation is

B-6-16.

(J+Ct')

s~(

+I

S+-2'

Define K "'

;>(I(

".,

-1.5~------l-~

,~

:;,

"'"
-.{'

s't-2.r'+2S

-~

2K
/+;:;0
s{J .. -t-2s+2)
A root-locus plot of this system may be obtained by entering the following
Hli.TLAB prcx;rram into the o::xoputer,
The resulting root-locus plot is shoWn on

f.st-(:1'-)

-----=
/(fr)

Root-locus plot

t-

( .S+S

\: S+S"
3.464); linelx,y)

/O(S+/0)

=-O

/C{s-t-/0)

S(5+i}(S+-/O)+!#S

Since the variable k is not a multiplying factor, we rewrite the characteristic


equation as

2); axislv); axis!'square'J

yriU
tillei'Roollocus Plot
x!aiJel('llea! Axis');
ylaiJel!'lmag Axis')

,,

'

S(S+!}(5t-IC)+!tJA S

J+ (_S+/f-)

ploW,'')
hold

-0.5

Thus, the characteristic equation is

Current plot held


-2); y = 10

S+J.~)

Kl ~ 0:0.1:10; 1<2 = 10:0.5:200;


K "' !Kl K21;
r "' rlocuslnum,den,KJ;

......

/0 (s+;o)
s(s+/)(s+/c) +-/e<.f.s

\...s+s

num,JO 0 0 2);
t.len ~ !1 2 2 OJ;

x = [0

-1.5

-2

--lS:. __

The closed-loop transfer function is

C&-)

v "" l-3

1 ..

-----------------------------------------------------------------------------
!::=!1_.

next page.

-2.5

'!ben, the characteristic equation becomes

. ...

-+-+-

+---

it as follows:

D(

-i

s"'+2s~-r2:>t-20( =O

!+

1-

'.: - ----- . ~~-c


c.s~---

=O

In thia case the variable ~ is not a multiplying factor.


Hence, we need to
rewrite the charactristic equation such that K becomes a multiplying factor.
Slnoe the characteristic equation is

we rewrite

---1--

1.5~---

------------------------------------------------------------------------------

IPro!Jiem B-6-16)'1

(.}'1-r-).s (s-+l)(r-trP)+

prr)ICI(.s + (s+-Jt)tof.Jf/P)

="

Which may be rewritten as


From the' coot-locus plot, the dominant closed-loop poles that correspond
to the damping ratio> of 0.5 are found to be

!t'(S+.s- )i!..s

/+

,,

S= -e<.S'i:jc.tM
The value of K corresponding to the dominant closed-loop poles is obtained as

k=l S{S'~+ZS+z)l
2

...;~I_)_J:!"'-"'~

f(J

I+
s=-t>f"+j<>-UI

- <-

(5-t-/t> )( s_,+D.s 2

+ ;s-s t-1-)

(SI-r-) 1( r

(:J+Z)(:s-r;o)(S+2tjJ.73~)(Y+z Jf.7.Jz.)

Notice that the open-loop poles are at s

www.shmirzamohammadi.blogfa.com

=0

= -2,

= -10,

and s = -2

=0

jl.731.

._.,i..._J:l'-"'~

'

-~15:...

...r4-- .:.:, ,, ..~ ~ 1.5: '"

obtained by entering the follOwing


A root locus plot for the system m8y be
MA.TI.J\B program into the computer.
'I'tle resulting root-locus plot is shown
below.

"~-I--_)

-~~= 9.08, G(s)H(s) can

'

f5r(s} H(s)

be given as

== f. H/. f~
\ s+.r J

num "' tO 0 10 50 OJ;


den"' II 16 75 164 140);
numa ~ [0 0 10];

Kv = ,.:..,.

.S"

~ tJ,Z'J?3

v = 1-15 5 -10 10]; axis(v); axis("square'l


x .,. 10 -5.51: v = [0 9.52631; line(x,yl

--------------------------

grid
titlei'Root-Locus Plot
(Problem B-6-17)')
text!- t 2,3. 'Asymptote')

(Prcbt.m B+11)

Roal.-l"""" Plol

J---1-==k-+=

J
11111.4YJM
liiD~

w.

-~

I'

j D.2.

-f."l.

''

#.f-

o--

'

<

1-.
.,

-1-4

-~.

f.%

'-'"DI

;;

The system tecanes

A root-locus plot of the system is shown below.


unstable for K > 19.6398.

B-6-18.

10

'"...

',

Cj(;}lt(9

,i;_
/_.5+f.9 _'j
/t/(.S+IP)
~ su .S"Cs+..r J s[(s+l)(.s+tc)+fP,s>]

hold
Current plot hold
a = rlocuslnuma,dena).
plot(a.'-'1

+ 9d. i"S

dena"'[t 11 20];
rlgcuslnum,denJ

I _,

S(S-+ I)(S+/0)

The static velocity error constant Kv is

% RooHocus plot

/O(S+/0)

__ ,_, ______

"'

-jo.1.

--~

~;e.t

'
:.~

The dominant closed-loop poles having the damping ratio equal to 0.5 can
be determined as the intersections of the root-locus branches and the straight
lines from the origin having an angle of 60~ or -60 with the negative real
axis.
The intersections are located at s = -5.14 . j6.90.
The gain value
k is obtained from

--------------------------------------------------------------------B-6-19.
A root-contour plot of the system is sh01o/Jl on next page.
Notice
that the system becomeS unstable if a '- 0, regardless of the gain value of R.

~ ~1 (s+z)f~-rN)(s+2+J;.?u.)(s+2-..JA?32)1
/0 (s+S).S

s~-s,t~+j.fD

= ;u?
81

80
....,~1.).):!-"l...i"~

www.shmirzamohammadi.blogfa.com

._..i...>.J:ll...i"~

_<. .:,AS:-..

...r~

.:..::, )

'i..i.:<)< ,.",.A.t;:OQt-<o'Ontour plot of the system with 0 ~ K< <><1 , 0 ~ Kh <()() is shown
' - ~.~~-Afhe closed-loop poles on the root contour when K : 10 and Kh = 0.5
are shown on thd root-contour plot.

jW

K,=~

f''
)4

~:;:

,,..,,

jJ

};ti-

-jt

.~-

'"

-jl

lit

,;;;

W;
-~-'

------------------------------------------------------------------------------~

-+

i\'

c,

_,~I

'I

'

'

a-

-jl

A root-locus plot of the system with Kh = 0.5 is shoWn below.

-Jl

-p

-J
------------------------------------------------------------

83

B2
...;~1_)_):!"'-"'~

www.shmirzamohammadi.blogfa.com

...,i->_J:l'-"'~

'

:.-

-""'15:... ...r4--.:.:,) ..ri.J:<_Jts: -~sCi's"'a

CHAPTER 7

lag network.

------------------------------------------------------------------------------B-7-3.

The following MATLAB program gives a root-locus plot for the -system.

The plot obtained is shown below

.---,-,.- - - - - - ;

8-7-1.

The

diffe~ential

hz (

% Aootlocus plot

equation for this mechanical system is

i, -i.,) +

-.x.,) == p, i.,

(.f,

Taking the_ Laplace _transforms of both sides of this equation, ass.uming zero

num"" !0 0 0 1];
den = !1 4 5 OJ;
rlocuslnum,denl
hold

"

initial conditions and then rewriting, we obtain


X~(r) _
Xi(S) -

Current plot held


x -

f,,

h'5 + ,t
(b,-rh)st-/t..

ys

t-/

b, + ;..,

b,

title!'Root-locus Plot

grid

l--

=f.>/

T>+l _ _f_ (
fTS+/

Xt(s') -

f1

~ .....

._,

then the transfer function Xo(sl/Xtfs) becomes

X.M _

s+f)
s+jr

,_

'

r --

cI

Z, = 'R., ,

Z,. = f?z+

Cs

2z
KzCS-t-/
Z1+Zt =(R,+f.:)C's+/

Define

l, C = T_.

R,+_l,.
,,

=;9;-/

Ts+ I

El(s)

jYTs + I

...;~I_)_J:!"'-""'~

f--

- - - - f--

'

- - -~- ---

-~i
'\

.....

~_L(s++)
f S+ __I__

of 0.5, we

s =:t:j.fix.
The characteristic equation for the system is

s 1 -r y.s ... +
By substituting s "x +

(;< ~lfx)'

Then, the tranSfer function becomes

Eo{$) _

---~

Since the doolinant closed-loop poles have the damping ratio


may write them as

Et(s) is given by

ds)

-.--

The transfer function between the output voltage E0 (s) and the input voltage

E,{.r)

--

---

--

-3 --- -

The canplex impedances z 1 and Z2 are

~ ..1~)

1/

f-11.

--

(Problem B-7-3!'1

1 - - -

This is a lag network, because the pale (s : -1/ T) is located closer to the
origin than the zero (s = -1/T).

!!::l::l

3.464]; line!x,y]

-~
"""''

--1<--- < +I

If we define

T~
If=

-2]; y .. (0

exis('square'J

b, + j,z

!0

_,

"'

n_

s-5

j.j"3x

t- ~ (

+ 1<

=O

into this equation, we obtain

>"j.[f x ) ' +

s-( "-

+jVJX) T /< =a

-rx 3 -fixl.+.>::r. +K+ 2-fij(l"-xz..+z.!.-x):::o


85

84

www.shmirzamohammadi.blogfa.com

._..i...>_J:l'-""'~

'

_By equating the real part and imaginary part to zero, respectively,

-'?X

2:ile,.solution to such a problem is not unique.


we shall present two
we~IS:... c.r'~ I ._rl.31--;!i-4,.&..,
Note that from the requiremmt
SB!i:i"rions tO the problem in what follows.
stated in the problem, the dominant closed-lOOp poles__must have!: = 0.5 and uJ n

-8x~-t-F.X t-k=O

4'-X._

+-

2.

s- .X

= ()

(1)

(2)

t:

Noting that x # 0, from Equation (2), we obtain

= 3, or

S;-I.S"j 2.$-'f'i/

i;.
;l

.
Angle deficiency = 180 -

-~

~.!!!'

I f we choose the zero of the lead canpensator at s = -1 so that it


will cancel the plant pole at s = -1, then the compen10ator pole lllllSt be located
at s "' -3, or

,,....

""'
')I

x =- " 6zs-::.

k.,

1-"-'

into Equation {1), we get


i'X 1-t-

.f X>.- 5":X.

= 8'(-p.us/ + f r-~Jz s-) ... - s"(-()J.ZS')

= f'-.2t6J?sTo determine all closed-loop poles, we may enter the following MATLAB program into the canputer.

(j, (r)

roots(pl

,,

-2.7500

jl.0825 and s = -2,75.

ru TT

"I 1 1

I
'"
1L
.'

...;~I_)_J:!"'-""'~

S=---l.s-+ J 1-ff.J'/

I'5=-1-St)z-rtr/

S(S+J)

JO

-;

~ (J,:J

= o,y

s+ I
s+.?

''

,I

The open-loop transfer function is

(j,{f}lj(.r)

il

s{..s-+3)

The closed-loop transfer function C(s)/R(s) becomes as follows:

1 1 1

...(d.K(:r)

-++I~H-1-

sz.+r.s+'f

Method 2:
Referring to the figure shown on next page, if we bisect angle OPA
and take 20.447 6 each side, then the locations of the zero and pole are found
as follows:

+~'

zero at s

-1.9432

pole at s = -4.6458

'

--

..

------------------------------------------------------------------------------86

s+-5

S+.?

S(S-t-1)

u~--

"

S+ I

S-t-1

(0

{j<fr)

= -0.625!

u~--

+- --L
T,

~ K1i

--Tz
)

Hence

The unit-step response curve can be obtained by entering the following


MATU.B program into the canputer.
'!he resulting unit-step response curve is
Shawn be lOll',

0 0 4.2969];
den 11 4 5 4.2969[;
step(num,denl
grid
title('Unit-Step Response
(Problam 8-7-3)")

T:r.

or

.'4-<'

K=

num [0

KTics+--t

7; s+ I

S+/
S-t-J

13K

g.

-0.6250 + 1.0825!
-0.6250- 1.0825i

% Unit-Step Re~ponse

'f,l<) =.? K

ens ,..

Thus, the cloSed-loop poles are located at s

7i~+l

The value of K can be tleternined by use o! the magnitude condition.

t'

4.2968751;

=I<

or

~0

p "' [1

.
.
100.894 = - 40.894

Method l1

-~

or

= -0.625

"
120

s~'

f..:t.+2.s- =0

ay substituting x

.,

Notice that the angle deficiency is :

Thus, Gc(s) can be given as

www.shmirzamohammadi.blogfa.com

(i ..(f)

= J<.

7i S+(

Tis T I

'r,
-k~
~

,,

St-/-'/1'-JZ.

S+ P.dP:J'f

'=

2-.J"i/ J< S+/-f1-.i'Z


S+fl.-ll!l'f

87

._..i..->__, '-""'.lo/<-

'

-""'15:... ...r4-- .:.:,)


jw
A _ __,. p
, I \

~<;.~
'\.0)
.. ,
/~-

,;

;:;'

jl

"
"' ar

,,,
~Jt

,. J

'

'

'

' o-

or

/0

S(s-r-t)

(:S+-J<./Hf )J (:5-N}

=I
S: -/-S'+) ~ ~'f/1

k::::::
2.3-?J C :>+/.Fi'JZ) T=-/-ft-j
Hence, the compensator Gc(s) is given by

Cir(~) ==

S.J-f,'fi'1Z

;.Z?J'S St-'f.Jft.-o.

l-!i~rt

::::P.SI;JS

'~

""

0 -S"JY.i.S+/
0 2-I>Z.s+l

(_P-5"/ftiS+I_\

'

;(.

'11len, the open-loop transfer function becomes as

~~($"}(j(.r) =-t'-.>"/.JS\t~-ZI.f"Z.S+i)

~-

P. .!"/3?

The system designed by Msthod-2 gives a larger value of the staj.:ic velocity
error constant.
This means that the system designed by Method 2 will give
smaller. steady-state errors in following ramp inputs than the system designed

% Comparison of unitstep responses lor three systems

num [0 0 101;
den [1 1 10};
num1 .. [0 0 91;
denl [1 3 91;
num2., (0 0 2.644
den2 .. [0.2152
t = 0:0.02:8;

s-.na

/0
S(f+!)

"r----,--''"""'i'-...,.,.,.,.,-...,,;==,r:-=:.;==--T--.
4

. . r---, \:.._

(t:~J/9-Ss+r)

'

~{r)- f(:ft-I)(PZI.)Z.S+/) -r.S-!33(o ...N~ST/)

.z. t)'JL s -r
-

I
I
I
I

0. 'Z/ .f'Z.

...;~I_)_J:!"'-""'~

S(Stl)

...;:

---

~--

--

s-. /1 :f'

For the system designed by Method 1'

--

s: 13E

sJ T / ,2 IS Z .s.l... + 3Jf< $LS +

It is interesting to compare the static velocity error constants for the


two systems designed above.

/(, =ft..
V
S~i:J

5.1381;
3.644 5.1381;

1.2152

c "' step!num,den,U;
ct .. 5tep[num1,denl,t);
c2 .. step(num2.den2,t];
plot(t,c,'.' ,t,c1 .'-' ,t,c2, '-. 'J
grid
titie('Comparison of Unit-Step Responses for Three Systems'!
xiabell't Sec')
yiabei!'Outputs'J
text{1.5,1.5, 'Uncompensated system')
text!1.1,0.5.'Compensatell system with K = 0.5138, T1 = 0.5146, T1 .. 0.2152'1
texti1.1,0.3,'Compensatell system with K .. 0.3, T1 = 1, T2 = 0.3333'1

The closed-loop transfer function is

m_ _

/0

In what follows, we CCK!JPilt"e the unit-st.ep responses ot the three systaDs 1


the original unccmpensated system, the system designed by Method 1, and the
system designed by Method 2.
The MATIAB program used to obtain the unit-step
response curves is given below.
The resulting unit-step response curves ue
also shown below.

.,a;.

"'

().~/'1/.S+!

P-zty-zs+/ s(.s+t) =r./31'

Oil'

I&-

'Ihe value of K can be determined by use of the magnitude condition.

h.. s (P-5"118)

by Method 1.

lfl:

Z.Jf/J< St-/9'fJZ.
s +- ?.J 'f$"1

designed by Method 2:

..'.ic
~

-iz

"

''.) riir' ~ystem

Kv =

jJ

jo

-/.1,.12

f. 6f.fT

' ' 1.5:

::rf:{:f::t::t;~t~.

utL_

~3

, - 2--~-

.--

;:;~~~-

"

89

www.shmirzamohammadi.blogfa.com

~-J:l'--"'~

'
~

~15:...

The closed-loop transfer function for the system is

C(s)
k
2
Rfr!;::;- 2S +S+kK~o5+K
From this equation, we obtsin

"' ~ vz
"' .

...r4-- .:.:, )J._rt..:..:<_)~-~ &'-->"

S~+

lt-kK~

s-t

From Equation (3) we obtain

k
So ~ 1+/<C~~

I+KK.,

.2>cv"=

If we choose K = 5000, then we get

!+KK,
2

The settling time is specified as

J:

'

=If

:~
.,._

5w~

!1

::::: (! + KI<A)/1- ;::

..;_::.!:

t+KK.it

.:S 2

I+

kK.,

99

2ST-f

ZJ'-f(

K=

qt.s)

= L

jt:Ks.

!!::::1:

Let us choose the zero of the lead compensator at s = -2.


pole of the compensator must be located at s "' -4.
Thus,

=If

II

/+kK,~2

(2}

The gain K is determined from the magnitude condition.

,.

K s+ 2

"

(3)

(<)

From Equations (1) and (2), we get

s~-zrjzfi

IS(S+)I
10

Hence,

~ ;,6
.S:-tfo}l/3

G;,(J) = ;,

< KJ, < I

S+Z
ST'f

Next, we shall obtain unit-step responses of the original system and the
compensated system.
The original system has the following closed-loop transfer function:

Cfs')

JZK

1?{1)

90
...;~I_)_J:!"'-""'~

s-

.s(D..ss+l)

S-tS'

K=
It Kk11 ~ Sc

Then, the

"'
(' = K S+
S~2
'1~ /
9(1)

!+KK~, :::::

.[3 is

The lead compensa_tor l!lllSt contribute 30.

!+KK~o

I+~<K,. ~so

go;;

all specificatLons ace satisfied.

The angle deficiency at the closed-loop pole s = -2 + j2

Thus, the conditions to be satisfied can be Sllll!lliirizecl as follows:

1:

...1.. ..._

~ = P.i' IFS'

,SP.(1P ..

1ao- 120- go = - 30"

S~P
s~t>
2:S T I +KK~o S
ThiEl value I!IUSt be equal to or greater than 50.
Hence,

/+-!<~

O.eJI?i

.)_
+

the static velocity error constant Kv is

K,.. = .t.;..._, s

Thus, we determined a set o! values o! K and Kh as follows:

With these values of K and

2,;- I

JiK, = (PO

~ =~

'
-"""'

Since the feedforward tran5fer function G(s) is


_}_

(j(.~):::::

I+ I< K, =

,.

\.-

ts= -~~~

j( ~ $"1?PP

1-rl:k~

Therefore, we have

=.JZK

Since the darnping ratio); is specified as 0.5, .we get

%=

<K

3:z

"/o

= s 1 +2.s +IO
9!

www.shmirzamohammadi.blogfa.com

._..i...>.J:l'-""'~

'

-""'15:... ...r4--.:.:,) ..rJ-.:<_)1..5: -~ Wsystem designed by Method

2=

jw
A _ _-;;<~
p
,'I \

ol'l.~
.. ,

>~

t!t

~JI

~c

+.

'

0\>

;~"'-

' <>-

il!l

-,.
1
I
a
~

The value of K can be determined by use of the magnitude condition.

or

k::::

/0
S(S-t-1)

S+ / 9JZ.
s.,. f<IJLrf

=I
S:: -/S'"+) 2t'111

(srf<,/Jrf)J(S-tl)
23.f/($+J.f'HZ) =--t.f+-jl-rPf/

t'.~/JJ>

'!It
it
~
~

'

Henc:e, the compensator Gc(s) is given by

S.f.J,'fttJZ

(j""(r) = J.Z?!'S .f'+y..lft.-"'

=P-S/3S

-~1-IS+/

17

0 z.ts-zs+/

Then, the open-loop transfer !unction becomes as

fi~[f)tj(.F)

In what follCJWs, we ccmpare the unit-step responses of the three systeftls 1


the original WlC'OIIIpensated system, the system designed by Method l, and the
system designed by Method 2.
The MATLAB program used to obtain the unit-step
response curves is given below.
Tile resulting unit-step response curves are
also shown below.

e:

I<

% Comparison ol unit-step responses for three systems


num \0 0 101;
den- 11 1 10);
numt - 10 0 9];

denl - 11 3 9);
num2 .. [0 0 2.644 5.1361;
den2 .. 10.2152 1.2152 3.644 5.138];
I = 0:0.02:8;
c "" step{num,den,tl;
cl '"'stepfnum1,dan1,t);
c2 .. step(num2,den2,tJ;
plot(t,c,'.' ,t,cl, '' ,t,c2, '.'I
gr!d
title!'Comparison of Unit-Step Responses for Three Systems')
xtabel('t Sec')
ytabeH'Outputs'J
text(1.5,1.5, 'Uncompensated syslem'J
text{1.1,0.5,'Compensated system with K = 0.5138, T1 = 0.5146, T2 .. 0.2152'1
t&xtll.l,0.3,'Compensated system with K = 0.3, T1 = 1, T2 = 0.3333'1

"-SI<J.ts +I)
/o
=-<P.r/38 (:o.u.,rzs+J
s(s-+t)

"r

/?{'s) -

2 !~r-

I
I
I
I

,_.

.S:/::JJ' (P.J"/'MS+I}

5'($+-l)(o.Z/J"Z..$

t-1)

____ _
+S-/$3" (".r/J~/s+/)

o;

5(S 'f-l)

--
1.

u~-N

For the system designed by Method 1'

--

t:

.s T s-. /38'

tJ.Z/.f'Z s-'+-j._21SZ5L+3J~Y.S+5>.1'3?

=ft...
S~4

-t-1--/--1---t
t...~~ ------ ---- -'

"

It is interesting to compare the static Velocity error constants for the

v,~

. -

two systems designed above.

1\

..,,._,;,=;-,-=,.,r==,--1

--,'-"i'.,.,~,,

The closed-loop transfer function is

.ff!l._

/0
o.S"/fi..f..>-+ I
p,z.tyz s + 1 s(.S+I) =.t-.n.f

'.

2, 3"1 II<

(P.YJJ8)

The system designed by Method._2 gives a larger value of the staJ:.ic velocity
error constant.
This means that the system designed by Method 2 w111 give
smaller steady-state errors in following ramp inputs than the system designed
by Method l.

..

jjt

'

<

:-.,.
-~:-

'

.,;,....
s~,

-'-

jl

jo
_,,

-f,l"~

f,6f.J7

Kv:::

"

'

~3

---- :;.. ,_.-;-,;

-~--;,~

;:-;;j;--

- 0~-;.. :.._~~t -

------------------------------------------------------------------------------...;~I_)_J:!"'-""'~

"

B9

www.shmirzamohammadi.blogfa.com

._..i...__, '-"'.lo/<o

'\
~

-""'15:... ...r4-- .:.:, )l.rt..:..:<_)!Or:~ &'-->"

The closed-loop transfer function for the system is

CN
R(rJ ::::::

---;sC'~+~]'_I~r~<~K,;::5~,_~Kii:2
z

s +S + KKn -; -+ K =

. we obtstn
.
From this equation,

"' ~ 1/T
rk '
Since the damping ratio

y;

.2~w...

k
sv~ I+/Cif- =J2K
/( ~ S~Pt)

is specified as 0.5, _we get

I+I::K.,

The settling time is specified as

t3= -~-~

If we choose K = 5000, then we get

.2

!+ ICI<t

..\:

'

=if

:f

"'

!;w,
ltkK.~,
(I+ J:K.4)/'r Since the feedforward transfer function G( s) is
___.K__

K, = ~ s rfifs) = ~ s
~.:>

S-#.,

'"

.._:1:

~ 2

K
ZSt- ( 1- Kl<1<

'

_j_
Zs T 1-t-KKs. 5

Hence,

"

Let us choose the zero of the lead COIIlpellSator at s = -2.


pole of the ClJllilE!llSator IIIUSt be located at s = -4.
Thus,

'1r:

/(

( 2)

(3)

() = K

S+Z
S-+ SL

s-

S("S

(4)

F~ 1-+KK, ::::-

VZK

Then, the

S+-2.

s-rsz..

s+l)

S=-Zj2{i

= I

oc

S(S+ft..)l
/0
S=-2+}2fi

:=

j.6

Hence,

C,,(s) = /.6

From Equations (l) and (2), we get

fi is

The gain K is determined from the magnitude condition.

K:::::

o < Kh < I

...;~I_)_J:!"'-""'~

The angle deficiency at the closed-loop pole s = -2 + j2

I:
tT I<K~-o ~ Sc

Aj = "" ITJ'

With these values of K ancl Kh, all specifications are satisfied.

The lead compensa~or must contribute 30.

!+KK"

(1)

/+KK~, ~2

99

=~-= 0.0/f'i

160- 120 - 90= - 30

I+KK14 ~SO
1bus, the conditions to be satisfied can be sUIII!Iarized as follows:

~[f

=/PO

K = .SPt'P ..

_1_
s

=JiK

Thus, we determined a set of values of K and Kh as follows:

b,,

K,

B-7-6.

This value must be equal to or greater than 50.

It- fC Ki.

!+I<K,
oc

~-

/6

2$-t I
l_
C,(r) ~ I
kK.
J
+~,
the static velocity error constant Kv is

oc

""~

Therefore, we have

From Equation (3) we obtain

I+KK.,

<K

32.

S+Z
S+'f

Next, we shall obtain unit-step responses of the original system and the
compensated system.
The original system has the following closed-loop transfer f~ion:
Ct>) _
/o

RM - s 1 +2s +10
91

'"
www.shmirzamohammadi.blogfa.com

~-.,'-""'~

'

~~;-_;~nsated

system has the following closed-loop transfer function:...""'IS:...

C(sj

...r~ '7) tt..:..:<J-t:~~I


;'!!"

;.t

at s = -0.5.

<j,(r}

R(n- sz+.fLS+/
program to plot the unit-step response curves of the original and
ted system is shown below.
The resulting unit-step response C'llrves
also 6hcMl belo1o1.

.::
1

% ' Unit-step responses of original system and compensateU system '

or

nurn "" [0 0 101;

den= [1 2 10[;
numc .. [0 0 16);

sns
S-t-3

-I

16[:

H>

sz.

I .'

S+t1,,r

S: -1-f.JI

Yz:. -t~JI

II!.'
=

ii

II

Hence the lead compensator becanes as follows:

c2 "' step(numc,denc,t);
plot[t,cl,' .' ,t,c2, '.'I

,,.

(j.(r) ~

tiUeC'Unit-step responses of original system amJ compensate\! system')

1-

]i

S+d..sS+3

The teedforward transfer function is


'/.S+Z

xlabei('Sec')
ylabeii'Outputs')

9.:f.r) fiJ(J) =

textl1.5, 1.3. 'Oriyinal sVStem')


text(1.8, 1.1,'Compensated system')

Iii

sl+.Jsz.

,,

A root-locus plot of the system is shown below.

ill'I

-.t.o<:us Pkll at (411+2)1(1"3<-3$"2)

'

~~~~;'!"~~~-~,~~"*o;~~~~;'~~-~~-~
r--,:~~:~"';'-~-~~-~~:;..

I~---

'

-- I . --

~c

I'
.,

.~

_3

;,

,,

'',.~

II

,., /.1., ....,. 1-t-

'

~--

!
I

'\\ :~
/

'

;~- ~

I li

''

'' ''

~ate

1Bo"- t3s" -135.:- go

C(s)

f<.s +- Z.

gi~

I
z

jl and s : -1.

the unit-step and unit-ramp responses of the

uncompensated system and the compensated system.

92
...;~1_)_):!"'--"'~

'

that the closed-loop transfer function is

In what follows we shall

_Let us choose the zero of the lead

"

l?(s) J ' -t- 3S'._+ 'fs t-.Z.


The closed-loop poles are located at s : -1

The angle deficiency is

A lead compensator can contribute 90.

. . .
"""""
~

...

' '""" ' '' '


------------------------------------------------------------------------------!!::1

_1

(s+.j) si

cl "" step(num,den,tJ;

5+ 4,S'

=K

The gain K can be determined fr0111 the liBgnitude condition.

dane- [1 4
t .. 0:0.01 :5;

Then, the pola .of the ccrnpensator lllllSt be at s , -3.

Thus,

A MATLAB program to obtain

,,,.

93

www.shmirzamohammadi.blogfa.com

I
IIII

._..i...>.J:l'-""'~

'

~~..........,_

~~:steP

. ,__

The resulting curves are also shcnm

response curves is given below.

-""'15:... ..r~ ,' )!Jri...:.C<_)\S -~ &'-->"

,,,~,-,,--,~-;e~-,-::,-:-:::.:-:.:-:r-=-=c,:-=-7

% Unit-step responses <.>I uncompensated and compensated systems '

num .. 10 0 11;
.den .. 11 0 11:
numc = 10 0 4 21;
denc

[1

!l "'

21:

1 0:0.02: 10;

cl o: step(num,den,t);
c2 = step{llumc,tlenc,U; ...

plol(t,cl ,'. ',t,c2, ''I


grid
title("Unit-step responses ul

uncompens~ted

xlabei('Sec'l

anll compensated systems'!

____

ylabeii'Outputs'J
text(3,0.9, 'Compensated system')
Utxt(J, 1. 5, 'Uncompensated system'!

....__

'-'

11

_L_\

,.

"ri-f='j '\ -

-----------------------------------------------------------------------~------

B-7-8.
The original
fer" "function:

1-

I
--1~ -1-

. '--,--i

. 11
l--

::~--f:!=t+~-~

/'

/6

s + .:.
'~-'
IT

K" ~ _t.:... '"ic~)tj{s) =


H

5--10

Let us choose

Kc =

s~

1.

Then

~~

.)""

Choose a lag c:oospen-

(p>!)

'

sK<

s+f

/6

>+-'PT

.s(S+!-)

=9-/K,=2C

(3=

The pole and zero of the lag compensator mu5t be located clo~>e to the origin.
Let us t:hoose T = 20.
Then, the Hr.g c:anpen~>ator bet:omes

num"" [0 0 0 t!;
den= [1 0 1 01;
numc "" (0 0 0 4 2!;
denc = [1 3 4 2 01:

h-.

.:'

The re-

% UrtiHamp responses of uncompensated and compensated systems

<jJs) =

+ .L'2.0

-'-

5+- (PO

s+o.P.s-

sro,o I

Notice that

t .. 0:0.02:15;
c1 = step(uum.den,t);
c2 = stepfnumc,denc.l);
plmlt.t.'. ,t.c 1, '. ,t,c2, ''I
grid
titlei'Unit-mrnp responses of uncompensmed and compensated systems ')
xlabeH't Sec' I
yh1bell'lnput and Outputs')
textl4, 1.5, 'Compensated system')
text18.6, 'Uncompensated system')

s+o.os-1
s+-o.t/ I

:s-=-

-.ltp-r:r

S+P,t;$"1
/

S+P.O/

::::: o. ?'ls-o
=

J=-z+jz.IJ

/-..< 95""+)2/3

- /-t.ff+jz.[i

= -(o.Cz!-1"+-/tJ./Zfiz" =-o.~P?7'"
95

94

'-""'.lo/<-

C(') _

Then, the static velocity error constant Kv can be given by

....:,-

A MATLAB program to obtain unit-ramp response curves is given next.


suiting response curves are shown on next page.

...;~!_).):!-"

system ha5 the following closed-loop trans-

ffr('~) =kc

-,--

~nsated

/?(l) sa +1-s-t-16
'lbe two closed-loop poles are located at s ,. -2 .j 2,f3.
sator of the following form:

J' -~--1(/-l~~oJ-.
i
1:='
~~
fi-- 1-- -

'

www.shmirzamohammadi.blogfa.com

._..i...__, '-""'.lo/<-

'\

-""'15:...

...r4--The angle cc:~ntribution of this lag network is very small (-0.4999 ) and th"
magnitude of Gc(s) is approximately unity at the desired closed-loop pole.
Hence! the designed lag compensator is satisfactory.
Thus

fi,(<) =
Let~

is

"

S"+t:?.t:?S"

CO!

O.t---1---

i"t-

/!

r -r 1-.r +- 16

o.o--
0.2f.-/ ..

/6 ( .St-P.Vs-)

f?(s)

o'0

(5-t-P.V/) 5(f+P...) +-16 (.S+tJ,&_r-)

/ts+-o.8
be

found by entering the following MATLAB program

p = [1 4.01
roots{pl

16.04

-1-

Jtl11jj--

+--1--j:---J
..

O.J

U~:U3U~H

Clearly, the unit-step response curves fOr the two systems are approximately
the sans.

SJ+P..P!S~+I5.o9-S +- o,,?
The closed-loop poles can
into the con;:ruter.

'<
---

For the COIIIpE!nsated system the closed-loop transfe:.; function is

Crr-J

..... ,...,...,..,.,, ......_.,.,.. ~.,c.. ,.... ....... ,........

1/it

sro,o 1

The closed-loop transfer function of the uncompensated

=
K{.!)

curves obtained are shown below.


u.~

compare the unit-step response curves of the uncompansa ted and

COII{IE!llSated systems.
S)'l>tem

.:.:, )_';...rt_J~Llll'ft~tep
respons?
'

For the unit-ramp response, the response curves for the two systems differ,
because the original uncompensated system gives the steady-state error of 0.25,
while the compensated system exhibits the steady-state error of 0.05.
The
following MATIAS program gives the unit-ramp response curves in the time range
95 sec .::;; t .:f: 100 sec.
The resulting unit-ramp response curves are shown on
next page.

0.8);

ans '"'
-1.9797 + 3.4526i
-1.9797.3.45261

.:r:.

-0.0505

:~-

The daninant closed-loop poles are located at s "' -1.9797 j3.4526,

locations are very close to the original closed-loop poles.

The~

The following MATLM! program produces a plot of unit-step response curves.


% ' Comparison of Unit-Step Responses for Two Systems

num = !0 0 16);
den., 11 4 16!;
numc"' !0 0 16 0.81;
denc "' !1 4.01 16.04 0.6];
1 .. 0:0.02:5;
c1 "' stepfnum,den,t);
c2 = steplnumc,denc,l);
ploHt,c1, '.', t,c2, ' ')
grid
titlef'UnitStep Responses of Uncomperosawd and Comrensated Systems')
xlaUeH'Sec'J
ylaUel I 'OutJmts 'J
textl1.5, 1.1 ,'Compensated system')
text/1.5;0. 9, 'Uncompensated system')

."f~

% Comparison of Unlt-Aam11 Responses for Two Systems numo.]Q 0 0 16);


don"" 11 4 16 OJ;
numc = 10 0 0 16 0.8);
denc .. 11 4.01 16.04 0.8 OJ;
t = OO 1100
c1 = stePinun'.,uen,t);
c2 = step!numc,denc,t);
plotft,t, ' . ' ,t,c1, -. ',t,c7, '. ')
v = 195 100 95 100]; axis(v)
grill
title!' Unit-Ramp Responses of Uncompensated
xlabel('Sec')
ylabel('lnput and Ourputs')
text(95.5,97. 7, 'Compensated system'!
textl97 .5,96. 7, 'UncompansateU system')

96
...;~I.J...l:!"'-""'~

~nd

Compensated Systems')

91

www.shmirzamohammadi.blogfa.com

._..i....J:l'-""'~

'\

~IS... ._r-~:~l...r~~-~ this

~:~,~=-=~0==-~
r-----"- "l- !- --~;;:~~
oul- -- -- - ------ -v
-~

! " "-- - -- -

lAB as shown below.


p= 11

/.
.

-~r---

r>.f
k

.5.,.

3.6t:~

t~;6c,

:s=-zz.e

'-[

'

Ts+ 1
loT$+ I
lo'here T may be chosen to be 4, or T = 4.
Then the lag compensator becomes

s+t~,.z.s-

~
'f<;s+/
S+-IP.t'ZS
angle contribution Of this lag natwork at s ~ -3.60 j4.80 is -1.77,
which is acceptable in the present problem.

(!)

The open-loop transfer function of the cqnpensated system becomes

S+

!!!2

Let us choose a lag-lead compensator as given below.

"'

Crc(!}= k~

~~

2t1t1. 7S

Kv

(f>t)

= 50

sec-1

The open-loop transfer function of the cornpensated system is

_,:z. +-I' ..?S s +-;;as-= 0


qg

98
....,~1_).):!"'--""'~

(aif){nf;)
(,. :, )(wjr.)

anO the static velocity error constant Kv is specified as

s{jc.(5}(j(j) = ~/ S-(c- 1

SJ

$/-.6 772. = S". IZI -'liiVJf /sec_

:s=-2jz5

Notice that because of the addition of the tag compensator the compensated
system becomes of fourth order.
The characteristic equation for the compensated system is
S<F-+ ?IP. P.ZS"

J .J, 4'.t.t 1 +

Since the or{ginal uncompensated system has the undamped natural frequency of
6 rad/sec, the compensated system has an approximately 3% smaller value, which
would be acceptable.
Hence, the lag compensator given by Equation {1) is
satisfactory.

.za.)

Clearly, the velocity error constant Kv for the compensated system is

=:=f;-;

:=

The desired closed-loop poles are located at

3'2C ( s+~.zs)

s ( SH,t:!Z s-) ( :s+ro) (

W 11

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

The

,r(:s)t:j(5 ) =

"1!;.

C;,ds) = /O

"lr)=IO 4-s+l

S= -22. 787

The undamped natural frequency CUn of the dominant closed-loop poles is

For example, we may choose

kv

~JDf?

~;

To increase the static velocity error constant tram 4.1 to 41 sec-1 without
appreciably changing the location of the dominant closed-loop poles, we need
to insert a lag canpensator Gc(s) whose pole and zero are located very close
to the origin.

.'

The closed-loop pole at s = -0.2646 almost cancels the :z.ero of the lag c:arq:ensator, 5., -0.25.
Also, since the closed-loop pole at s = -22.787 is located
very farther to the left CCIIil<U"ecl to the ca:nplex-conjugate closed-loop pole5,
the effect of this pole on the system response is very small.
Therefore, the
closed-loop poles at s = -3.4868 j4.6697 are indeed the d001inant closed-loop
poles.

!20 =o

www.shmirzamohammadi.blogfa.com

'I

''

"

The other two closed-loop poles are located at

ou ,..,

the WlCODpensated system has the closed-lOOp poles at

s--

-3. 9-1'181;}

s~-o-269-1)

205];

Thus, the dominant closed-loop poles are located. at

-----------------------------------------------------~-----Since the characteristic equation of the uncompensated system is~s.J+ J()s.t-r iJ.(JO s

825

-22.7866
3.4868 + 4.6697!
3.4868- 4.6697i
-o.2649

- - --

200.75

ens =

- --

r-- /.
"- - H
~~ -- ,_ -~-r--~r--'10

30.025

roots(p]

r:'=~e- Jc?-~r--d=~
"
ou
--[--

characteristic eqwtion can be easily obtained by use of MAT-

._..i....J:l'-""'~

,I
'I

-""'15:... ...r4-- .:.:,-;1 ci<L:M_)ts: __p..., &'-->"

'

.L

C,.I>)C,{S)

(5+f,)( s.-fz)
~ t:, ( -'-)( _/_ \
s.;..T,

;o

s (S+<)(s+s)

s+jlTzl

?; = o.

./i-.

S~t1

.s o/cf!:) o/fSJ

=A
$~.,.

ke.

.--.!!!..
2XS

J::e = stJ

that

1 and the value of

For

1 are determined

from the requirements

= 10.

Then,

the

_L
S'+- Tl.

:r+t'-1

>+-'-

5+ """$/R/1-

fTi

S+ ..L

S1::J

T,

)t /()

S(s+z)(:St--5')

S+L

S=-2.,...j.2-Ji

7i

-,~

(~

'

s+.L

~
H..L

pr,

S=

-2 T-jl..fi

5+1_

I
5:-

-zrjzS

' 998/i

= 7f./t'E6'

:>+P./
5+P-fJPfl,.fl.

_L

S+ Tj

7i

Notice that

r.
lag portion may be

given by

:,

(3 = !? 2.! fP.

~o7 ~

the lag portion, we may choose T2

kr:_ =SO
The time constant T

~~-.

Th~

s+L
Hence.

Kv =

.S+Z.2!.f7

srz?.!tll

r,

~lienee

S'+ Tj

_L

5+ 1i

s"' -2 + J zll

= -1-IS"Fi'o

5+.1..

pr,

The angle 79.1066 CCXtVaS from the fact that the tead portion must compensate

"5""

-z.r.jzP

the angle deficiency Which is


Angle deficiency

= 160 - 120- 90- 49.1066 = - 79.1066

See the diagram shCMI below.

(j,(s)

jW

~ )t!

:s-r,;.Z/1?

s+ o.;

s+t7.1///

S-t-P. PP f/ f9

The COJ!!Pensated system will have the open-loop transfer fUnction

jUJ

lj,{s)q(<} ~ t"O(s-tz.ztn)(:NP.I)

(:s t

z?-/f/1

..... 120 1

-s

-z

Hoocethe

The changes caused by the lag portion are small ana acceptable.
lag-lead canpensator can be given by

J( .st-11.# riFf-)

/0

s(s+z){s+s)

S"tJ() .sz.r //sj'. 3J'..s t-//t?,?Ss.5 f" -1- .JJL. 1/'/3 :S "

+ 2PP.P >7t' s' -t- Z? .?. ?9'/Z .s'""~ 2. Z/ F!'S

The .closed-loop transfer function J::>ecOmes as follows:


~P s~

C(s)
By using trigonometry we find the locations of the zero and pole of the lead
portion of the compensator as follows:

I
I

wo
~IJ..>!"''-""'~

R("f)

1/S"f.

;1rs --+ //p. f$s-

= s~" -t- 19-; f!fjS,. + ]M. t7.J"7PS' +


!OJ

www.shmirzamohammadi.blogfa.com

772. 7!/2.

S~+l///. Sill! +//'-fit"


._..i...>.J:l'--"'~

"\

L:;V:;:
~-;--

.l-

'The following MA'I'!.AB program will give the unit-step response of thEL~tft:<~ .:...:;)
aat;ec~ system.

:1..:..:<_)1.5:05?--- &'-->"

S (S 1 -t-l)

K=
%

o. o o o o

num = 10 0 0 500 1159.35 110.935);


den"' /1 34.1193 200.0570 772.7462 1161.5688
step(num.denJ
grid
title!"UnitStep Response or Compensated System')

110.935];

~--

~-~---

1--~-Lj-/--j-I
r

rtl-r---i-+-+3--,. --1- i - !--~-- o.H-- --

'

'

i --~--- -

% Roo Hocus plot o

1:

-~

"
~

f-f--

The resulting root-locus plot is shown below.

---------------------------------------------------------------------

'

s-7-n.

We first determine the angle deficiency of (s + 0.5)/[s(s2 + 1)]


lihen the dC(Ilfnant closed-loop poles are loc:ated at s "' -1 ;t j./Y.
Angle deficiency :: 160- 143.7940- 120- 110.1039 + 106.1021

Root-lor::us Plol a1 Gc()G(s)

We need to choose the zero s = -b at a point such that this zero will contribute +67.7956.
By a simple calculation, we find

-2

'

IK

.I

s=-J~>;ifi

'

"

'-"'.lo/<o

I
i

"

/
'

"'" closed-loop transfer function

for the PID controlled system is

C(s)

+ .3.6/.SS"S' +I.Z.JO/l

=/

/?($)::::

102
...;~1_)_):!"

I
:\

I
I

(s+c..r ){s +/. t'.f4"7)

I'

---------r

Thus, the transfer function of the PID cOntroller becomes as


(S+-tH') ( S+/.0615"?)

/~~ - 1/
I

---+-

-1f--

b=l.<1t~7

(Probl<rn 8-7-1 t)

I'

-87. 7958'"

gain K can be determined from the magnitude condition:

o o

num.., [0 2.3077 3.6155 1.2308];


den ..- 11 0 1 0];
rlocuslnum,denJ
v = 15 1 -3 31; axislvl; axisl'square'J
grid
title('Root-Locus Plot ol GclsJGisl
(Problem B-711 J'J

'

The

the canputer.

" ,_,_,
o''"'"

<:fo{')=k

I
sz.-t-1

To obtain a root-locus plot, we may enter the following MATLAB progra111 into

~-

+--

2 3" 7? ( 5+P s- )(s f-j.tJ/PJ)

~--- ~-~----

-l-1

(jt;($)(Jj(s)

':--<c

it-

..

The open-loop transfer function becomes

fj
.r.:o--

..........""""""-d-=--s.-

+j.fi

(s +- " s-)( s + /.tJ,f"tr "7)

Cic(>) = 2. 3o7?

~--

or:~

S!: -J

Hence

~c:'

The resulting unit-step response curve is shown below.

,''If r,.=
(\IL

2. 3o7y

('s -t-tJS) ( s t"/. P.{tr?)

Unit-step resjlonse ' ' ' '

2.J077St

s,+-~.Jo"l-? st + ~,rts-.>'s

t-/.23C3

103

www.shmirzamohammadi.blogfa.com

._..i..>_., '-"'.lo/<o

'

;~-~-.

--r -~-

-~15:...

4-- .:.:, ,[" .,. )1.5: '"

~~'- Tb obtain the unit-step response curve, we may enter t~ following M.\~pro-:- grlllll into the canputer.
The resulting response curve lS shmm below.

;E'-

-Thfs~?ggests that the controller should have tvo zeros near point s = -2.
Therefore, we choose the controller Gc(s) to have the following term:

num ..

ro

den= 11

K(.J-r-z-/

'7.:(s) ~

% Unit-step reSJ!Onse ' '

(It is a PID controller.)

2.3077 3.6155 1.23081;


2.3077 4.6155 1.2308[;

slep(num,denl

Note that

Let us plot a root-locus plot for this system.

grid

title('Unit-Step Response of

Comp~tnsated

System

(Problem 8- 7-111'1

cl<(r)6j(')

"c---"-:r==-:;===-::;==::.;-==-=i=-==~::.;':"c.-,

K(S-t-2)&

/OK(S"+9-S+.;.:.)

/0
s~+2

s'+z.s:

The folloYing MATI.AB program Yill produce the root-locus plot as shOJI'Il below.

(\

~::rct=t=tt1~

% Root-locus plot

num=IO

den- [1

14 41;

2 OJ;

rlocus(num,denl

v -= [-8 2 5 51; axis(vJ; axis(' square')


grid
tltle('Root-Locus Plot of Gc(sJG(s) = 1 OK Is 2 +4s+4lllsls "2 + 2)1'J

ofl --[-~ .. -~ ---1--0--+------o----

--1---1---f---f--1- -1----<
" .
------------------------------------------------------------------------------

r..,.(OE!

B-7-12.
The system needs at least one integrator to eliminate offset in the
step response.
Therefore, the controller should include an open-loop pole at
the origin.
Suppose that ~ want to have the dominant closed-loop poles around
s = -2 j2{:i.
Then, the angle deficiency becomes as follows:
Angle deficiency= 180- 134.29424- 112.29253"- 120~
-186.58677

See the diagram shown belo\i,

jw

'

:r=-l-::~=e-,=t;"':::J

'"

f'
f

=
~
"':r:"'

'"

,,

Root-l..call Plot al Gc()G(J. 10K(a"2-)11(t"2+2)J

-~

-
~

'

'

J,L

'

, r

IJo

'

k.r

-~l--------,-----7'
' r---__J_~.
y

I.
I
.
!
... < '
_,

:---+

_,

.../luJ'

f-

--

'

-j~

105

10<
...;~I_)_J:!"'-"'~

www.shmirzamohammadi.blogfa.com

._..i...>_J:l'-"'~

'\
-~15:...
...r4--.:.:, "I
By examining this root-locus plot, it may be a good choice to have the
dominant
closed-loop poles at

S=-3j .1.8
The characteristic equation for this system is

s' + z s + 1~ K

sz + Y-s + 9-) =

-"'!_~

i":.,;

~--

+ 23.

1f'

f4P.

+ /ok-6

F'

(IPK-~) sa+ { F<:!k- 2/f/.fL) s + fl.OK

(!Ok -~) sz +(tfok-:u) s + '2J~.fc?-k-l~.fjZ

:-#
.:r.

+ 36 = 0

ilt?K-21~.~-;;:J< -t-1{47.69-

These roots (closed-loop poles) are shown on the root-locus plot sho\lll earlier.

numc = [0 7.25 29 29];


denc"" (1 7.25 31 291;
grid
tltle('Unlt-Step Response of Compensated System

(1)

=o

% Unit-step response

step(numc,dencJ

By setting the remainder equal to zero, we require


~ k - 2./.t,t.r;t. - /() .k.

.;.

(2)

Equation (1) yields K = 0.728 and Equation (2) gives K ~ 0.723.

may choose

.,

Hence, we

'

K=o.72.s-

:s

o.?2F(5+-2)z _____!!!_

Vet>) q{$)-

s+

" ---- ---

" - - --"
"'

P.Zr(~+-2.Jt
S(s~+Z)

'Ihe assumed closed-loop pole locations


.S=

~ill

be slightly shifted.

equation, we obtain

-3 :tJ3.1"

By substituting K: 0.725 into the characteristic

-- - - !--

'

-..

'

..

The response curve shows that. the maximum overshoot is 23'!1> and the settling
time is 3 sec.
Therefore, the system satisfies the given specifications.

106

...;~I.J...l:!"'-"'~

......

l"

(s+z)t

'Ihe open-loop transfer func~ion becomes as

.-=

-1-12)

~-"'~.,_

r-y

(Problem B-7-121'1

" - ---- -

Then, the controller can be written as follows:


f"'(s);:::; P7.<s-

'

3.0106 + 3.8128i
-3.0106-3.81281
-1.2287

Using the designed controller, the unit-step response and unit-ramp response can be obtained by use of Mli.TLAB.
The following Nli..TIJ\B prCJL:lraJ!I vill
produce the unit-step response curve, as shown below.

r~Fs + .Z3. f49- } s 1 + 101: s .. + ( Z.-t-f/.() !<) s -r fr.oK


1
s + tfsz + Z3.SL9.s

Os

'

291;

"i!.i",

or
s

31

ans =

1'

By dividing this characteristic equation by the quadratic factor

s"" +6.r

p .. [1 7.25
roots(pJ

-~-

S1+ /OK sa.+ (2+- tfLO.K)s+ fl.oK =0

t-j .7,8 )(s"t" 3 -j J, &') =

The roots of this characteristic equation can be obtained by use of MATU.B as


follows:

-~-

or

( S+J

s-'-r-;o;:s"-+ (l.+~l<)s+ .p;cf::;::;:. ~ 2 + 7.z>s 2 -+JI.s+Z'i=o

-:c-

(Of course, other points on the circular root locus may be chosen as potential

dominant closed-loop poles.)

:1...:..:<_)1..5: __y?... &-..Y'

107

www.shmirzamohammadi.blogfa.com

._..i...>.J:l'-"'~

'\

-""'15:... ...r4-- .:.:, ) ._r\1:<_)1..5:


-~~
_._. I

MATLAB program shown next produces a unit-ramp response curve.

following diagram for the computation of the angle deficiency.

% Unitramp respons11 '

j2.fi

numt - [0 0 7.25 29 29];


dun1 "' [1 7.25 31 29 OJ;

/(1/.ltiZ/ 0

I "" 0;0.02:3;
c ... step[numl,denl.tJ;

f/J,,/)2'

plot(t,c, '',t,t,'--'1

-ltl-ltf'l

grid
title('Unit-Ramp Response of Compensated System

!Problem 8-7-121'1

;o:labell't Sec')

~.;,I;~
!'--

"

~;-~i

'~

I/ -

1'

o.5

'

'/

<j.!r) 'iff)=

H<

s(.s+J)(n-z)

2-5

"II

I
/St'.S

=:

~----- controller is acceptable.

.. roUU. can be designed for this systE!II.

.S($-tJ)(~t-z)

(St-/.,1,:zi'".f'7)(2S"TI)j s .. -.J.+jN~

The evaluation of this K can be made easily by use of Ml\'I'Lli.B.


program produces the value of K,

The folloving

MATLAB

:z:

/:!;

'

% . Determination of gain constant K

'

a"' 11

:l

K .. abslpotyvalla,s))/abslpolyval\b,s)J

:.:

s-

"-"61'Pi

3 2 OJ;
b "' 12 21.5714 f0.2857J;
s = -2+J"2"sqrt(3!;
lormatlong

--,

K=

(Note that infinitely many other cent-

ot mny pJUible controllers, )

TI>e present controller is just one

------------------------------------------------------------------------------~-

~I
.s:"'-Z-1-j2.{3

-"'-

?.zs (s-.J.z)l
S{s-a+z.)

=+==

--I
-

error in the unit-ramp response is

es..

S(S+t)(S+2)

The gain K can he determined trom the magnitude condition:

O<

(t--

K(S-rf",ZIS7) (2s+l)

Kr $+/8. ur?Jr z$ r-1 J

etl

The feedforward transfer function be!;:Oltll!s

this system is

= {.:.... s

_,

o/drJ = K { S+/P, zN7)

-H-02)

f-

!/

'/

_,

'/:J.~

From this diagram we find the zero of the ccmpensator to be at s = -10.2857.


The compensator thus can be written as

beiow.

1/
!/

!'

,_..__ _

-r

Ill

--.,~-

'

~l-lrl1"

_ylabeU'Inpur Ramp and Output']

1118 resulting unit-r<UI!p resp:>nae curve is shown

0.73684318666243

Hence, the compensator becooles as fol1011s:

us choose the dominant closed-loop poles at s "' -2 j2/3.


Then,
the angle deficienc-z at a closed-loop poles"' -2 + j2/Jbecomes as follows;
Let

Angle deficiency

1eo- 120G- so"'- 106.1021 .. + n3.4132~

GJJs} ::::- (), ?.J6 FfL

{ S + /0. Zl 5""1)

The closed-loop transfer function becomes as

:: -22.6889G

lOB
,_;~l_)___l:!"'-"'~

109

www.shmirzamohammadi.blogfa.com

._..i..->_J:l'-"'~

'

-~~'
s

~-<- /J.~.

('(r)

/. Y:'?U f

/l{r)

s~ + Y., (l.'J,36?

'l:

-Ju..:<).SO~~_?E! plant pale at s "' -4 can be canceled.

~IS:...._r4-

+ tJ. .>?J'f/.r

31' ~.f? 5

-L

We may also include a zero


Thus, we may choOse the transfer function of the canpensator to be

T /'/, S 9i<?S +- ?.' f'?lf/s-

(s-+-td(.s+l)

C,Jr) = K

s+h

The following MATLAB program will produce the unit-step response curve.

where the compensator pale at s "' -b need be detetlllined based on the angle deficiency.
The angle deficiency is , ,
% Unit-step response

Angle deficiency = 180 - 135- 135 + 126.8699 "' 36.8699

numc"' 10 1.47368 15.89467 7.578915];


done.., (1 4.47368 17.8947 7.578915/;
t ... 0;0.01 :5;
c "' s1ep[numc,denc,tl;
plot[I,C/

'"

grid

title['Unit-Step Response of Compensated System


J<labeH't Sec')
ylabeH'Output'/

(Problem 8-7-13)")
-9- ..j!l-

-~j~

,,

The resulting unit-step response curve is shmm t:elow.

........,,.,._ .. coo.-_
'

-1#-Uif'

.-~1>1

!r
+- -

~6. rl

..
"

-10
.

,~s

_,

-1

(/

-,jl.

Then, the compensator Gc(s) can be given by

--

GJs) = K

~-"-

ft'

-'i.HJJ

From the diagram

The compensator pole must provide an angle of -36.8699


given below we find b to be -9.3333.

. ..
'

Ok

..
.

_,_

The open-loop transfer function becomes as follows:

{j<(r)(i{s) =

The response curve shows the maximum overshoot of 13% and the settling time of
approximately 3 sec.
Thus, the designed system satisfies the requirements of
the problem.

~-'

The first step in the design of the compensator is to choose the


desired closed-loop pole locations.
Considering the open-loop poles of the
plant and the given specifications, we may choose the dominant closed-loop
poles to be

(S+~)(:>+!)
St' f. 3J.?J

K(:S+'I-){S1"1)
K(S+!)
(S+f,J3.33)S 2 (S+<;4) ::= -s(:s+f,H3.J)

The value of gain K can be determined frOlll the magnitude condition:

,-

K(s+l)
st(s+f.HJ3)
or

I<

=I

.s=-~t")'f

1
+7.H33S?.
S+

=I

:s ... -y.+j9

The value of gain K can be determined easily by use of MATLAB.


lowing MATLAB program:

S=-?-jf

see

the fol-

(Of course, other choices can be made.)


With the present choice of the dominant closed-loop pales, ve may choose the compensator to have a zero at s = -4
lU

110

...;~I_)_J:!"'-"'~

www.shmirzamohammadi.blogfa.com

._..i...>_J:l'-"'~

-""'15:... ...r4-- .:.:, ;I ._rJ'..:<_Jts: The


-~ &'-->"
closed-loop

'\

poles are located at s = -4 j4 and s

-1.3333 as seen from

the following MATLAB output.


% Determmation of gain K

II = (1 9.3333
b - [1 1[;
$ "'-4+j'4;

roots!denc)

0[;

ans ':'

K-

"~

';':";-~

42.6665

,g,
!it

Hence, the compensator becomes as follows:

(j& (s)

~ 2 .1'/6

=:;

(s+~)(s+t)

s-

Srf.

~333

f<-Z.U/S"S + t.Z./#5S'

+-9. IJ:I.J

$ ..

The unit-step response curve shows that the ma.xil!lll!ll overshoot is approximately
25% and the settling timE! is approximately 3 sec.
Hence, the given specifi-

ll.

The closecl-loop trai1ster function of the designed system bec:cmes as

C'(!) _
Rrn -

'

-4.0000 + 4.0000i
-4.0000- 4.00001
-1.3333

abslpolyvalla.sll/abslpolyvallb.s!J

~~
)11&.

cations are met and the designed system is acceptable.

--------

-------------------------------------------------

~-~

+ '1--Z-/I/ss +

---!-~-

~~.1'//.r

The following Mi\'I'I.AB program produces the unit-step response curve, which is
shown below.

'<

c.:J;-_
_,..__
"'

% Unit-step response
numc =- 10

0 42.66fi5 42.6665];
denc = (1 9.3333 42.6665 42.6665];
step(numc,dencl
grid

titlei'Unit-Step Response of Compensated System

<;-

----

'

- ..

t-~

+-

..

!Problem B-7-14)')

'

"
ir..l-"

-~~

I
~I

-r-

.: . ---cj 1-]- . .

...;~1_)___.1:!-"'---"'~

'

-...

,,.,

'
113

www.shmirzamohammadi.blogfa.com

._..i..->_J:l'-""'~

'

~IS:... ...r4-- .:.:, ) ~_Jts: -~ ~-->"


- .
l/(s)

CHAPTER 8

:::=

..

r; s +I

~r.-',"-~=-+'-1-'-

'

,.
-uo
~

(T,7T,,.o)
!t::!!=!

The closed-loop transfer function is

C'(s)
K(J)

/()
::;

..S+ II

........

ON

Css{f)

p.

9-.c- AM< (t + .21'.

% Bode diagram
num .. 10 10 4 101;
den = 11 0.8 9 OJ;
bodelnum,denl
subplot(2,1,1);
title("Bode Diagram of G(S} ,. 10ts 2 +0.4s + 1}/lsls 2 +0.8s +9)]')

Cult)=/. 7? ""'- {2t -ss-. J)

(c)

C.ss(f) ~ o.IP.r-~ (t-+2r.-.r) -/.?! ~ {2t-ss.3)

------------------------------------------------------------------------------

I()

'iS_

The steady-state output c 55 (t) is

cST(t)

- !? K t+- T: ..w .. ~
1+-T,:t.ll.)l.

{wt + ;/;...:.' 71.. w - ta--l Tt 4))

;:
i.

,..' '

T2.S 1" I

(T.>T,.;:-o)

Cj(<) =

T,

..

s -I

!;.s+l

'
T,

Ti

,,.,.

1~

..

,.
l-::::::t

t==t ++H l

Ill\

! ++4 -Hi

--~-~

,~

Frequency (radlsee)

4J (~~~~~/e)

------------------------------------------------------------------------------B-8-5.

Noting that

w..

,nl

- ----'-'--,--:-:--:--~'':..J'+.?J(i ;:;,)+

'[jw) = (jw)&-+-.2$'41"()"-')+-W"z.L

r.

.,

r [ I 1111Jm [NdJlli
-90

(Ti>J;>o)

...;~1_)_):!"'--"'~

1)1[t(
.....2+0.Bo+9)J

Fr.quency (fld/MC:)

Sloft .. 20 48/J~c

,,.

T,s+l

10~

"-'

J>

,.,.~-.,-

~-

.,.....,u.,,..,.,~....,l

~ 'f-=:::j:::::II-----T+-1-H+I
'

-;

-------------------------------------------------------------------------------

t;(s)

Stff.fft. )

'Ihe following M!\TLAB program produces the Bode diagram shown below

li')

(b)

!t:!!::l

'1 \

4) (

-------------------------------------------------------------------------------

The steady-state outputs of the system when it is subjected to the given inputs

(ol

t.

'

T,

t,

I.e) {l.}.s~,/~..)

U5

www.shmirzamohammadi.blogfa.com

~-.,'-""~

'-""- ...r'"'-+"......,.::5:
' ' "'~:.+')"""The"-'-"-"'"-"'
' MA'TIAB
.. program sho-.m next vill produce a Bode diagram where the phase curv-

'

-..

-~--...._

)"'

starts from o.

we have

l'lDw.JI = 1-/ +;>j +/ i= -'s

% Bode diagram
num "" 10 0 t 0.5):
den = 11 1 o.oooooooboooooooooooo1 11:
bodelnum,denl
subp!otl2,1,1l
tltlei'Bode Olagrem of Glsl ~ Is +0.5JI!s "3 +s 2 +Os + 11"1

------------------------------------------------------------------------------B-8-6.
A Bode diagram for this transfer function obtained by use of MATLAB
versioo 3.5 and that obtained by use of MATIAB version 4.0 differs slightly.
'Ihe pha:se curve obtained by use of MATLAB version 3.5 starts at 0 and ends
lBO, while the phase curve obtained by use of MATlAB version 4.0 starts fr
_
-360 and ends at -tao.
However, if we add a very small nonzero coefficient'~
to the s term, that is, change the characteristic equation to
-~
S' 1 +SJt.T

where

t.

"

E.S+ I =0

is a very small nU!IIber, positive or negative, then the Bode diagram

obtained by use of MATLAB version 4.0 changes.


'Ihe phase curve starts frcm
o and ends _at 1ao (the same as that obtained by use of MA'J'.[AB version 3.5).
starts fran -36o , as shown in the Bode diagram shown below.

num ~
den~

(0 0 1 0.5):
[1 1 0 1];
bodelnum,den)
subp1otl2, 1.11
titlei'Bode Diagram of Gls) "' Is +0.51/ls 3 +s 2 + 1)')

.-'i-

'i!!"
t;t;<

IIIII

"'

t_

10''

10~

-~-

,,'"1-

,.

,,

,.

'"'

.~

F.--(nod!Me)

lm

;i

(b)

'

(4)

!O''

.. -

B 8 7.

~-------

I--

-------------------------------------------------------------------------------

Frequency (nod/sec)

~"~b

,.

"

F..quenq(1'11C14o0C)

jE.

:s:

-.._

"

.,.

._.<li;

8odl Di11Jwn d G(J" (a.O.Sy(~1)

iII ,,II

tO''

-- -----

,.

'

teo:
f-

% Bode die gram

'<

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

",.

The follOwing MATLAB program produces a Bode diagram where the phase

ro

See the resulting Bode diagram shown below.

T>];.)o, T'71j>O

---

T.>T>O, iDT>o

------------------------------------------------------------------------------

F-(r:acr.e)

117
...;~I_)_J:!"'--"'~

www.shmirzamohammadi.blogfa.com

._..i.,>_J:l'--"'~

-.!!::::::!

::_).5J~~9J.e,

' '' 1-""'IS:...._r~......,_,

lm

Im

~{J) Pf~t-

F:z{~)

,,

while a closed-loop system with the following open-loop transfer

function is stable.

Pllnfl.

K(U,H!)

,,..
+:.
_,_

Re

-(Tz>J;

s~(7;s+t)

tj(J)f/{$) =

;>0)

Nyquist plots of these two systems are shown below.

4(s)Hf~)"'

.
I

srr.s+O

Jo-~

( U.. :s~.-.bl~)

Im

<tr

I b)

IJ

}ff,I'
left

-------------------------------------------------------------------------------

...._..

.
.

..--+-... /

>i>
ji_

w< '

{J(r)H{t)

.
,.

Im

~,

~
if

-"~;

The stability requirement of the unity feedback control system with

.St.,J.lc
tAJ,.(}-~(11-oo>
t.J,.o+
-~ ,_ ~~~ .. - ..
K=t
St.. ble

-II

\'oVI

w~o-

/lie

,., __
~

-------------------------------------------------------------------------------

the condition for stability is

B-8--12.

1>!<>0

{j(j>) HyN)

A closed-loop system with the following open-loop transfer function

Cj{s)H{s)

= sz(T;s+/)

(T,>o)

friUw)H{i) = /

ke- 2J..;
j'<'

c.n. 2"' -j_..;. 2"' - ,90 '

.... -:?11)- ?o"

118
...;~1_)_):!"'--"'~

?14M..

The system is stable for 0 < K < 16.8.

t:. < I

~-

ftH

,;W+/

is that -K be greater than -1, or

> 0,

\ ,,

.____j_/

n~! = /<(1-Jw)

Since we assume that K

. ,::'..t

?/lid

K= IO

">o

IHI-11.

:<;>-

Re

Sf"b/t>

-------------------------------------------------------------------------------

-<-'-

(T1 ;>T.> o)

"7'

-1

K(Tr. S'f-f)
)
s'(7is+l

Ke

119

www.shmirzamohammadi.blogfa.com

._..i...>.J:l'-""'~

'

_;:..;)S:...

._r4-- .:.:, I _;;G:IIts: ~ :9 ~


-- I
-The "fOllowing

The phase angle becanes equal to -180 at 2 w =


F~r stability,"
"/2 rad/sec.
t-he magnitude jG(jw}H(jW)Jat w= ?r/4 must be less than unity.
Hence,
noting that

/"v-'J H!i.,!/ =
we require that K

< ?l/4

MATIAB program produces the Nyquist plot sho1m below.


'!I> Nyquist plot

for stability.

num- [0 0 0 1);
den- 11 0.2 1 1];
nyquistlnum,denJ
v - [1.5 1.5 1.5. 1.5]; axis(v); axisl'square')
grid

"tlai'Nyqulst Plot of GM - 1 /Is J + 0.2s 2 +s + 111'1

"'

---------------------------------------------------------------------B-8-13.

The following MATLAB program will produce the Nyquist plot shown

,_,

JW.oirll
- Pk:t ol G(t).
- 1J(N+O~+a+1)J
-

% Nyqui$1 plot
num = [0 0 0 lJ;
den = [1 0.8 1 OJ:
nvquist[num,den)
v "' [-4 4 -4 4]; allislvJ; axisl'square'J
grid
tltlei'Nyquist Plot of G(s) ~ 1/[sls"2+0.8s+1J]')

'

,,,,
~

l '

~Plot CJI G(a) tJ[-tr'2'<1.a.-t)l

I I

't'lrI
I

_,

'

'=R

'

,,_ ,.

-.

'"

I-~-

-t-- -+-

.......

-4

"--

'
_,

-4.J-2-10t23

_,

..f.l.5

-0

L1
I

0.5

''

From the plot notice that the critical !Xlint (-l+jO) is not encircled. Because
there are two open-loop poles in the right-half s plane and no encirclement of
the critical point, the closed-loop system is unstable.

-~ ~

~~

'

--+rr

----;---1 '[-'' --tI


I _ - -I- -!
'
I
1" --iI ~i ~ 1--.
I
'
~----+--" -- --- ' - - - '

The following MATI.AB program produces the Nyquist plot shown in next

page.

-------------------------------------------------------------------------------

% Nyquist plot

B-8--14.
Note that G(s) has two bpen-loop poles in the right-hals s plane, as
seen from the following MATLMI output.

num = [0 1 2 1);
den"' (1 0.2 1 11;
nyqulst[num,den)
grid
titlel'Nyquist Plot of Glsl = (s 2 + 2s + 11/ls 3 +0.2s 2 + s + 11'1

.-=--------,----.
p=[1 0,2 1 1];
rootslp]

ans "'

0.2623 + 1.1451i
0.2623. 1.1451i
0.7246

Since G(s) has two open-loop poles in the right-half s plane (see the solution
to Problem B-8-14) and the Nyquist plot encircles the critical point {-l+jO]

120
...;~1.).):!"

'-"'.lo/<-

www.shmirzamohammadi.blogfa.com

"'

~.J:l '-"'.lo/<-

counterclockwise, the system is stable.

./'

'

'

:~---

~'

_,

:j',

"

P1c1 d

-""'15:... ...r4-- .:.:, ) ..J<t..:..:<_)ts: -~ &'-->"


ny<Juisi(A,B.C.0.2)
goid
lille('Ny(jUisi Plots: lnpul
leKI{0.1,0.5, 'Yl ')
tu1{0.1,2.2.'Y2')

G(s)'o(~WI)I(r"J.<028"2+sH)

...._____

_I

-+-~, r
.

\
'-----

,
the Nyquist plots obtained by this MA'I'LAB program are shoWn below.

I~

..,..._,_.........

- - -W,.
' 1' '"--~

.J--~-~1

- -1.-~+::j:-!:.-:rl>hL

,,_,~

I
Ra!~

1,5

,::t
,.,
;'
..,.

'/

. .. .

u2 (ul = 0/'1

I ""\.

_/

'---

(.

ill'..

--- . ...
""

~
-~

lI ,,

!.
:;>!:

~~--'\.i---"i-"

{f

it
Fe
.,.
--------------------------------------------------------------

'The following MATI.AB program produces two Nyquist plots for the input
Ut in one diagram and two Nyquist plots for the input u2 in another diagram.

o.J

% We shalt first obtain Nyquist plots when the Input Is


% ul. Then we shall obtain Nyquist plots when the Input is
% u2

"'

o. ro o;o oJ;

...

title('Nyqulst Plo1S; lnpul = ul (u2 "0)')


')
lexi(O.l ,2.5,'Y2')

'

... ...

L _ '.. :<J...

'

-------t

,,

'

.._......... '"'""....

[re,im,wlnyqulsi(A,B,C,D,ll;
rei :ore"[l;O];
lmJ,.im"[l;O];
plo!(rel.iml)
grid
titlei'Nyquist Plot for Yl(jwl/UHjw)') 1
xlabei('Real Axis')
yl~btd('ln:aag Axis')

} ....

,,

..,,

-I -1--l'"- !---

I
I

~---

'- .. , ~

l .... j

; .....-

--- .... /

.,....

'

~-

To plot the Nyquist locus for -DO < W < OQ , replace the! plot cotm~ano:l
plot(rel,iml) in the! above MATLAB program by plot(rel,iml,rel,-iml).

% NeKI. we shall oblain Nyquisl plols wh~n lh~ inpul is


% u2. fnler !he command 'nyqulst(,A,,8,C,0,2)'

122
...;~I_)_J:!"'-""'~

'

~-

u,

A-[-1 -1;6.5 0);


B II 1;1 0];
c .. ,, 0;0 I];
0"' [0 0;0 0];

l~xi(O, I ,0.7, 'YI

. ___ LJ_' -- ---L-J

% Nyquist plot

A"!l 1;6.5 Ol;


Bfl 1;1 Ol;
c .. [1 0;0 1];

nyquis!(A,B,C,O, 1)
grid

:-:i.

The following MATIAB program produces the Nyquist plot for Yl(jt.J)/
B-8-17.
The plot obtained is shown below.
Ul(jW) for (A)> o.

% Nyquist plots

% To obtain Nyquist plots when the input is ul, enter


%the command 'nyquistrA,B,C,D, 1)'

o'

<'
'

- - _. _r--

-~-

,---- I

~-

B-8-~6.

% fnter matrices A, B, C, and 0

L-- . ~

'

_,

..j....

.. ---
... ~. ~

~ .. -1'

--l-.:..- +-- . ~~- (-~+- -.:r--

123

www.shmirzamohammadi.blogfa.com

~-.,'-""~

'

-""'15:... ...r4-- .:.:,)

!::!!::!!

l!i~J I~

,,

j,.,.,.+ I

"'.

= ta..._-'aw -/SO~

/c10t.>)

'

;:_)S:~y

'I1Ie phase margin of 45" at c.; = 4J 1 requires that

)a 2W,'+t

=I

w
'

{.

.t

tw.-'Aw1 -ltfoe;:;:; ft.s-;so"

:_,-

+I =

UJ1 ,.

-.

Solving for a, we obtain

;~

:<~-

;~
-31.

,b

'
' l.l .W/-.t

2f;"

--------

--------------------------------------------------------------

-.-.

B-8-21.
'
+

~{s)

_,J,

''

'

,_,

-
.. , ;.1

'

I
I
III

'

'

~4.t~:m

the angle of -130

'

"

j~

1<

='

S(.s.t+S+ft.)

o.-zs-K
S(p.2SS ... +&>.ZSS-t-/)

The quadratic tenn in the denominator has the undamped natural frequency of 2
rad/sec and the damping ratio of 0.25.
Define the frequency c:orresponding to

'

'1

to be c.J 1

/4Gw1) =

-~-

/t-CI.2Sa;tt.+-j0.2S411

-l/11"

= -lfo-

ta..:'

(!.zsrv,
/ - " 2

-/30"

s tV/"

,,

oil AAooih-

From this Bode diagram, we find the phase and gain margins to be 21 and 13 dB,

respectively.

Solving this last equation tor t..i1 we find Cc/1 =< 1.491.
Thus, the phase
angle becomes equal to -13o at w = 1.491 rad/sec.
At this frequency, the
magnitude must be unity, or jG(j 4J 1l = 1.
The required gain K can be determined from

------------------------------------------------------------------------------

(?()~(/;

'.}

I I(j/.~I1)(-~>ST.S+j~J72f'"TI) I
--2$'/(

~.zBfoj(

125

124
...;~1_)_):!"'--"'~

'

1.

The phase margin is 103.657 and the gain margin is 9.929 dB.

''

" "

...... """

.. ,. f.l

...

-.,,.

;t'

., ---

-=:co

--~

'

,,,

;i;-

A Bode diagram of the system is shown below

+Jill

''
'
''

-~-

---------------------------------------------.!!:!2

'

a-fl_\t
-lli"_/ = P, N-1

..

,~

aw, =I

f.fU<IJ

''
'

"

'lbus, ve have
t:t ~cv/

'

www.shmirzamohammadi.blogfa.com

~-.,'-""'~

'

setting ja(jl-491)!

~15:...

0.2890K " 1. ~ find


j(..: ;.

...r4-- .:.:, )l.rt..:..:<_)S: -~ &'-->"

Note that the ~hase crossover frequency is at 41"' 2 racl/sec, since

'

..

The magnitude /G(j2Jj with K = 3.46 becomes

= .:- . .P~s- = -/.2148

'.-'6$"

(JZJ(-1-I'O ..f'j +t)

!)

Thus, the gain margin is 1.26 dB.


is sholm below,

The Bode diagram or G( j

. --...

) vi th K " 3.46

.,

},.,jJ

'

t-

::-.-

1'--

'

'"'

... l

-'

.. ..

[;>

IU
#()

- o.tl

''

m
,.

,W/.ue

Since the phase curve lies atove the -tBo tine for all w , the gain l!lilrgin is

<X1

dB.

------------------------------------------------------------------------------B-8-23.

Note that

K
cf(s)== 5(st+s-t-e>.s)

1-

,,~

!
u

...... ' .


J.1

20

I,.

Ci{jt..J) =

-'/s...

that
JWTO.I
JW+bS"

____!_
=
JW(jw+l)

We shall plot the Bode diagram When 2K = 1.

of

U('w)=

2k(/oJw +1)
)~~,.J {zjCf./

Zl<
S(ZSz....._ ZS -t--1)
That is, we plot

~,,.

"

We shall first plot a Bode diagram of G(j~) when K = 0.5.


a Bode diagram for

-------------------------------------------------------------------------------

'IJ

...

.sa

1\

.
..
.''

--~1

-~-

Note

'

'
'

iii""~

""

B--8-22.

..

f:
,,,..

..

h-

/~rpJ =-f..!!:_ -;-~.trxzLrtJ.z.r-xj2rl =-'1~~-r~"=-;so

1"'>1 ~ I

'I'-

'1-6

+-I )(jw T/)

jW [ 2(jW)'-

+ 2)111-+ I}

By reading the magnitude and phase angle values at


each frequency point considered, the tog-magnitude versus phase curve can be
plotted as !'<hmm on next paqe below the Bode diagram.
By moving the curve
vertically, we can shift the curve to be tangent to theM"' 2 d.B lOCl.IS
The
vertical shift needed is 9.3 dB.
'Tha.t is, if we lower the curve by 9.3 dB,
then it is tangent to the M "' 2dB locus.
Therefore, we set

It is shown on next page.

I< =-f. 3 dB

That is, we plot the Bode diagram

Solving this equation for K determines the desired value of K as

Njwt-1
j(,()(2jW+I)(jW-t!)

/<

= P.

/7/f'

The diagraJil is Shm/n on next page.


'!'he phase curve shows that the phase
angle is -130"at (A)= 1.438 rad/sec.
Since we require the phase margin to be
SO , the magnitude of G{jl.438) must be equal to 1 or o dB.
Since the Bode
diagram indicates that G(j1.438) is 5.46 dB, we need to choose 2K : -5.48 dB,

oc

K =:
...;~1_).):!"'--"'~

tJ,

216

'"

127

www.shmirzamohammadi.blogfa.com

._..i...>.J:l'--"'~

'

~IS:...._r4-~,

-~ &'-->"
jl

..

'-

q~

..;

.. )- J;i;T

jr.t

'

., j

1\

-..sri.l~:o

_,
_,_.

111/.t '\

tl.l

.. ..

ol

'

~.4 ....

I'

,........

' -jr.f
-jl

I"If

~fJId

,,,..

tl,., '"

1' &0

'-'

. ..

" '"

l11'

The Nyquist l!X:US crosses

the nega'tive real axis at o-"' -0.442.

Hence, for

stability, we require

o-~so:2>K>o
~

2-ZIZ.

>

>o

The same result can also be obtained analytically.

G(jw) =

'

...

I' e -)ltJ
)kJ+I:::.

Since

K(CAw-;~ w)(!-jtU)

(t J"){t-J'-')

K
!+w-... [ (en "' -"'

~ w) +j ( 4.4) t-"'"""'~

by setting the imaginary part of' G(jW) ~d.l to zero, we obtuin


~w+-W~W=O

------------------------------------------------------------------------------~-

or

For this system

{j!J"') By setting K

e -j4J
k

itV +

W=-Z:O.,W

Solving this equation for the smallest positive value of W, we obtain

1, we draw a Nyquist diagram as shown on next page.

je-J" -

-41(wl) = --'7. 3'w

Note that

tV=2.oz~

Substituting W" 2.029 into G(jw) yields

4 {j Z-21)
118
...;~I_)_J:!"'-""'~

K
~ I+ l.cl. f

1 (

UZ.

2.1' 2f- 2.t12'f

)f

.A,..!..

z. P21)

129

www.shmirzamohammadi.blogfa.com

._..i...>.J:l'-""'~

=- tr'i?-2/

-""'15:... ...r4-- .:.:, ) ..f<i...:..:<_)\S -~ &--->"

I<IT"'b

The critical value of K for stability can be obtained by letting G(j2.029) = -1,
or

UT4

"'T

:?.ziZ>K>O

... r ..J

fJT=O fie

"''"J

Thus, the range of gain K for stability is

t'

WTcVi

=I

().9-f'2/ K

lm

r~

-zr-

4)

I"

qt;.,),. (TJlf-tTjoJ ..,~


!/
(T,p..) TITjulHZ.

'

61T'J
bli'i,l

"T:t

------------------------------------------------------------------------------B-8-25.

8-6-27.

The magnitude of G(jW)H(j"-'l is

1 4fj")H~") I=
The phase angle of G(j41 )H(j((.l )"

jq,t.~)Hf,'(())

10

tf{s)

4!Jf<1 .. +/

iS

s{M7s+/)

--------------- --------------

= - Tw- fo-~- 14J

The maximum
value of K for stability can be determined from the following two
equations
1

8-8-28.
From the magnitude curve the transfer function for G{jAI) may be approximated by
,..,_
A

<iM =

tvlw'+t = I ~

- Tw- 9()- ra_-, w = -180

--,':';:-:~
~. ~J.Sf~ t- I

The phase curve of G(jGI.I) differs trom the given phase curve.
Therefore, we
expect the presence of the transport lag and/or minimum-phase transfer function
of the form

By eliminating t.;J from these two equations, we can obtain the maximum value of
K
for stability as a function of dead timeT.
A graphical solution is given
in the figure shcn;n below,

-<s

'

1-T.s

1-tT.s

!TT..1

1- T.s

K
Hence, we may assume G(jlo.)) to be

'

. ,1
Gl
~~w/=

1
MSfjw+l

J-T;_.jw)(

e -l}W (

1+-7jjW

;+T;JW~
1-T..jw

By use of a curve fitting process, we find

.z

G,{'w)
.!1
3

= .,--,-"'::7=

e -) ~-~> (-'- t~--.r.Jw )fJ+P.Ift.~I())

I tSf jW +I

/1-IJ.'JJ'jW

------------------------------------------------------------------------------Polar plots of G(j~) and e-jTI<I are sho'Wll on next page.


From the
see that G(jlc.l) gives a good approximation to the transport 1ag
e-jTW for the frequency range 0 < w T < 2,/3.

{j(s)

=_I

e- 7:?r

B-B-26.

~we

'

...;~I.J...l:!"'-"'~

\,1

tllft.jW

Thus, the transfer function G(s) is

~r.

1-o.,ss_y t+o.f>s)
(

I+C.flS'S )\_ 1-~./~.J'

l3l

www.shmirzamohammadi.blogfa.com

._..i...>.J:l'-"'~

'

,
~.

''

''

"

1\

J>

' -

1\

'

' "

>

)~
"

'

'

., lr.
~0

1/
"

-~
~

~
1!

~
~ .

~
~

~
~

I-
I

I' -~

I'
I ~

;;

w
~

"

;,

"

;;;
w

0
+

;;;

"I

"0

:;;
0

"'

E
"
c;.: :i'

<"!-~--i5

<'I

.-

...,..:..::
-0
0

<:"C&.IO-~

:::JQIO:>O::

e.,{:~'i

" ~ .s. o&

!:'.oENIII
-:.-"<>

'-;':--':-L-LLJ .,~0
0

0~~~

.
.

I
I

'

I
I

I
'

i
I

0P U!89

'

'
I'

''

- i

''i

'

'
I
I
I
!
'
I'
I
I I J.
r

''

''

I
I

I ~I

'

'
''
j

I'
I
0

'

'

"

l
j

- 1-- '

---f-----

<

I
'

'

'l!i!!

.~
o:-~~

B-9-4.

'".
I
Choose the gain crossover frequency to be approximately 0~/~.:..;,)

;,_)1.5: __y?... &'-->"

'\:c~: ifidthe phase margin to be approximately 60~ Draw the high frequency asymptote

',

...
~

"

having the slope of -20 dB/dec to cross the 0 dB line at about tJ: 0.35 rad/sec.
Choose the corner frequency to be 0.25 rad/sec.
Then the lrn.r-frequency asymptote can be .dra'<lr! on Bode diagram.
See the Bode diagram shown below.
~I

""

"

"

..

'

'

"

.l

.'

,.t <' .

'""

. ,.

..

''

.. -

I"

--":'

-~

-~-

'

'

1\

Ji!' .

'"""'

.-...
_,..
,,

-~

..,

"'
.
. ..
'
'
41 .luUC/u.:.
-~
'

'

..

"-!'il'

'~
~-

lh'

'

-~

The actual magnitude curve crosses the 0 dB line at about~: 0.41 rod/sec and
the phase margin is approximately sa.
we

flFrom the Bode diagram, Kd must be chosen to be -21.4 dB, or

k.t ::::::- 21, .;.. dB

"'"'

( ( 1+

=- ke

K, '=!.;... sKoO(

,.,

o(

is shown on next page.


ximately 0.5 rad/sec.

'-""'.lo/<o

Then

i'
c.;sJ-r/./S"

~.JW

+s

% Bode diagram
num = [0 0 0
den= 10.1 1.1
bodelnum,den)

+ I

4);
1 0);

subp!ot[2,1, 1 );

title('Bode Diagram ol G{s) ., 4/[st0.1s + 11\s+ 1 ll'l

From this diagram we see that the bandwidth is appro135

'"
...;~1_)_):!"

KcO< : 'K.

= Kco< k = 4-

fl..s +I

/;,?s-Js"+?--s+J

Y..jw + I
1/. ') s-/ {/IV}~

following MATUIB program produces the Bode diagram shown on next page.

A Bode diagram of

'"

s(p,fs +!)(s+-/)

~
'The

"" !lS"/. ( l+~s)

c.

Next, plot a Bode diagram of

5'

S".f- ~.d 1'$"/ (I+ <f..S)

srf
S"+......L_

Ts +I

S{t>./STf) (STI)

l?(r)

_ K
-

tNJ?S"I ( !+(Ls)

C(r}

Rfjw)

o<T'S'+/

K='/-

The closed-loop transfer function is

cGwJ

A.A.<{/.Tee

_I!_~

o< Ts--r f

~s)

Then, the open-loop transfer function becomes


Cj(s}

Since Kv is specified as 4.0 sec-1, we have

= o, o ~s-1

~ - o ;-s

'

Let us use the following lead compensator:

Let us set K : l and define

Kd 1<- 7;, <)

P.Z

--------------------------------------------------------------------------

haVE chosen the corner frequency to be 0.25 rad/sec, we get


T~ =

1.1

~t

fl,ll/

(jJr)
Sinc::e

..

:i,

www.shmirzamohammadi.blogfa.com

._..i.,.__, '-""'.lo/<o

-""'IS... ...r4--.:.:, ),:riJ'J.S: -~~-yo 4-J::= 2.61

rad/sec.
we select this frequency to be the new gain crossover frequency t..Jc
Then we obtain

~-

<JtG('

-~

["((l1o1Xol)J

+=

~~-

[r( 4Jc -;, .[i:l/ X Z. 8 I == f. 2 S ?7

<'

'

,...___

_j__:::::
o<T

_,.,.,.

1ff

,,

10'

H~=

F-ftadlsec)

"'

(je{~)

,..,'

~d

J.oo
'"',

.!!.

2-11

= \Jo.z,

=- Kc.

f(
Kc = 7

--

'"

s+J.2J??

~
l'.2./

ti~(O(j(s) ~?-,.??.US+/

z: =

fL!i" -17+I

J',Jt76

ftc

o~ =

~f~ = - - -

!+"'

-.

90)

Let us choose, instead of 0.2174, ~to be 0.21,

Q( is determined as 0.2174.
O<

The closed-loop transfer function is


('{$)

/?.(s)

.f<F~

1..

=~

L
v~. 7./

1.~ It J/ sf'

3./i#~

s + -;.

+-P219P. sJ

+ / 21 ~/ S '"-+- ~,/PD.fLS + 9-

The following Ml'o.TLAB program produces the unit-step response curve as shcnm on

Next step is to determine the COiner frequencies aJ = 1/T and W"' 1/(Q.' T) of the
lead compensator.
Note that the maximum phase-lead angle m occurs at the
geanetric mean of the two corner frequencies, orW= l/(5T).
The amount of
the modification in the magnitude curve at w = 1/( .{r/(T) due to the inclusion of
the term (Ts + 1)/(c.'Ts + 1) is

Note that

::

next page.

o!:::::IJ,2/

t+jWT
l+jt.J/)(7

s +- fL

= " P/.13/~ ~ + tJ.2'Jff-SJ. _../. 26 ~/ .r' +S

(This rooans that 12 has been added to compensate for the shift in the gain
crossover frequency.)
The maximum phase lead is 40 .
Since

(-oi

I
S(C./st-!){$"~1)

~-ln~s-s+J

Since the specifications call for a phase margin of 45~ let us choose

p.//,JtJJ'S +-/

s t"l/3/9

The open-loop transfer !wtction becoi!IE!S as

Fran this plot, the phase and gain margins are 17" and 8.7 dB, respectively.

rf,..

_ - o.nlls +-I

sf-/. 2.6'?7

p_.'Z/

-,

S+6.HI'1

Th~

C?,M =

6.13/9

_j_

% Unit-step response o o

numc = [0 0 0 3.1064 4!;


denc"' !0.01631 0.2794 1.2631 4.1064 4J;
steplnumc,denc!
grid
tltlel'Upit-Step Response of Compen5ated System

[Problem B-951'1

.,foi.

= 2Jtf'Z2 -:::::: 6. 77?3' PIS

We need to find the frequency point where, when the lead c~nsator is added,
the total magnitude becomes 0 dB.
The magnitude G(jW) is -6.7778 dB corres137

136
...;~I.J...l:!"''-"'~

www.shmirzamohammadi.blogfa.com

~-.,'-""~

'
..

,,_
'

--

'

- - f---

-----

---

-~

s+-"T

'

,,_..L
wT

C{,(5) = K 'ils):= s{S-i-1)

- - ---.

where K =

Since the static velocity error constant Kv is given as 50

KcO(.

Kv ~ .{..:.. S ff.{s)(jfs)

S_,.tll

--

r<
Ts-t'/
=j.;,_,
s ri-T.s-t/ s{s+l)
S,_,t>

=:

We shall nov plot a Bode diagram of

<i,{s)

Similarly, the following MATLAB program produces the unit-ramp response curve
as shown belov.

Ts+t

Cj.,(s') =k.:tX. l)(n+l = Kc

.;.

sec-1, we have

ul
u

./
..

requirements, try _a lead compensator Gc{s) of the form

Define

00--

:~f

-""'IS:... ._r~ .:...:;) ~_)1..5: -~-->"To satisfy the

-.,~- ~IJ-.&)

-r

...........

57>
.S(S-t/)

The following MATLAB program produces the Bode diagram shoWn below.
% Bode diagram

% Unit-ramp response
numc .. 10 0 0 0 3.1064 4);
denc .. 10.01631 0.2794 1.2631
t .. 0:0.01:5;

4.1064

num .. [0 0 50];
den "' [1 1 0];
w .. logspa~;:e(-1,2,1001;
bodelnum,den,w);
subplot(2, 1,11;
title!' Bode Diagram of Gl!sl .. 50/[s(s+l)]'l

0);

c .. step(numc, denc,t);
plot(t,c,t,t)

grid

__ ___

titlel'Unit-Ramp Response of Compensated System


xlabeU'.t Sec']
ylabeH'Unit-Ramp Input and System Output')

,,

- -- -

--

--

17:

Ih '

!'

i! .

oo

.....,

--

}r..

(Problem B-9-51'1

7-

_.,,.
'

~1

:2~r=f= -=I:-- f-

------------------------------------------------------------------------------0

00

'

'

>

...

1)8
...;~I_)_J:!"'-""'~

'
"
~

---

v;

.-

Bodoo;,v...<#G1() 50'(ll(a+1Jl

trf

10'
F._.:y (radiHC)

I I lllfHt=1+Hi1111

"
I I I Hilli

I:::~t=jit!
'"~ I ul=l4~ltltl11
w'

to

10'

to'

F~l,_)

139

www.shmirzamohammadi.blogfa.com

~-.,'-""'~

K-SP

'

;. 1.5:

The gain ma~lfR.. iie-<~)

Free this plot, the phase margin is found to be 7.8.

.)

dB.
Since the specifications call for a phase margin of so. the additional
phase lead angle necessary to satisfy the phase margin requirement is 42.2~.
We may assume the maximun phase lead required to be 49,
This means that s.a
has been added to compensate for the shift in the gain crossover frequency.

pre following MI\TLI\B program produces the Bode diagram of the lead canpens<~tor
>:J'Mfte!igned, as shown below.
%

~ ,/,

!-o<
r.-1+~

~ = 48., corresponds to~= 0.14735, {Note that ot = 0.15 corresponds to m =


47.657",) Whether we choose m"' 48" or f6m = 47.657 does not m<~ke much diffe-

Hence, \o'e choose

c(

Bode diagram

o o

numl "'"111.325 50];


den1 = ]0.03397 1];
w ~ logspace(-1,3, 100);
bodelnum1 ,den1 ,w];
subplot(2, 1, 11;
tltlel'Bode Diagram of Gels) = 50(0.2265s+ 1)/(0.03397s+ 11'1

since

renee in the final solution.

o o

= 0.15.

The next step is to detennine the corner frequencies W= 1/T and w: 1/(0CT)
Note that the maximum phase-lead angle !11m occurs at
the geanetric mean of the two eorner frequencies, or t:u = 1/{&T).
The amount

of the lead canpensator.

of the II\Odification in the magnitude curve at


of the term (Ts + 1)/(0C' Ts + 1) is

I I+J"'T

!+)WotT ..;-...L

-,.T

Note that

Jc./r =

~::::.

t.J ==

1/{ftiTl due to the inclusion

1+-JF./ _ ,[0{

_L_

I+

'C>(

_l_

--

""'

2.5'120 = ?. 2]'/ 4B

We need to find the frequency point where, when the lead compensator is added,
the total magnitude becomes 0 dB.
The frequency at which the magnitude of
Gl(JlV) is equal to -8.239 dB occurs between~= 10 and 100 rad/sec. From the
Bode diagram~ find the frequency point where jG1 (jtv) I e -8.239 dB occurs at
o.J= 11.4 rad/sec.
Noting that this frequency corresponds to 1/(.[o{T), or

4Jc

___L_
{O(T

we obtain

The open-loop transfer function of the designed system is

-9:-""" 4'cr.;( =
<.Jo
=~ ::::

1/.

$'- .Jc,/s-

II~

,; ... /.$'

= ff

f'/$'2

c-,,{s) <q(s)

== 2'f. ~J 9-7

!.EE.

jS"+~~!SZ.)
S-1-2f.$<.l7

I
J(.S+I)

'I1le following MATI.AB program produces the Bode diagram of Gc(s)G(s), which is
shown

Qll

next page.

The lead compensator thus determined is

9-:fs) = Ke

s+-f
s

+of:r

=Ke.

s.,. If ;sz

% Bode diagram

num .. JO 0 1000 4415.21;


dan .. 13 91.3041 88.3041 OJ;
w .. logspacel1,3,100);
bode{num,den,w];
subplotf2, 1, 1);
title('Bode Diagram of Gc(s)Gis) =- lOOOfs +4.4 1 52)/[3(s + 29.4347]s(s + H/'1

S f"Zf. 'f.-1ft.?

where Kc is determined as

K,

K
0(

s-o =

/J./S

/Pt:'O

Thus,

GJJJ=

/000

S+-$'-.fl/$'2....
$

+-zt.ftJS!-7

(), 2Z / J'S T I

=SO

~.~JJ'I7

s +I
141

~-

,.S)~ ..l:!"''-""'~

140

www.shmirzamohammadi.blogfa.com

._..i...>.J:l'-""'~

;:;:-

'

- . --- -
Bodo

000

Oia1

000(~ ~152__.,..,--~--

G<:()GI

-~------

-""'IS... ._r~ if,) .1...:..:<_)1..5: -~ ci->% ,, ,, Unit-step response ' ' '

,.,... ,

num ,. (0 0 1):
den""\1 111:
numc"' 10 0 1000 4415.21:
denc =- 13 91.3041 1088.3041 4415.2\:
t ... 0:0.01 :8;
ct "' step]num,den.tl:
c2 = steplnumc,denc,ll:
plotlt,c1,t,c21 Responses of Uncompensated and Compensated Systems')
titlel'UnitStep

-~o=.----

;:0<:'

-"''-'

~ '

..

r--_,

100'

"

,,.
0

oo'

oo'

xlabe!rt sec' I
ylabei!'OutPuts'l
telltll ,1.25, 'Compensated system')
text\2,0.5,'Uncompensated system')

"

Fre<j~~~IIC)' (radiltiC)

~-"..,._.,.,...,
-----r----'-
....... .s...

...... ~ _ .

-~-~--

c ...,......, .. ~...,

(~~

"
F~(rm'Mc)

i '"

From this diagram, it is clearly seen that the phase margin is approximately
52, the gain margin is +oOdB, and Kv: 50 sec-1; all specifications are met.
Thus, the designed system is satisfactory.

;-~~

':::1
"'I

Next, we shall obtain the unit-step and unit-ramp responses of the original
uncompensated system and the compensated system.
The original Wlcompensated
system has the following closed-loop transfer function:

C&)
-.~~~~~-R(s)=-s .. +$+-1
The closeO-lOOP transfer function of the compensated system is
C(1)

-:

l{(S")

+ ~.fL/$"Z)
.3 ( s t- zf. '!- J ft-?)s ( s t-1) + /NJ()

- --- , .

I
~~'
oL---;---~ 3
Uoo
0

The MATLAB program given belOW produces


pensated system and compensated system.
shown on next page .

/&Jt'O ( .S

~. ~

Un<en1>'"' .... ' ' ' -

the uni t-r<IIIIP responses of the uncanThe response curves obtained are

s -t P. fl./.J'2)
% Unit-Ramp Response

jtit'tJ

s +

'1-~1' J""'.

2.

asJ+f(.3c 9-(s'""+!tJf3,Jofi./S-t flf'-l$".2.

The closed-loop poles of the compensated system are as follows:


s"' -11.1772 + j7.5636

s"' -11.1772- j7.5636


s = -8.0804
The MATLAB program given at the top of next page produces the unit-step res-

ponses of the unco:npensated and compensated systems.


curves are shovn on next page.

num = [0 0 0 1};
den""l1 11 01;
numc "" 10 0 0 1000 4415.2];
denc = 13 91.3041 1088.3041 4415.2 0];
t = 0:0.01:8;
cl = step\num,den,tl:
c2 = steptnumc,denc.tl:
plot\t,c1 ,t,c2,t,t)Responses of Uncompensated and Compensated Systems')
titlei'Unlt-Ramp
xlabeU't Sec'\
ylabei\'Unit-Ramp Input and Olltputs'l
text\1,5,'Compensated svstern')
text\4, 1 .S,'Uncompensated system')

The resulting response


143

!42
...;~1_).):!-"

'-"".lo/<-

www.shmirzamohammadi.blogfa.com

._..i...__, '-"".lo/<-

::!~-

-""'IS:... ...r-4-- .:.:, J ..,-.......J:<)-.5: __y?... &--->"

-~c--

,_.

'I

"'~ "~"" "-~

-.--

...... ~ ... .-~ .... "~ c....,..,..,., s,. ......

-- -- ---

-~-

-0:

~-""'"
;/
/,/-'/
+

,,
i

'

~---;----

--------

'

j ~-;--:i.e

.-~-;--

Kv = ~

Sfr;;(s)

Thus,

S1.~ 1

Clc {f)

::=

'
t -90i
J.

--

.,,
,.' '

<-.. q,(') = I
~
Since the static velocity

error cons-

---

phase

Let us choose 'Gc(s} to be

s+

=k

'
fieM

= 4-

~cfsJ

of

fL( S.s T /)

s(S 1 -+I)

= S(s4z+/)

The resulting diagram is shown on next page.

The following MATLI\B program produces a Bode diagram of G(s}.


shown on next page

See the diagram

% Bode diagram '

num "' [0 0 0 4]:


den = [1 0.000000000000001

1
bodelnum,den)
subplotl2, 1, 1)
title('Bode Diagram of 4/[sls 2 + 1 )]")

= (AS+t){bs+!)

Then, {as + 1) will contribute up to 90" phase lead in the


and choose a = 5.
The following MATI.JUI program produces the Bode diagram
high frequency r'!f!9ion.

Next, we plot a Bode diagram of

<j(,s)

,.

.~

margin of so and gain margin of 10 dB or nore.


Fran the
aboVe Bode diagram, we note that the gain crossover frequency is approximately
W = 1.8 rad/sec.
Let us assume that the gain crossover frequency of the
compensated system tote sot!IE!Where between W = 1 and W= 10 rad/sec.

We need the

K A
I
= /,;_, s T <iJ) -.---1
:

"

f...,....qt (raclfaec)

B-9-7.
Since the plant does not have an integrator, it is necessary to-add
an integrator in the canpensator.
Let us choose the compensator to be

where 6c{s} is to be determined later.


tant is specified as 4 sec-1, we have

,.

,.'

------------------------------------------------------------k '
'io!) = -,-Crds)

'-....

'

l '

8oOI Oillgnrn
. d <CIIo(.-:1+1)1

F
I
I

OJ:

Bode diagram

num=IO o 20 41;
den "" [1 0 1 01:
bodelnum,dent
subplot[2,1,1)
titlel'Bode Diagram of Gls) = 415s+ 11/[sls 2 + 1!]')

145
...;~1_)_):!"'

'--"'.lo/<-

www.shmirzamohammadi.blogfa.com

~-J:l '--"'.lo/<-

..
!

=0 ,

'

,,

M'l

"

---

..,

...

-~

1
10'

,_...

_,_

~
,

"

FI'Oq\lllnCl' (..alne)

...
~

~:}-,-

..,...
l

-""'15:... ...r4-- ~_)1..5: -~ &'-->"

Balo ~ d Glo)'" 4(5o+1)1[Jjr-2+1)!

oo

!
,,

.......,.._,

...

Based on this diagram, we choose the value of b.


The term (bs + 1) need to
give the phase margin of so.
By simple MATLAB trials, we find b = 0.25 to
By choosing b = 0.25,

give the phase margin of so and. gain margin of+ COdE.

Next, we shall check the unit-step response anc!l the unit-ramp response of the
designed system.
The closed-loop transfer function is

~ha~

~~(s) =(s-s-rl)(t~.2~s+-J)

Rtr)

;md the open-loop transfer function of the designed system is

Open-loop transfer function =


~

s- s"'+ 21~

Cfr)

s J + J's .. ..,_ n

+ 9:!'

+ 4-

Note that the closed-loop poles are located at

4(S".s-t-J)(t:>.2SS1"1) -;i/-:-T

==

.r~+

:=

-2.4052 + j3.9119

s : -2.4052 - j3.9119

rs~T2tst-~

s "' -0.1697

s' + s
See the folloving MATLAB program and the resulting Bode diagram shown on next

page.
Ft'CIII this Bode diagram it is seen that the static velocity error constant is 4 sec-1, phase margin is 50" and gain margin is + 00 dB.
Therefore,
the designed system satisfies all the requirements.
Thus, the designed system
is acceptable.
(Note that there exists infinitely many systems that satisfy
all the requirements.
The present system is just one of them.)

Notice that the complex-conjugate closed-loop poles have the damping ratio of
A root-locus plot of this system is shotm on next page.
The following MA.TIAB program is used to obtain the root-locus plot,
(The closed-loop.
poles are indicated on the root-locus plot.)

0.5237.

% Root-locus plot

% Bode diagram

numl = [0 5 21 41;
dent = [1 0 1 OJ;
rlocus(num1',den1 I
v 1-10 2 -6 6[; Rxislv); axisl'square'J
grid

numl - [0 5 21 4,;
denl "'[1 0 1 OJ;
bode[num1,den11
subplotll, 1,11
title[' Bode diagram ot 415s

tltlei'Root-Locus Plot ot 4(5s + 1H0.25s + 11/[sls 2 + 1 )J'l

+ 1110.25s + 11/lsls 2 + 1II'!

.,,
...;~I_)_J:!"'-"'~

147

www.shmirzamohammadi.blogfa.com

._..i...>_J:l'-"'~

-""'IS... ..r~ .:.:,) ._rU..::Jts: __y?....nili-'following MATIAB program produces

Rool..l.oaa Plot ol "(5.+1)102So+ 1ytll(r'2o1)]

'

% Unitramp response

'~~,
I I

"\
Cl"".

_,

.......

I ~

_il _

'\

..

Jf.

' 1\J

numc = ]0 0 5 21 4];
denc ~It 5 22 4 OJ;
0:0.05;20;
c "' steplnumc,denc,t);
plot(t,c,' -' ,t,t,' ']
titlei'Unit-Ramp Response of Compensated System
Klabel('t Sec')
ylabeWOutput and-Input Ramp'!
teKt(10,7,'Compensated System'!

"-

'l,.+t

~o

the unit-ramp response curve of t h e The resulting response curve is shown below.

pensated system.

'

-~~)
;I;

....__,_s,_
,---.----"
"

-~,--

(Pr-.a+'l

!,"

The n~ HATLAB program will produce the unit-step response curve of the compensat.ed system lrllich is sh0>1n below.

(Problem B-9-7]')

-"'-~,-

l,.

-~-

,..._..,

...,._

% Unitstep reS)lOnse
numc = {0 5 21 4];
denc = {1 5 22 4];
l!ep(numc,denc)
grid
title!' Unit-Step Response of Compensated System

ok::::_.__ '
0

'

'

The Nyquist plot is given next.


the Nyquist plot shown on next page.

rr
"1/\
!"

"

,,

....,~1_)_):!"''-"'~

i
i

'lfo

,.

2o

'"

The following MA'!'LAB program produces_

o o

Nyquist plot o

title!'Nyquist Plot of 4!5s + 1)(0.25s + 1Jlls!s 2 + 1 )]')

' J'

I.

I'

"

numl .. [0 5 21 4);
dent ., ]1 0 1 01;
nyqulst(num1 ,dent J
v"' [-120 40 -80 80]; aKislvJ; eKisl'squere'J

t.

"

II''<"""" 0.0-'J

(M,ISiop R"''""' d "-">otod "'"'"'

10
' So

!Problem B-9-7)')

'

'

I'

__ j__j~--'--'-~

10

T.,.!_l

'"

www.shmirzamohammadi.blogfa.com

'"

._..i...>_J:l'-"'~

~:'"-

-~-"7
Nyqurst Plol ol ~15t I )10 25ol Jl!<[s2 11)

'"
"
"
"

-~--~~-----,--

-~15:...

...r4-- .:.:, )

J..-<~...:..:<_)1..5: __y?... &'-->"

~ ..,H+H

--------

0-

-r-

'"
~
'"

,,

'---""ll~'

-4!

r _,~ I If!

,1}_:

.,o

~.

:1:

'~~'-~

~~

"

oo

..eo

-&J

-40
-20
RniA>ro

;t.:

., '
,:':.__:- ~

" "

---------------------------------------------------------------------------- :!{-~
--ci;:_

!!!

The plant transfer function is

'J(s)::::::

The unit-step response of this original, unccmpensa.ted system is obtained by


entering the following HATIAB program into the canputer,
The resulting unitstep response curve is shown belOW,

-,--,_';'

2S-t--0,/

% Unit-step response

S{s"--ro.IS+f<.)
The plant involves a quadratic term with ~ = 0.025.
This term is quite oscillatory.
MJl.'I!.AB program shown below produces the Bode diagram of G{s) as
shown on next page.

num,..[O

den= [1

0.1

0.11:

0.1[;

steplnum,den)
grid
titlei"Unit-Step Response of Uncompensated System')

% Bode diagram

num"' [0 0 2 0.1];
den,[1 0.1 4 OJ;
w = logspace[-3,2, 100);
bodelnum,den,wJ
subplotl2. 1,1 J:
.titlei"Bode Diagram of GlsJ = (2s +0.1)/[sls "2 +0.1s +4)")

0.0

The closed-loop transfer function of the original uncanpensated system is

--1Y!l... R(J)

s + (),/

S't-o.;st+6.r-I-P,/

The closed-loop poles of the uncompensated system are


s" -0.0417 + j2.4489
s " -0.04!7

s" -O.Ol67

'-""'.lo/<o

. --

151

~50

...;~1_)_):!-"

..
II
.
o. . , _ ..

j2.4~89

www.shmirzamohammadi.blogfa.com

._..i...>__, '-""'.lo/<o

'

-""'15:... ...r4-- .:.:, ) ._r~...:..:<,tts: -~ &'-->"


To design a compensator for such a system, it is desirable to cancel the
zero of the plant, since it is located very close to the origin.
It is sometimes useful to include double zero and double pole in the compensator.
we may choose the curnpensat.or to be---$

1:.

{jc{. ) -

C-

(s+Z)l

> +~

{Sf-10}1

.2S +P, /

~ '

where ~ have chosen the double zero at s = -2 and double pole at s = -10.
The value of a is determined later.
since the static velocity error constant
is specified as 4 sec-1, we have

k, = ~ 'qc(>) q{$) =.!.;.. <k, (.T+zt


~_,,
S?l

(s +tl)'-

ko
~.

__L =
I'P

St4

2SM/

zst-P-/

;f:
-:;~

By several MATLAB trials ve find a ~ 4 will give a satisfactory result. Therefore, ve choose a = 4 and Kc = 100.
Then, the transfer ftmction of the ccm-

pensator becomes

5+P.
ZST-&1, I

_,

'
t-/6dO

be found as follows.

/00 ( 5+-Z.)l.(S+fL)
denc .. 11 20.1
IOOIS(denc)

206

890

2400

1600[;

ans =

.s J + J't:J" s'- + 20(Jt:JS +-/6oer


sr+ ZP.(s~+ /~:?6' s.s t- ?o.s~+ ~ s
/CI)

-7.3481 + 7.2145i
-7.3481. 7.2145i
-2.2424 + 3.37511
-2.2424.3.37511
-0.9189

The result-

'!he following MATLAB program produces the unit-step response o! the designed

num = [0 0 100 BOO 2000 16001;


den= [1 20.1 106 90 400 OJ;
bodelnum,den).
subplofl2.1, 11
titlei'BMe Doagram of 100[s + 21 2(s +4)/[(s + 10) 2sls 2 + 0.1 s +41J'J

system.

From this Bode diagram, it is seen that Kv ~ 4 sec-1, phase margin is approximately so and gain margin is + D<l dB.
so, all the requirements are met.

'-"'.lo/<o

--

The closed-loop poles of the compensated system can

% Bode diagtam ..

to"

CM
IO"~J + ~Op S"2. + Zt:P, s -r ft()O
~ = sst- 2()./ S' + :zo~ s J t- 8 'ltJ s'- + 2'HJCS

""""""

The following mTLAB program produces a Bode diagram of Gc(s)G(s).


ing Bode diagram is shown on next page.

..s~u ..l:!"

to"

The closed-loop transfer function of the compensated system bee-alEs as foll.ovs:

(S+!G}l 5 ( S 1 t-O/S-t-~)
_

1'-

to'

.~;:_

The open-loop transfer function becomes as follows:

,.

F~('

-1!._ft

~j

,,
v

J~

.""'.

(Sh")~

S(S -tt7,/,H~) "5\'-

ko: "- = ft..t't?

Cj,{r) Cj(r) =

~-

. -.

-----

''

,to

:!,

(srz.Jt

-~:-"rmr-

i'-

~,(s) =!t>O

'

So,

'"'

www.shmirzamohamm.di.blogfa.com

% Unit-step response

numc = [0 0 100 800 2000 16001;


denc = [1 20.1 206 890 2400 16001;
steplnumc.dencl
grid
titlel'Unit-Step Response of Compensated System

153

(Problem B-9-81'1

._.,i...__,. '-"'.lo/<o

'

___

~15:...

...r4-- .:.:, ) ._rt..:..:<_its: -~ &'-->"


It is noted that there are infinitely many possible compensatocs foe this

unit-step response curve is shmm below.

"

"

......,..__

system.

':ffi

'

'

-u

fj&(s)

-~

"

'

The following MATLAB program will produce the unit-ramp response of the corn-

pensated system.

li

j!o

ll

ro

20.1

100

2000

BOO

206 890 2400

t ., 0:0.02:10;
c = step(numc,denc,tl;

Let us asSUITE! that the CQIPensator Gc(s) has the following form:

(jc(.s) = k. (7is+IXT..:s+/)

'(3)->+t)(~T.'>t) ~J<,

:-:--

16001;

S+f.NI
S t-?JL.3Z

:"!f!!_-J

'i

11

= /2(2,/Z

S+ 0./.133

------------------------------------------------------------------------------

-~

% Unlt-remp response

S+J1

ii

.i .

HI

S+F

!{;,{<) -110

;;!<.

zsro.;)

jt

$..

"

.,

(st-1 )'1.

(srz1)(

'~

--

denc

(5+ 1Y
(s.rzsJ(Zsro.t)

q.pp

.!

"
'"

numc ,_

Cfcfs} = J2o

"

few possible compensatocs ace shown below.

(j,,(s}

l\

'

l\

~_.,

1600 OJ;
Since Kv is specified as 20 sec:-1, ve have

plot(t,c,-,t,t,'--'1
title{'Unit-Ramp Response of Compensated System
xlabell't (Sec)')
ylabeU'Output end Input Ramp')

!Problem B-9-BJ'J

1<., = ./...;...,. s fi, (s-)


'f~l

IBI!t(5,3,'Compensated system')

("*

(s+i)(sr-f.)

- K

s (s+t )(s+ .r)-

_j_
S

)(s;- ;,J
=2o

Hence

kc

The unit-ramp response curve is shown below.

= /00

Define

'":

Lni-1!-Rn-OIC....-... odSfll""
~~----r--------~

iP-8-U)

i
'
I
! '

S(s.+-1)($+S)
The following MATI.AB program produces the Bode diagram of G1(s) as shown on
next page.

.l ,I"

% Bode diagran-.

! .,I

num

'[

,,

~ .

10

100);

den "' [1 6 5 01;


w = logspace(-2,3, 100);

c....,...,,,..,,,.,m

bode(num,dan,w)

.?

"o ~- '

...;~I_)_J:!"'-""'~

Nd

ft,(s) =-/00 Cj(:s) =

subplot(2, 1,1 J;

title(' Bode Diagram of G11sl

l ------.--;
,,i.,l

'"

,r.

'
www.shmirzamohammadi.blogfa.com

100/[s(s + 1 Us+ 5JJ'J

!55

~-J:l \.,)-'.lo/<o

~15:...

'

...r4-- .:.:,) ...r-a.'


.. 'l.ts: -~-~ C:'?'-->"
For the phase lead portl?" we first note that

o;.gr.marG1(o) ~ 1001s(s+1)(o..S)J

1001

1 1 I II 1111

I I II IIIII

I I I I IIIII

4/)~2S) = 1~.3S dB

I I I II

,-_, .

~ ,ooi-1-j~IIIIII--HH

If the lag-lead compensator contributes -10.35 dB at~= 2.25 rad/sec, then the
new gain crossover frequency will be as desired.
The intersections of the
line with slope +20 dB/dec [passing through the point {2.25, -10.35 dB)] and the
0 dB line and -26.0206 dB line determine the corner frequencies.
Such
intersections are found as w = 0. 3'704 and 4)"' 7.4077 rad/sec, respect;ively.
Thus, the phase lead portion becomes

S-+C.37ofL

S"r?.~o'l? =

'

2c

2.6??8 51-/)

0./J.r"sr;

Hence the compensator can be written as

q,

(s) =

'

Fraa this diagram we find the phase crossover frequency to be

determine the corner frequencies of the phase lag portion of the lag-lead
cat~pensa.tor.
Let us chtx:~se the corner frequency l/T2 to be cne decaae below
the new gain crossover frequency, or l/T2 " 0.225.
For the lead portion of
~he compensator, we first determine the value of p that provides~" 65',(5'
added to 60 . )
Since

__..:.. f-

5 -I

'~ -1-/

/+

we ind ~ = 20 eorresponds to 64.7912',

may Choose

p = 20.

Since wa need 65D phase margin, we

Thus

t~ 20
Then, the corner frequency 1/( pT2l of the phase lag portion becomes as follows:

J__

17i -

I
:ZO)<

q.:(f) Cj(s)

-'-- =
loll~

t>. 22S'

2o

sro.zzs ) ( .S+-tJ, 370$1-)


St-P.O//:Zt;'

.S

+ 7fit'77

p:.~rd-1'-S+I ) ( z.tfff3s+l) -:-:---'1~;-:---:;-

ftJ(J ( r;.l/f'/S-t-1

"/Jros+l

S(.s+-t){H.t:-)

,.
'i

--"t

4)

Once we choose the gain crossover frequency to be 2.25 rad/sec, we can

.L

100

Then the open-loop transfer function Gc(s)G(s} becomes as follows:

= 2.25 radj
sec.
Let us choose the gain crossover frequency of the designed system to be
2.25 rad/sec so that the phase lead angle required at 41= 2.25 rad/sec is oo.

1-

;oo( 'if,Ft"f'fSi-/)rp,f]~OS+//
."-(<'~sts+ 1~\ ( z.&?P8 s+l _\

II'?'/. 90 S

71~. {t-2

s T /00

--=---~.:..C.:.--'--;-'--"
J:lSr + /6/. P2 3 f s" T S''/.S: l"lft- sJ -t-

"f.~t.J!fS s l-+ N

The following MATIAB program produces the Bode diagram of the open-lOCip transfer function.

<M. Rods diagram ''

num"" [0 0 0 1199.90 714.42 100[;


den"' (12 161.0239 595.1434 451.1195
w = logspacet-3,3,1 001;
bodelnum,den,wl
subplot\2, 1, 1);
title('Bode Oiegrsm of Compensated Systam'J

01;

(),()//.?~

Hence, the phase lag portion of the compensator becomes as

The resulting Bode diagram is shown on next page.

+/)

St-0-lZ.S' ~
( f.fl:i<S<.Jc-'5
20
.s +0.0112) 81, 't!8'ts +I

...;~1_)_):!"'--"'~

!57
~'Sfi

._..i.,.__,.:r~

~-~
From this

diagram we find that the phase margin is approximately 60 and gain


margin is 14.35 dB. The static velocity error constant is 20 sec~l.

. :J:TT111l1C--h.;;Bodoo OoQwn ~ ~ S)'>'lom

The closed-loop transfer function of the designed system is

>OOFH+mlll::i Ill

..fE2_ _

~-ooHf

7?.(~) -

;.:.~

!I'! 'I ffJ :5" + 714-- fl-Z .s

/lJ$+/If s""t', srs-./ s'

,.

'::

~-'
-
;,t.

% Unit-step feSIJOOse
numc = [0 0 0 11!}9.90 714.42 1001;
done= 112 161 595.1 1651 719.4 1001;
step(numc,dencl
gfid
tltle('Unit-Step Response of Compensated System']

..,_,

___ __ _

~
,,

<~H-++

';),:

..

i:.

To read

the phase margin and gain margin precisely, we need to expand the diagram between w = 1 and 4J = 10 rad/sec:.
This can be done easily by modifying
the preceding MATIAB program.
[Simply change the comnand w = logspace (-3,3,
100) tow = togspaoe(Q,l,lOO).]
The resulting Bode diagram is shown below.

ul

..

~
(radlsec)

o,--------,----,---,--,--r,-TII

r=~----.

-2TOc

,.

..... -

I I

i -1-'--1-+-+-1----i---1 I
I

i" -f+-- . -

1--+--1----~--

.1 \ bHJ r~r=n

oo~I--1--J~\----+-

______ J___t4ttllJ
Frequen<:J~

,o

~.----------''""~~...
~~-~~~~"'"~~v-~---~~~"""T'C,c-.--r-r-,

The resulting

"t

rI

..

0~"'~"2(1
-~

The closed-loop poles can be obtained by entering the following MATL!'.B progn-
into the computer.

F#M

.....
t __ I --1-1 j-11-ti,
10

roots(dencJ

ans ""
-9.7022
-1.6110 + 3.0494i
-1.6110-3.04941
-0.2463 + 0.10761
-0.2463 0.1 076i

F~(~l

...;~I_)_J:!"'-""'~

]';8

+/00

unit-step response curve is shown belo~.

;,"./o'

s+ 'lf'f.~S

The following MATI.AB program produces the unit-step response.

. F~'*"''' (1'8d/Hc)

;~t

+ /00

T j,{..)/

www.shmirzamohammadi.blogfa.com

159
._..i...>__, '-"'.lo/<-

-""'15:... ...r4-- .:.:, ) ._rG:{).S: -~ &'-->"

'

'

CHAPTER 10

Notice that there are two zeros (s = -0.225 and s = -0.4939) near the closed-

_.,._,-

t::.;:.
--'

loop poles at s = -0.2463 j0.1076.


Such a pole-zero combination generates
a long tail with small amplitude in the unit-step response.

''"""

-":-

The follOwing MATLAB program will produce the unit-ramp response as shown
~1~-

~f
~

B-10-1.

Referring to EqUation {5-'3.0), we have

% Unit-ramp re5ponse

0 1199.90 714.42
595.1 1651 719.4

100];
100 01:

c "' step[numc,dem:.t);

plotlt,c,'-',t,t,'.'J
grld
tltle('Unit-Remp Response of Compensated System' I
xlabel('t Sec'J
ylebei!'Output and Ramp Input' I
textl11, 7, 'Output']; text(l, 7, 'Ramp Input')

__ ___
..

.. --.

- -l--

171L

--

JlL
.
-,--IZILI--- 1-1:;;; --I-- - -

;f-r- - f-- ..

,-++! ' i - !

----+- --

D
Jr.;(~p
-"i--

{~ W-f--

2-

~-.-

)-

-- --

--

--4-

---

'

i -

~~,

-If

T,=

'b

f;
~
:W:,

-=

~,C,Ic.CL

RICI

= 3f~Z

1?1 cit

7i.::::: if,c 1 +- K1.C'z =

~~;;--,

3. o77
::::: (),'7/fZ

+ Rc.la.

First, notice that

(K,.c,)+(R.c.) =

J,P77

(!r,c 1)(Rz.Cz,.) = o.?lf.?x.J.P-:17 =

:?.111'1

Hence we obtain

l'z..C'z =/.S',JKS

l(,C1 = /.Y.Ji'S.;

since we have six unlmmm variables and three equatiops, we can ehoose three
variables arbitrarily.
So we choose c1 = c 2 = lOJ'F and one remaining variable later.
Then we get
1(

= k,:::::

/S3. f'.> k.f2.

From the equation for Kp we have

_& N1 C,+i?~:.C~ =J?.!o'-Z

'-

"'
'~-

-- ---~-

Rt(~,C,i-Rt.CJ

k, _

.;:..

numc"" 10 0 0
denc .. 112 161
I .. 0:0.05:20;

"o~o<l

"'

RJ

R1 C.,

_&

Jf.Jr.2 X+= ff.7/

"'

we now choose arbitrarily R3 =

10 k.O..

Then, R4 , 197.1 Jt.(t,

The PIO

cont-

roller obtained is shown be lew.

<----

_j1

"' '1'~'-
!J-'-f,
~3.S5
n

'..

o '"

r=,,
....
'

-----------------------------------------------------------------------------...;~I_)_J:!"'-""'~

www.shmirzamohammadi.blogfa.com

1<1

._..i..->__,~~

~15:...

E~VJ

ffr R~

_E,'(J)

R.,.t_,

-~

...r4-- .:.:, ) ._rif'_)ts: -~ &'-->"


f<J

(n- h)(" ;b)


5 (

s + ((, ...

=o<'lk-4K, =t:l/(-

r=..(:>)
E; #)

.(r)
5t"&)

R.rR( =K

Tk'

B-lo-3.

+- k, {

2---

k,) s

1..

+ ~
k,

s( n- f)

_L

k;
I
)
+ R:c...
= _!L_
t: ~.

i-

k~-

From this curve,

find

we

t.. =

)(,.

I?,C,/i'z.C = ~

t?.~

./.

S 3 src.

K =/.2 ..L =/.Z.


t1
Qk

k,: = J?,c, kz Cz
1

+ l?tCa.
~-)

k. = Ak ( - -1-

H,c,

_
ak
- I(,Cj R::.

c~~.

(
R,

T=P.7P8 fee..

Referring to Table 10-1, we have

Hence, if we define

'I'

.---;,

.----~----

t- -;:-

/(

...;~I_)_J:!"'-""'~

..,, I
'.r-r . . . . (. ,
---j~"

Thuo

K ( K,c,

/O
6S+S

s r-..1:-) r-/- s'-

( "' +- ~) s ... + ( 5.e.


-+4

I<= 1<,.

.Sz.-t-

-"- -----I

s(S'r-f)

The step response curve of G(s) is given below.

k<

.J:-)

(>o)

.;::

/0
:= (S"t-I)(St.t')

'
kps ( s+-

ku
I+ <1. s

Define

~($)

.z:.
s.-'-

Sk,

= kr +

------------------------------------------------------------------------

Rl< /i'~

I
= K s r (-"~r,c, +-L)s+
I?~ c.
R.c, trz.C,
S(srf:::)

== kr.,...

{K1 C,+l?.,Cz-""-)

theo

R'J )

~,R~c,

R,Jt_, l, = .::t. ~
K, + I'.J

a k
R1C,/f.,Ca.

r, + t~

]&,2

k,a

f/-7'18
~.~)3

:::::;i'.o{"8"

7,: =

2L

7.(;::::

~.J'L::: o.S"-XP.o.J.'.3::: p.tJ26S

2X p.tJ..f"3 = CJ.I06

Hence

t/c (>) == /<p

c,. -4..)
www.shmirzamohammadi.blogfa.com

{I+

~$ + T.J s)
153

= /. 2 [

( 1-t-

2 ~.r

._..i...>.J:l'-""'~

7-tJ.JLs)

'

~15:...

-'-)'

=o.6 T

-c-.tfx.o.7f8'"

This response curve shows that the system is very oscillatory.


The dOII'Iinant
j~ axis, as the following

closed-loop poles are located very close to the


MATLAB output shows:

~)l

(sr
s

(st-a,

()-~?8?

:::::
The

(sri.

...r4-- .:.:, ) .rjt..:..:<_)ts: -~ &'-->"

roots(denl

?67f)_l

ens=

-0.5328 +13.2301i
-0.5328 -13.2301i
9.7224

open-loop transfer function is

~c(r) Gfr) = ~-f'-'lBF (s+/tf-U?9Y


/0
s
(.S+!) (s-r.s-)
f,?l/'1" Sz.

s)

+ /.ft), /of' .s +
+-tr.s~

.,.,

Since this system is very oscillatory, we need to adjust the parameter values.
Thus,
we adjust the parameter values such that
The first attempt is to double each of the values of Kp Ti and Td-

/?()j:L, S2

/y:::: :JI./36

-r >-s

The closed-loop transfer function is

Then, Gc(s) becoroes as

~-'71/i'Sl.+/J'tJ.&SSt-/?t>f'.s-2

C(J')-

7j = "-PS3

J; :=-P,ZIZ. ,

K(r)-

sJt-/tJ.?J'Ssl+tJ'S""..frsrl?of.S2
The fOllOWing MA'I'IAB pro;ram produces the unit-step response curve shown below,

Ci,(s) = 36.1:16 (I+

P """i"{Z;

'~-

= 3i.l)b

+-

S+- f.?l?t' +'~'S"JS"

% Unit-step resr1onse

/.f/.rz.st+.Jt/36S

num = (0 4.788 180.68 1704.52];


den= (1 10.788 185.68 1704.521;

0, p S' 3 S)

+I?OF'S.i.>

s~ep(num,den)

grid

ttlei'Unit-Step Response')

The open-loop transfer function becomes

o/~fs)t;(s) =

/.P/f"Z.r .... +:U/31~-t-17,./f.>JJ

s
tf.;sz.s~-t-36/.

''

,.

~-

''

,,

-:J__

--

.sJ T-

~-

C(:s)

~--

sl +

Jt/. J6

.s t- /?(;19, S3s-

The following MATIAB program produces the unit-step response of the modified
system.

..

% Unitstep response

num = [0 19.152 361.36 1704.535);


den .. [1 25.152 366.36 1704.535);
t = 0:0.01 :2;
step(num,den,tl
grid
tille!'Unit-Step Response')

...;~I_)_J:!"'-""'~

If, /J'.Z

Rt;r> = .sJ..,..zs.ts-zs:a.+3,6.J6s+I'7P9!-,.r.u-

'

'

J6s T!?ot-.s-Js-

ts-r s.s

The closed-loop transfer function is

10

(5t-/ )( H <:-)

'

'

'

T-[ooc)

'"II

"
www.shmirzamohammadi.blogfa.com

l65

._..i...>.J:l'-"'~

~15:...

resulting response curve is

sho~~

...r4-- .:.:, ) ..r!fM.)ts: -~ &'-->"

Using only the proportional control action, the closed~loop transfer function
becomes as follows:

below.

('(r)

Rts) -

"r-,--r-,-~~;~~-~,_~-,-

t.

i::R=-t:tttt
--

-.:

cuo.UM

-~,

zo

s'

Zl

l<f

,.

.~

-:l'"<

U1.4U1.1

'
s'

-~-

o>---~--

+I

SJ+ 2/S'-t- .<OSt /(f ==0

-""-'

S(s

l<p
){.st-2c) t- k!

The characteristic equation is

-+-

. 1--;::

'IU-kp
2/
l<f

Examining the coefficients of the first column of the Routh table, we find
that sustained oscillations will occur if Kp = 420.
Thus, the critical gain

Kcr is

FrOfll the response curve we see that the maximum overshoot is 25%.

Ker

Note that

the dominant closed-loop poles of this system have the damping ratio of 0.563.
The closed-loop poles are shown in the following MATlAB output.

= 'i20

with gain Kp set equal to Kcr (= 420), the characteristic equation becOmeS

S'+ Z/s~+ Z05 -r if'20 =0


roots(den)

TO find the frequency of the sustained oscillations, we substitute s = j4) into the chracteristic equation as follows:

ans "'
8.9842 +12.5127i
-8.9842 -12.5127i
-7.1836

(jw)J +- 21 ( jw)~
O'

These closed-loop poles are very acceptable.


Kp Tt and Td are

(jw} +

20

9-20

=0

2/(zo-w .. ) +j {u-C4J,.){() =o

Hence, the acceptable values of

cram which we find the frequency of the sustained oscillations to be cJZ = 20, .
w = J20 = 2 0
Hence, the period of sustained oscillations is

or

l<t

36./36

2.

21!
Frr= w - <..J"r

T;=O-Z/2

j.

f!,-().f'"'O

Referring to Table 10-2, we determine the volues of Kp, Ti and To as follows:

T.t :;::o.os-3

------------------------------------------------------------------------------

kt

.!=!!!::1-

J;=: P.Sf'n =o.s-x./.~t>.NJ =P7t'2S'

'{($)

...;~I_)_J:!"'-""'~

Kc:r-

tJ.6X ~ZtJ = 2f'Z

Tj_ = c>./l.$-f:.r = 0,/ZS"X/.-t'..N:J =t'./?S"2.,r

.I($+/)(ST2o)

\0<

= e?./

167

www.shmirzamohammadi.blogfa.com

~-.,'-""'~

-""'15:... ...r4-- .:.:, ) ...rG!JS: -~ &'-->"

.,

function of the PJD controller is thus

C;J') ~ kf (
:

I+ __}__

T;

tJ.7tJZ!>'S

"
r P-1? J'tf zr-.s)

1.ll

'

s.

~H-

,)_~.

The open-loop transfer function becomes as

Cic(s) tj(s) = .Y.P..zs-u- s ~+ 2 s-z s -t- Jr-r.pz.

I
S"(ST/)(5tz0)

.:.;.

z s-7.s J .. + z s-z s +

{<1.

(j., (J')

.1 ~~. '72.

<i.l'! 0 (')

sfl + 21 s.l + 61"; Zf>?S S2.+ 2SZ. s +- ),S-,f. 'lZ.

den= 11

44.2575

252

21

64.2575

252

step(num,den)

"

-~

-'

k.(S+I)'

.::;:

j(>P{ra+2S+I)

358.72];

I
5(Stl )(S"-t-.2o)

tOO Sl+ ZOOS+ /1>0


~

% Unit-step resr1onse

-, 6

The folloving MATLAB program produces the tmi t-step response curve as Sholffi on
next page.

num = [0

By several MATLAB trials, we find K ~ 100 will yield a desirable unit-step


response.
Thus, we may choose K = 100.
Then the open-loop transfer !unc:tion
of the system becomes

The closed-loop transfer function is


C{s)
l?(S) :::

'

'

Since the system involves two poles at the origin, it is desirable to cancel
one of the c:ompensa.tor zeros with the plant pole at s = -1.
SUppose we choose
two zeros of Gc{S) to be at s '" -1 and choose Gc(s) as

{I.I'.Z~?.rs-._+ 2s-zs +-3s-J".?z.

S"+ 2/s 3 + ..<os"-

JilHD!

.."'

s
(Jf2.J>~?o)l.

---+-

t:l /--r

(/{l.,?.r?J"'s2,.+zr2.s T75"J'.7Z

ft.S<.ZY7S

--1-------

:=:rA~

u~

-t ~s)
I

t+

2S2 (

-,--r-,c-~~~=r--~-o_y--,-,--,

sl<+zts~

+-zos'

The closed-loop transfer function becomes

358.721;

grid

C(T)

titler'UnitStep Response'/

RfJ)

{()()S'-

=-

+-

20t:J.S -t-/00

s'+- z/sJ +!2o.s

2.0I>S +tPP

,.,..

The following MATIJ\B program produces the unit-step response as shown on next

Fr0111 the Wlit-step response curve we see that the system has the maximum overshoot of 66%.
'Ibis is because the daninant closed-loop poles are located very
near the j W axis, as the MATIAB output below shows.
roots(den)

% UnitStep res)lonse
num .. !0

den"' /1

21

100
120

ans =

200

100!;
100);

steplnum,den.tl
grid

-18.1666
0.5134 + 3.2659i
-0.5134. 3.2659i

titlel'Unit-Step Response')

-1.8066

...;~I.J.J:!"'-""'~

200

t - 0:0.01 :5;

16e

www.shmirzamohammadi.blogfa.com

169

~.J:l"'-""'~

-""'15:... ...r4-- .:.:, ) ...r~...:..:<tts: -~ &'-->"


~

T7t+JJli;lll

C{T) _

F_

-u
-~

120

200

Zlt:(bs-tJ){H2)

/(($). -

.__,

"s(.HI){srtP) +Zk(bsrt)( J+2)


Let us chOose the value of b to be 0.5 so that the zero of the controller is
located at s = -2.
Then, the c:ontroller transfer function Gc(s) becomes

(j (r) = /((P,J"5-t/) =

'

-~

;;"i_

.it.
- -,_.
.,..

C(f) _

k(st-2/
S(5+/)($+/~)

R(s") -

CoM

1.0000

Noting that

P,

"?r K.:r Rr

(s

-;:-;/

ts

we find
/Ppo

?.:,.. =

{){s)

_
-

z~~+f-s

s'+ :nsa.+

'lt1f

+-5o

where K = 20 is substituted in the equation.


The following MATLAB program
produces thl! response to th2 unit-step disturbance input.
The resultingresponse curve is shown on next page.

Thus, the
follows, final values of Kp, Ti and Td as determined satisfactory are as

"#'" Kcr

$(S+-/)(Sf-/P) -t- k ($ +-Z) 1

::::

C0 {s)

Kf =

k (S"+2)t.

To satisfy the requirement on the disturbance response, we need to obtain the


unit-step response curve for the disturbance input.
By varying the value of
K (say, K = 5, K = 10, K = 20, etc.) we find K = 20 satisfies the requirement
that the settling time be 2 sec.
Note that the closed-loop transfer function
for the disturbance input is

5.8739

kcr =

+-

2S ( S+2)

P(s)

1.3305

The closed-loop transfer function for the disturbance input becomes as

100];

-12.7956

1" 0 (S+!Y'

P.>K (s+-z)

Th~

ans '"'

tfcfr) =

0( bs-tr)(St-2)

C(t)

Notice that the lllaXimum overshoot is approxil!lilltely 15% and the settling time
11!1 approximatelY' 3 sec.
The following MATLAB output shows the locations of
the closed-loop poles.
den= 11 21
IOOtslden)

2K (As+

.S(H/)(H/0) + ..lK(AS+/){i>st-t)(H2)
Notice that the numerator is a polynomial in s of degree 3 and the denominator
is also a polynomial in s of degree 3.
In such a case, it is advisable to
reduce the deg-ree of nll!~Erator polynomial by one by choosing a
o.
Then the
closed-loop transfer function becomes
if{f)

r;-f- - - ______ ,__ ,__,___,_


1::~ttt~t
~IT- -U-+-~W
."

For the reference input,_ the closed-loop transfer function is

.% Unit-step fBSI>Onse !Disturbance input)

numd .. [0 2 4 01;
dend .. 11 31 90 SOJ;
ateplnumd,dendl

It>"'"' =2P?P
= o.6x ---y--

grid
title!"Unit-Step Response !Disturbance Input!')

T.=o.sR...- =

o.sx~ =2.

T.!=o./2S~,

=0./ZS"X]>'=o.s

----------------------------------------------------------------------------...;~1_)_):!"

'-"'.lo/<-

'"'

www.shmirzamohammadi.blogfa.com

._..i...>__, '-"'.lo/<-

____

'
'"

-""'15:... ...r4--.:.:,) .,rl..:..:<_)i..51.~ &'-->"

..,..,

The settling time can

l\
jo

1--

'

I,,

"'

approximately 2 sec.

R(~) ==

s1

JI()S

+-Us~1'

+-

'fl)s;

20 is

8o

tBo

The MATIJ\B program below pwduces' the unit-step response curve for"the reference input, as sho\IJl below.

-- -

""

.."

be

20s 1

C{;-)

~-

seen to

for the reference input, the closed-loop transfer function with K

-11-

be

% Unit-step response (Reference Input)

1'---u

'

'

-u

.. ..

nurm .. [0 20 80 801;
denr = [1 31 90 80J;
steplnumr,denr]
grid
titlei"Unlt-Step Response (Reference Input)")

.,

This response cw:-ve corresponds to the settling time of 2 sec.


This may not
be obvious.
Therefore, we plot the response to ttte unit-ramp disturbance
input.
The following MATIAB is used to obtain the unit-ramp response.

1:-:

~--

:;..
;,----~--

.....

--~

'

..

% Unit-ramp response !Disturbance input)


numdd "' [0

dendd = [1

2 4 OJ;

31

90 80

OJ;

-----

j"

step(numdd,denddl

grid
titlei'Unit-Ramp Response (Disturbance Input)')

''

u'

The resulting response curve is shown below.

........_ _. .. ,o"'-..,..1

~r~~-~
I
.

ooo

O(W

Jo i
o02

''

''

l-1 I
,
!

i I !
'' I 1''
'

'
'

!i

oool

...;~I_)_J:!"'-""'~

177

-u

'

"

The closed-loop poles for the system are sho\IJl in the MATLAB output shown belciw

I
I

roots[denrl
ens=

o'---~---- : ___ ,_ , _ , _L __i ___ :_ __ _


""'""2"~"'".""

'"'"''""'

'

From this plot, we see that the settling time for the reference input is 2 sec.

I
I

-27.8742
-1.5629 + 0.65371
1.5629. 0.65371

The designed controller is

www.shmirzamohammadi.blogfa.com

!73

~-.,'-"'"'~

-""'15:... ...r4-- .:.:,)


ZO(Q.Y.f+l)

4c:(f)

!O(.S+l)

'

;,_)1.5: __y?... &'-->"


IZ.Ifl/2

>

S"+ l.s'+ ~s-. !21'/ s~+37.Z..S

The closed-loop transfer function is


The Closed-loop transfer function of the system shown in Figure 10-

C($)
K{s)

(o)!o

C(rJ

Kp

= .

X(<)

(I+ rfs + 7;p) ti,(.r)

JrKr

..L
)
lt-~ 0 +T.ts

12. 11112

= s'-r GS 1 ..f.-.JS'.J~/9Sz-t-.Jf,1-Z.S -tJ,l.ii/Z.

The following MATLAB program produces the unit-step response.


response curve i5 ~;hown below.

(l)

tj1 {s)

% Unitstep restlonse

num = 10 0

The closed-loop transfer function of the system shown in Figure 10-39 (b) can
be obtained a~; follow~;:

Define the input to the block Gp(s) as U{s).

V{s) = kr ( 1+ T.a) R(s)

+- T.~

The resulting

Then,

den ... 11

~:.-

0 0 12.8112];
35.3219 39.42 12.8112);

t ... 0;0.05;30;
step(num,den,tl

title!'UnltStep Response of t-PD controlled System')


''"

[ R(sl- CM] - K, (If- 7;, s)Cfr)

Also, we have

------,--~.....
~~~""'""'"''"";"'~"""""'"""~'"""'""--r-----,

C(r) = 91 19'/T(r)

H~=

.!!]_
G (.r) = k. (
1

from which

!+- 7/s
-

_,

+- 1.1r) R(s}-

k1 (If-

f;+-TJ$)
t

Cfr)

iT7L--I---t-:=-r--H
~.[ _j_~-~f------1----j

obtain

i; + 1;$) 'l,fs)
l+t<,{t+is+-~s)~(s)
X, {

C(r)

RM =

1+

Thi5 last equation is the same as Equation (1).


equivalent.

~H~--+-~~1--1---f----i------1

!!::::!2:1

We shall first obtain the closed-loop transfer function C(s)/R(s) of


the I-PD controlled system.
In the absence of the disturbance D( s), the
minor loop has the following transfer function:

3'/. ~2

U'(s)

.S($-ri){STS)+J?.S'Z(I+P.71f2S)

where U(~;) is the input to the minor loop.


G(s) of the system is

C](s) =

-c--"1:::-~ [
].6?'JS

...;~1_)_):!"

'-""'.lo/<o

(l+tJ.?/'/lS)

"
_,_,

..

Notice that the response is slow but shows no overshoot.


pole5 are shown in the following MATLAB output.

The closed-loop

rootstdenl
ans ""

2.3514 + 4.8215i
2.3514- 4.8215i

-0.6486 + 0.1568i
0.6480 O.T568i

The open-loop transfer function

3'/. <r2.
S(H/)(Hs) + 3f!tl.
174

'

Thus, the two systems are

------------------------------------------------------------------------------

C{s')

Since the d0111inant closed-loop poles are located very close to the jW axis,
the re~;ponse speed b very 5101<1' compared with that of the closed-loop system
shown in Figure 10-40 (a).

www.shmirzamohammadi.blogfa.com

175

._..i.,.__, '-""'.lo/<o

-""'15:... ...r4-- .:.:, ) ..rlt_)ts: -~ &'-->"

'

~-

~---f,;r the PID controlled system shown in Figure 10-40 (a), the closed-

>lrransfer

fu~ction

C(:s)

s~(s+J)(s+~)

D{s)..:::

For the reference input, the closed-loop transfer function is

between the output and the disturbance input is

_@_ _

~z.(st-~.Jz.ro-ro.?~fzs)

+.if.

For the disturbance input,

s
5~

+ 6' sJ

JS. 1 z 11 s

t.

+ IZ .ttl 2

11. ft2 s

_,._

For the I-PD controlled system shown in Figure 10-40 (b), the closed-loop
transfer function between the output and the disturbance input can be obtained
as follows:

C{)
:Sz.(St-1) ( .H >')

P(J)

+ 3f.

S<Z ( 5 +t;J.JZ,>P t-o 71f'/2 ~ ~)

1 + C'/ls)q,.(s)H(s)

A/(.J)

--

~~

-''

That is, the characteristic equation for this system is ~he same regardless of
which input signal is chosen ~s input.

The resulting

num = 10 0 0 1 OJ:
den= It 6 35.3219 39.42 12.81121:
steplnum,den)
grid
title!' Response to Unit-Step Disturban~:e Input')

--...," -_:t..- l:,..


~~
....."--

------------------------------------------------------------------------------

i.,
II

o.oot]

. -

--

Cj(s)
I -qF(s)

Hence, the closed-loop transfer function is


(()

I~

1-

--

-----------------------------------------------------------------------------B-lD-11.
i

The closed-loop transfer function C(s)/R(s) for the reference input

c;,C, Q.J

/({1)

-- - 1--- ---

-~

'"

"

"

r:;,

/+- ~" 191 H~

C:(.r)

IS=: ..

'

<?(s)

/- 'f1 (I) + (j{f)

If Gf(s) is chosen nearly 1 but less than 1 1 then the closed-loop transfer
function C(s)/R(s) becomes nearly 1.
(We must maKe sure that all closed-loop
poles are in the left-half plane for stability.)

--

~
~

---

The open-loop transfer function ()f the system is

R(i) =

......

It (j1(s)(jz{s) Hf$)

Notice that the characteristic equations for the three closed-loop transfer
functions are the same;

B--l.D-10.

"

=-

Y~.(s)li4).

/+ rfi,{>} q,(s)f{{s) = 0

% Un!t-step response

(/,(s)

C(')

Sfl+6sJ+.JS::JZI7sl.+ 1f.y.2s+-/z.3/IZ

produces the response to the unit-step disturbance input.


response curve is shown below.

'-""'.lo/<-

i?,,(>)

1>($) For the noise input,

Since the two closed-loop tranSfer functions are identical, we get the same
unit-step response t':Ut'Ves for the two systems.
The folloving MATLAB program

._;~]_)_):!"

S/!L-

Cf,M 9z(s)
I+ 9tCs)'],(s)H(s)

!(s) -

I+

fi.z

,j'

(j,tj,_C$,1{,
lt-r:j~(jJ/{:1.

I+ 9l411-1z+-4,'1~~JH,

The closed-loop transfer function C(s)/O(s) for the disturbance input is obtained as follOIJS: Noting that the feedforward transfer function is G3{s)
and the feedback transfer function is (-Gt{s)Hl(s)- H2(s)JG2(s), and that
the closed-loop system is a positive-feedbacK system, ve have

www.shmirzamohammadi.blogfa.com

177

~-J:l ~.lo/<-

-""'15:... ...r4-- .:.:, ) ..ri..J:<_)ts: -~ &'-->"


0J

((r)

f*l

D(J

I- qJ [- o/Jil; -H,.] c;,

P{s) =

"

',

From this last block diagram, we obtain

For the system shown in Figure 10-44 (b), the closed-loop transfer
for the disturbance input is

D(.i)

.,

...!2,($) -

__

I>(r)-

- k Cj(r)fl{s)

J+ kC1(s)fl(.r)

~,-,

'~

The transfer function between the output C(s) and the disturbance
given by
Ci~(s)

I-

/)(s) =

IT Ci/s)[.;.Js)

-._;

G;is)

= ch($)

(k.,+K,rkt~s)st-k.:
s

JL .sJ

+ { JKt-Kk~ )s .. t- K

(1)

{K., -r K1)s +-Kf:,

The bior:k diagram of Figure 10-46 (b) can-be ltDdified as follows:

.PM

J-

(j1 {s)

KKo~
,J'(ts+l()-+ l(k.,

JK

J(l.s .. K)-ti(/(J

n.tJ

K,-t K,. T ~.-

for small values of / s J

Limitation:
This approach cannot be used if G2(s} has a zero or zeros in the
right half s plane because of the stability consideration.

B-10-14.

Ls t R.

,;.c-

If G2(s)G3(s)~ 1 in the neighborhood of s = 0, then steady-state error to the


disturbance can be eliminated.
Thus,
I

!+-..L-(__5___)

s(Ls+R.)

""'

'"'-

--------------------------------------------------------------------------

----'-J"S

..:r.s

ft .

TO minimi~ the effect of disturbances, the adjustable gain K should be chosen


as small as possible.
Thus, the answer to the question is "no".

Gr)

'

,,

1-+- 0,c,,qJH1 -tChtiJh'-z..

C{.r)

Jl.(s)~

.(-_K
,,.___ ) (k,-tK~-1-Ks)S+):.-

<;,
=

JS

The block diagram of Figure 10-46 (a)

From this diagram the transfer function .I2.c(s)/D(s) becomes

Js
_j__

J( Ls-t~)

.il.Jr)

simplified as follows:

--v(i) =

J(Lr-t~)tKI<I.

;+ _L

JS

JldJ

J(,+K,-~o

J;::: or. r

/(r 1"

la(s)

J(U-ti?)+I<KJ

= ---~~~---~s~(=L=s~+=R~)~------~-------

/Gil

JL~J+ (:T.(t-I<Kt~)s+ /((K.~tK;)s+-I<K,

.fle(s)

which is the same aS Equation (1).


46 (a) and (b) are equivalent

Hence, the block diagrams of Figures 10-

-----------------------------------------------------------------------------

,,

K,-tl<,-t<:,~-t-T

...;~I_)_J:!"'-""'~

www.shmirzamohammadi.blogfa.com

7q

._..i...>_J:l'-""'~

-""'15:... ...r4-- .:.:, ) ._rl...:..:<_)~ __y?... &'-->"


loop t<ansfer functions Gyr Gyd and Gyn are independent.is a two-degrees-of-freedom system.

B-10-15.
()

Yl>)

-=
R(s)

(c)

9.:, q,
t-qc, c?ca 9/

Y&l _
-;((f)

YM

-j)(s)
=

<'lt
It-

tj,, fie~ 9p

. ,',

Y(J)
- tJc1 '7n. <ip
-=
1/isJ
It- c;,, 9a. 91'

Get Yt

I"'"

:-,s

-~~:'

q,,

'---

q,. = c;,"'Cit- c;,

G,

[)(>)-

!+<f""t

Yl')

- c;a r;,

M'i

If'

--;

'

.'

Yc~.c?

~'>I;r'

'5!'

Hence

"'' = ifCJ

Hence, the system

tjca 9,.

Hence

c;.,, = lj" c-;,,

q,. = C1,,- q,

-~~

"'

If ~ is given, then Gyn is fixed but Gyr is not fixed because Gel is independent of Gvd
'Thus, two closed-loop transfer functions among three closed-loop
transfer functions Gyr Gyd, and Gyn are independent.
Hence, the system is a
two-degrees-of-freedom system.

If Gyd is given, then ?Yo is fixed.


Gyr is not fixed because Gel is independent of Gyd
Thus, the system is a two-degrees-of-freedom system.

(b)

B-10-16.

Yt1J

=
!<(s)

lt-(jcz.

YM

q,

p(s)

11- (jcz

A(s-)

GJ,

Y(r)

Y(s"} ;

C?c~ ~~

N(S)

1+-Cj,z~/'

"'

Hence

/"_
l..J'l} ::::::

.q(', 0;:

1r>O

0c3

YfsJ]- ~~9nAfs")

'-1 1 9 2 Afs)

c?cJ rf 1 Ga. ('7n

(1 + o/" <;1 r 9" ~" q,

-t

C7C'~) l<.(s)- c;c, Yf~}

q1

It tfc 3

ij,) YM =: Cfo 'f, f$, ( !$" tf$,,)11('1

Y(s)

(9cr T lJ~z) o/o (/, Cfz.

R(J)

1-r ~CI

--;

Cl,.~-c:,,

If Gyd is given, then Gyn is fixed but Gyr is not fixed because Gc1Gc2 is independent of Gj'd'
Thus, two closed-loop transfer functions among three closed...;~1_)_):!-"'---"'~

[R{r)-

Hence,

C:;'f.;

"'

= 'lcz RrsJ + 0c 1

Then we have

Eliminating A(s) from the aboVe two equations, we get

9/'

-Yl'l
-=

~.,'( =:

Define the input signal to box Gc3 as A(s).

tJJo ~,, l?e

Cft + 6rct

To find Y(s)/D(s), we may proceed as follows.

www.shmirzamohammadi.blogfa.com

]8;

'7c3 (j,

(1)

t:?z.

Since

._..i..->-.!:l'-""'~

-""'15:... ...r4-- .:.:, ) uf<t..:..:<_)ts: -~ &'-->"


A(s) = 'io [-

Yes!

CHAPTER 11

rr>i] - c;, [ DM r CJCJ A(s)}

= c;, 9, [

D{s! t <fo A{sJ1

Yro = c-;, ~-z [

J>M +

(-;c~

( /f
OS

~c~ l]1 + qC',

Gc..1

I+ C:,o

Cj,9z)

A{s) =-

J>{s)

~'~-

c;" [Yio

<:!lc, Cln.

Cf,7z

~.i:;~c
-ji,;:~

--~,

+N(<!]-

Y(>) =

""

c;, c;,

A(s)

==

r:fcJ

q, Clz

-t?o Y6J-

c;,,c;,

[I

~=['

lt
(2)

(b)

11

'][:,]

11

l'i

Observable canoniCal form:

[;.]=[:

A{s)

:1

~:][:}[~]~

ve have

Yls)

0o N(J)

1)[;:]

1=[

11-if('Jq,

OS

(It" r!in rj,

T Cj

t't

9t:J

------------------------------------------------------------------------------

c;, t:;z) Yfs) ~- (jC', ($", Gj, !fz NP)

B-11-2.

Hen~.

The transfer function representation of this system is


y~

'((.T}

N(J) ;

9J9;J

;_'-

t.7r.J Cj, $z
/+ 9e.J ;1 + C1c1 9o q, 0r.
- Cict

U(s)
(3)

Yfs)
V(s)

9r., ::::- Ci<!', 9('J tiy.f

= JJ-r 6S"""-t/IS-+I

(s:+/)(s-t-z)(:s+.;>)

The partial-fraction eXpansion of Y(s)/U(s) is

From Equations (1), (2), and (J), we get

--+ s+z.
-

3 1
s+

st-3

Then, a diagonal canonical form of the system is

.x,

Cf1r =-Cit"+ 9o. ClrJ 9r.t


If Gyd is given, Gyn is independent of Gyd because Gel + Gc2 is independent of
Gyd.
Gyr is independent of Gyd and Gyn because Gc2Gc3 is independent of Gyn
and Gyd
Hence, all three closed-loop transfer functions Gyr Gyd and Gyn
are independent.
Hence, the system is a three-degrees-of-freedom system.

-1

()

tJ

Xt

[1 = [ o

-z

:t~ -t 1

tJ

-3

~~

;tJ

J[

Jr1

:iJ

_1

-----------------------------------------------------------------------------....,~1_)_):!"

'-""'.lo/<o

182

www.shmirzamohammadi.blogfa.com

'i

II
I

~:] = [ :, -~J[: ] .[}

-{:

'l'"

0, ql

Pfs)- I+ 9t'J G;1 -tNext, we shall find Y(s)/N(s).


Since

~I

Yff}.::

':t

c;;,

Controllable canonical form:

~c'"'t"

_lli-

(a)

- q,, YM- Ci, t:M1

Simplifying, we have

,,

!!::!!=.!

ve have

!83

~:J:l '-""'.lo/<o

~15:...

1~[3

...r4-- .:.:,)

Hence,

3][~]

;,_)1..5: __y?... &"-->"

- r~ -~l

nd

r.~' =

-----------------------------------------------------------------------------~
We shall present tvo methods to obtain the controllable canonical
form of the given system equation.
Method l;

']

:;'+ZS-+S [I

Js + I

I
I

.-/ ,~:n~J

2,

t!~.::::s,

["'- ,:J[:]
h,-= 3,

0,

[~]=['I -MsJ[' ~][ 7I][~] ['-1 -P,>l[l]"

[1H:,
1=[,

~.3

x,

~9-

(),JS"

-3

-1

Xz.

0.3~

"'3

};.__

=[ _: -~][::] +[~]"

ba =I

1=[1

Then, referring to Equations (11-3) and (11-4), the controllable canonical


form of the state and output equations are obtained dS

..1

......

~.:;cr;

Szt-4/StAl.

bo =

t7 .IS

X= :;:_,AT x-------

or

Hence

a,:::::

>, ''"]
-o.

+ T_,Bu

b1 s'-..,. b,s-rb:z.

:;<l~<?s+-S

'] [

= ['

[0./

The state equation and output equation become

Referring to Equation (3-32), we have

C7() = C (SI-A)-' B

;J=r.: ~ J

T=

-~}[:JT[;Ju

!][_: ~][::]=[1 3][:.]

-----------------------------------------------------------------------------~

Referring to Equation (3-32}, we have

fM =f( :r -:! r~

3)[::]

-:

SrZ

.I

s:J[;]

HI

=[1 1 o]

Transform the original state vector x to a nev state vector x by


the transformation matrix T, or
~
-

SH
I

J[J~

e:

{lttXs+J.

X=

T x.'

[I

o] '-

"

[(S'<)(stJ)
S+.)

where

T=MW =[8

...;~I_)_J:!"'-""'~

-.......

184

a,

- ' :]

1\B]

su

SH

...- (S-ti)(S+2)(S+3)

www.shmirzamohammadi.blogfa.com

(S+t){.J+J)

185

sJ1"s-"-t-l/s-t-6

._..i...__,.:_r~

-""'IS:... ..r4-- .:.:, ) ~.)1..5: -~ &"..Y'

~Although this is a third-order system, there is a cancellation of (s + 3) in


'the numerator and denominator.
Hence, the reduced transfer function becames

- ____ .. __..

p-1
transfer function expression can be easily obtained from the stateexpression if MA.'lt.AB conrnand

?'"

The

[num,den] = ss2tf(A,B,C,O)

see the following

MA'lt.AB

-2-0;0

1.0000

- --

p-'A P

= ~

-I

-;

-I

-I

-;

0 tJ

I 0

I I -j -I J

Ot?

-1

3.0000

-I -)

IC/110

I I

I -1 J
I

I
-J

I -/ -1

I -I

-j j

/PPO]

den 11

o o

num ..

-I

tJ I

.1];

D- [OJ;
Jnvm,den/ .. ss2tf(A,U,C,OJ

I -1

-:o;.::.

~haw

output.

A-., 1-1-0 1;1


8 .. 10;0;1];
C = [1 1 OJ;

=- ()

-!

[0o

tJ

t?

~ 0

0
o-j

This output corresponds to the transfer function


5+3

S 3+ 6

S"L

T-IIS -t-6

B-11-6.

Notice that the MATLABoutput does not show the reduced transfer function when
cancellation occurs.

ei'=

------------------------------------------------------------------------------~-

The

~.- [Cs-~n

=..:-![: ,~J'}

The eigenvalues are

A,=J,

Az.=-1"'

"'\J

"'".i,

/\j<.:

-j

--

following transformation matrix P will give p-1AP"' diaq()..l,)..2,), 3.-\4)'


I

Method 1:

'
l' =i >-t
A'
I

" 'J

Aa.

).J

;..,

.)._,

. }.. ... ...


/\~ ;.., ;.,_
;..,

This can be seen as follows.

_,

-I

-j

-I -I

-;

Since the inverse of matrix P is

Method 2:

Referring to Equation (11-46), we have

I
187

166
...;~I.J...l:!'"''-"'~

www.shmirzamohammadi.blogfa.com

._..i...>.J:l'-"'~

~15:...

...r4-- .:.:, ) ..ru..f_)ts: __y?... &'-->"


B-11-7.

A-t

P"t

e-=f.e.-!.. =! [

are-

'''
~

a ]
e).&t

The given

A,==.Z,

r'
Since

e-lt

-I

e"

-tez.t

e"

A<

e- =

e :1r = [I 1]['-t '][' 1]


-.2

)IJ

).L .::: 2'

11le

eigenvalues

= 2

....

Since the eigenvalues are )., 1 "' -1 and )I 2 = -2, we obtain

-I

is in the Jordan canonical form.

~trix

- -

-I

~-t<'e
eu"]
e"

t>.

we have

2e-T-

==

e-lt

e--e-><

[ -.:ze-1" -r 2 e-z:t

X(t-)

]
or

-e-tr2e-te

:f Itt)

Method 3:

A,

e >.,t

X.(t)

A,

eJ.,.t

e~t

e ,,

-t ' ~t

e"

;i,tt)

.!!::!!::!
I

-I

e-'

-2

'

which can be rewritten as

J
J

-e .... , -r
Thu
1'!-t

e-

- =(A+2I)e
- ....
-z

=0

e-

(A + 2

=['

-u-j

1
-1

A=[~

e-~t-

-e

]e-"~-['

ze--e-n:
= [ -2e--t-t2e-u

-lt

trEez.-t-11

Xt(~)

t et.-c

X-r..fP)

e''

:fJ(P)

:,]

..

IH-Ai =Is , -I~ =sl+2S+3 =(s+lt-jfZ)(s-+r-J~)


-

e -t -t'

l=

=0

or

Referring to Equation (11-47), we have

e:i' X{P)

- -

I= Ae-t.t:.

I-e
.....

-z.t-

e-<' =..,r-'[(>I-A)-}

--

A
....,

o]e-"-[-z l]e-''
0

J:

-ll

-J

e--e-'' ]
-e-T -r 2

e-z.t-

S(S-t-2.) t.3

= .:-'{[:

[ SH
-3

s:',
I] Jt

rJ

.s

st-1+1

= ;c-'

(Stf) .. +.fi
[

-3
(s+t)z.+li'

(sn/,.

.fi']

s+f-L_

(st!)z +.fil

-----------------------~----------------------------------------------------...;~I_)_J:!""-"'~

188

www.shmirzamohammadi.blogfa.com

189

._..i...>__,~~

-""'15:... ...r4-- .:.:,)


H/
_

-l

+,vz

(stt)'-+li'

_1

J
[

,r,:

l.s+J)'-t.JI;.

VzI

.jj"

fi

.rz.

~~"
f i' e-".- vz.

5-t

e- te&l: .J"i:-t -

e-At -X(P'/

X(~)=

....

I
I
I

__,~'-

.,__.

Define

[0

'",,. ~:J[;J =r;~J= r~1

fJ,

,d =

[ ~ :l ~
-II

-t

Define also the

transfo~tion

J:!

- --

can be written as

X-t-

= [

~]

G= [ 1 0

!',,]['']

!>J

-- -

...;~1_)_):!"'--"'~

-6 I 0][2~

o]

--

[- I

-11

8t.<

p,,

"J

fn

0 -6]

0
1

-11

-~

[ -/>T 6
-22.T2

l,

In

f,,J =
~~~
ftJ

[2
I

z.

-/If~~.+-

-IZ

~d

!uJ [H'

-lp,. t ;,...
/)z.

'''"

fo

- ....

!',.

lzr.

fn
fu
lh

=-6 '

-If,,
-1/{IJ+,AJ :::;: pll

-II

-6

-lfo

PH

.Pu =- 20,

!,.

-JI-IIf,. -1/u

t,

-IZ -11/'J .. -!In

?Jz

--

-6/'IJ + f.u = -/2-// f/ll- -d' l't~

-lift.
www.shmirzamohammadi.blogfa.com

+f'~z

=-/Z

=/i:.
==th

"'

-12-llth _,,_

-6j7,z -r ,Pn

'()0

fu

0 -6]

t,,

r-'APi+ p-'eu

=CP

f.][O1
;~

O'

from which we obtain

.....

t'

~= :
'J

~2

hi

we have

f,l'n

-i .... - ........ -

'"

!',

AP = p

l'u /~.. J'JJ i 3


Then with this transformation the state equation and output equation:
:(=A

/JJ

Since

matrix as P such that x = Pz.

'"
p,

/',,

r=H

-rze--r~./2-t

_,

I'

r..

!=J:.4=Pz,
I] ['"

---------------------------------------------------!!:!!=:2

II
\

e-r..u,:... ,[i--t

. .

::; [ -e-'tW'l.-fi"t-

I"I;

Hence

I
I

'

Thu

e-A~[l]
-J

e-t ec..-1<-t

Iii

-- [ 0 o0 -11-t-6] , -p-'a..... = [I]Po

r-'A r =

.....

He~

Ill

In this problem it is specified that

5
(HJ)'-t-li"

rs+0'2-+ rz-

_ ""!o._[e~~Ur..fit ~--ke-T~JZt"
_..Le-T .u:-

St-1

($"tl)l+Ji"'

-(2

(.HI)"'"+.fZ~

:1...:..:<_)..5: __y?... &'-->"

._..i..._J:l"-"'~

~15:...

...r4-- .:.:, ) ..rl.::f}S: -~ &'-->"


__ It can be shown that

- I //ll -r f'1:~ =::- 3! - I I /n- .f /b

' ;;-

-6 fJ.J = -12 - II j11

- /

/'J.J

Also

/tf 1

f'z.,

>--F

/'J.J

=Jb

_,

The output equation

~)i;
--~:;;:-

:.i'
.-

= s'+

t(,

16][:;]

-I

-I

s,+ t f ...+-/ls t-

"'""

...;~I_)_J:!"'-""'~

~-

= [2

_,

=[:]
c

;.r]

q~

-3

-s-

-12

36

FJ

~nto

? -r

--

[i,] [~

:: =:

;tr1 B"'
......

~
0

-6][1'] + [']:

:':

::

=~

-~ ~'!] =[;

~-' =Hr

N
36

M-'B

-u

-;:(1 == -ex i =;r'A M


- ... -1

O<

Define

M= [ ~

-6

= CN..;

s~+4a.5+P.J

4~=11~

6J

-20

=11

....

we find

a1 =

-;;

()

/IX+BL<.

can be transformed

the given system_

An alternative approach to the solution of this proSince the characteristic equation for the system is

"'
II

-- o][: "]
-- =P ::1[:;l
X

Jsr-~1=

0 -6]

-6

becooes

Alternative approach:
blem is given below.

-,j [

-I<

36

We thus determdned the necessary transformation matrix P.

-_-;~---

::]

-/z

() -A~
I - .::r,

I
()

Hence, by use of the following transformation:

-Zp

"iJ=Cf'Y=[Z

eM= [t

-6

!=U

M =

-6

the last six equations for PI3 P23 and P33 we find
/1)

--

~>r'A

- 'f'n. =?n

.."'..-l

-6
->P

16
ry

-12

36

=[

-6

16{::]

------------------------------------------------------------------------------A MATLAB program to obtain a state-space representation is given


B-11-10.
'-'" uext page,

I.S

-;..r

192

www.shmirzamohammadi.blogfa.com

193

._..i...>_J:l.'-""'~

-""'IS:... ...r-4-- .:.:, )

..r.)1..5: -~ &"..Y'
The transfer function representation of the system is

nurn"' )0 10.4 47 1601;


den ~ 11 14 56 1601;
JA.B,C,DJ ~ tr2ss!nu,.,,denJ

Yr:s->

U~)

14
,
0

-56 -160
0
0
,
0

I
s'+s'-+S

B-11 12.
A = 12 1 0;0 2 0;0 1 3);
B .. 10 1;1 0;0 11;
c .. 11 o OJ:
0 - IO OJ;
!NUM,den] - n2tf!A,B,C.O,l)

,
0
0

NUM =

.~,

10.4000 47.0000 160.0000

den

,.,

=
-7

i:1

0 ; (1

;>(l

-12

NUM =

The state-space representation is

[ rN -s6 -;6o][''] [']

16

[NUM,denJ .. ss2tf!A,B,C,0,21

""

"z~'] =

den

16

-12

=
-7

t<

The transfer function representation of the system consists of two equations:

~=[to.< <7 16o][:;] + 0

-----------------------------------------------------------------------------B-11-ll.

A= 10

0;-1

B = 10;1;0!;
c = 10 0 1];
D = 101;

-1

0;1

OJ;

[nurn,den) = ss2tHA.)3.C,Di

num

Aj

U":.(s) =:

[8
0

0.0000

'"'

1.0000

den =
1.0000

...;~I.J...l:!"'-"'~

1.0000

194

1.0000

st_ ss + 6
sJ -?.s'-+(tf S -IZ

B-11-13.
The controllabilitY and observability of the system can be determined by examining the rank conditions of

...
...

S-3

s 1 -7..rt..,...us-tz.

Y(s")

!II

Vd:s)-

respectively.

www.shmirzamohammadi.blogfa.com

['

--A"'-c -- c']
-- - A$

A'8]

(!1')'

195

._..i...>.J:l'-"'~

~15:...

..r-'4-- .:.:, ) ...j.<t..:..:<_)ts: __y?... &'-->"


B-ll-15.

!1 -2 -2;0
a- J2:0:1J:
C- [1 I OJ;

-1

A~

D ~[OJ;
rank([B A'B

1;1

-1J;

A"' [0 1 0;0 0
B .. (0;0;1[;---
c- 120 9 1[;

1;-6

-11

-61;

0 .. [0);

A "2'6])

ranld[B

A'B

A"2'BJI

ans =
ans

rankl[C'

A"C'

A'"2'C'IJ

ans =

Since the ranJr; of (B


AB
A2B] is 3 and the rank of [C'
A'C'
,\'2c) is
also 3, the system rs cOiiiPte'teiy state controllable and-observi'ble.- -

-----------------------------------------------------------------------------B--ll-14.

,.,
_o;;,"

___, __
--~--

A"2'C'JJ

ans

A''C'

rank(IC'

A [2
8 .. [0
C = !1
D = 10

0 0;0 2 0;0 3
1;1 0;0 1);
0 0;0 1 OJ;
0;0

OJ;"

rankUB

A'B

A"2'BJJ

Since the rank of (B


AB
A2a] is 3 and that of [c
A'C'
A2c) is also
3, the system is cc:Uipletily 'Sti'te controllable and 'Comp1ete'1y obsei:Vable.

------

------------------- B-11-16.

11;

~ ~]

[:
-6 -11 -6

.!!

'

~[:] ' -C'=[c

c~.

c,j

ens""

'

The observability matrix is

3
ranki[C'

A"C'

c,

A'"2'C'IJ

['

ans =

2
rank(!CB

C'Ae

~:<~s:J= c,
[ c,

--

A"'C_..

From the rank conditions obtained above, the system is completely state controllable and completely observable.
It is also completely output controllable.
Note that the condition of the output controllability is that the rank of

[~t

c, -II c.t

-/I Ct. T 6P C"_,

C,- ~CJ

c,- 6

c~

+ zs-(;l

There ~re infinitely many sets of c1, c2, and c3 that will make the system unobservable.
Examples of such a set of cl, c2, and c3 are

C = [ I

-,;(c,- 0 C1 )

C:'A"2'BJJ

ans =

-$Cl

--

c=

-cc L
--e.tc.

.:~',!)

C A~

be m (the dimension of the output vector, which is 2 in the present system).

------------------------------------------------------------------------------

[1

o}

;J

[6

!]

tl

With any of ti1ese matrices . the rank of the observability matrix beCQmeS less
than 3 and the system beccmes unobservable.

------------------------------------------------------------------------------._;~I_)_J:!"'-"'~

196

www.shmirzamohammadi.blogfa.com

197

._..i..->_J:l'-"'~

-""'15:... ...r4-- .:.:, ) ._r~_)ts: -~ &'-->"

~ ~[;

~]~ -

c-

ts-]=U I I;]

I
I

j-

13

Hence, the system is not

= 0,

c:cmple~ly

I: ;J =

-'-~

B-U-18.

_i{

_,,

i +

C" 71'

Z'(~)

9.

"
In Problem A-11-16 it was proved that this system is ccrnpletely state controllable if there is no cancellation in

Us)

~J[:J ~

('1-A)c';

'

consider the system

-i =A,..-- -

~'-'-

I! the output vector is given by

[~J = [;

1];

zcn

---------------------

~-~

observable.

2 0;0
2 3];
A'

-:-~

(b)

O;O

1 ;1
'A'"C'

ans =

is two, because

[1

rankUC'

....'

--

11:-1

ans =

A- [2

[~ Ac'"

'

= [1

rank([C'

I I]

[I

0;0 2 0;0 3
1 ];
A .. C' A''2'C'I)

A"' 12

p.(<)

IS!_-6_'1
;. (<)

then the rank of

!'']=[:

A~c

['

--

13

13
3

~}

is three, because the detenninant of a 3 x 3 matrix consisting of the first,


fourth, and sixth column is

{3

Henc:e, the dual system

--

is completely observable if there is no cancellation in


fd.J)

;t-1 =

--

x=AX

~
~=ex

., c.

-2.

(sr-~/- = 1sr-~1

f~(')

!,($)
'
since the rank of [C*

A MATLAB solution

to

A
'
A*C*
A2c]
is J, the system is completely observable.
thiS Problem Ts given on next page.

or if there is no cancellation in

C{H-A) =

- -

1
fSf:-~1

[ f,l<l f,{>) - P.!!]

199
...;~I_)_J:!"'-""'~

J9P,

www.shmirzamohammadi.blogfa.com

~-.,'-""'~

-""'15:... ...r4-- .:.:, ) ..rlt:<_)ts: -~ &'-->"

CHAPTER 12

a direct approach to the solution to this problem can be obtained by


the steps shown in Problem A-11-16.

Referring to Equation (3-32), we have


HI

- ... - -

!j(f); C(si-11)"'!> =[I I

-'
0

o] -:

0
STZ

-(HI )(s+2)(StJ)

[ I

(stt)(stJ)

()

s+ 2

5-t-J

s+3

s+3]

(f+2)(ST J)

o)

= (s-tl)(s+2)(s-t~) =

t?

-1[ p

][]

(s-tt){Hi)

s+.J
s 1 -t-,$L+(/s-t6

(1)

Comparing this transfer function with


6,5J-t- b1S 1

br.S+J,J

.sl +t~rs ... +tf&S"+&/:~

we obtain
A;z =//I

Cit= { '

/Jo:::;-o,

-1

{a)
~

b,

controllable canonical form:


h<w

nl.
XJ

!1 =

-i

[ J

b .. =I

0
I

-II

It-,~= 3

Referring to Equations (11-3) and (11-4),


~,

X.~:::()

II~ : 6

I
OJ
-(

~.

x,

tlu
fo
I

(2)

o][::]

'"

!
...;~I_)_J:!"'-""'~

200

www.shmirzamohammadi.blogfa.com

201

~-.,~~

-""'15:... ...r4-- .:.:, ) rt..:..:<_)ts: -~


&'-->":
we obta1n

because of the cancellation of the tenns (s

3) in the transfer

the system defined by Equations (2) and (3) is state controllable,

q,== I

not observable.Observable canonical form:

[~']
~~

[0 o0 -][''] + [']
I

~~
j

[ 0

-11

Xt

x,

~t:l

1iE'

rl;,] =lr,;- ;0 ~~~-6]r,]l::

/4)

{..(

~=[

(5)

not state controllable.

b.l =

have the state-space equations in

[8]
+ :

1][::]

------------------------------------------------------------------------------

It is important to note that When cancellation of the numerator and denominator of the transfer function occurs [see Equation (1) ], the system becomes
controllable but not observable or observable but not controllable depending on

B-12-3.
Referring to Equation (12-lB), the state-feedback: gain matrix! can
be given by

how one writes the state and output equations.

--

q{s) = C (5L-A)-'B ~

...

......

[I

tJ
[

- -- -- =- + - + -

ST I

-/

-1

S--t-2.

{)

-1 [ I

s.+.3 ]

where

f( A)
The values of ()( 1,
equation:

C(

A .J

&< r

2, and 0{

[I I

(St-t)( s-tl ){H~)

I)

5 +3

('>+!' )(n J)

'

S+2
I

(s-r/)(S+z){st-:1) ::::

'iJ(I:;::.f'fJ

s 3 +{$~+!/s-t-6

(.s..- u

f(~) =

b(ISJ+b!SL-t-J.,zS +-6..1
3

of.!

)"-)( 5T 2 -j'l-)( NICJ)

T /9-S 1 T .ft>S -t- 200

s'-rD{,ss.-t-

0(2.

= tt? )

Theo

Comparing this transfer function with

A +

o< ...

s+ ot.z

Thus,

2s .. +rs-t i"

ZS ... +-8s-t- 8

ol 'L

::=

][']
I

Ut~Xn-2). I

A a.

--

,_.
3 are determined fram the desired characteristic

Is!-- (6.- ~~/ =

(,., )(" !
I

NB] _, <f(~)

A8

K=[ooi][B

'

b.:=. 1J ~

b, ==2'

Because of the cancellation of the terms (s + 3) in the transfer function given


by Equation (1), the system defined by Equations {4) and (5) is observable, but

I.

b(l == 0 ~

Referring to Equations (11-5) and {11-6), we

= 6

"'J

Referring to Equations (U-S) and (11-6),


the following observable canonical form:

XJ

a,.=./t,

o
0

0I

"J'+
I

[ -1-S-i.

+q,S~+4zs+q~

19-

vo oI

0(>

=.:?tJO

t + /o ('~
OJ'

-1-S -6

p I o
OJI +2~P[''
0]

-t-.r-6

,03
...;~I_)_J:!"'-""'~

:'02

www.shmirzamohammadi.blogfa.com

~-.,'-""'~

o()/

-""~

=r~~

-]

:f~J

---1-

/]

If'~

A8

?- o>r
% Pole plucemant --

sr

-7

[1J.

'" '"'" " "") """"r

% Enter matrices A and B

I I]

: : _I

[ I

% Determination of state feedback gai" matriK K by


% use of Ackermann's formula

A= 10

M"" 18 A'B

60

have the desired state-feedback gain matrix

= [o

'

1] [ ;

Tf?

-If

sr

-11

. --.~

!Sf

6C

-7

-3

[''""

D./r,<Sf.b

[m
-0

-7

= [

1]

A'2'BJ;

J7]

""12()

-t>, 11/ZO

- " " /2()

l?.tP/2t'J

% Since the nmk of M is 3, the system is completely


% state controllable.
% possible

Hence, arbitrary pole placement is

% Obtain the desired characteristic polynomial by


% defining the following matrix J and entering statement

% poly!Jl . . . . .
J"" [-2+4"1

0
0

-24i 0
0 . -10];

puly(_JJ

sr

_f;-9
_,

[ /7(1-7.16')
l$1""
ZP-?KJ/

~:~ns

/:J

14

S'-S"/31

60 200

% Compute tha characteristic polynomial


%Phi ... polyvalm(po\y(JJ,AJ ***

17P 'ZUf
F,Lf,

'1-J" 1'1

.5' .,r;s I

Zf

Phi = polyvalm(poly(JJ,A);

?IJI]

..1".~;,.

% State feedbnck gain matrix K can be given by

K = {0

z. St-,.11

z. ""' 17]

1]"hnviM)]*Phi

K
28.7831

:;; [ z/". 78 J I

-61;

ans =

''"'"]

o. us-~

t>. I' J't"lf

-5

ranltiMJ

as follows:

I
I

1;1

% Check the rank of matrix M

.-.;~

k; [o

% Deline the controllability matrix M

-1/

-11

1 0;0

a "' to:t;tJ:

5.5181

2.4819

-----------------------------------------------------------------------------B-12-5.

B-12-4.
A MATLAB p<ogram to obtain the state-feedback gain matrix K by use
of Ackermann's formula is given on next page.
-

Substituting

--

U=-k;(=-[fr,

kt:J

into the state equation, we obtain

..s~u ..l:!"''--"'~

204

www.shmirzamohammadi.blogfa.com

205

._..i...>.J:l'--"'~

-""'15:... ._r4-- .:.:, ) 11...:..:<_)1..5: -~ -&'Y

'

[~}[:1 ~][x}[;]~
= [-/:~,

t:J

The values of
equation:

ha~

-/+K,~.I

= (S+/+ ~I)( S-2) = 0

x,] [ co
[:i,
i ..

-6

5-2

/ Io] [x'
x, j +
-6

XJ

["j
D

.I

-11

-6

0/(J

1 + Fl-

-1.

-11 -/.

;:;;: -'II

Since

AB

/0

s -t

Q-'3

()

]z [
T s-6

"1

-6 -II

2]

..

A'8)

1-

-=
K

[o

www.shmirzamohammadi.blogfa.com

-to

z<t;

~-rT~

I) [b'

/0
0

-tP

-Y.B

10

-ltJ

~ro

t8

207

']i

I
rI

=/0

p
1
-11 -6

we have

10

206

~J

H,

Referring to Equation (12-18), the state-feedback gain matrix K can be given by


.
...;~I_)_J:!"'-""'~

[IN .... -~]


II -It-
ra- - -- =[: - I"]

t(

~=l-~ ~ ~]' ~=[:]


_,

/60

+d's~ -t-1/S

II~ + 6 ~ = IO"

c1~ =

10

"'"'

:;: S ,T/1! S:..T s-1 S"

fl!O

-~

= (s+zrJ zfi)(s+z-Jz.,f3)(sn)

J' [
+f-u -- ~]

~) =

I'

I.

Hence,

10

-11

I
I''

.....

2 and CX 3 are determined from the desired characteristic

ot, == If'- I
'-" I

Using the state variables as defined in the problem statement, the state equation beccmes

__

Th~

tO

o(

~-1

(S-ti)(S"+l.)(Hi)

+ 6

= sJ + oo:, s& -r

Since

l si~(A-BK)i

-----------------------------------------------------------------------------YM
v;) =-

J)(

- --

_,

Because of the presence of one eigenvalue {s = 2) in the right-half plane, the


systEm is unstable whatever values k1 and k2 may assume.

.@:::!l:_.

--

- -

.....

~~-]~:]

=I s+;+lr,

_,

AB .........
AB] <f(A)
,,..

o 1][8

4'{A) ... AJ + "< 1 A .t+ ()(1 A+ ot3 ..I

The characteristic equation becomes

J.s.f-:1/

K~[

where

=[ ~~ ~][:]-[;]r,

,.

.....

-:]
-I>
!6

39

._..i...>_J:l'-""'~

-""'15:... ...r4-- .:.:, ) ..r~...:..:<vts: -~ &--->"

= [o

;J [I./
,_,

"

~ [ 0

"

0./

0./

I ]

Phi = polyvalm{poly!Jt.At;

-9-f

,{,{

-3

o/o State leedbltck gain rnauix K can be given by '

IC

-IS

J'fL

K = )0

1]'\inviMII'Phl

9.s

I""]

15.4000

. so,8

o.S]

We shall present three ~~~ethod.s for the design of the full-order state
We shall first transform the system equations into the observable

form.

where

% . Pole placement .....

% Determinat1Un of state feedback gain matlix K by


%use of Ackermann':; formula

% Enter matrices A and B

0;0

1;-6

-11

-6);

A'B

- = [ -c
w
-

% ' Deline the conttollabilitv matrix M '

M = JB

A"2'!ll;

ens =

-:]

-/\=S 2+JS+/

S+l

:= s~-+-q 1 s+4z...

3
% Since the rank of M is 3, the system is completely
% state controllable. Hence, arbitrary pole placement is

Thu

Cf,:::: 3}

%possible
% Obtain the desireU characteristic polynomial by

% defining the following matrix J anU enteriflg statement


% poly!JJ

J"' [2+2'1sqrtl31!'1

0
-2-2"1sqrt!JU'l

~ =[~

""'

0
0
-10[;

polyiJJ

_1

.....

14.0000

4-:. -;:::/

;]

Hence

ens "'

loll

=[~

=['' ']

isJ.-!1 =\S+/
-I

ranktMI

._;~I_)_J:!"'-""'~

!'']

where a1 is a coefficient in the characteristic equation of the original state


equation:

% ' Check tile rank of matrix M

1.0000

--

~(wN'i'

e = to;o;IOJ;

2. by

Define a transformation matrix


Q

0.8000

obserVer.

A MATLAB solution of Problem B-12-6 is given below.

A= [0

4.5000

-----------------------------------------------------------------------------~

-----------------------------------------------------------------------------Jt:!:1.

K=

[m.~
fi'?. 6

1\S'

( ;S,.

87. b
:13. t

IS'9-

o./] [IS'~ s- "-]

o.o

% ' Compute thPJ characteristic polynomial


%Pili = polyvalm(poly\JI,AI

= WN
=[
--

3
I

/1[ 0] =[ l I]

I
-1

56.0000 160.0000

209
208

www.shmirzamohammadi.blogfa.com

._..i..._J:l __;.~

-""'15:... ...r4-- .:.:, ) ._r\..:..:<).5: -~ &'-->"

~ =U -~l
LDetine a new state vector
~-----

[sf_-d+.!:1 =

...f by

- -X={;

the state and output equations become

i =..............
>1-'A (;! J.....,
~

Q-'A Q

...,

... -

-c~

j+/t:~,

--[ I2

'J[ '] [ -I]

'][-/
I

-z

o][oI

-2

= [t

-2.

l]=[o

-3

where

t:J{

= -Q

[.. - ]

'
~ethod

2:

:::: [ I

CX1.

2S

Define

'][2S-/J [7]

-z

IP -3

- [~"]
'h

2:::10

/1-

2/r~, 1-

..ftoz = 2~

/t,-2 =lo

matrix:~ by

use of Acker-

'""

h1l[:~1T1
= S'

{;s-t r){ Sf- S)

"1- /0 5 t- 2~

Thos

re

-1
' ] ' -t-10 [-/
']
[ I -2
I -2

+ ,-[/
0

[177 . /07][-1I Io]-' []I = [177

OJ =[/7 7]
I

I()

7J[ I ][] =lor7]

10

The equation for the full-order state observer is given by Equation (12-51):

Then, the characteristic equation of the observer is

...;~1_)_):!"'--'"'~

I_OI +ZS

=d'+!od+2>!_
=

10

K,-

Hence

Hence,

rf{$) ,.. (S-f'!)( S -p~) =

'/'(<!,)

ce

where (s) is the desired characteristic polynomial, or

'

2)s +-I r zf,., + .t~,z.

Method 3:
Next, we shall obtain the observer gain
mann's formula given by Equation (12-55):

S 1+N5 -t2S"

=J"+o<IS+ o<z =0

s~.+ (I+ k~, +

Thus,

K,

(s-)i,){S-)'1z) = (S+S){s+s)

r:.t, = ;o

::=

~e.=?"

o(,-ar

1 and 0( 2 are determined from the desired characteristic equation:

$+2

~=~]

Ref"erring to Equation (12-50), the state observer gain matrix ~e can be given by

Ke

+.tf'~

-I

oe

t]

The new state and output equations are in the observable canonical form.

"'

-I

Homce

= CQ f

s+l+_.i._o;:,_

""

--

where B = 0 in this problem.

www.shmirzamohammadi.blogfa.com

- -

;?_=I
A-!c.c)
X:+ 8
......
.... ..........
Hence

211

t- Ke fj

._..i...>_J:l'--'"'~

-""'15:... ...r4-- .:.:, ) ._ri...:..:<_)).S __y?... &'-->"


i

given below.

[!:]= /[ ~~ -~]- r,][t oJ1[;} [:.]if

% Design of luff-order stele observer .....

% This program determines observer gain matrix Ke


% based on Ackermann's formula

[tl =[ ~: _:J[;H: l~

% Enter matrices A and C


A"' {0 1
= ]1 0

N "' \C'

------------------------------------------------------------------------------~

-I
:=

-~Ht+~::j -

c=

1;-5

-6

0];

% Enter tha observabj~ity ml!_trix N and check its rank

This is the equation for the full-order state observer.

B-12-9.

0;0 0
0];

A'"C'

A'" 2'C']

rankiN!
ans "'

[1

o]

% Since the rank of the observabi\ity matrix Is 3, design


% of observer is possible

The characteristic equation for the minimum-order observer is

% Enter the desired characteristic polynomial by defining


% the following matrix J and entering stetement poly(JJ

lsi-Au.+keAo~~.~o! = S+2-r-':e:::: s+s-

J = l-10

"'""

0;0

-10 0;0 0

-15);

JJ "' poly(JI

S-t-2+'ko: = S+s-

JJ "'

O<

% Enter charet:teristic polynomial Phi

The equation for the minimum-order observer is

= ( A~o~o- ~eA .. ~.)

Phi "' polyvalmlpoly{J),A);

f+ [( fl~- ~e A ... io) ~e + Ah- .f~ A...,.]~

% The observer gain metrix Ke is obtained from

Ke"' Phl"(invlN'll'[0;0;11

+(B,-{,8.)~<
where u = 0 for this system.

Ke"'

Thus

= (-z --Jxl)

1500

400

35

It~ = 3

35

394

[1-z -Jxt)X3

+ 1-3

x {-t)] ~

1285

-5'~-11]

O<

Referring to Equation {12-51) the full-order state observer is given by

'f +St =-"!I 'if

This equation defines the dynamics of the minimum-order observer.

-----------------------------------------------------------------------------B-12-10.

of MATI..M>.

A full-order state observer for the given system is designed by use


The MATI.AB program used for the design of the state observer is

...;~I_)_J:!""-"'~

www.shmirzamohammadi.blogfa.com

ii,l

............

[-J!>

~. = -Jtj'-

;.J

~][i.]-~-l~1u +[:~J ~

'=~- (A - Kfl C ) ~ -t- B u + k"e

-tzt~

I
0

-6

....

t~

213

'J

tf~

~-.,"-""'~

-""'15:... ...r4-- .:.:, ) ._r\..:..:<).5: -~ &'-->"


We shall pr-esent two methods for obtaining the f!-lll-order state obmatrix ~e
A ~~TLAB solution is also given,
Method 1:
Referring to Equation 02-50), the state observer gain matrix
can t:e given by

_ftt

~e

--

N.::-[C~

A""C.-

...

.[

'!! = ~I

1,

2 and

!;>(

D(

3 are determined from the desired characteristic

( ,_ ;i;J ( 5 -,1.1. )(>-,I.!,)

= ( H:>-jN'i)(S +5'+)f'fi ){sT!o)


= (sz+ ;o s- +too){ s t-lo)

tt I

s-c~~T'

r>f

by

.mere

The values of
equation.

"' - 'h.
= Of._at, -

Matrix 0 is given

']

'

0I

A .. .zc~]::::

......

........

01 =T

"'"'

Hence

0
I()

II(,

"I

-I

:::: Sl

-:=-

S-'

+ .:z.or'"-+ :2t>os +;poCJ


+-

o!tS"-t- IX:o..

0(4!.

lfe=~cva-.::1._:::::

The values of a1 and az are determined from the characteristic equation of the
original system.

-;.z~p

.:::

t-c;o(

.:Y.1 '=/Ptft:J

I J[1-.o
T- /. < ~fL J
zo, +o.uro

l:ft

=- 2&'P

[.-,-a,] ['

/<;!:-,11=/ :

CV1 =2o,

......

q,
I
0']
0

-3.11<..r-

-J./'fs-

2~ -

;o, z.rtfrf

.J. 1 ,.S

[I'' "]
19-? 317

~~.

38"/

-I

:r+ ;J. /f'.-,r

-P:JJ'$",{

Method 2:

+ J. I~S .s ~- (), :J'f.fif s -/. 2$L;E

s + q,sz-t3

!f.e =

s +4 3

(jz.

-Define the state observer gain matrix as

['".,]
"t'r.

[,,,Jr

The desired characteristic equation t:eoomes

~~
4 1 .::3./f<-r;

a~=-.::>.J?.s-.5',

a3 =

- - .......

II-A+K.c) =

-/.2!<-9

Th"'

-dJfs-6

w=
-

.3-/Jl.S'"

"'"'"'o'e

[_,, 5J'.J"6
Q. = (WN"~ F' = 3/J-' r

- --

...;~1_)_):!"

'-"".lo/<o

3-/F.r

J-t9-s-

'

'"

~]

~FU

OSP-

0 eJ S

.fU-f'

rt-Jrr,
-/.2"-fJ

-3./Y.f'
I

-.J.!JlS

10. Ull'

www.shmirzamohammadi.blogfa.com

O:Jts-6

-1
s

~r&

o.

()I

T-~t:)

-OJfFtf

()

lr1

'*t,,(t
[
J
+

-3-111-S'

o o]

A:tl

"

-{

:H j'. l'fS'-

.> 1 + { 1tr1 + J, IP:S) s .._ + (J,; 1-s-4~ 1 +A-t-& -p,JJ'Sb).s


t- (-/.:1~Y. +-lrr, t- :J,/fl.sA:i!:Jl. -o.~ff-.f' ~~1 )
215

~-J:l

'-"".lo/<o

-""'15:... ...r4-- .:.:, ) .,rl...:..:<_)ts: -~ &'-->"


==

+ 2" s& +

2otJ .5

% ' Since the rank of tho <Jbserval>ility matrix is 3, design

lt!tJil

% of observer is possible ,

% Enter the desired characteristic polynomial l>y defining

Hence

% the following matriK J and entering statement poly(JJ

-/e, +
~
j

'J./'f-S

-I. 2

zo

3./~S::::

S<jZ

!:.e,

rk,.,._ -~- 3?.5'6

Kr-, +-

J = [-5+5'(sqf![3t)'l 0

J../St.s

JJ = poly(JJ

200

or

~e

~>

-f'~:~

= S"fi-~.34'/

ss-1

'
'-

.. -

16.8550
147.3866
544.3809

___

or

~]--=- [-" .,

~a

-JY.7.317

iJ

-SS'-JI 3 7

I
0

t'.Jf.$'6

:i',
u + /Jt?.
'[-]
[
]
-J.tv;-j :r, ;.,.~ [s.- J

o
(

X,

i"

J.t,IS~

Jl7

B-12 12.

Referring to

Equation

(12-71), we have

[~J=[;:~-j-L~~---~~-:J[~J+UJ

111

MATIAB solution:
A MATU\B program to obtain the state observer gain matri:x
~e is shown below.

~=[1 )[~]

% ----- Design of full-order state ol.lserver -----

% Enter matrices A and C

A= 10 1
C'= [1 0

0;0
OJ;

1:1.244

0.3956

Define

-3.145);

!~

% Enter the ol>servability matrix Nand check its rank

1-

Phi

Ke = Phi'(inv(N')I'[0;0;1)

$'9-p:.:U/

% This program determir1es observer gain matrix Ke


%based on Ackermann's formula

1-

1.0000

potynomi<~l

% The observer gain matrix Ke Is obtained from '

;(::::: (A-kec).x:
+:Bu
-+Ke:J.
....
.........

0.2000

Phi = polyvalrn(poly(JJ.A);

Referring to Equation (12-51), the full-order state observer becomes

,_

0.0200

% Enter chara1:teristic

IP-7 3K".,.I

-.

-10);

1.~7003_ ~

0.0010

-fe.,_ =./fL7.3t7 ~

-5-5'\sqrUJ/I'i 0;0 0

JJ"

-fc-. - " 3f.s-~ Kc, = /OdO

from which we obtain


If~, =/If'. ?>S

0;0

N = IC'
rankiN)

A"C'

A''l'C'I

;:;:

[']
}~I

The characteristic polynomial for the minimum-order observer is

ens ""

I
...;~I_)_J:!"'-""'~

.'IF.

www.shmirzamohammadi.blogfa.com

:<17

._..i...>_J:l\...i"~

-""'15:... ._r~ .:.:, )


s

/ s!-d" ~e ::! I = l [ 0

I
lI

S"

ol. [
sJ-

4.]f$'b

l Hr
-3-/I<SJ-1-l,f,_JJ

t ke~:..

"'"'

o]

?]
[-<.NT ' Jf'lf,]
[i :;:;

S 2 -f- (A-t":~.+ J ./f.S) S

.s +

l ['IU'] ]~ I[t

0
+ [ /.ZVi'j-

3./ft.S"

+ ( ~. /lf.s-/r,.z

rr.] [-t.ts-r
l~'

The desired Characteristic polynomial for the minimum-order observer is

- "

=: So.f-ltJ.s +-100

B-12-13.

'""+ ( ,tt>.._ + J./pS") s +- ( Y/P:.S ke~ -

/t'S

--

k, (r-x,) _If, :tao -K, x, =- Kx.. + k1 Y'

Thus

~c =

K=[~,

J.ll<.>'.k~.z. -P.J95-6 +A'C"J ~ /(lt)

[''"S"]

'

where

?1.1'37

KaA" )ke +A~_.-I<eA"'~.],;t


-- -f + [(AI>h- -... .... ...
.

- !- = [1
~ ;::: [Sf] -:._e
X,

~-

'

Jsr-6.1~

-r ( 8 0 -Ke IJ.)u

A'B] =

AB

-I

"
0

-::: s'

_I,}

31

is three, arbitrary pole placement is possible,


for this system is

ke.r = ?JI. JL-37

-=(Au -ke A..")

....

k,]

- --

1'1=[13

Referring to Equation (12-79), the equation for the minimum-order observer is


given by

'

~.

from which we obtain

""t<~ :::;; 6.8SS)

+l-?ljt.Jl./1

Noting that the rank of

0<

s-.r-1 XO 1
j U.

'''
/.Z!'f"] - [7.1137

From Figure 12-21 we obtain

Jf S,tf 1-/(oe.r)

+ /t'tJ

A~~~. +J.,~r::::to)

l[f't,] r" r-t] ta +lt.-:sr:lf.J"'


r,1

-3./S'S'"J

-'liV,_./

where

;;;:: S"

Hence we set

lfn..-1

------------------------------------------------------------------------------

(s-,u. )(s-,u.) ~ ( SS -j ,5 )(.rrr+J<'fi)

,I

?lol$7 XO

-JIf'.~l?ITJ7j.

O<

-~Jf#

+-Itt- l)

/[-N

+ l-781'/

-J./(I...S

-71. f< I

-I

-tJ.Jt(N+keJ

._r\..:..:<_)1.5: -~ BY

The characteristic equation

0
-I

s~+o.rt.-rss

.s- st6

Tti 1 .S2.-t" th.S -t4 3 =0

Hence
t:f,

=tf

t:12.=s~

t?:s-=0

Since the state equation for the system is already in the controllable canonical form, we have!: I.
The desired characteristic equation is

71'. 8J7 ";.


["] [""'}

'Q :;;; X', -

219
218
...;~l_)..l:!"'-""~

www.shmirzamohammadi.blogfa.com

~:.,'-""~

-""'15:... ...r4-- .:.:, ) .,rl...:..:<_)ts: -~ &'-->"


(1 + 2

+j<r)(s

t-2.

-jfl.)( :S+-It7) = s:t Tl- s

=
1)(';==/P.,.

otz

= 6d .-

K; [ "'' _,.,

',

=[ZOP-P

=[200

s :~

-t- los +

+- C(, s "-+ or.,.

+-

A .. ro 1 o:o
B "" [0;0;2001;
c .. 11 0 0[;
0 .. 101;
step[A,B,C,DIgrid

o<~

Cl'): = 2011

ot.. -4'1..

o<,-t:{, ]

hJ-,S'"

.t~-

"I

J
-(

'

ul

"I

=(A-BK.)x. +BI,,y
......

e -~ J ~
w haw

.l
z,

x..1= [ o

iJ

-6

-200

S"S"

'

~]

-[:

-1()0

_,,
p

_:]

-0 -1

o
o r

..

--

'

'

-----

][ ] [ ]
:tJ

2 is given by

(1)

(M+,._,);;+Irlt!i::-u.

2()0

)Hti; +-,/X= "'i-1&


which can be modified to

o][::]

ML (i

(2)

= (N+ M) ~ t9 - u.

N;/ =

'

Referring to Section
shown in Figure 12-

The output equation is

~=[r

"/ ..
'i

B-12 1.4.

tox,
o
t
x. +

ul

; ~J-[~][z.o

I' o -s

I" I

- -- - --

---

7----~

,,

:i =A:t:-t81l =AX+- B{-!<x+k 1 r)

Since

t:-2oo -eo -141;

'lhe resulting unit-~tep response curve is shown below.

The state equation for the designed system is

- --

tillei'Unit-Step Response of Designed System')

6] I

?]

.ST

% Unit-step reS!lOnse

200

The unit-step response of the designed system can be obtained from Equations
(1) and (2) by substituting r ~ l{t) and finding y(t).
A MATLAB program to
obtain the unit-step response curve [y(t) versus t curve] is given on next
page.

u-mg&

Since the state variables are defined as


;(1 o::::J9 1

Xz.=,9)

X:.J;::::::X~

X,.=:i

we get the following state space equations:

...;~I_)_J:!"'-""'~

nc

www.shmirzamohammadi.blogfa.com

221

~.J:lt.r~

-""'15:... ...r4-- .:.:, ) .,r\..:..:<_)1..5: __y?... &'-->"


;.,

<,

x,

-NT

0
'.-t.t+l>f

;,

M.l '

;(,

.
x,

x,

x,

- M?

S=-1'-rj,

[~J =[ ~

0
% ----- State-feedback gain ~lfi)( -----

% This progrem determines the state-feedback gain


% m;mix K ., (k1
%formula o
%
(2)

.,

Substituting the given numerical values into Equations (1) and (2),
the following state-space equations for the system:

.I

"'
;,

.,'.

'

IZ. UzS
0

- z. Jt..f'2.S"

[~J =[ ~

"

<,I

obtain

I 0

+ -o. .s-1 u

.,

x,

o.s

"

k3

k41 by use of Ackermann's

Enter matrices A,B,C. ;md D 0

o o

A= 10 1 0 0;12.2625 0 0
B '"' 10;-0.5;0;0.5):
c .. 11 0 0 0;0 0 1 0];
D -IO:OJ;

0;0 0

1;-2.4525

0];

% Define the controllability matri)( M and check its rank

M = IB A"B A'2"B A'3"BJ;


rank(MI

1/2.

2.6 zs
0

-z.rt..s:zs

J"' l4+4"i 0
JJ .. poly(JJ

-4-4i

Phi ,. polyvalm(poly(JJ,AJ;

..

JJ =

0;0

'

% 0 0 Enter the desired characteristic polynomial which


% can be obtained by defining the following matrix J and
%entering statement poly(JJ ooo

x:

'

% 0 0 0 0 Since the rank of M Is 4, the system is completely


% state controllable. Hence, arbitrary pole placement is
%possible.

or

"'

'

Determination of the state-feedback: gain matrix K:


this system are

A~

we

)
I

k2

ens ""'

'

-I

x,

s=-z.o

_/_

"'(:
0

s=-.zo,

the following MATIAB program can be written for the detennination of the statefeedback: gain matrix !:

(1)

,
0

s=-~t-j9-,

I
0

'

Since matrices A and B for


~

B=

0 0 0

0;0 0

4480

Enter characteristic polynomial Phi

-20 0;0 0

-20];

12800
0

% o o State feed buck gain matri)( K can be determined


%from

K = 10 0

/~:s

752

1]"linv(M))"Phi

K
1.0e+003

lo~s

-4.1381

-1.0094

-2.60~36

-0.9134

and the desired closed-loop poles are at

...;~1_)_):!"

'--"'.lo/<o

:?2?

www.shmirzamohammadi.blogfa.com

223

~-J:l

'--"'.lo/<o

~15:...

...r4-- .:.:, ) ._ri.f:<_)S: -~ &'-->"


--~~

To obtain the system response ------

,,,j

--

X+

gu.

- - -- 0

-z..c >lt

"'

~.

"""/
-# s-c~

Z.R/#6

"

(J ' .f'"P

"'
-/.JDH

-(). ~S7

I 3 o ~2

d.~#7

' I

~
(

(3)

-~
-~~

'

--

_:::

...I

_."<-

'''

~-Z,PS"! 8

'

- /I.S"t:>fl-7

z.o/tft

O.J'(J

Y.J

subplot[2,2, 11;
plol{t,xlJ;grid
titlef'x1 (Theta) versus t'l
xlabel!'t Sec'J
ylabeH'x1 = Theta')

-/. J()fi

-O,f<S67

"

p, r,tSdJ

/ Jt'~f

tJ,

subplot(2,2,21;
plotft,x2);grld
tltlef'x2 !Theta dot) versus t'J
xlabel('t Sec'J
ylabeH'x2 - Theta dot')

""I

subplot(2,2,3J;
plotrt,x31;grid
title!'x3 IDisr>lecAmAnt ~~Cart) versus t'J
xlabelf't Sec')
ylabeH'x3 .. Displacement of Cart')

Define the initial condition vector as B, or

'

subplot(2,2,4J;
plot(l,x4);grid
titlel'x4 (Velocity of Carl) versus t'J
xlabeU't Sec'J
ylabeU'x4 .. Velocity of Cilrt'l

= [;]

---

Then, the response of the system to the initial condition can be obtained by
solving the following equations:
0

OJ;

% Plot response curves x1 versus I, x2 versus I; x3 versus I,


% and x4 versus t on one diagram

where
tJ.t:'R

BB "' (0;0;0;11;
[x,r,tl .. stepfAA,BB,AA,BB/;
x1 .. [1 0 0 OJx';
x2 - [0 1 0 OJx';
x3 .. (0 0 1 O]x';
x4 = [0 0 0 1)x';

% ... Enter the Initial condition matrix BB Bhat ..

x;;,tZ,

1;-2.4525

AA- AB"K;

"$~
._....

'\

Let us rewrite Equation {3) as

'

A"' [0 1 0 0;12.2625 0 0 0;0 0 0


8 .. [0;-0.510;0.6];
K m [-4138.1 -1009.4 2609.6 -913.4);

'1;;.
'"

x,

(7,/IOI

'! 7

% Enter matrices A, 8, and K to produce matrix


%AA ... Ahat

;~,.

when the n!JIIIi!t'ical values are substituted, can be given by

% This program obtai'nk the response of the system


% xdot ,., (Ahat)x to the given initial condition xiOJ

x~(A-!3K)X

'

.B =- BB

% ---- Response to fnltiBI condition -----

J~~

following equation1

x,

A :AA

-~:
~~
"""
.. :I,:,_.

-- -

::( = fl

The following MI\.TLM program will generate the response of the systao to the
initial condition.
In the W.TLM program we used the following notational

The resulting response curves are shown on next page,

..."'=A?+B
--

-A

X'=Az+B<.t

...;~I_)_J:!"'-""'~

"'

225

www.shmirzamohammadi.blogfa.com

._..i...>__,.:;.~

-""'15:... ...r4-- .:.:, ) .,rl...:..:<_)ts: -~ &'-->"

'

,..

__,..,

x2{1Mia<lol)_...t_

"'
:1 {Thotll)

'

I
'

L' '
'.

i"
--

.0.00

.u-

'

""'

'

""'

'

------

-o

0.6

' 'o

'

1.5

""'

....

o.s

1.5

M [8
rankiMJ

:l

% state conuollable.
%possible.

'

--t

J .. 11.3+1 0

A~

JJ

-e>~'i-f'S'

Case 1:

0;0 0

-20 0;0 0

20];

0.0426

0.5067

1.1476

1.0760

Phi -=- polyvalm(poly(Jt,A);

'

-I

0
0

, B=
~

o.s

' C
~

[I

% State feedb<~ck gain matrix K can be determined


%from

00 "]
0

K = [0

"

-I.J-+-j,

1]"lirwiM))"Phi

K=
-582.1330 -101.0913 -109.6840 116.9827

~=-/.3-J,

% State laedbilck gain matrix K is thus


% K = [582.1330 101.0913 -109.6840

116.9827)

S=-2P, S=-20

A MATLAB program to determine the state-feedback gain matrix K is given on


next page.

The response of the system to the initial condition can be obtained as follo~
By substituting u = -~into the system equation i = ~ + ~u, we obtain

-X - --

--

=!/4-BK):c. ;::;,4x.

where

=
0.0010

The desired closed-loop poles are at

S=

-1.3-i

% Enter characteristic polynomial Phi

0;0

1.0e+003

JJ = poly{JI

~ex

[ u.0PtJ I

Hence, arbitrary pole placement Is

% Ent11r thlt desired characteristic polynomial which


% can blt.obtained by defining the following matrix J und
% entering 1tatement poly(JI

:::::;

...................

where

A"3"8J;

=A ;e +.8'<

A'2"8

% .. SillCB tha nmk of M is 4, the system is completely

The state-space equations for the system are

-.i<1

A"B

0];

~J

------------------------------------------------------B-12-15.

ans "'

: l

-- '

ID:-t;0;0.5J:
[1 0 0 0;0 0

0"' [0;0]; __

.I

'
1./

c "'

a"'

t.s

o.s

)(( (VIIOCily 0( Cart}

l<l(D~IIC.O......,I

J:...

%formula

A~ !0 1 0 0;20.601 0 0 0;0 0 0 1;-0.4905 0 0 01:'

'o

~~I

-~

% Thls program determines the state-laedback gain


% mauilc K [kl- k2 k3 k41 by use of Ackerm;mn's

,_ j

'

.,

% ---- State feedback gain matrix

...;~I_)_J:!"'-""'~

'"

....

m
www.shmirzamohammadi.blogfa.com

._..i...>_J:l'-""'~

-""'15:... ...r4-- .:.:, ) .,rl...:..:<_)ts: -~ &'-->"

[0,/1

subplo\(2,2,31;
plotlt,x3t;grid
title('x3 !Displacement of Cart) versus t'J
xlabell't Sec'/ ---ylabei!'JC3 = Displacement of Cart')

A==A-BI<
the initial condition vector as 'B.
A
B=

subplotl2,2.4);
plotlt.x4J;grid
tltlel'x4 !Velocity of Cart) Versus t'J
JCiabeWt Sec']
ylabell'x4 = Velocity or Can')

p
~

Then, the response of the system to the initial condition can be obtained by
solving the following equationst

.-

The resulting response curves are shown below.

- -- --

'

E = AP+8U
'
A
X;:::;fl'i+S

A= AA

8 = JB

"

Vc

;0

~ 0.08

% This program obtains the response of the system


% xdot -= !Ahat)x to the given initial condition xiOJ

'8 0.05

0 OJ;

_,.;!----!----!---c!-----!
0
1
2
3

'"'

.,'

Case 2:

OJx;

1 O]'x';
0 t]'x';

t.

'

....'

'

.0.0 1 2 3

'"'

The desired closed-loop poles are at


S=-2,

% Plot response curves x1 versus C x2 versus I, x3 versus


% and x4 versus 1 r.m one diagram

~
'
f'-'
> '

' '

0.00

'"'

)04 (VIIocllyol c.t} _ _ ,

0.

0~

BB "' [0.1 ;0;0;0];


[x.z,t/ = step(AA.BB,AA,BB);
x1 = 11 0 0 OJ"x';

'

'\

~-:;,.0.

% Enter the initial condition matlix BB = Bhat

0
0

'

x3(~olc.tl)-t

% ..... Response to inital condition .

x2 .. 10
x3 = [0
x4 .. [0

~
_,

"'"

A= JO 1 0 0;20.601 0 0 0;0 0 0 1;-0.4905 0


B = !0;1;0;0.5];
K- J-582.1330
-101.0913 -109.6840 -116.9827/;
AA .. A B"K;

I o

'

..;,--=;-~:o:""r--==r''--,

:d {11Wiol-l

'

The following MATLAB program produces the response of the system to the given
initial condition.
In the MA'llAB program we used the following notations:

'

s= -z

S=-/~,

5=-/0

A MATLAB program to determine the state-feedback gain matrix K is given below.

subplotl2,2, 1);
plot(t,x1 );grid
title('xt !Theta) versus t')
xlabeU't Sec')
y/abel!'xl =Theta')

% ..... State feedbacl1 gain matrix .....


% This program determines the state-leedback gain
%matrix K .. [kt k2 k3 k4] by use of Ackermann's
% formula

subplotl2. 2, 2);
plot(t,x2);grid
title('x2 (Theta dotJ versus t'l
xlabel('t Sec")
ylabeU'x2 - Theta dot')

A = JO 1 0 0;20.601 0 0 0;0
B = )0;-1;0;0.51;
C = 11 0 0 0;0 0 1 OJ;
D = [0;0);
M = [B A'B A"2'0 A"3'8);

1;0.4905

0 0[;

rankiMJ

...;~I_)_J:!"'-""'~

228

www.shmirzamohammadi.blogfa.com

229

._..i..._J:l'-.!"~

-""'IS:... ..r-4-- .:.:, )

ans -

._r\..:..:<_)1.5: __y?... &-..Y'

4
% S111~e tim rani< ul M is 4, tt1e system is completely
%state contwllal>le. Hen~" albHrary pole pli!cement is
% pr;>ssil>le.
~,

._'

subploti2,2,2J;
plotlt,ll2); grid
title!'ll2 (Theta dot) varsuS-t'J
Jllabel('t Sec')
ytabell'x2 .. Theta don

% Enter the <lesired ch~racteristic polynomial which


%can be obtained by <lefiningthe following matrll<. J and
% entering statement poly(J) '

J .. 1-.2 0 0
JJ = polyiJ!

0;0

0;0 0

-10 0;0 0

-101;

subploti2,2,3J;
plotlt,K3);'giid
tltle('x3 !Di~placement of Cart) versus t'J
xlabell't Sec'!
ylabel('x3 .. Displacement of Cart')

JJ
24

subplot12.2.11;
plotlt,lll); grid
titlel'lll (Theta! versus l'l
Jllabel!'t Sec')
ylabell'>~1 "'Theta'!

184 480 400

subplotl2.2.41;
plotlt,ll4); grid
tltlel'x41Velocity of Cart) versus t'J
xlabel('t Sec'/
ytabell'x4 .. Velocity of Cart')

% Enter charactltristic polynomial Phi


Phi ,. polyvalm(polyfJJ.AJ;
% State feedba1:k gain mall ill K can be determined
%from
K .. [0

0 _ 1J'linv(M)J"Phi

The resulting response curves are shown below.

r ", II
'
VI.

% State feedba1:k gain rna trill K is thus


% K = 1224.9884
-48.4648
-40.7747 -48.92971 ' " ' '

/I
The response to the given initial condition can be obtained by entering the
following MATLAB program into the canputer.

~ ' '(\

::...
1
.""'

% This program obtains the response of the system


% xdot IAhatlx to the given initial condition ~40)
A- 10 1 0 0;20.601 0 0 0:0 0 0 1;0.4905
B .. {0;-1;0;0.5);
K .. [-224.9884 -48.4648 -40.7747 -48.9297);
AA"" A B'K;

0);

% Enter the initial condition matrix BB = Bhat

''

BB = [0.1 ;0;0;0);
t .. 0:0.01:4;
)li,Z,I],., step(AA,BB,AA,BB, 1,1);
>~1 =,11
x2'"' [0

x3"" JO
x4 = {0

o a

Ol'x';

0)'>~';

Ol"x';
1)'x';

'--

'o

,,
8.

'

"" (Veio<ity t;l c.rt) _ ,

'

f ,' -\

\.

,1'--

'

'

x3 (Olsplacemlnt of Car\) vtrwa I

% ----- Response to initial condition ---

><2 {lhollo d o l ) - I

r-

, '

.0.050

'

~~~-)--\

"'

-224.9884 -48.4648 -40.7747 -48.9297

'

'

..o.:!0\23<1

""

Comparing response curves Xi versus t (i = 1,2,3,4) for Case 1 and Case 2, respectively, they are substantially the same.
This means that the response
characteristics are about the same provided the dominant closed-loop poles are
located in the same general region and the non-dominant closed-loop poles are
located far away from the origin.

% Plot response curves lll versus 1, ~2 versus t, x3 versus 1.


% end x4 versus t on one diagram

'
,._

--

231

230

._;~I_)_J:!"'-'"'~

www_:s~~!_rz_a}!1_9h<!!!l.madi.blogfa.com

-----~---

._..i..>_J:l'-'"'~

-""'15:... ...r4-- .:.:, ) ._ri.S:<_)ts: -~ &'-->"

-K -

to Section 12-8, the inverted pendulum control system can


following equations:
:

- -- -

X;,::;;AX-t-[lu

,,._

<"1-_

--

.s--z._ s.=-to, s = -/tJ ~ s = -10


.
produce the state-feedback gain matrix K and the

A MATLAB program to
gi'lin constant 11:1 is given below.

--

>.

- -

,,

% This program determines the state feedback gain matlix


% K ,. lk1 k2 k3 k4J and Integral gain constant kl by use of
% Ackermann's formula

% Enter matrices A, 8, C, and 0

x,

-- -

A"' 10 1 0 0;20.601
B = [0;-1;0;0.5];
C=[OOIOJ;
0 = [0];

:<

A=

,(

-I.Pf'P.r

0
0

fl'-

AI =[A zeros(4, t);C


81 = [8;0];

C=[o o ;o]

-I

B=

'

--

o.s-

where

, - [A -OJ--c o

...

-I

- (), fl-ft!.>

0 -1

"

.....

0);

A1"B1

A1"2St

A1"JSt

A1"4"B1]

A- -

1;0.4905 0

ans ..

t" I

2a.

rank(MJ

'

0;0 0

% Check the rank of matrix M

:::;'Ae+B~e

....

% Define the controll!lbilit';' matrix M


M = [61

The state error equation can be given by Equation (12-114), or

0
0

'

i= [:]

0
OS"

% Since the rank of M is 5, the system is completely


%state controllable. Hence, !lrbitrary pole placement Is
%possible .
% Enter the desired characteristic polynomial, which
% can be obtained by defining the following matrho; J and
% entering statement polyiJI

J = [2
0
0

0
2

0
0

10

0 -10

0
0

0
-10];

and Ue is given by

I ZC.6'/

% Enter matrices A1 and 61

and matrices A, B, and C are given by

% ----- Design of 11n Inverted pendulum control system -----

is defined by

;(,

"'

-<z 1

Y~V,; Y-C <:

=I

' , ' i

s=-l,

u :-Kx+ lz f

llhere the state vector

= [ ~, L

The desired closed-loop poles for this system are located at

7=::::

I=

= [ K .' -h]

Ur:

JJ = poly(JJ

'
=- Ke

'ilhere

...;~I_)_J:!"'-""'~

.,.,.,

www.shmirzamohammadi.blogfa.com

213

._..i...__,.:_r~

OJ;

integral

-""'15:... ...r4-- .:.:, ) .,rl...:..:<_)ts: -~ &'-->"


Since

,_

't(=-Kx

"

424

2320

5200

~-

4000

Equation (1) becomes

% Enter charac:teristic polynomial Phi

[1}[:~ ~:"][;H~Jr

Phi"" polyvalm!pofyW,A1!;
% State leedbi!Ck gain matrix K and integral gain constant

% kl can be determined from


KK .. 10

t--'.d

ll"(invlMJJ'Phi

The solution or this state equation when r = l(t) gives the Wlit-step response
A MATLAB program to obtain unit-step curves is shcnm below.

KK

of the system.

-709.6367-162.6378-530.0714-257.2756 407.7472
k1 .. KK!H. k2 KKl2), kJ - KKlJ), k4 - KKl4), kl - -KKl5)

% --- Step response of the designed system

% Enter ni!CeSSiiiY matrices .

k1 -

A = [0 1 0 0;20.601 .() {) 0;0 0


8 "' [0;-1;0;0.51:

-709.6367

1;-<l.4905 0

0 0];

c-tootoJ:
D .. [0];

k2-

K = [-709.6367 -162.6378
kl'"' 1-407.7472];
AA .., lA- B"K B"ki;-C OJ;
BB'" (0;0;0;0;1);
CC,. IC OJ;

-162.6378

k3 -

% Enter the following command to obtain step 1esponse


t = 0:0.01:6;
[y,X,t] .. step(AA,BB,CC,DD, l,t);

k4-

xl = 11

257.2756

J
j

~
j

0 0 0

O]"x';

1
0
0

0
1
0

0
0
1

0[ 0 JoC';
OJ"x';
0[ 0 >:';

xS = [0 o

li"JO:';

x2 = [0
x3 - [0
x4 = [0

kl-

-407.7472

-257.2756);

DO= [0];

-530.0714

530.0714

subplotl3,2, 1 J;
plot[t,xlJ; griU
tltlel'xl versus t'J
xlebel('t Sec')

Referring to Section 12-6, the


obtained by solving the folloving

ylabell'xl']
subplot(3,2,21;
plotH,x2); grid

equations

title('>e2 versus t'l


xlabell't See')
ylebel!'x2'J

i=Ax-t-ll'<

j =

--

Y- C >:

subplot!3,2,3J:
plotlt.K3); grid
titlel'x3 versus t')
Klabel('t Sec'!
ylabel!'K3')

By combining these two equations, we obtain

[;]=[: ~]~}[:]" +[~)r


...;~I_)_J:!"'-""'~

;;:;<]

'"
www.shmirzamohammadi.blogfa.com

~-.,'-""'~

-""'15:... ...r4-- .:.:, ) .,rl...:..:<_)ts: -~ &'-->"

'

CHAPTER 13

subplo!l3,2,4);
plo!lt,x41: grid ,
!i!le!'x4 versus 1')

xlabeWt

Se~:'l

ylab~l!'x4'l

!!:!H.

subplotl3,2,51;
plotlt,x5J; grid

The given quadratic form can be written as

title!'ll5 versus t')


xlabel('t Sec')

Q = (x,

ylabeU'x5'1

XJ]

;tl

[ I / -I]["']
I

-9

-1 -3

Tile step response curves obtained by use of the above MATLMI program are sh01m

belov.

''

'

"~

'

j
..

5o 2 6

..o_so

"~

~-

.:~v1
0

.~

..

~.

= I> o

f11

/"n.. )

f'r

/'zal

/1

I/

;, /'" /'a
fh fv =

,.,

Pu p,.

xJ

3 /0

I
-I

'"

-I
-31=-9-<0

-3

-------c-------------------------------------------------------------BH-2.

I I
.t

Applying Sylvester's criterion, we find that the quadratic form Q

Mv.,... t

~-

.(1_

){l

since

~-

-:rg; .I I ~~~I !
.:1-zf ij *~>b I I
-

-J

The given quadratic form

can be written as

-!]["]

I
Q

= [ :t, x,

XJ]

[-I

-]

_,

- 2.

:ill

-1!

XJ

-;

-I

-3

-<

Applying Sylvester's criterion, we find

_, < 0

I~~

I
-3

>O,

I
-I

_,

I <O

-II

The given quadratic fom is negative definite.

------------------------------------------------------------------------------

~-

'J

Consider a tentative Liapunov

V(X)

= f/ + :t/' =

function~

positive definite

...;~I_)_J:!"'-""'~

"'

www.shmirzamohammadi.blogfa.com

237

._..i...>.J:l.J-~

.c"'

..

-""'15:... ...r4-- .:.:, ) .,rl...:..:<_)ts: -~ &'-->"


The time derivative of

..

..

V(~;>::::

V(~)

-2

;:(!

becomes
2Xt.' ..... 2 (

:r, -t-

;(~

')

By choosing different positive definite or positive semidefinite matrix Q,we

obtain different Liapunov functions.

VC~) becomes negative definite in the region inside the circle x12 + x22 ~ 1,
,,~

Ve-;

Different Liapunov functions may be obtained by choosing different


B-13-4.
0 in the Liapunov equation A*P + PA "' -Q.
If we choose 0 = r, then

...

[~

']['"

-3

PtJJ

..-

l- f

p =
-

....

_c
T

which is positive definite.

l/(3")

=:

"][-/ '] ~-['

"'] + ["'
/?~
;,i Pz,

!rom which ve obtain

-3

il

~]

..

I!

,.
,_

;1,. =- :J,-a

:,.:(2

't:

-1
[ I

[I

'

][p" p,.]
,,. + ['"

-J

t.i+Zhtz =D

+'f.b-1 =

b=-f

'

With this choice of a and b we can translate the equilibrium state to the ori
gin Of the n-n plane.
The system equations on the n-n coordinate system
bee~

'J,

= - 't f -

z 'J(Il

!H

from which we oPtain

r
which is positive definite.
tained as

V1I;: ) =

p,.

:]

...

"][-/2
I'~

-J

"

...;~I_)_J:!"'--'"'~

0,0

p,,]

_' ]['"

$1-

}',. }1-...

[ll

--

-z]

f,. ][-/

J1o. fu

= _ ['

- S<

()

from which we obtain

[t i]
S'"
a
Tx,
-r

[~

1]=- [' ']

p
-

Thus, a different Liapunov function can be ob-

=: 'p
_-:!:--

_- - -

To determine the stability of the equilibrium state at the origin, we solve tt


Liapunov equation A*P + PA " -0 for P.
By choosing 0 = I, ve have

_L

'i"

:t',Xz.

Since

"

Plf=j;>O,

-r 71 .:r.z.

=-;;,- z.7a. ra +-z.J.rz

t~=v,-fl-~(1!.
Q =

then

{'J-,.- ir) +-2

-Sl{:J~-1.) -/=~ 1 -9-:J:.-"' +-P.b -I

a= _ __
Xz.'

=X:t-b

Choose

we choose

'

~~ =--(.,,-a)- 2

-a

X,z.+:

'12.

.J

Define

Then

A Liapunov function is

~T?1_ =

__

We shall first translate the equilibrium state to the origin

or

Since 0 is positive definite and P is also pos1tive definite, the origin of


the syStem is asymptotically stabi'e.
It is asymptotically stable in the
large because this system is a linear time-invariant one.

...
,.,

--

-I

9-Iz..

,,=X,t-.lt

,J

-2:(_l. t- 2

X,= :r,-

":!,- -.:r,

= -2t-r.'+ :(,')( t-:r/- :r:J

Thus, V(~) is a Liapunov function.


From this Liapunov function we can conclude that the origin of the system is asymptotically stable

..
..
..

~-

..

www.shmirzamohammadi.blogfa.com

=:

[""

"~]

7i

-L

I,,

.!!.-

"

P,,H ::

P,, Pu

239

-f,

_zj
il>

.11.

..

,2(1

y.

31'"

~-.,'--'"'~

>o

~J
I

~
~

.
.A

..
.

-""'15:... ...r4-- .:.:, ) .,rl...:..:<_)ts: -~ &'-->"

!!::::!1::..

-3 al][p,,p.,
fu
f, .. A1 fu
-2.

-J

l ['"

p,.r,,
P,z Pu lu
1'11 l'z~ f'.n

f,, fJ Pu _

tJ

][I-

.1
.J -2:

OJ = [0o 0 0]
o

-.J

==A

---

whm

-3

-3

/',1- Jf'..J r,Pi..~-3/ta. =O

j/11 -2fn T {'1z - JjJu "t-/aJ =0

The characteristic equation for the systE:Ill is

Is

-3

-I

=(

.11::;

Q =

"
I
To verify this choice, note that V(x) : -xQx.

- ---

V(,:r) = -z.-.Q .:c. =

V(~)

... __

Since

""

I f x3

is

1-j-

_.J...

.,.,._

-..C.

...
I

[::] = [ _:

36

-~tJ

- -- =-Q-

AT~+

xz:~o

--

Choosing Q : I,

...
we obtain

[~

PA

-]['" l'n]

- J'

p,. ?en.. +

['"p,._ p,_._~] [ 0 I J [I "]


- -S

--

simplifying, we get the following three linearly independent equations:

www.shmirzamohammadi.blogfa.com
"0

....

The Liapunov equation is

ATF+f'A;:::-Q

...;~I_)_J:!"'-"'~

..+

-.!::.

!t!H

=.X,

Thus, V(x) is identically zero only at the origin.


Hence we may use the chosen Q matrix for the stability analysis of this system.
Solving the Liapunov
equa'E'ion:
~-

-L
4

------------------------------------------------------------------------------

-x:Jl

If xl is identically zero, then x2 must be identically zero, since

;(, :;(,-rXz...

p:;;:

-,.11

Since the first principal minor is negative, P is not positive definite.


Hence, the origin of the system is unstable. -

being identically zero implies that x3 is identically zero.


identically zero, then x 1 is also identically zero, since
X'J =-XI

3 /{~ = ()

"

t:'

2./u -

Solving these six equations for the Pij, we obtain

This problem can, of course, be solved by use of the Liapunov approach


The Liapunov appriach will take more time to solve but is given below as a reference.
Chooose a positive semidefinite real symmetric matrix~ to be

[" 0 0]

Jfz -2fu. =0

- 3f'J- 3fz.J :::::-I

z 3- S )(s- .::>II 7 s-- +j 2-D'! '?) (s.- f?./17.!'-j 2-CP7)

=0
Since t~ roots (eigenvalues) are located in the right-half plane, the equilibrium state (the origin) is unstable.

-2/z' +-

3fl1 -

s 1 ...,...st.-r7srr

H /.

3fn.

H2

-I

+fo = o

3 0]

[ I

l!--~1=

3~a

-2

,P,,-

0 -I

ore obtain the following six lin'early independent equations:

..

[:

The system equation can be written as


X

~-

"'

------------------------------------------------------------------------------

Hence, the equilibrium state is asymptotically

matrix p is positive definite.


stab,le rn the large.

241

._..i...>__,.j.~

I'
.,,

r;;::,:

-/Z.f',z

~i~~

-(fH t-jJ11-Sj12 :::0

~15:...

...r4-- .:.:, )

.,rl...:..:<_)ts: -~ &'-->"

Since b3

> 0,

if there are any negative s's, then the number of Such negativL

s's must be even.

-1

Suppose that s 1

hm

<

0, s2

<

O, and S)

> 0.

Since b 1

> O,lol"

ls-,1-s,~.j<sl
Hence

.. ~

2( fn- s-f-.)~ -I

..

~~~

..

/:5,/ '(' SJ

Solving these three equations for Pij, we obtain

["

/z

.!L
It>

.-!I&

b-.=s,sa.-t-Sa.S 1 t-s,s,= s,s.. t-{s,rJL)s.~~ <o

...

This matrix P is positive definite.

.1.

-------------------------------------------------------------------------------

.!!:.Q::!.

...

tive.

~
~
~
~

..
"
J

-'

If matrix!, is positive definite, au the eigenvalues of P are posiHence, the roots Sf of the charateristic equation

which is a contradiction.
Hence, all s's must be positive.
This same argument can be extended to the case where n = 4, 5, 6, ...
Hence, a necessary
and sufficient condition that a Hennitian matrix P be positive definite is th...all bt be positive.
-

V=

( s-s.)
+

-.. :."'- (s,+.S;z.+

s., )

"-! -r

Conversely, if the bi

=~,:>aT" .$"a :!iJ t-

J,,.

= s, ' ' .. s., > 0

nich means that the Sf are all positive.


case where n = 3:

- -- ---

...;~1_).):!"'-"'~

1-

t1""9~!"X

u..

- -- - --- --zx*PBB""fx.

To determine the parameter a in matrix A, we first determine matrix

P from

To show this clearly, consider the

s,s,

--

>O

[:
www.shmirzamohammadi.blogfa.com

--

AT.f'"-r PA =-I

0'

>0

"'

+-2~.$.?8

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

{ A"P+ PA):t:.

If u = -B*Px is substituted into this last equation, we obtain

B-13-10.

j, 1 = .J1 -t-S" ;- S 1 >O

+ SaSJ t-

x~

Since~ is always positive definite or positive,semidefinite, V is always


negative definite.
Since V is positive definite, V is negative definite, and
V ~""' as J xM ~ O<J , the ongin of the system is asymptotically stable in the
large.
...

-t-.s...s, >o

b2

S, Sz. S"J

...

V :::::-x>trx

J,,.,. 51 +S;a.+ +S,.. >O

-=

---

t- x~PBu

T(-) " S 1 .Sa S..

..;-(-t)"b.,

Since the si are positive, the bi are also positive.


are positive, then

b1

...i""Px
... _ + ::cr:i
---:r..""LX

5"- b, s .,_, +

~ S",5;:,

:x""P~

Then

Note that

(s-.s,)(s-.s..,)

- --

V,..

'.

Choose the following V as a possible Liapunov function:

fs.r- fl ~ U-s,)(,-s,). (>->.) ~o

b"

'

Hence, the origin is asymptotically sta-

ble in the 1:irge.

are all positive.

/Sz./ < S;r

Then we have

']

'P="'j';"

'

-If' p,.p,,] l"

()

- Z

- et

p,.
,P, .. fu
p,) Ps

PaJ +
I'Jr fu fn

/'11

f'l~

243

p,,

f3~

p 11

][00 0I 0]

[/HI

I=-~ /Of

-1 -2 -A.

._..i...>.J:l'-"'~

0 IJ l.l

-""'15:... ...r4-- .:.:, ) .,rl...:..:<_)ts: -~ &'-->"


41,. =/.S =JP.S-+2.S/<.
from whi~ 'we get K 2 0.7, wJn: 1.5.

Cfr)
kfs) :::

~.

E{s)
Then we can obtain the optimal value of the parameter a that minimizes the

performance index J for any given initial conCition x(O).


by

?'1. a._ fL4 _,

J
J.

Note that

:o

= 13Z3

'

e.

Then we have

s:

e{t)dt =

~(r)

a= -".rz1

Since a is specified to be positive, we discard the negative value of a. Thus,


we choose a = 1.823.
Noting that a = 1.823 satisfies the condition for the
minimum (d2J/da2 > 0), the optimal value of a is 1.823.

=O

_T{<)~ ~{t)4t

where

from which we get

..

().S'Y

[::] =[_:..s -;.~][:J

TO minimize J, we determine a from dJ/da = 0, or

(<fA- <)l.

;-.zs-~ = 'Y +/.si-r

Define el " e, e2 =
C, ;z

J = "' +.t"IJ - / c'


s:::a. -2
'

f:: + ;..s-t!- r

'!hus

e -r;.s-e +z.zse

- --

Jl: +-/. s .s + o.s


s&.+ ;.s-.s +.?-zs-

Since r "' 0 in this problem, w have

J = ;( T(t.?) 7" X.(#,) = f?o


Therefore, we obtain

,!?(')

R(1)- C(s)

!U>) :

the performance index J can be simplified to

Since x{O) is given

~I! = [ ;]

.~

'/.?S

J 1 .;./S.sT;.zsE(s)/R(s) can then be obtained as

Then we obtain

--

['dt)lJ)
t',Jt)

- -

Let us solve ATp + PA = -Q for P.

J =

J."' e

....

101=['
0
Using this

"'ft) dt =.

we obtain

:z. 7ca) J: ~ (")

Note that for a general case of


B-13-11.

C(J) le(T) -

.d

"ZSI<
S' +-/..$""$ + a.S+Z.>K

=[_:_. -z:w.]

'ole have

From this

closed~loop

transfer function, we obtain

2!:41 .. = /.

s-)

w .. t =0.S+2.s-k

Since) is given as 0.5, we obtain


...;~I.J...l:!"'-""'~

I
.,.
9-]"~V..
~

7' ;::::
[

-L
:?4>.,z

__-LJ
s..-..
z~

._..i...>.J:l"'-""'~

www.shmirzamohammadi.blogfa.com

'"

-""'15:... ...r4-- .:.:, ) .,rl...:..:<_)ts: -~ &'-->"


we obtain

B-13-13.

J"e'ft-Jdr = [e,M e.IJ) ......P

'

= fll

e,f!J =o [1

[e..l')

o][[~]

Where

P=

...

w.

?-ftVn

---

V.= .xTP:x..

.. L-

= _j___

Define

['" ""]
.

P1a. Pu

Then
By

substituting ) = 0.5 and W 0 = 1.5 into this last equation, ..,e obtain

~d

V.,..

B-13-12.
The optimal control signal u will have the fonn u : -Kx.
fore, the performance index J beeanes
-

J
~

e'{t)d:C = 3-

J:

--

('!_Tz t-U')at = 5 ';!T(:!_+!5.T!9!..{tc

V =- /11.:(/ + 2f'" :l1 :1-._ +-f'u ::t~.,

'

--

'lbere-

J
and

_____

.......
....
(A-Bk)'P;
p CA-B!') =-/I+KTI<)

Equation (lJ-25) becomes

=zp,x,z... t z. ,,,. x.,z. +-

>H

8'f.j

--

-- -- ... ---

requiring that it be positive definite, we obtain

!:=

0 :]

The optimal feedback gain matrix

--

I<= 8T p

= [o

--

U=-KX:=-;(,-XL

-.-

2fu.Xa. +z.u =O

By substituting this last equation into the equation for H(x,u) and setting
the result equal to zero, we obtain

T X,.r, ( Zf'n- 2,P0

This equation must hold for any x1 and x2.

becomes

.,. Az. x.z)u + .::rt+l'~1.+"

U :::-j'.-..X,-/'u :<'z.

jJ,..) '+- 'Z /

(i.t ~>- 2~~ -/,:) = ()

Hence, we require

1- ,,,' =tJ

:] = [t !]

Itt -lo ?,, = "

)" . .,_ 2f't,- )J,.z.' ;:::: ()

Thus, the optimal control signal u is given by

...;~I_)_J:!"'-"'"~

= 2{'1&-:il r

l:/1 ( 1- f'o.')

1]

2 { "'Jx:,

from '<lhich we obtain

A"T1' +!'A- PB8TP +I= 0

Solving for

2c f'u.:t' 1 +fu. x.._)u.

The optimal control signal u(t) is the one that minimizes H(x,u).
Therefore,
we differentiate H(x,u) with respect to u and set the resulting equation to

zero, or

--

Where!:_ is t'etermin!!<l frcm the reducec:! matrix Riccati equation:

.Xa1 +

H(i:!,u)= ::: rL!i:i.,u)

BTP
...K=f?-'8T?:::::
...........

.J

+ 2 p,z

Equation (13-54) becomes

Since R =I in this problem, Equation (13-23} becomes

2fu x, :tz.

(Note that these three equations in the Pij are identical with those obtained
in Example 13-9.)
Solving these three simultaneous equations for PU P12
and P22 requiring that P be positive definite, we obtain

www.shmirzamohammadi.blogfa.com

247

._..i...>_J:l'-"'"~

-"-"~

'-"'"'-" '-') u!\')\S .~

C?Y

,.

.:~:;"'-
-.

~-'

!''

presented below produces


below and on next page. the response curves.

f.!

p, =-J,A-4.,..2. ~

.i'.

-j~~

-:X 1

% Response to Initial condition

With this control law, the system state equation becomes

[~:]= [: ~][:}[~]r-~.-n;+z,J

or

},

'

plot[t,x2J
grid

Note that the coefficient matrix in this last equation is a stable one.
Thus,
the origin of the system is asymptotically stable and the present approach to
the solution is valid.

tltfe('Aellponse of x2. Theta dot')


xlabell'.t Sec' I
ylabell'x2 .. Theta dof"J

'I

plot[t,x3J
grid

.
ti!fe['Response of x3, Displ;:~cement ol Cert'l
xlabel{'t Sec')
yJ;:~b-e!["x3 ""' Oisplao;emenr of C<:~rt'/

A MATlAB program to solve the given quadratic optimal control pro-

blem is shown below.


~~~~----~~------,

A "' 10 1 o o;2o.6o1 o o o:o o o 1;-0.4905


B"' 10; .1; O; 0.51;
0 = 1100 0 0 0;0 1 0 0;0 0 1 0;0 0 0 1];

o o

plotlt,x41
grid
title(' Response of x4. Velocity of Cart')
xf<:~belf't Sec'/
ylabef('x4 =- Velocity of Carl")

.
i

% Ouadretio; optimer control

or:

fl "' T;
K "' lqdA.B,O.RI

--.-..-

K
54.0554 T1.8079 1.0000 -2.7965
~The

state-feedback gain matrix is obtained as follows:

5_ == (- Sft., s-s-p.

-//.I"? f

-/.011>10

-27?6>]

--~ext,

we shall obtain the response to the given initial condition.


stitute

we sub-

--

U=-k.:r:.

-- -

--

--

X =Ax+8J-t =Ax- Bkx. -==(A-Bk.)z


~-ln the following MATLAB program define

t~

e_J;nted on pages 175-176 of the text.


248

The

~.

AA = A- eK

_fhen use

'=

1nto the original state-space equation and obtain the following equation:

..

ploHt.x1)
grid
.
tltle('Response of x1, Theta')
xfabel!'t Sec')
ylabelf"xl .. Theta')

~'

[::]=[_: _;.,][::]
B-13-14.

' ,,_ ~- ,-_.,c_-

AA "' A 8-~l<;
BB ., [0. T; 0;0;01:
[Jo:,:z,ll .. sJep[AA,88,AA,BB!;
xT .. IT 0 0 OJ"Jo:';
Jo:2 .. 10 1 0 OJ'x';
x3 - [0 0 1 0/"x';
x4 /0 0 0 TJ"x';

-/~+-Z -'z.

'lbe~resU!tlii:J--brves are &bowl

P":z. =)p+z.

f"=t,

The optimal contiol law is then given by

U =

~: :::-."-':.l;;o-:~,.,_2::~
i ,j n":i' ~ ~-

MA~~amoh.ammadi.blogfa.com

v
'

'


._..i..>_.,.:;.~

.,
'cl

,l
./
I

'

J
!

...

I
'
I
'

'

''

,
...; -.. ...'

'

'

i\

i
:I

,I
"

.o

'

I/

__

1/

...,,.a "'' "- "' !

v
~

''

.'

"
"

f
'

'

vi

.
.

.I

"

v.
0

'' -

I i
0

..- ... ..,...-.,...- .....-.,..

l r . I I O - ..

.a .." .. - 9

-~---- - - -
w"""'f"........-~-....--w

u ww w w w w w w .......

:it
~-~------!
''"-' v ' .

..,-

0>

"0

:0

~
~

ro

~
.E
E

11

S-ar putea să vă placă și