0% found this document useful (0 votes)
64 views

71HW3

Uploaded by

ruweiyan
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
0% found this document useful (0 votes)
64 views

71HW3

Uploaded by

ruweiyan
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/ 7

ECE-171B: Linear Control System Theory

Homework - 3
Fall 2021

* Deadline is Wednesday Nov 10th, 11:59PM


** Please mark how much time you spent on this homework
at the first page of your submission.

1. (Nutrient) First please read Section 4.6 (Drug Administration) in the textbook of
Feedback Systems: An Introduction for Scientists and Engineers by Karl J. Astrom
and Richard M. Murray, 2nd edition for a general background of compartment mod-
els.
Now we will use it to model the nutrients such as vitamins and minerals in our
body. We consider a simplified two-compartment model, e.g., the gastrointestinal
(digestive) system and the blood circulatory system. We consider that a nutrient
with concentration c0 is injected in the digestive system at a volume flow rate of u
and that the concentration in the blood circulatory system is the output. Let cg and
cb be the concentrations of the nutrient in the two compartments and let V1 and V2
be the volumes of the compartments. The dynamical model for mass balances for
the compartments are

dcg
V1 = q(cb cg ) q0 cg + c0 u
dt
dcb
V2 = q(cg cb )
dt
y = cb

where q represents flow rate between the compartments and q0 represents the flow
rate out of the digestive system that is not going to the blood circulation system.
Introducing the variables
 a0 = q0 /V1 , a1 = q/V1 , a2 = q/V2 , and b0 = c0 /V1 and let
c
state variable x = g . The model can be written as,
cb
 
a0 a1 a1 b ⇥ ⇤
ẋ = Ax + Bu = x + 0 u, y = Cx = 0 1 x
a2 a2 0

Let’s pick a1 = 2, a2 = 1, a0 = 1, b0 = 0.5.


(a) Compute the reachability matrix for the system and show that the system is
reachable.
a a 2 a 1 aoil bo 05
AxtBu
Ti 糽 可u
y G 01 it
reachability matrix
T AB B AB ⻔
皆恐
rankTAB 2
systemis reachable
bu
KXtkr sxttxtBUEABKJXTB.kr.in
reference.Signal
the steadystate output_the
了 5K1 01
i ⼩⼼⼆Is⼊⼀ AtBk1 毕 毖⼴
⼋⼗

也 3 0⼼印⼊ 1 45后 2
N 14015K
叺 40.5Kit0.5K2
N z90W⼊ twi
410.5ki 4S.no 8
zsowzcwiyyfkl
kltkz Kizwò 4GW 6
and from the closeloopfunction
CESI AtBkTI Bku

蕊 恐恐 ⼼ 阰 a

C WEI
k scigervalue m.zi

zsowoo_E
Sio.li N
签恐 ⼊
o.ltz.

o 4
i o 4
hit4 ⼋ 014 1.8j 017

K2 6.4 N o 4 i 8j
个 0.7 ⼋ 0.7 1.4i
总筘 N 0.7 1.45
0.9
9点三毖 9to.

n
0.9 a9j
z o9

Soincreasefrom oil too 9


the system is morestable
smoother
(b) Determine a controller u = Kx + kr r (the first part Kx is a state-feedback
control, where K = [k1, k2] is a constant matrix to be determined; the second
part kr r is a reference gain control, where r is a fixed reference signal, and
kr is a parameter to be determined). We require the controller to satisfy the
following two properties: (i) the closed loop system has unit static gain, i.e.
after applying the controller, the steady-state output equals the reference signal
(ysteady state = r). (ii) the closed loop system’s eigenvalues (i.e. the eigenvalues
of A BK) are the two roots of equation 2 + 2⇣0 !0 + !0 2 = 0, where ⇣0 , !0
are considered given.
(c) Set !0 = 1 and ⇣0 = 0.1, 0.4, 0.7, 0.9, then compute the eigenvalues for the
resulting closed-loop system in part (b) and also the corresponding K and kr .
Plug the controller u = Kx + kr r into the system and get the closed-loop
system ẋ = Ax + B( Kx + kr r) = (A BK)x + kr Br, y = Cx. Plot the step
response of the closed-loop systems. Discuss what you observe as ⇣0 increases
from 0.1 to 0.9
(Hint: Step response refers to the system output behavior under a step input
signal r(t) = r for all t 0 where the initial value are zero.)

2. (Self-balancing scooter) Suppose you’re building a self-balancing scooter, in which a


person tries to balance on a moving base (the segway). A model for such a scooter
is defined by the following equations:

(M + m)p̈ m` cos(✓)✓¨ + cṗ + m` sin(✓)✓˙2 = ⌧ R (1a)


m` cos(✓)p̈ + (J + m`2 )✓¨ + ✓˙ mg` sin(✓) = 0 (1b)

Where p is the position of the scooter; ✓ is the angle of the rider (with upright being
✓ = 0); M is the mass of the scooter; m , J , and ` the rider’s mass, moment-of-
inertia, and leg length ( half of rider height); c and are coefficients of friction, R is
the radius of the wheels, and g is the acceleration due to gravity.
The System has the following parameters:

