100% found this document useful (1 vote)
481 views

Solutions for Exercises in Linear Systems Theory by Joao Hespanha

Dive into the world of linear systems with these solutions for exercises from "Linear Systems Theory" by Joao Hespanha. This comprehensive guide covers key concepts like feedback control, stability, and system dynamics, making it a must-have for engineering students and professionals.

Uploaded by

Aviv Avraham
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
481 views

Solutions for Exercises in Linear Systems Theory by Joao Hespanha

Dive into the world of linear systems with these solutions for exercises from "Linear Systems Theory" by Joao Hespanha. This comprehensive guide covers key concepts like feedback control, stability, and system dynamics, making it a must-have for engineering students and professionals.

Uploaded by

Aviv Avraham
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

You can access complete document on following URL.

Contact me if site not loaded


https://unihelp.xyz/
sm
Lecture 1

State-Space Linear Systems


tb9
Exercises
1.1 (Block diagram decomposition). Consider a system P1 that maps each input u to the
solutions y of
8@
„  „ „  „  „ 
x91 1 0 x1 4 “ ‰ x1
“ ` u, y“ 1 3 .
x92 ´1 2 x2 1 x2

Represent this system in terms of a block diagram consisting only of


ş
• integrator systems, represented by the symbol , that map their input up¨q P R to the
solution yp¨q P R of y9 “ u;
gm

, that map their input vector up¨q P Rk


ř
• summation blocks, represented by the symbol
řk
to the scalar output yptq “ i“1 ui ptq, @t ě 0; and
• gain memoryless systems, represented by the symbol g , that map their input up¨q P R
to the output yptq “ g uptq P R, @t ě 0 for some g P R. 2
ail

x1
u ř ş
4
ř y
´1

x2
.co

ř ş
3

Figure 1.1. Solution to Exercise 1.1


m

Contact me in order to access the whole complete document - Email: [email protected]


WhatsApp: https://wa.me/message/2H3BV2L5TTSUF1 - Telegram: https://t.me/solutionmanual
Lecture 2

Linearization

Exercises

From Newton’s law:

g m`2 θ: “ mg` sin θ ´ bθ9 ` T,


θ
where T denotes a torque applied at the base,
ℓ and g is the gravitational acceleration.

Figure 2.1. Inverted pendulum.

2.3 (Local linearization around equilibrium: saturated inverted pendulum). Consider the in-
verted pendulum in Figure 2.1 and assume the input and output to the system are the signals
u and y defined as

T “ satpuq, y “ θ,

