MAE143c: Embedded Control & Robotics, midterm...

2

Click here to load reader

Transcript of MAE143c: Embedded Control & Robotics, midterm...

Page 1: MAE143c: Embedded Control & Robotics, midterm …renaissance.ucsd.edu/courses/mae143c/midterm_143c_15.pdfMAE143c: Embedded Control & Robotics, midterm ... Sketch its Bode plot. ...

MAE143c: Embedded Control & Robotics, midterm (2015)Modeling the double inverted pendulum

90 minutes, no electronics, closed book, 1 page of notes allowed.

θ1

θ2

Consider the driven two-pendulum system illustrated above, where each pendulum is a uniform rod of length ℓ and mass m,

a motor is applied at the base to which applies a torque τ to the first pendulum, and the angles are measured, in radians,

counterclockwise from the down orientation. This system is governed by the following four first-order equations:[

16− 9cos2(θ1 −θ2)]dθ1

dt=

6

mℓ2

[

2p1 − 3cos(θ1 −θ2)p2

]

, (1a)

[

16− 9cos2(θ1 −θ2)]dθ2

dt=

6

mℓ2

[

8p2 − 3cos(θ1 −θ2)p1

]

, (1b)

d p1

dt=−mℓ2

2

[dθ1

dt

dθ2

dtsin(θ1 −θ2)+

3g

ℓsinθ1

]

+ τ, (1c)

d p2

dt=−mℓ2

2

[dθ1

dt

dθ2

dtsin(θ2 −θ1)+

g

ℓsinθ2

]

, (1d)

where p1 and p2 are the generalized momenta of the system (see https://en.wikipedia.org/wiki/Double pendulum).

1. Linearize this system about a (possibly time-varying) nominal trajectory {θ̄1(t), θ̄2(t), p̄1(t), p̄2(t)}, none of the components

of which is (yet) assumed to be small. That is, in (1a) - (1d), take

θ1(t) = θ̄1(t)+θ′1(t), θ2(t) = θ̄2(t)+θ

′2(t), p1(t) = p̄1(t)+ p′1(t), p2(t) = p̄2(t)+ p′2(t), τ(t) = τ̄(t)+ τ

′(t),

multiply out, and keep all terms which are linear in the perturbation (primed) quantities. The following identities will help:

sin(x+ y) = sinx cosy+ cosx siny, cos(x+ y) = cosx cosy− sinx siny.

2a. Starting from the solution to problem 1 above, linearize this system about the (stable) equilibrium nominal trajectory given

by the hanging condition θ̄1 = θ̄2 = 0.

2b. Starting from the solution to problem 1 above, linearize this system about the (unstable) equilibrium nominal trajectory

given by the “jack-knifed” condition θ̄1 = 0, θ̄2 = π.

2c. Starting from the solution to problem 1 above, linearize this system about the (unstable) equilibrium nominal trajectory

given by the upright condition θ̄1 = θ̄2 = π.

3a. Take the Laplace transform of the system of linearized equations governing the upright condition, as given in problem

2c above. Combine the resulting four algebraic equations to eliminate θ1, p1, and p2, thereby determining a single transfer

function Ginner(s) = θ2(s)/τ(s). [Hint: use a simplified notation for the intermediate algebra to minimize the work, introducing

linear operators Li for each of the coefficients as appropriate.]

3b. Proceed as in problem 3a above, but now combine the equations to eliminate τ, p1, and p2, thereby determining a single

transfer function Gouter(s) = θ1(s)/θ2(s).

4. Assuming m = 1, ℓ = 1, and g = 10, and evaluating, rewrite the transfer functions Ginner(s) and Gouter(s) given in problems

3a and 3b with the coefficients given as numerical values. If possible, determine where the poles and zeros of each of these

transfer functions are (during the midterm, only attempt this if it’s possible for you to do by hand!).

Page 2: MAE143c: Embedded Control & Robotics, midterm …renaissance.ucsd.edu/courses/mae143c/midterm_143c_15.pdfMAE143c: Embedded Control & Robotics, midterm ... Sketch its Bode plot. ...

5. Consider the transfer function DPID(s) = K(

1+ 1TI s

+TDs)

, with TI = 2 and TD = 0.5. Where are the poles and zeros of this

transfer function? Is it strictly proper, semi proper, or improper? Sketch its Bode plot. Discuss thoroughly the pros and cons of

using a transfer function of this form as a controller.

6. Consider a simple system given by d2y/dt2 = u. What is the common name given to a plant of this type? Determine

the transfer function G(s) = Y (s)/U(s) for this system. Then, sketch the root locus (with respect to K) for the closed-loop

system given by G(s) in this problem acting together with the DPID(s) proposed in problem 5. Sketch the Bode plot of L(s) =G(s)DPID(s). Taking K = 10, compute the step response of the closed-loop system T (s) = G(s)DPID(s)/[1+G(s)DPID(s)].In this case (with K = 10), where are the closed-loop poles? Is the system stable or unstable? If it is stable, what are the gain

margin and phase margin?

7. Noting the various disadvantages of the controller proposed in problem 5, design a lead-lag controller Dlead−lag(s) that

achieves approximately the same effect as the controller DPID(s) proposed in problem 5 on the plant G(s) considered in problem

6. Describe precisely (using the Bode plot!) how the controller Dlead−lag(s) may be tuned, and tune it as best as possible to

achieve similar a similar step response as in the case considered in problem 6. What is this process called, of tuning a controller

while using the Bode plot?

Some potentially useful hints follow. Here is a Laplace transform table:

f (t) (for t ≥ 0−) F(s)

eat 1/(s− a)

t eat 1/(s− a)2

1 1/s

t 1/s2

δσ(t) −−−→σ→0

1

cos(bt) s/(s2 + b2)

sin(bt) b/(s2 + b2)

Recall that we may determine the roots of a cubic polynomial analytically as follows. Starting with the normal form

λ3 +Pλ

2+Qλ+R = 0,

we first define λ = x−P/3 and substitute, giving

x3 + qx+ r = 0,

where q = Q−P2/3 and r = R+2P3/27−PQ/3. This reduced form is solved first for its roots x j for j ∈ [1,2,3], after which

the roots λ j = x j −P/3 solving the corresponding equation in normal form may be determined immediately. The discriminant

in this case, d = r2/4+ q3/27, again characterizes the nature of the solution. For real q and r,

• if d > 0, there is one real and two complex-conjugate roots,

• if d = 0, there are three real roots, at least two of which are identical, and

• if d < 0, there are three distinct, real roots.

As may be verified by substitution, in the first two of these cases (with d ≥ 0), the roots are given by Cardano’s formula (note

that the imaginary part of the complex roots goes to zero as d → 0)

x1 = u++ u−, x2,3 =−u++ u−2

± i√

3 · u+− u−2

where u± =3

−r/2±√

d.

In the third case (with d < 0), the so-called casus irreducibilis, the three distinct, real roots are given by

x j = v cos(θ/3+ 2π j/3) where v = 2√

−q/3, θ = acos( −r/2√

−q3/27

)

.