Scooter’s parameters Rider’s parameters


variable value
M 10 kg variable value
R 0.25 m m 30 kg
g 9.81 m/s2 ` 1m
c 0.1 J 100
0.01

Page 2
as nmjp_mlas ⼼ Ü tcptMISMGETRa
⼆0 1b
mlcoslaitgtmiitrio
1019
mgcs.ru
o 25 1 5 9.81 C 011 to.ol Ju 0
N m 30kg R
40i 30as ⼼Ò to 中430⽖⼼Òzazrc
30050 i 130ò too ⼼ 294.3she 0

㓹䨊 燚4
⻔ ⼆⼥
utca ME x Jt lb Ymcas叮
⻄ twnjtmD WFoigitljtmhciptmlos0 ro
tmlCJtmhSMQG mzgps.no as0
tRCJtml i.i
ERCJtmhtmyvsmo.ws0 lJtmlik
mlcosoro ml.at mV Sho 07
Mtm Gtmlyyi Us20
let l la XML SO tlb X Mtm
Mtm rE LMtmj.mglsnytcmlcosoptnhoso.no i
Mtm JtmlD
mtiosthizmlosoz. U
mlosOTRMMtwDmglsno LMtmmi
CMLcodap widcoscas.ru ǗJ
Mtm m v j my cos20
义以 3
义⼯以
4
义3 uRCJtmHtmyismxzcosxz Dtmycx
mlosxz.ir X4
mltgtmEJSMIXDX LMtmigtmlij
mvoix X4
Enlcosxz.HR tlMtmmghhxz mtmrx
cmkoslxzsx3 mz.ws sin x 奵
Mtm Jtmly
m2ltcosxz ly
1100 X

b TH 红0
加⼆ 0 X4 0
⼽ 0
mzgESMXzos cmtNDmglsmx
DX KNLK o.tl
weget too

为 my Ex 1 mlYCX3 mlrx.lt Rotmlyu
义4 必 以 mglxz EMtmytmlgx stml.RU
义⼆
AxtB A
qiin hutmmgv.mil 咒蠡吵了
have specified
from b we

purawetevdusi AE sequilibumpo.hn
䛗熊 i ⻔ 内 is unstable

B超

reachability Matrix
2A 13 BAB PB A313

麣 灜 吐 的B
89700
19356

ran
4s the system isreachable
e we know
131 8 8 8
1989 讪900 650057590
45951900 150013290
A

澏䲜灜 愈㖌
IN At BK ⼋⼗6802 nu to 3M to 3 96.3⻔
⼋⼗ 3 96.3D
i the system is stable the eigenvalue are all less than
zero
f
The scooter has the following features:
- It is controlled by a lever control that reports the desired velocity in m/s
- It is fitted with a speedometer that reports in m/s
- O↵-the-shelf motor controller that controls the motor torque (⌧ ) in newton meters.
(a) Using the above equations to derive the state-space model of the system in
terms of ẋ = f2(x, 3 u), y = h(x, u) where the control input u = ⌧ , output y =
 p
p 6✓ 7
and c = 6 7
4ṗ5Please write down the system model using the parameters

✓˙
(`, M, m, J, , g, c) rather than using the specified parameter values.
(b) Assume that the motor torque is zero, i.e. ⌧ (t) = 0. Calculate the equilibrium
points and linearize the system around the equilibrium point(s). [Note: Please
write down your results using the parameters (`, M, m, J, , g, c) rather than
using the specified parameter values. And please write down certain details
about how you derive the results rather than merely providing the final results.]
(c) Study the stability of the equilibrium points calculated in (b) using the linearized
state-space models obtained in (b). [Note: In this question, you can use the
specified parameter values.]
(d) For the equilibrium point with ✓ = 0, compute the reachability matrix for the
system and show that the system is reachable (Note: Please use the specified
parameter values. You can use Python control package and command W =
control.ctrb(A,B) and det(W).)
(e) Now let us only focus on the equilibrium point with ✓ = 0. A state feed-
back is defined as ⌧ = Kx, i.e., the input torque varies with the state of the
˙ Show that the fol-
system. Here the state of the system is x = (p, ✓, ṗ, ✓).
lowing state feedback stabilizes the linearization of the self-balancing scooter:
K = [ 61.2, 6920, 200, 1772]. [Note: Please use the specified parameter val-
ues.]
(f) Now, simulate the non-linear system with the same state feedback as in part
(e) (You can use ODE function in Python to simulate). Try di↵erent initial
conditions and show that the controller asymptotically stablizes the system for
some initial conditions while it fails to do so for some others. That is, for the non-
linear system, the state feedback controller locally stabilizes the system. Here
locally means that the controller stabilizes the system if the initial condition is
not very far away from the equilibrium point, but fails to stabilize the system
if the initial condition is far away from the equilibrium point. Provide plots of
✓(t) for both types of initial conditions.

Page 3

You might also like