0% found this document useful (0 votes)
25 views6 pages

Ece171b HW4

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)
25 views6 pages

Ece171b HW4

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

ECE-171B: Linear Control System Theory

Homework - 4
Fall 2021

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


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

1. (Observer for nutrient model) Continue with Exercise 1 in Homework 3. We will


study the observability of the problem and build an observer.
(a) Compute the observability matrix for the system and determine whether the
system is observable.
(b) Consider an observer for the system in the form dx̂
dt
= Ax̂+Bu+L(y C x̂). Here
L = [`1 , `2 ]T is called as an estimator gain matrix. Define e(t) = x(t) x̂(t).
Please write down the dynamics of e(t) in the form of de
dt
= Ae e. In other words,
you need to write down Ae using A, B, C, L (Note: you might not need all of
them.) Then compute L such that the eigenvalues of Ae are the two roots of
equation 2 + 2⇣e !e + !e 2 = 0, where ⇣e and !e are considered given.
(c) Now we combine the controller you obtained in Homework 3 and the estimator
in part (b). Let u = K x̂ + kr r, where is the estimated states in part (b),
K and kr are what you obtained in Exercise 1(c) in Homework 3, and r is a
reference signal. Note here x̂ follows the dynamics given in part (b), with L
being whatever you calculated in part (b). Let e = x x̂ be the estimation
error. Stack x and e into one 4-dimensional vector x̄ = [x1 , x2 , e1 , e2 ]T . Let the
state be x̄, the input be ū = r, and the output be ȳ = x1 , derive a state space
model for the closed loop system that takes into account the controller and the
estimator. That is to say, find matrices Ā , B̄ and C̄ in the following state space
model
2
4Sowò 4W x̄˙ = Āx̄ + B̄ ū

4 ⼼ two ȳ = C̄ x̄
(Note: you can represent Ā , B̄ and C̄ just using k1 , k2 , kr , `1 , `2 )
Find the eigenvalues of Ā. Assume ū = 0 and !0 > 0, !e > 0, 0 < ⇣0 , 0 < ⇣e ,
determine the stability of the above system.

2. (Observer for Self-balancing scooter) Continue with Exercise 2 in Homework 3. We


will study the observability of the problem and build an observer.
⼽ A x 13u 7 年7 啊 u y Cx E in
from the obsewabiity matrix
Mo G 04
rank 4⻔ 2上
full rank
det ⻔ 1 40
0

i the system is observable


b 裘 Ait ButLly T.li
cx liFT iy a.li

㼦 Ait ButLLCN C
x41 iAItB
rial e.lt
㖌 樊䠁 ⼀
Ax Ani.ua 的
⼆ Aee
⼆ A cx M l.cc x_x
i e A N_n
x i
i Ae ALC
到 司 0 1

烈 ǒǔ 恐订
⼊⼯ Ae
䢳贰
了 ⼋⼗1
⼋⼗
2
1 12 111
⼊ 3⼊⼗⼋⼗ 3that312th 2
⼆⽉ 4tht ⼋⼗
3lztht l4tlzizsew 3hth.tk
红⼆2bewe
wè we li
bewetl
kxtkn.hr csktlk
成⼆
意 from hw3 b

iii o o

i
⻔ 谁叫

j i o o o 义 i r
NIAl E IN34015K1 015K 2 0 0

in
T M o o

A lit Sow⼋⼗ ⼼⼼ 2SoWe itwē o


⼊ 2 2So
Wofzwofl
⼊314 2SewfzweT

i.io woo we So lose


the ⼀eigenvalues are on theleftsideof coordinateaxis
the systemis stable

2 for equilibrium point u 0 o


0
6 4
A
惢 㓸 囖了

yP c 1 00 0 y 0 C 0 1 00
observable matrix


ranklMo 4
京蠡
fullrank
⿒⻔ it
fhiteym
rank
品 了
full Mo
on_no
3 not rank
i 㘩 gums smh we mommy way
的 fromcan we have yep the system is observable
L is observer for system
V 20 4 212i 2 2⻔

L place Hi v1

i
191.1468
3150758
⼝ 以
⻔ for
愿剑
2 t _o 0⼠0.6i
KF 18 1689.2 57 640.1 0
ii for z.tn and 1⼟ Ii
K it 0.5 1198.7 5.8 403.1
iiis.zi i.tt Ii
K1 50 2209.8 125.1.890.2
To satify the property Pst
wehave y cx
rx
AxtBu A BKJxtB.twr
A 张 ⼀点 9 1 00184K4
掀 点 isn 品go.oisn o.no
o.oogzk o.oosrzkz oooo8 o0082k3
7z o.oool

o.ooszk
X3 N4 NFr.AZ
010184Kin Xi ⼆0
0

010082 K X FO
Er Li 18
Kirk
For Lili Kirk 0.5
For iii Kr ⼆⼼ 50
t

angle
for u kitkr.tn
At Atc fromabove

ii
315.0758

M Ant But L ly_成


7.2 oooo8

A
LDAtBlkxtkrrHLc ititBkitBKrrtl.cn

25390 1 3390 1248,4


(a) For the equilibrium point with ✓ = 0,
if y = p, is the system observable from this measurement output? What happens
to the observability of the system when y = ✓? Explain your Answers!
(b) For the observable systems in part-(a), design an observer for the system with
eigenvalues at 4, 20, and at 2±2i. (Hint: you can use the ’place’ function)
(c) Using Python (Hint: you can use the ’place’ function), find the feedback gain
K of a linear controller u = Kx + kr r that stabilizes the segway and gives
closed loop eigenvalues at each of the following three sets of eigenvalues.
(i) 2, 1, and at 0.6 ± 0.6i
(ii) 2, 1, and at 0.1 ± 0.1i
(iii) 2, 1, and at 1 ± i
For each of the three cases, if we require that at steady state pss = r, calculate
the reference gain kr and simulate the response of the system to a step change
in the distance reference r from 0 to 0.02 m (assuming the initial condition is
zero), and plot he tilt angle ✓, p and the torque input ⌧ . (Try to plot torques,
tilt angle and p in separate curves. Scale of each quantity is too di↵erent. Best
way is to have 3 plots, one for the plots of torques for all cases, second for the
plots of tilit angles for all cases, and third for p)
(d) Design an output feedback for the system using your observer from part (b)
above and the first set of state feedback gains designed in part (c) (case (iii)),
but with u = K x̂ + kr r rather than u = Kx + kr r. Again simulate the
response to a step change in the reference value r of 0.02 m and plot both the tilt
angle ✓ and the torque input ⌧ (assuming x(0) = 0). Compare with the results
obtained with full state feedback in part (c). For the initial estimate value, plot
the results with a perfect initial estimate x̂(0) = x(0), and also with a non-zero
¯ = ✓(0)
error in the estimated value of ✓ at time zero, e.g., ✓(0) ˆ ✓(0) = 0.002.

Page 2

You might also like