PS#4 - Nonlinear Systems and Control Spring 2011
PS#4 - Nonlinear Systems and Control Spring 2011
PS#4 - Nonlinear Systems and Control Spring 2011
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
<strong>PS#4</strong> - <strong>Nonlinear</strong> <strong>Systems</strong> <strong>and</strong> <strong>Control</strong> <strong>Spring</strong> <strong>2011</strong><br />
Problem 1<br />
The magnetic suspension system is modeled by<br />
˙x1 = x2<br />
˙x2 = g − k<br />
m x2<br />
L0ax<br />
−<br />
2 3<br />
2m(a + x1) 2<br />
˙x3 =<br />
<br />
1<br />
−Rx3 +<br />
L(x1)<br />
L0ax2x3<br />
<br />
+ u<br />
(a + x1) 2<br />
where x1 = y is the elevation, x2 = ˙y, x3 = I is the current, <strong>and</strong> u = V is the input voltage. Use the<br />
following numerical data: m = 0.1kg, k = 0.001N/m/sec, g = 9.81m/sec2 , a = 0.05m, L0 = 0.01H,<br />
.<br />
L1 = 0.02H, R = 1Ω, <strong>and</strong> L(x1) = L1 + L0<br />
1+ x 1<br />
a<br />
1. Find the steady-state values Iss <strong>and</strong> Vss of I <strong>and</strong> V , respectively, which are needed to balance the<br />
ball at a given position y = r.<br />
2. Is the equilibrium point obtained above stable?<br />
3. Linearize the system <strong>and</strong> design a state feedback control law to stabilize the ball at y = 0.05m.<br />
Solution:<br />
1. Set ˙x1 = ˙x2 = ˙x3 = 0. Then, we have<br />
0 = x2<br />
0 = g − k<br />
m x2<br />
L0ax<br />
−<br />
2 3<br />
2m(a + x1) 2<br />
0 =<br />
<br />
1<br />
−Rx3 +<br />
L(x1)<br />
L0ax2x3<br />
<br />
+ u<br />
(a + x1) 2<br />
Now, set x1 = yss = r, x3 = Iss, <strong>and</strong> u = Vss. Then, (choosing the positive sign)<br />
<br />
Iss =<br />
2mg(a + r) 2<br />
,<br />
L0a<br />
Vss = RIss = Iss<br />
2. We linearize the system around the equilibrium point xss = [r, 0, Iss] T to obtain<br />
where c1 to c5 are positive constants given by<br />
A = ∂f<br />
∂x |xss<br />
⎡<br />
⎤<br />
0 1 0<br />
= ⎣c1<br />
−c2 −c3⎦<br />
0 c4 −c5<br />
c1 = L0aI 2 ss<br />
m(a + r) 3 , c2 = k<br />
m , c3 = L0aIss<br />
m(a + r) 2 , c4 =<br />
Now, the charactersitic equation is given by<br />
λ 3 + (c2 + c5)λ 2 + (c2c5 + c3c4 − c1)λ − c1c5 = 0<br />
L0aIss<br />
L(r)(a + r) 2 , c5 = R<br />
L(r)<br />
which is clearly unstable (using Routh-Hurwitz criterion) due to the sign of the last element being<br />
negative.<br />
1
3. The linearized system is given by<br />
˙xδ = Axδ + Buδ<br />
where xδ = x − xss <strong>and</strong> uδ = u − uss, with A as in part 2 <strong>and</strong> B = [0 0 L(r)] T . It can easily be<br />
verified that the pair (A, B) is controllable, <strong>and</strong> hence we can design a state feedback gain K,<br />
such that A − BK has eigenvalues at −2 <strong>and</strong> −1 ± j. The control input is given by<br />
where Vss = Iss = 6.26.<br />
Problem 2<br />
Let<br />
Aa =<br />
u = − −256.2 −65.5 3.07 (x − xss) + Vss<br />
An×n 0n×p<br />
Cp×n 0p×p<br />
<br />
, Ba =<br />
(n+p)×(n+p)<br />
where A, B, <strong>and</strong> C satisfy the rank condition<br />
<br />
A<br />
rank<br />
C<br />
<br />
B<br />
= n + p.<br />
0<br />
Bn×p<br />
0p×p<br />
Show that if (A, B) are controllable, then (Aa, Ba) are also controllable.<br />
Solution:<br />
First note that since (A, B) are controllable then<br />
rank (C(A, B)) . = rank B|AB| · · · |A n−1 B = n<br />
<br />
(n+p)×p<br />
Now, let us look at the controllability matrix of C(Aa, Ba):<br />
rank (C(Aa, Ba)) = rank Ba|AaBa| · · · |A n+p−1 <br />
a Ba<br />
<br />
B | AB | A2B | · · · | An+p−1B = rank<br />
0 | CB | CAB | · · · | CAn+p−2 <br />
B<br />
<br />
A B<br />
= rank .<br />
C 0 Ip×p | 0p×p | 0p×p | · · · | 0p×p<br />
0n×p | B | AB | · · · | A n+p−2 B<br />
<br />
A<br />
Since rank<br />
C<br />
<br />
<br />
B<br />
0n×p<br />
= n + p, <strong>and</strong> rank<br />
0<br />
| B | AB | · · · | An+p−2 Ip×p | 0p×p | 0p×p | · · · |<br />
<br />
B<br />
= n + p,<br />
0p×p<br />
it follows that rank (C(Aa, Ba)) = n + p, <strong>and</strong> therefore the augmented system is controllable.<br />
Problem 3<br />
A simplified model of the low-frequency motion of a ship is given by<br />
τ ¨ ψ + ˙ ψ = kσ<br />
where ψ is the heading angle of the ship <strong>and</strong> σ is rudder angle, viewed as the control input. The time<br />
constant τ <strong>and</strong> the gain k depend on the forward speed of the ship v, according to the expressions<br />
τ = τ0 v0<br />
v<br />
v <strong>and</strong> k = k0 v0 , where τ0, k0, <strong>and</strong> v0 are constants.<br />
1. Assuming a constant forward speed, design a state feedback integral controller so that ψ tracks a<br />
desired angle ψr.<br />
2. Use gain scheduling to compensate for varying forward speed.<br />
2
Solution:<br />
1. Take x1 = ψ − ψr, x2 = ˙ ψ, <strong>and</strong> u = σ, then the state-space model is given by<br />
<br />
˙x1 0 1<br />
=<br />
˙x2 0 − 1<br />
<br />
x1 0k<br />
+ u<br />
τ<br />
x2 τ<br />
<br />
A<br />
B<br />
As such, we would like to regulate the system to ψr, using integral control. First, it is easy to<br />
check that the pair (A, B) is controllable <strong>and</strong> that for C = [1 0]<br />
<br />
A<br />
rank<br />
C<br />
<br />
B<br />
= 2 + 1 = 3<br />
0<br />
Note that k = 0 <strong>and</strong> τ = 0. Therefore, taking ˙η = ψ − ψr results in the following augmented<br />
system<br />
˙x = Ax + Bu<br />
˙η = Cx<br />
Since the system above is controllable (see the previous exercise), we can design<br />
u = − k1 k2<br />
<br />
k3<br />
<br />
x<br />
η<br />
that stabilizes the overall system to the desired equilibrium. The closed-loop system matrix is<br />
given by<br />
<br />
A<br />
C<br />
<br />
0 B k1<br />
−<br />
0 0<br />
k2<br />
⎡<br />
<br />
0<br />
k3 = ⎣−<br />
1 0<br />
kk1<br />
τ<br />
1 − τ (1 + kk2) − kk3<br />
1 0<br />
⎤<br />
⎦<br />
τ<br />
0<br />
which has the following characteristic polynomial<br />
λ 3 + 1<br />
τ (1 + kk2)λ 2 + kk1 kk3<br />
λ +<br />
τ τ<br />
All the roots of the characteristic polynomial lie in the left half plane iff the following conditions<br />
are satisfied<br />
1<br />
τ (1 + kk2)<br />
<br />
kk1 kk3 1<br />
kk1<br />
> 0, > 0, > 0, (1 + kk2) · −<br />
τ τ τ τ<br />
kk3<br />
> 0<br />
τ<br />
which give the desired stabilizing control gains k1, k2, <strong>and</strong> k3.<br />
2. Whenever the forward speed is varying, the resulting system matrices depend on v, i.e., A(v) <strong>and</strong><br />
B(v), because τ = τ(v) <strong>and</strong> k = k(v). We can design control gains k1(v) k2(v) k3(v) such<br />
that the over all closed-loop system matrix<br />
<br />
A(v) 0<br />
C 0<br />
is Hurwitz for a given velocity v.<br />
−<br />
= 0<br />
<br />
B(v) k1(v) k2(v) k3(v)<br />
0<br />
<br />
3
Problem 4<br />
Consider the following scalar (x ∈ R 1 ) system<br />
˙x = −ax + bu (1)<br />
The values of a <strong>and</strong> b are unknown, however we assume that b > 0, i.e., the sign of b is known. Now<br />
the objective is to make system track the following known reference model<br />
˙xm = −amxm + bmur<br />
where am > 0 <strong>and</strong> the reference input ur is known. Let the controller be<br />
u = θ1ur − θ2x (3)<br />
where the parameters θ1 <strong>and</strong> θ2 are the ones that we would like to adjust adaptively online. Define the<br />
error between the system <strong>and</strong> the reference model<br />
1. MIT rule design<br />
e = x − xm<br />
• Substitute the value of u in (3) into equation (1), <strong>and</strong> derive the transfer function from x to<br />
ur (under zero initial condition).<br />
• Using the transfer function derived above <strong>and</strong> the definition of e in (4), derive the following<br />
quantities: ∂e ∂e <strong>and</strong> . Then, use these quantities to form the adaptation equations obtained<br />
∂θ1 ∂θ2<br />
via the MIT rule, i.e., minimize J (θ) = 1<br />
2e2 . Can you implement the MIT controller that<br />
you derived? Why?<br />
• Use the following nominal approximation a + bθ 0 2 ≈ am in your answers for part 2. Can you<br />
implement the resulting adaptation laws now? What is the final MIT rule controller?<br />
2. Lyapunov-based design<br />
Consider the following Lyapunov function c<strong>and</strong>idate<br />
V (e, θ1, θ2) = 1<br />
<br />
e<br />
2<br />
2 + 1<br />
bγ (bθ2 + a − am) 2 + 1<br />
bγ (bθ1 − bm) 2<br />
<br />
Design the update equations of θ1 <strong>and</strong> θ2 so that we obtain a stable system, i.e., ˙ V ≤ 0. Use the<br />
following equation<br />
˙e = −ame − (bθ2 + a − am)x + (bθ1 − bm)ur<br />
3. Simulate both controllers that you got in parts 1 <strong>and</strong> 2 for the following parameters: a = 1,<br />
b = 0.5, am = 2, <strong>and</strong> bm = 2. Take ur to be a square-wave with amplitude 1, <strong>and</strong> γ = 1.<br />
Solution:<br />
1. MIT rule design: It is reasonable to change the design parameters θ1 <strong>and</strong> θ2 in the direction of<br />
the opposite gradient of J , i.e., ˙ θ = −γe ∂e<br />
∂θ , for γ > 0.<br />
• The closed-loop plant equation is<br />
bθ1<br />
˙x = (a + bθ2)x + bθ1ur ⇒ x =<br />
s + a + bθ2<br />
4<br />
ur<br />
(2)<br />
(4)
• As such, we have that<br />
∂e<br />
∂θ1<br />
b<br />
=<br />
ur,<br />
s + a + bθ2<br />
∂e<br />
∂θ2<br />
b<br />
= −<br />
2θ1 (s + a + bθ2) 2 ur<br />
b<br />
= − x<br />
s + a + bθ2<br />
Since we do not know a <strong>and</strong> b, the partial derivatives above cannot be used in the MIT-based<br />
adaptation given by<br />
˙θ = −γe ∂e<br />
∂θ<br />
• Using the approximation a + bθ0 2 ≈ am, we obtain the following adaptation rules instead<br />
˙θ1 = −γ ′<br />
˙θ2 =<br />
<br />
am<br />
ur e<br />
s + am<br />
−γ ′<br />
<br />
− am<br />
<br />
x e<br />
s + am<br />
where γ ′ = γ b . The sign of b is crucial for this scheme to work!<br />
am<br />
2. Take the derivative of V <strong>and</strong> substitute the given expression for ˙e to obtain<br />
˙V = −ame 2 + 1<br />
γ (bθ2<br />
<br />
+ a − am) ˙θ2 − γxe + 1<br />
γ (bθ1<br />
<br />
− bm) ˙θ1 + γure<br />
Then pick the adaptation parameters in order to obtain ˙ V ≤ 0, i.e.,<br />
˙θ1 = −γure<br />
˙θ2 = γxe<br />
This guarantees that (e, θ1, θ2) is bounded. With some more work, one can show that e → 0 as<br />
t → ∞, but not θ1 <strong>and</strong> θ2.<br />
3. For the simulation results run the file sol4adaptive.mdl.<br />
5