where “sat” denotes the unit-slope saturation function that truncates u at `1 and ´1.

(a) Linearize this system around the equilibrium point for which θ “ 0.

(b) Linearize this system around the equilibrium point for which θ “ π (assume that the
pendulum is free to rotate all the way to this configuration without hitting the table).

(c) Linearize this system around the equilibrium point for which θ “ π4 .
Does such an equilibrium point always exist?

(d) Assume that b “ 1{2 and mg` “ 1{4. Compute the torque T ptq needed for the pendulum
to fall from θ p0q “ 0 with constant velocity θ9 ptq “ 1, @t ě 0. Linearize the system
around this trajectory. 2

2
João P. Hespanha

„ 1 „ 1
x θ
Solution to Exercise 2.3. Setting x – 1 “ 9 , the system dynamics are given by
x2 θ
„ 
x2
x9 “ f px, uq – g b 1
` sin x1 ´ m`2 x2 ` m`2 satpuq
y “ gpx, uq – x1 .

(a) The linearized dynamics around an arbitrary equilibrium point xeq , ueq are then given by

B f px, uq ˇˇ B f px, uq ˇˇ
δx “ ˇ x“xeq δ x ` ˇ xeq δ u
Bx u“ueq
Bu ux“ “ueq
„  „ 
0 1 0
“ g eq δ x ` 1 d satpu q δ u
eq
` cos x1 ´ m`b 2 m`2 du
Bgpx, uq ˇˇ Bgpx, uq ˇˇ
δy “ ˇ xeq δ x ` ˇ xeq δ u
Bx ux“ “ueq
Bu ux“ “ueq
“ ‰
“ 1 0 δ x,

where δ x – x ´ xeq and δ u “ u ´ ueq .


eq eq
The only equilibrium point consistent with x1 “ θ “ 0 is x2 “ θ9 “ 0 and ueq “ 0 and
the linearization is given by
„  „ 
0 1 0 “ ‰
δ9x “ g b δ x ` 1 δu δ y “ 1 0 δ x.
` ´ m`2 m`2

Note that the derivative of sat around zero is equal to one.


eq eq
(b) The only equilibrium point consistent with x1 “ θ “ π is x2 “ θ9 “ 0 and ueq “ 0 and
the linearization linearization is given by
„  „ 
9 0 1 0 “ ‰
δx “ δx` 1 δu δ y “ 1 0 δ x.
´ g` ´ m`b 2 m`2

eq
(c) For x1 “ θ “ π{4 to be an equilibrium point, we need
π
0 “ mg` sin ` satpueq q
4
to have a solution. This means that we must have
?
2
mg` P r´1, 1s.
2
eq q
Except for the extreme case of |ueq | “ 1, we will always have d satdu
pu
“ 1 and therefore
the linearization is given by
« ff „ 
9 0
?
1 0 “ ‰
δx “ g 2 b δx` 1 δu δy “ 1 0 δ x.
` 2 ´ m`2 m`2

(d) We are seeking for a solution of the form

θ ptq “ t, θ9 ptq “ 1, θ:ptq “ 0, @t ě 0.

3
Lecture 2

Substituting θ and θ9 in Newton’s law we obtain

1 sint ” 1 3 ı
0 “ mg` sint ´ b ` T ptq ô T ptq “ b ´ mg` sint “ ´ P , , @t ě 0.
2 4 4 4
Attention! Note the The linearized dynamics around this trajectory are then given by
time-varying nature of
the linearized system.
„  „ 
0 1 0 “ ‰
δ9x “ g b δ x ` 1 δu δy “ 1 0 δ x.
` cost ´ m`2 m`2

2.4 (Local linearization around equilibrium: pendulum). The following equation models the
motion of a frictionless pendulum:

θ: ` k sin θ “ τ

where θ P R is the angle of the pendulum with the vertical, τ P R an applied torque, and k a
positive constant.

(a) Compute a state-space model for the system when u – τ is viewed as the input and y – θ
as the output. Write the model in the form

x9 “ f px, uq y “ gpx, uq

for appropriate functions f and g.

(b) Find the equilibrium points of this system corresponding to the constant input τptq “ 0,
t ě 0.
Hint: There are many.

(c) Compute the linearization of the system around the solution τptq “ θ ptq “ θ9 ptq “ 0,
t ě 0.

Hint: Do not forget the output equations. 2

„ 
θ
Solution to Exercise 2.4. (a) Defining x – 9 we have
θ

x9 “ f px, uq, y “ gpx, uq

where
ˆ„  ˙ „  ˆ„  ˙
x1 x2 x1
f ,u – , g , u – x1 .
x2 ´k sin x1 ` u x2

(b) Setting f px, uq “ 0, with u “ 0, we obtain


#
x2 “ 0
´k sin x1 “ 0 ô x1 “ πm,

where m can be any integer in Z. Therefore the equilibrium points are pairs pxeq , ueq q of
the form
„ 
πm
xeq “ , mPZ ueq “ 0.
0

4
João P. Hespanha

(c)
∆x – x ´ x0 , ∆u – u ´ u0 , ∆y – y ´ y0 ,
where x0 ptq “ 0, u0 ptq “ 0, y0 ptq “ 0, t ě 0 is the solution around which we are doing
the linearization, we get
9 “ A∆x ` B∆u,
∆x ∆y “ C∆x
with
„  „ 
Bf 0 1 Bf 0 Bg “ ‰
A– px0 , u0 q “ , B– px0 , u0 q “ , C – px0 , u0 q “ 1 0 .
Bx ´k 0 Bu 1 Bx

2.5 (Local linearization around equilibrium: nonlinear input). Consider the nonlinear system
y: ` y9 ` y “ u2 ´ 1.
(a) Compute a state-space representation for the system with input u and output y. Write the
model in the form
x9 “ f px, uq y “ gpx, uq
for appropriate functions f and g.
(b) Linearize the system around the solution yptq “ 0, uptq “ 1, @t ě 0. 2
„  „ 
x1 y
Solution to Exercise 2.5. Defining x “ – , we can write
x2 y9
„  „ 
y9 y9
x9 “ “ “ f px, uq,
y: ´y9 ´ y ` u2 ´ 1
y “ gpx, uq
with
„ 
x2
f px, uq – , gpx, uq “ x1
´x1 ´ x2 ` u2 ´ 1
The linearized system around the equilibrium point x “ 0, u “ 1 is given by

δ9x “ A δ x ` b δ u
δy “ cδx`d δu
with
„  „ 
B f ˇˇ 0 1 B f ˇˇ 0
A“ “ , b“ “ ,
2
ˇ ˇ
Bx x“0,u“1 ´1 ´1 Bu x“0,u“1
Bg ˇˇ “ ‰ Bg ˇˇ “ ‰
c“ ˇ “ 1 0 , d“ ˇ “ 0 .
Bx x“0,u“1 Bu x“0,u“1

2.6 (Local linearization around equilibrium: one-link robot). Consider the one-link robot in
Figure 2.2, where θ denotes the angle of the link with the horizontal, τ the torque applied
at the base, px, yq the position of the tip, ` the length of the link, I its moment of inertia, m
the mass at the tip, g gravity’s acceleration, and b a friction coefficient. This system evolves
according to the following equation:
I θ: “ ´bθ9 ´ gm cos θ ` τ.

5
Lecture 2

m
y

θ
τ x
Figure 2.2. One-link robotic manipulator.

(a) Compute the state-space model for the system when u “ τ is regarded as the input and
the vertical position of the tip y is regarded as the output.
Please denote the state vector by z to avoid confusion with the horizontal position of the
tip x, and write the model in the form

z9 “ f pz, uq y “ gpz, uq

for appropriate functions f and g.


Hint: Do not forget the output equation!
(b) Show that θ ptq “ π{2, τptq “ 0, @t ě 0 is a solution to the system and compute its
linearization around this solution.
From your answer, can you predict if there will be problems when one wants to control
the tip position close to this configuration just using feedback from y? 2

” ı
θ
Solution to Exercise 2.6. (a) Let us pick the state vector as z – θ9
. Then
„  „ 
θ9 θ9
z9 “ : “ “ f pz, uq,
θ ´ b θ9 ´ gm cos θ ` τ
I I I

where
„ 
z2
f pz, uq – u .
´ bI z2 ´ gm
I cos z1 ` I

Moreover,

y “ ` sin θ “ gpz, uq,

with

gpz, uq – ` sin z1 .
” ı
π {2
(b) For z0 ptq “ 0
and u0 ptq “ 0, ě 0 we have
„ 
0
f pz0 , uq “ π “ 0 “ z90 , @t ě 0.
´ gm
I cos 2

Therefore this pair z0 , u0 satisfied the differential equation.

6
João P. Hespanha

The linearization around this solution is given by

δ9z “ Aδ z ` Bδ u
δ y “ Cδ z ` Dδ u,

where
„  „  „ 
Bf 0 1 0 1 Bf 0
A– pz0 , u0 q “ gm b “ gm , B– pz0 , u0 q “ 1
Bz I sin π
2 ´ I I ´ bI Bz I
Bg “ ‰ “ ‰ Bg
C – pz0 , u0 q “ ` cos π2 0 “ 0 0 , D – pz0 , u0 q “ 0.
Bz Bz
The fact that C and D are both zero means that around this configuration the torque
has little affect on the output (i.e., the y position). In fact, it only affects y through
second order effects that were neglected by the linearization. This indicates that it will
be difficult to control y around this configuration.

2.7 (Local linearization around trajectory: unicycle). A single-wheel cart (unicycle) moving
on the plane with linear velocity v and angular velocity ω can be modeled by the nonlinear
system

p9 x “ v cos θ , p9 y “ v sin θ , θ9 “ ω, (2.1)

where ppx , py q denote the Cartesian coordinates of the wheel and θ its orientation. Regard
“ ‰1
this as a system with input u – v ω P R2 .

(a) Construct a state-space model for this system with state


» fi » fi
x1 px cos θ ` ppy ´ 1q sin θ
x “ –x2 fl – –´px sin θ ` ppy ´ 1q cos θ fl
x3 θ
“ ‰1
and output y – x1 x2 P R2 .

(b) Compute a local linearization for this system around the equilibrium point xeq “ 0, ueq “
0.

(c) Show that ωptq “ vptq “ 1, px ptq “ sint, py ptq “ 1 ´ cost, θ ptq “ t, @t ě 0 is a solution
to the system.

(d) Show that a local linearization of the system around this trajectory results in an LTI Attention! Writing
system. 2 the system (2.1) in the
carefully chosen
coordinates x1 , x2 , x3
is crucial to getting an
Solution to Exercise 2.7. (a) LTI linearization. If
» fi one tried to linearize
v ` ωx2 this system in the
x9 “ – ´ωx1 fl original coordinates
ω px , py , θ , one would
get an LTV system.

(b)
» fi » fi
0 0 0 1 0 „ 
1 0 0
δ9x “ –0 0 0fl δ x ` –0 0fl δ u, δy “ δ x.
0 1 0
0 0 0 0 1

7
Lecture 2

(c) In x coordinates the candidate solution is


» fi » fi » fi
px cos θ ` ppy ´ 1q sin θ sint cost ´ cost sint 0
xptq “ –´px sin θ ` ppy ´ 1q cos θ fl “ –´ sint sint ´ cost cost fl “ –´1fl
θ t t

Therefore
» fi » fi
0 v ` ωx2
x9 “ –0fl “ – ´ωx1 fl .
1 ω

(d)
» fi » fi
0 1 0 1 ´1 „ 
1 0 0
δ9x “ –´1 0 0fl δ x ` –0 0 fl δ u, δy “ δ x.
0 1 0
0 0 0 0 1

2.8 (Feedback linearization controller). Consider the inverted pendulum in Figure 2.1.
(a) Assume that you can directly control the system in torque (i.e., that the control input is
u “ T ).
Design a feedback linearization controller to drive the pendulum to the upright position.
Use the following values for the parameters: ` “ 1 m, m “ 1 kg, b “ 0.1 N m´1 s´1 , and
g “ 9.8 m s´2 . Verify the performance of your system in the presence of measurement
noise using Simulink.
(b) Assume now that the pendulum is mounted on a cart and that you can control the cart’s
jerk, which is the derivative of its acceleration a. In this case,

T “ ´m ` a cos θ , a9 “ u.

Design a feedback linearization controller for the new system.


What happens around θ “ ˘π{2? Note that, unfortunately, the pendulum needs to pass
by one of these points for a swing-up, which is the motion from θ “ π (pendulum down)
to θ “ 0 (pendulum upright). 2

Solution to Exercise 2.8. (a) Since the system is given by

m`2 θ: “ mg` sin θ ´ bθ9 ` u,

a proportional-derivative (PD) feedback linearization control is given by

u “ ´mg` sin θ ` bθ9 ` m`2 ´ KD θ9 ´ KP θ q,


`

where the constants KD and KP should be chosen so as to achieve good performance for
the following closed-loop system:

θ: “ ´KD θ9 ´ KP θ .

(b) It is now convenient to write the system in the form

g bθ9 1
θ: “ sin θ ´ 2 ´ a cos θ
` m` `
a9 “ u.

8
João P. Hespanha

Defining

g sin θ bθ9 a cos θ


z– ´ 2´ ,
` m` `
we conclude that we can re-write the system as

θ: “ z
gθ9 cos θ bz a θ9 sin θ cos θ
z9 “ ´ 2` ´ u
` m` ` `
A feedback linearization control can then be given by

gθ9 cos θ bz a θ9 sin θ cos θ ` ´ gθ9 cos θ bz a θ9 sin θ ¯


´ 2` ´ u“v ô u“ ´ 2` ´v ,
` m` ` ` cos θ ` m` `
where v is chosen so as to achieve good performance for the following closed-loop sys-
tem:

θ: “ z
z9 “ v.

You might also like