Вы находитесь на странице: 1из 5

The Modeling and Simulation of First-Order Inverted Pendulum Control System

Zhiming Dong*, Lepeng Song, and Huanhuan Chen


Chongqing University of Science and Technology, Chongqing, China zhmdong@yahoo.cn, slphq@163.com, chenhuanhuan@163.com

Abstract. In this paper, it give a research about the control problem of the balance of the first-order inverted pendulum. And this paper presents two methods of first-order inverted pendulum using PID, fuzzy controller and constructs the mathematical model of pendulum. The satisfied results are achieved with two schems. The simulation results show that the two schemes is satisfying. And the two schemes have their own characteristics. Keywords: Inverted pendulum, Fuzzy control, Simulation.

1 Introduction
The inverted pendulum problem is one of the most important problems in control theory and has been studied excessively in control literatures. It is well established benchmark problem that provides many challenging problems to control design. The system is nonlinear, unstable, no minimum phase and under actuated. Because of their nonlinear nature pendulums have maintained their usefulness and they are now used to illustrate many of the ideas emerging in the field of nonlinear control [1]. The challenges of control made the inverted pendulum systems a classic tool in control laboratories. PID control is a very typical control method in the field of automatic control. Its features is that it is very easy to operate and suitable for industrial field. Fuzzy logic controller, which is the logic on which fuzzy control is based, is much closer in spirit to human thinking and natural language than the traditional logical systems. In this paper, we will first build the Mathematical model of the inverted pendulum in section 2. And in section 3 and section 4 is construction of PID controller and fuzzy controller. At last it is simulation.

2 The Model of Inverted Pendulum System


Ignoring the air flow and all kinds of friction, we can abstracted inverted pendulum system into a car, uniformity and quality of blocks rod system. The ultimate goal of this application is to adjust the car position to make an inverted pendulum in the inverted vertical position[2]. The principle structure is shown Fig.1.
* The Natural Foundation of Chongqing City (cstc2011jjA1152).
D. Jin and S. Lin (Eds.): Advances in ECWAC, Vol. 2, AISC 149, pp. 221225. Springer-Verlag Berlin Heidelberg 2012 springerlink.com

222

Z. Dong, L. Song, and H. Chen

Fig. 1. Principle of single inverted pendulum structure

3 Inverted Pendulum Mathematical Modeling


The state space equations of system are[3-7]:

 = AX + Bu x y = CX + Dn
Equations (1.1) on the solution of algebraic equations, by solving the following: =x  x
I + ml 2 b m 2 gl 2 I + ml 2 + + x u 2 2 I (M + m ) + Mml I (M + m ) + Mml I (M + m ) + Mml 2  =   = x  = mlb mgl ( M + m) ml + x + u I (M + m ) + Mml 2 I ( M + m) + Mml 2 I ( M + m) + Mml 2
0 0 2 x + I ml 0  I ( M + m ) + Mml 2 x + u 0 1  ml 0 2 I ( M + m ) + Mml

(1)

(2)

The last system state space equation are:


1 0 ( I + ml 2 ) b  x 0  2 x = I ( M + m ) + Mml  0 0  mlb 0 I ( M + m ) + Mml 2 0 m2 gl 2 I ( M + m ) Mml 2 0 I ( M + m) + Mml 2 mgl ( M + m )

(3)

M the car quality m pendulum mass B the frition coefficient of car l the length of pendulum I pendulum inertia

1.096Kg; 0.109 Kg; 0.1N/m/sec; 0.25m; 0.0034 kg * m * m.

x  0 x 1 0 0 0 x + u y= = 0 0 0 0 0 

(4)

The Modeling and Simulation of First-Order Inverted Pendulum Control System

223

as external forces for input the system state equations are:


 0 1 0 x   0 0.0883167 0.629317 x =  0 0 0  0 0.225655 27.8285 x  0 x 1 0 0 0 x + u y= =  1 0 0 0 0  0 x 0 x  0.883167 0 + u  1 0  0 2.35655

(5)

When the input is pendulum angle and the output is cart s displacement, the transfer function are:

(s ) 0.0275s 2 = X (s ) 0.0102125s 2 0.26705

(6)

When the input is pendulum angle and the output is external forces, the transfer function are:

(s ) 2.35655s = 3 U (s ) s + 0.0883167s 2 27.9169s 2.30942

(7)

