Professional Documents
Culture Documents
Function
Zhang Shifeng, Zhang Zhenxing, Jin Ke, Yang Cheng
School of Electrical Engineering & Information Anhui University of Technology Maanshan, Anhui Province, 243002, China
E-mail: zhangsf@ahut.edu.cn
Abstract: The method is introduced to control the double inverted pendulum using the fuzzy controller in this paper.
Model designed based on the linear state-space expression was obtained by approximating the nonlinear model for
inverted pendulum, Dimensions of a fuzzy controller’s input varieties are depressed by designing a fusion function which
the upper pendulum’s angle and angle velocity are chosen as principal components, and it can reduce the rules of fuzzy.
This method can greatly simplify the designing process of fuzzy controller. Simulation and real time control experiment
in the double inverted pendulum prove that this method has the effectively, fast speed, good stability and good
robustness.
Key words: fuzzy control; fusion function; double inverted pendulum; real time control
on the guide way. When the dolly moves left and right, it
1 INTRODUCTION acts on the pendulums to keep the whole system in stability.
The dolly mass is m0, the upper pendulum is m2, and
Inverted pendulum system is a multi-variable, prompt, another pendulum is m1.
non-linear and absolutely unstable system, so it must use a
certain control method to make it stable. The inverted
θ2 m2
pendulum system is usually used to test the effect of the
control policy, and it is also an ideal experimental
instrument in the study of control theory[1, 2]. The inverted
pendulum system is a typical nonlinear and unstable θ1 m1
controlled object. Therefore how to control it effectively is
a typical problem in the control theory[3]. Motor
m0
In this paper, the stability control on the pendulum as the
main target. Design the fusion function of synthetic r
inverted pendulum system state variables, and design of
fuzzy controller stability control a double inverted Fig. 1. Physical model of the double inverted pendulum
pendulum system. Multi-variable system for the state The dynamic equation[4] is:
variable according to the nature and type classification, Can
ª r º ª r º
greatly reduce the dimension of the fuzzy controller input,
M (θ 1 , θ 2 ) «« θ1 »» + F (θ 1 , θ 2 , θ1 , θ2 ) «« θ1 »» = G ( u , θ 1 , θ 2 )
Reduce the number of fuzzy rules, Conducive to the use of
«¬θ2 »¼ «¬θ2 »¼
expert control experience, Reduces the computational
complexity of the control algorithm. Where:
F (θ1 , θ 2 , θ1 , θ2 ) =
2 THE STRUCTURE OF DOUBLE INVERT- ª f0 − ( m1d1 + m 2 d 3 ) sin θ 1 ⋅ θ1 − m 2 d 2 sin θ 2 ⋅ θ2 º
ER DPENDULUM «
«0 f1 + f 2
»
− f 2 − d 3 d 2 sin( θ 2 − θ 1 ) ⋅ m 2 ⋅ θ2 »
MS The physical model of the double inverted pendulum «0
¬ m 2 d 3 d 2 sin( θ 2 − θ 1 ) ⋅ θ1 − f 2 f2 »
¼
system is shown as Fig.1. Schematic diagram shows that M (θ1,θ2 ) =
the double inverted pendulum system is composed of a ª m0 + m1 + m2 (m1d1 + m2d3 ) cosθ1 m2d2 cosθ2 º
dolly moving on guide way and two pendulums which are «(m d + m d ) cosθ J + m d 2 + m d 2 m d d cos(θ −θ )»
fixed on the dolly. There is a shaft between dolly and « 1 1 2 3 1 1 1 1 2 3 2 1 3 2
2
1 »
pendulum and between two pendulums respectively. The ¬« m2d2 cosθ2 m2d3d2 cos(θ2 − θ1 ) J 2 + m2d2 ¼»
G (u , θ 1 , θ 2 ) =
angles of two pendulums can be measured by two coaxial
angle sensors respectively, one install in the bearing which [G 0 u ( m 1 d 1 + m 2 d 3 ) g sin θ 1 m 2 d 2 g sin θ 2 ]
T
articulates the pendulum to the dolly, and the other install in In the equation: r , r , r, θ 1 , θ1 , θ1 , θ 2 , θ2 , θ2 is the dis-
the bearing of two pendulums. The displacement of the placement, the velocity and the acceleration of the dolly,
dolly can be measured by a sensor installed on one side of the angle, the angle velocity and the angle acceleration of
the guide way. There is a motor driving the dolly to move the pendulums.
The equation shows that the double inverted pendulum has
Natural Science Foundation of Education Department of Anhui 6 state variables: dolly displacement r, dolly linear velocity
Province P.R.China. (KJ2008B104)
978-1-4577-2074-1/12/$26.00 2012
c IEEE 2696
r , pendulum angle θ1 and θ 2 , pendulum angle velocity where:
~ ~ p
ki N kj
θ1 and θ2 .When the system can linearised , assume: k1 = k1 k 2 = k p +1 ~x 1 = ¦ xi ~
x2 = ¦ xj
i =1 k1 j = p +1 k p +1
x = r, x = θ , x = θ −θ , x = r, x = θ , x = θ −θ ~ ~ ~
1 2 1 3 2 1 4 5 1 6 2 1 then: u = k1 ⋅ ~
x1 + k 2 ⋅ ~
x 2 = f 2 ( X ) = f 2 ( f1 ( X )) (3)
The system state function is:
In Eq.(3), f 2 is the fuzzy control arithmetic. The primary
X = AX + BU
control target is to stabilize the upper pendulum and the
Y = CX
other pendulum is the next one, the dolly is the last one. So
The system matrix is:
ª 0 º
the θ 2 − θ1 and θ2 − θ1 are chosen as principal
ª0 0 0 1 0 0º
«0 « 0 » components, the displacement of dolly r , the angle of
0 0 0 1 0»» « »
under pendulum θ1 and the linear velocity of dolly r , the
«
«0 0 0 0 0 1» « 0 »
A=« » B= « »
« 1 »
«0 angle velocity of under pendulum θ1 are combined to the
0 0 0 0 0»
«0 86.69 − 21.62 0 0 0» « 6.64 »
« » « »
¬«0 − 40.31 39.45 0 0 0¼» ¬«−0.088¼» two principal components. In this way, the sub-state
Eigenvalues of The system are obtained from the state information is combined into the principal components in
matrix: the given proportion, then the fusion functions are obtained
by the linear feedback coefficient. And then the fuzzy
λ1 = λ2 = 0, λ3 = −5.0262, λ4 = 5.0262, λ5 = −10.0438, λ6 = 10.0438
The positive eigenvalues result in the system unstable, so control logic performs the f 2 .In the double inverted
the eigenvalues should be rearranged by the state feedback pendulum system, assume:
controller. The state feedback controller can be obtained θ = θ 2 −,θ1 θ = θ2 − θ1
using the optimization control theory.
K = kr [ kθ1 kθ 2 −θ1 k r kθ1 kθ2 −θ1 ]
3 THE DESIGN OF FUZZY CONTROLLER
[
X = r θ1 θ 2 − θ1 r θ1 θ2 − θ1 ]
T
+
K *u
Fig. 5 The curve of θ2
Gain1 x = Ax + Bu
¡¡¡¡ K *u K *u
disturbance −Matrix y = Cx + Du
K *u Gain2 Scope
Gain *
Fuzzy Logic State − space
Gain1
controller
4. SIMULATION EXPERIMENT
Simulation analysis for the double inverted pendulum
system, Will be based on the fusion function method to
determine the membership function for fuzzy controller Fig. 6 Tracking curve of The settings
design. The results of simulation are shown in Fig.3 –Fig.
6. The simulation curve shows that the double inverted
pendulum system can be recovered to stand straight in 3-4
seconds and the dolly can track very well in the initial
position of 0.01m.