pendulum being in the upright position. The linearization of the cart-pendulum system around the upright position is:(6)
Cx y BV Ax x
=+=
&
where(7)
.0100
0001
1010
⎟⎟ ⎠ ⎞⎜⎜⎝ ⎛ =⎟⎟⎟⎟⎟⎟⎟⎟⎟ ⎠ ⎞⎜⎜⎜⎜⎜⎜⎜⎜⎜⎝ ⎛ ⎟⎟ ⎠ ⎞⎜⎜⎝ ⎛ −−−=
; Rr K K M l m LM Rr K K Ll mM
C B
g m p g m p
Finally, by substituting the parameter values that correspondto the experimental setup:(8).This system will allow us to design a controller to balancethe inverted pendulum around the point of linearization.
3
.
STABILIZING CONTROLLER DESIGN
The controller design approach for this project is broken upinto two components. The first part involves the design of an optimal state feedback controller for the linearized modelthat will stabilize the pendulum around the upright position.The second part involves the design of a controller thatswings the pendulum up to the unstable equilibrium. Whenthe pendulum approaches the linearized point, the controlwill switch to the stabilizing controller which will balancethe pendulum around the upright position.The state feedback controller responsible forbalancing the pendulum in the upright position is based on aLinear Quadratic Regulator (LQR) design using thelinearized system. In a LQR design, the gain matrix K for alinear state feedback control law
u = -Kx
is found byminimizing a quadratic cost function of the form, (9)
∫
∞
+=
0
Ru(t)dt u(t)Qx(t) x(t) J
T T
where
Q
and
R
are weighting parameters that penalizecertain states or control inputs.The weighting parameters chosen in the design of the optimal state feedback controller are:
⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟ ⎠ ⎞⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎝ ⎛ −⎟⎟ ⎠ ⎞⎜⎜⎝ ⎛ −⎟⎟ ⎠ ⎞⎜⎜⎝ ⎛ −−−−=
0101000
0100010
222222
M l m L g Rr K K M l m LM Ll mM Ll gm Rr K K Ll mM
p g m p p p g m p
A
.11000
01000000
0010
00010000
=⎟⎟⎟⎟⎟ ⎠ ⎞⎜⎜⎜⎜⎜⎝ ⎛ =
RQ
(10)Based on this design, the controller gain matrix for thelinearized system is:
( )
5668306568180444864091699
.-.-.- .- K
=
. (11)By using this
K
and the control law
u = -Kx
, the system isstabilized around the linearized point (pendulum upright).Since this control law is based on the linearized system, thestate feedback optimal controller is only effective when thependulum is near the upright position.
4. STATE ESTIMATION
For the inverted pendulum experimental setup, not all thestate variables are available for measurement. In fact, onlythe cart position,
p
, and the pendulum angle,
θ
, are directlymeasured. This means that the cart velocity and thependulum angular velocity are not immediately available foruse in any control schemes beyond just stabilization. Thus,an observer is relied upon to supply accurate estimations of the states at all cart-pendulum positions.A linear full state observer can be implementedbased on the linearized system derived earlier. Thisobserver is simple in design and provides accurateestimation of all the states around the linearized point. Theobserver is implemented by using a duplicate of thelinearized system dynamics and adding in a correction termthat is simply a gain on the error in the estimates. Theobserver gain matrix is determined by an LQR designsimilar to that used to determine the gain of the optimal statefeedback stabilizing controller. In this case, the weightingparameters are chosen to be:(12)
.10011000
01000000
0010
00010000
⎟⎟ ⎠ ⎞⎜⎜⎝ ⎛ =⎟⎟⎟⎟⎟ ⎠ ⎞⎜⎜⎜⎜⎜⎝ ⎛ =
RQ
Based on this design, the observer gain matrix is:
⎟⎟⎟=
y
010
⎟⎟ ⎠ ⎞⎜⎜⎜⎜⎝ ⎟⎟ ⎠ ⎞⎜⎜⎝ ⎛ ⎟⎟⎟⎟⎟ ⎠ ⎞⎜⎜⎜⎜⎜⎛ −+⎟⎟⎟⎟⎟ ⎞⎜⎜⎜⎜⎜⎝ ⎛ ⎟⎟⎟⎟⎟ ⎞⎜⎜⎜⎜⎜⎛ −−=⎟⎟⎟⎟⎟ ⎠ ⎞
θ θ
pV ..
θ
p p....
θ
p p
&&&&&&&&&&
00001
330393061231000
004314150
0010
⎜⎛
p
⎝ ⎠ ⎠⎝ ⎝
θ θ
8031370
⎜⎜⎜⎜⎜⎛
Leave a Comment