4 Fuzzy Controller
Inverted pendulum system has four input variables, if we use a fuzzy controller, each input variable has five linguistic values, so the rules may be up to more than 100. It has so many rules that we are difficult to design, therefore, we design two fuzzy cotrollers which contain the angle fuzzy controller and the displacement controller, controlling the angle and displacement respectively[7]. Two fuzzy controllers will be designed in parallel or in series to control inverted pendulum, fuzzy controller structure was changed in order to achieve the lower the dimension of the controller. According to the force U1 and of the motor output are relation to the displacement x of car and the the rate of change displacement x, we can establish follow fuzzy logic control rules[8,9].
Table 1. Rules between displacement and speed U1 PL PM PS O NS NM NL The displacement of car x PS O NS NL NS NS NS NS NM NS NM O NM O PM O PM PS PM PS PS PS PS PL

The speed of car x`

PL NL NL NL NL NL NL NL

PM NL NL NS NS NM O PM

NM NM O NM PS PS PL PL

NL PL PL PL PL PL PL PL

224

Z. Dong, L. Song, and H. Chen Table 2. Rules between displacement and angular U2 angular velocity of pendulum PL PM O NS NL The angle of the pendulum PM PS O NS NM PL PL PS PM O PL PS PM O NM PS PM O NM NS PM O NM NS NL PM PS PS PL PL

PL PL PL PL PL NL

NL NL NL NL NL PL

According to the force U2 and of the motor output are relation to t the angle of the pendulum and the the angular velocity of the pendulum [8], we can establish follow fuzzy logic control rules The design in matlab / simulink simulation platform is shown in figure 2

Fig. 2. The simulation model of inverted pendulum

5 Simulation Results
Simulation results with fuzzy control and PID control for inverted pendulum are put in the same scope, We can get the angle-curve in figure 3 and the displacement -curve in figure 4. Through figure 10 and figure 11of the inverted pendulum control, the fuzzy control was significantly better than the PID control, fuzzy control 's overshoot is very small, and the adjust-time also is very small, it only has 0.8 seconds. The adjust-time of PID contro is 9 seconds, the overshoot is also larger relative to fuzzy control.
s te p re s pe ns e 2 1 0 -1 0 5 time 10
step respense 2 1 0 -1 0 5 time 10

Fig. 3. Angle-curve

Fig. 4. Displacement -curve

The Modeling and Simulation of First-Order Inverted Pendulum Control System

225

6 Conclusion
This paper we established a mathematical model of the first-order inverted pendulum at first, and then designed PID controller and fuzzy controller for first-order inverted pendulum. We obtain good simulation curves from the two kinds of control, so it show that the angle of the pendulum and the the displacement of the car are controlled well by the PID-controller and fuzzy-controller. But compare to PID controller, the adjust-time of fuzzy controller is shorter, overshoot is smaller and the control accuracy is also higher.

References
1. Sun, L., Kong, H., Liu, C., Bi, L.: Inverted pendulum and research. Machine Tools and Hydraulic 104(7), 7983 (2008) 2. Wang, J.Y., Liu, M., Li, H., Miao, Z.: The same value of fuzzy Controller output for two sufficient conditions. Control Theory and Applications 6(14), 324327 (2009) 3. Li, H.: Fuzzy control system modeling. Chinese Science 32(9), 772781 (2002) 4. Yang, W.: The first order based on MATLAB inverted pendulum control system modeling and simulation. Application of Electronic Components 1, 2931 (2007) 5. Yang, S., Xu, L., Wang, P.: Single PID control of inverted pendulum. Control Engineering 6(14), 2630 (2007) 6. Zhang, W., Wang, Y., Hong, Q., Miao, G.: Controlled inverted pendulum system based on principles of experimental design. Modern Educational Equipment 15(39), 3539 (2010) 7. Li, H., Song, W., Yuan, X., Li, Y.: Based on Fuzzy reasoning. The time-varying system modeling systems. Science and Mathematics 8(13), 8286 (2009) 8. Li, H.X., Yuan, X., Wang, J., Li, Y.: Fuzzy Systems and Fuzzy norm of the classification system. Chinese Science: Information Science 12(5), 135140 (2010) 9. Ren, B., Li, Z.: Inverted pendulum system based on fuzzy human-simulated intelligent control. Science, Technology and Engineering 15(44), 167171 (2010)

Вам также может понравиться