Professional Documents
Culture Documents
1. SVD I
Find the singular value decomposition of the following matrix (leave all work in exact form, not decimal):
" #
2 2
A=
3 −3
(a) Find the eigenvalues of AA> and order them from largest to smallest, λ1 > λ2 .
Solution:
λ1 = 18 , λ2 = 8
(b) Find orthonormal eigenvectors ~ui of AA> (all eigenvectors are mutually orthogonal and unit length).
√
(c) Find the singular values σi = λi . Find the ~vi vectors from:
A>~ui = σi~vi
Solution: √ √
σ1 = 3 2 , σ2 = 2 2
" 1 # " 1 #
√ √
~v1 = 2 , ~v2 = 2
− √12 √1
2
A = σ1~u1~v> u2~v>
1 + σ2~ 2
2. SVD II
Find the singular value decomposition of the following matrix (leave all work in exact form, not decimal):
√
1 0 − 3
√
A= 3 0 1
0 3 0
(a) Find the eigenvalues of A> A and order them from largest to smallest, λ1 > λ2 .
Solution:
λ1 = 9 , λ2 = 4 , λ3 = 4
(b) Find orthonormal eigenvectors ~vi of A> A (all eigenvectors are mutually orthogonal and unit length).
Solution:
0
~v1 = 1
0
Since λ2 = λ3 , any two mutually orthogonal unit vectors that are also orthogonal to ~v1 = [0, 1, 0]> will
work. For example:
1 0
~v2 = 0 , ~v3 = 0
0 1
√
(c) Find the singular values σi = λi . Find the ~ui vectors from:
A~vi = σi~ui
Solution:
σ1 = 3 , σ2 = 2 , σ3 = 2
√
1
0 √2 − 3
3 12
~u1 = 0 , ~u2 = 2 , ~u3 = 2
1 0 0
A = σ1~u1~v> u2~v>
1 + σ2~ u3~v>
2 + σ3~ 3
Solution: √
1
0 0 0 0 0 − 3 0 0
√23 12
A = 3 0 0 0 + 2 2 0 0 + 2 2
0 0
0 1 0 0 0 0 0 0 0
3. Balance
Justin is working on a small jumping robot named Salto. Salto can bounce around on the ground, but Justin
would like Salto to balance on its toe and stand still. In this problem, we’ll work on systems that could help
Salto balance on its toe using its reaction wheel tail.
Figure 1: Picture of Salto and the x-z physics model. You can watch a video of Salto here: http://www.
youtube.com/watch?v=2dJmArHRn0U
Standing on the ground, Salto’s dynamics in the x-z plane (called the sagittal plane in biology) look like an
inverted pendulum with a flywheel on the end:
Where θ1 is the angle of the robot’s body relative to the ground (0 is straight up), θ̇1 is its angular velocity, θ̇2
is the angular velocity of the reaction wheel tail, and u is the current input to the tail motor. m1 , m2 , I1 , I2 , l, Kt
are positive constants representing system parameters (masses and angular momentums of the body and tail,
leg length, and motor torque constant respectively) and g = 9.81m/s2 is the acceleration due to gravity.
Numerically substituting Salto’s physical parameters, the differential equations become approximately:
(a) Using the state vector [θ1 , θ̇1 , θ̇2 ]> , input u, and output y linearize the system about the the point
[0, 0, 0]> . Write the linearized equations as dtd ~x = A~x + Bu and y = C~x. Write the matrices with the
physical numerical values, not symbolically.
Note: since the tail is like a wheel, we care only about its angular velocity θ̇2 and not its angle θ2 .
Note: text in red are solutions for if you solved before a typo was fixed
If you solved before the typo fix using:
0.001θ̈1 = −0.025u + 100 sin(θ1 )
Then the dynamics are:
θ̇1 0 1 0 θ1 0
5
θ̈1 = 10 0 0 θ̇1 + −25 u
θ̈2 0 0 0 θ̇2 500
h i θ1
y = 0 −1 1 θ̇1
θ̇2
Solution:
h i 0 −25 0
C = B AB A2 B = −25 0 −2500
500 0 0
(c) Design an observer of the form dtd x̂ = Ax̂ + Bu − L(Cx̂ − y) and solve for the gains in L that make the
observer dynamics converge with all eigenvalues λ1 = λ2 = λ3 = −10.
~e˙ = (A + LC)~e
where~e is the error between the estimated state x̂ and the true state~x. The characteristic polynomial is:
A + LC = 0
0 1 + l1 −l1
100 l2 −l2 = 0
0 l3 −l3
(λ + 10)3 = 0
λ 3 + 30λ 2 + 300λ + 1000 = 0
l3 − l2 = 30
−100l1 − 100 = 300
−100l3 = 1000
If you solved before the typo fix and set λ1 = λ2 = λ3 = 10, then the characteristic polynomial is:
(λ − 10)3 = 0
λ 3 − 30λ 2 + 300λ − 1000 = 0
which we can achieve by matching the coefficients of matching powers:
l3 − l2 = −30
−100l1 − 100 = 300
−100l3 = −1000
−105 l3 = 1000
Solution:
The original diagram for the summer circuit was incorrect. Circuits which had a resistor value of n ∗ R1
for the feedback of the the first amplifier in the summing block will not be deducted points.
We can put the equations in the following form to figure out how we should change our control inputs.
v∗ + βL δ (t)
vL (t) = dL (t + 1) − dL (t) = θL ( − kL ) − βL
θL θL
v∗ + βR δ (t)
vR (t) = dR (t + 1) − dR (t) = θR ( + kR ) − βR
θR θR
These are our new closed-loop control inputs - the new closed-loop proportional control is the kL /kR term.
v∗ + βL δ (t)
uL (t) = − kL
θL θL
∗
v + βR δ (t)
uR (t) = + kR
θR θR
(a) Let’s examine the feedback proportions kL and kR more closely. Should they be positive or negative?
What do they mean? Think about how they interact with δ (t).
Solution: If δ (t) > 0, it means that dL (t) > dR (t), so the left wheel is ahead of the right one. In order
to correct for this, we should help the right wheel catch up, and we should do this by making kL > 0 in
order to apply less power on the left wheel and kR > 0 in order to apply more power to the right wheel.
Likewise, if δ (t) < 0, it means that dL (t) < dR (t), so the right wheel is ahead of the left one. In this
case, kL > 0 is still valid, since kL δ (t) > 0 and so the left wheel speeds up, and likewise kR > 0 is still
correct since kR δ (t) < 0 so the right wheel slows down.
(b) Let’s look a bit more closely at picking kL and kR . Firstly, we need to figure out what happens to δ (t)
over time. Find δ (t + 1) in terms of δ (t).
Solution:
δ (t + 1) = dL (t + 1) − dR (t + 1)
= v∗ − kL δ (t) + dL (t) − (v∗ + kR δ (t) + dR (t))
= v∗ − kL δ (t) + dL (t) − v∗ − kR δ (t) − dR (t)
= −kL δ (t) − kR δ (t) + (dL (t) − dR (t))
= −kL δ (t) − kR δ (t) + δ (t)
= δ (t)(1 − kL − kR )
v∗ + βL δ (t)
uL (t) = − kL
θL θL
v∗ + βR δ (t)
uR (t) = + kR
θR θR
Solution:
δ (t + 1) = dL (t + 1) − dR (t + 1)
= (θL + ∆θL )uL (t) − (βL + ∆βL ) + dL (t) − ((θR + ∆θR )uR (t) − (βR + ∆βR ) + dR (t))
= θL uL (t) − βL + ∆θL uL (t) − ∆βL + dL (t) − (θR uR (t) − βR + ∆θR uR (t) − ∆βR + dR (t))
= v∗ − kL δ (t) + ∆θL uL (t) − ∆βL + dL (t) − (v∗ + kR δ (t) + ∆θR uR (t) − ∆βR + dR (t))
= v∗ − kL δ (t) + ∆θL uL (t) − ∆βL + dL (t) − v∗ − kR δ (t) − ∆θR uR (t) + ∆βR − dR (t)
= v∗ − v∗ + (dL (t) − dR (t)) − kL δ (t) − kR δ (t) + ∆θL uL (t) − ∆βL − ∆θR uR (t) + ∆βR
= δ (t)(1 − kL − kR ) + ∆θL uL (t) − ∆βL − ∆θR uR (t) + ∆βR
v∗ + βL δ (t) v∗ + βR δ (t)
= δ (t)(1 − kL − kR ) + ∆θL ( − kL ) − ∆θR ( + kR ) − ∆βL + ∆βR
θL θL θR θR
∆θL ∗ ∆θL ∆θR ∗ ∆θR
= δ (t)(1 − kL − kR ) + (v + βL ) − δ (t)kL − (v + βR ) − δ (t)kR − ∆βL + ∆βR
θL θL θR θR
∆θL ∆θR ∆θL ∗ ∆θR ∗
= δ (t)(1 − kL − kR − kL − kR )+ (v + βL ) − (v + βR ) − ∆βL + ∆βR
θL θR θL θR
∆θL ∆θR ∆θL ∗ ∆θR ∗
= δ (t)(1 − kL − kR − kL − kR )+( (v + βL ) − ∆βL ) − ( (v + βR ) − ∆βR )
θL θR θL θR
δ (1) = δ0 λ + c
δ (2) = λ (δ0 λ + c) + c = δ0 λ 2 + cλ + c
δ (3) = λ (δ0 λ 2 + cλ + c) + c = δ0 λ 3 + cλ 2 + cλ + c
δ (4) = λ (δ0 λ 3 + cλ 2 + cλ + c) + c = δ0 λ 4 + cλ 3 + cλ 2 + cλ + c
δ (5) = δ0 λ 5 + c(λ 4 + λ 3 + λ 2 + λ 1 + 1)
δ (n) = δ0 λ n + c(1 + λ 1 + λ 2 + λ 3 + λ 4 + ... + λ n )
n
δ (n) = δ0 λ n + c( ∑ λ k ) (rewriting in sum notation)
k=0
1−λn
δ (n) = δ0 λ n + c( ) (sum of a geometric series)
1−λ
1−λ∞
δ (n = t → ∞) = δ0 λ ∞ + c( )
1−λ
1
δ (n = t → ∞) = c
1−λ
1
δss = c
1−λ
For your entertainment only: δss is fully-expanded form (not required) is
∆θL ∗ ∆θR ∗
( (v + βL ) − ∆βL ) − ( (v + βR ) − ∆βR )
θL θR
∆θL ∆θR
kL + kR + kL + kR
θL θR
The answer is correct, since plugging in zero into all the model mismatch terms into c causes c = 0, so
δss = 0 if there is no model mismatch. Compared to the open-loop result of δss = ±∞, the closed loop
1
δss = c is a much-desired improvement.
1−λ
What does this mean for the car? It means that the car will turn initially for a bit but eventually
converge to a fixed heading and keep going straight from there.
Contributors:
• Justin Yim.
• Tianrui Guo.
• Edward Wang.