ARTICLE International Journal of Advanced Robotic Systems
Study of Inverted Pendulum Robot Using Fuzzy Servo Control Method Regular Paper
Dazhong Wang1, Shujing Wu1,*, Liqiang Zhang1 and Shigenori Okubo2 1 Shanghai University of Engineering Science, China 2 Graduate School of Science and Engineering, Yamagata University, Japan * Corresponding author E-mail:
[email protected]
Received 1 May 2012; Accepted 21 Jun 2012 DOI: 10.5772/50982 © 2012 Wang et al.; licensee InTech. This is an open access article distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/3.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
Abstract The inverted pendulum robot is a classical problem in controls. The inherit instabilities in the setup make it a natural target for a control system. Inverted pendulum robot is suitable to use for investigation and verification of various control methods for dynamic systems. Maintaining an equilibrium position of the pendulum pointing up is a challenge as this equilibrium position is unstable. As the inverted pendulum robot system is nonlinear it is well‐suited to be controlled by fuzzy logic. In this paper, Lagrange method has been applied to develop the mathematical model of the system. The objective of the simulation to be shown using the fuzzy control method can stabilize the nonlinear system of inverted pendulum robot.
Keywords Inverted Pendulum Robot, Disturbances, Servo Control, Fuzzy Control.
1. Introduction
In recent years, the researchers wish to simulate human stance on the machine. In this paper, the model is constructed based on purely inverted pendulum dynamics and on a movable supportive base. This work www.intechopen.com
was based on the assumption that the act of maintaining an erect posture could be viewed. However, the problems often are a complicated nonlinear system (Figure 1) [1].
Inverted pendulum robot is the abstract model of many control problems which the gravity center is upper and the fulcrum is lower and it is unstable object. In the control process it can reflect a number of key issues effectively such as the system stability, nonlinear problem, controllability, robustness and so on. As a controlled object it is a higher order, nonlinear, multi‐variable, strong coupling and unstable rapid control system. Walking robot joint control, the vertical degree of control in rocket launch, satellite attitude control, those all related to the stability of the control problem that of upside‐down objects. Therefore, the inverted pendulum control strategies can be applied to aerospace, military, robotics, industry and others areas, to solve the balance problems.
Recently, some authors proposed several control methods to control the nonlinear systems by using fuzzy system models [1–9]. The affine fuzzy system means the fuzzy system of which consequent part is affined and which has a constant bias term. It is well known that such models can describe or approximate a wide class of nonlinear J Adv Robotic Sy, 2012, Vol. 9, 69:2012 Dazhong Wang, ShujingIntWu, Liqiang Zhang and Shigenori Okubo: Study of Inverted Pendulum Robot Using Fuzzy Servo Control Method
1
systems. Hence, it is important to study their stability and the design of stabilizing controllers. Besides, robust stability also has been considered in literatures which have presented robust stability analysis and methods for designing robust fuzzy controllers to stabilize a class of uncertain fuzzy systems. In general, stability analysis and synthesis can be extended to the time‐delay systems. Time delays often appear in industrial systems and information networks. Thus, it is also important to analyze time‐delay effects for the affine fuzzy systems.
Figure 1. Inverted pendulum robot system to simulate human stance
Nowadays, fuzzy logic is one of the most used methods of computational intelligence robot [10‐14] and with the best future. Oscar Castillo et al. [15] describe the application of Ant Colony Optimization (ACO) and Particle Swarm Optimization (PSO) on the optimization of the membership functions parameters of a fuzzy logic controller (FLC) in order to nd the optimal intelligent controller for an autonomous wheeled mobile robot. The results obtained by the simulations performed are statistically compared among them and the previous work results obtained with GAs in order to nd which is the best optimization technique for this particular robotics problem. And [16] presented a hybrid architecture, which combines Type‐1 or Type‐2 fuzzy logic system (FLS) and genetic algorithms (GAs) for the optimization of the membership function (MF) parameters of FLS, in order to solve to the output regulation problem of a servomechanism with nonlinear backlash. In this approach, the fuzzy rule base is predesigned by experts of this problem. The proposed method is far from trivial because of nonminimum phase properties of the system. Intelligent control of robotic systems is a difcult problem because the dynamics of these systems is highly nonlinear [17‐18]. Oscar Castillo et al. [19] develop a tracking controller for the dynamic model of unicycle mobile robot by integrating a kinematic controller and a torque controller based on fuzzy logic theory. Both the 2
Int J Adv Robotic Sy, 2012, Vol. 9, 69:2012
kinematics and dynamics models are used currently to design, simulate, and control robot manipulators [20‐25]. The kinematics model is a prerequisite for the dynamics model and fundamental for practical aspects like motion planning, manufacturing cell graphical simulation and fuzzy servo control. For example, the inverted pendulum robot is a classical problem in controls [26‐27]. The inherit instabilities in the setup make it a natural target for a control system. Inverted pendulum robot is suitable to use for investigation and verification of various control methods for dynamic systems. Maintaining an equilibrium position of the pendulum pointing up is a challenge as this equilibrium position is unstable. As the inverted pendulum robot system is nonlinear it is well‐suited to be controlled by fuzzy logic. In this paper, Lagrange method has been applied to develop the mathematical model of the system. The objective of the simulation to be shown using the fuzzy control method can stabilize the nonlinear system of inverted pendulum robot. The remainder of this paper is organized as follows: In Section 2, the expression of problems is presented. In Section 3, the fuzzy servo control method is proposed. In Section 4, linearization and stability analysis and the fuzzy rule is shown. Section 5 is the simulation results. Section 6 is the conclusion. 2. The expression of problems Design of the robot naturally centered on the basic idea of an inverted pendulum. There would be a weight at the top of a long shaft and there would be some sort of mechanism attached to the bottom of this shaft that would be used to balance the weight at the top. Unlike most inverted pendulum experiments that consist of a cart on a track that limits mobility, this project was constructed much like a Segway to enable the robot to have a greater range of mobility. Kinematic and dynamic models for wheeled inverted pendulum robot as shown in Figure 2.
θ F
x
Figure 2. Kinematic and dynamic models for wheeled inverted pendulum robot
www.intechopen.com
Lagrange method is adopt to establish the mathematical model because the number of equations equal to the degree of freedom system and modeling process can be simplified. The dynamics of inverted pendulum robot can be described in general form as follows [3].
d F Qi dt qi qi qi where
H (q )q C (q, q )q G (q ) Qu q, q
and
q
system, are
Si is the local linear system and the fuzzy rules
n i N , , N . zw R is a vector of nonlinear
elements, and
(1)
z w Cw x u
T
, which are included in
(2)
are the velocity and
xT x1 x2 x3 , u T u1 u2 , where x1 , x2 , u1 are nonlinear, and Cw can be defined as
Let
x1 1 0 0 0 0 zw x2 , Cw 0 1 0 0 0 u1 0 0 0 1 0
C (q, q )q is the coriolis and centripetal force vector, and G ( q ) is the gravity force vector. 3. Fuzzy servo control method
Fuzzy method has been used as alternative method to develop control rule for complex system. The method has been successfully implemented to the real‐world application like engine control system of subway train. The idea behind of control method in this paper is to divide the operating region of nonlinear system into small area, and treated as a collection of local linear systems. After that, in order to develop the control law, fuzzy method has been apply to each local linear system and combines it as new control law as shown in Figure 3
: all domain).
Cw R nw ( n m ) is a
matrix of which its elements are 1 or 0. Example
acceleration vectors, respectively,
( Di : small domain
Di is the local driving area, S is the nonlinear
controlled system in the equation.
H ( q ) is an n n inertia matrix dependent on
position vector
where
Let
i define
as Gaussian type fuzzy membership
function as follows.
i e ( z
T w z wi )
Qw ( zw zwi )
Qw QwT 0
i can be define as
i wi / i N i . N
The fuzzy servo system can be rewrite as.
z
N
(A x B u d
i N
i
zi
zi
zi
)
(3)
In order to develop new control rule, we calculate each local linear system control rule by using
u Ki z
(4)
K i is the feedback coefficient matrix of the input. This matrix calculated using Hikita method [28]. Let
fij ( j I Azi ) 1 Bzi g j Figure 3. Driving domain
Fuzzy method has been apply to each local linear system and combines it and can be define as Ri IF zn Di THEN S is Si
www.intechopen.com
,
j 1, 2,3,..., n l )
,
g j R m , fij R n l . j be the eigenvalues and fij be eigenvector of the system. The feedback co‐efficient matrix can be represented as
K i gi1 gi ( n l ) f i1
f i ( n l )
1
K i ki1 ki ( n l ) Dazhong Wang, Shujing Wu, Liqiang Zhang and Shigenori Okubo: Study of Inverted Pendulum Robot Using Fuzzy Servo Control Method
3
x3 and x4 .
Applied fuzzy method to each local linear system and combines it as new control law. The control input u is
Parameter
N
u i K i z
(5)
( M m) x ml cos Dx ml sin 2 F (6) 4 ml cos x ml 2 mgl sin C 0 (7) 3
y x1 . Define an error of the system as v y r . Rearranged the equation in term of x1 x , x x , x , x and F u . The new
Mass of the cart
M
0.18kg
Mass of the pendulum
m
0.10kg
Gravitational constant
g
9.8m/s2
l
0.20m
D
5.0kg/s
of gravity to its rotation axis
The input u in (5) is applied to system in (1) and (2). 4. Linearization and stability analysis and the fuzzy rule The inverted pendulum robot used in this paper is shown in Figure 2. It consists of cart and a pendulum. The cart is free to move the horizontal direction when the force
applies to it. We assume that the mass of the pendulum and cart are homogenously distributed and concentrated in their center of the gravity and the friction of the cart is proportional only to the cart velocity and friction generating by the pivot axis is proportional to the angular velocity of the pendulum. The parameters used for simulation are shown in Table 1. The mathematical model of inverted pendulum system can be described as follows.
Value
Length of pendulum’s center
i N
F
Description
Coefficient
4
3
equation for inverted pendulum are shown in below.
x1 x2 x2 3cos x3 ( mgl sin x3 Cx4 )
2 3 4 2 3
4l (u Dx2 ml sin x x ) 4l ( M m) 3ml cos x
x3 x4 x4
Coefficient between
Rom the equation, we know that the nonlinear coefficient
x3 and x4 . The linearization has been
done to mathematical model of the inverted pendulum robot system using Taylor expansion as shown in (5) and (6) around of the operating points for nonlinear variables
Int J Adv Robotic Sy, 2012, Vol. 9, 69:2012
friction
pendulum
0.02kgm
C
and
/s
Table 1. Parameters of inverted pendulum system
where
x3 x3 x3i
and
x4 x4 x4i
. The
linearization has been done and the linear servo system can be represent as.
z Azi z Bzi u d zi
(8)
where
0 1 0 a 22 Azi 0 0 0 a42 1 0
0 a23 0 a43 0
0 a24 1 a44 0
0 0 0 0 0
Bzi 0 b21 0 b41 0
T
z x1
x2
x3
x4
v
T
d zi 0 d 21 0 d 41 0
T
ml cos x3 (u Dx2 ml sin x3 x42 ) ml 2 (4( M m) 3m cos x32 )
4
of
rotation axis
3(( M m)( mgl sin x3 Cx4 ) ml 2 ( 4( M m) 3m cos x32 )
for the system is
friction
between cart and system
With output as
2
of
d zi
is disturbance vector. Each coefficient can be
described as follows.
a22 (2 D(5m 8m 3m cos(2 x3i )) 6mx3i sin(2 x3i )) / (4( M m) 3m cos 2 ( x3i )) 2
a23 (8M m 3m cos(2 x3i ))(4ml 2 x42i cos( x3i ) 3mgl (3m (8M 5m) cos(2 x3i )) 3Cx4i (8M 11m 3m cos(2 x3i )) sin( x3i ) / (2l ( M m) 3m cos 2 ( x3i )) 2
www.intechopen.com
a43 ((3mg ( M m) cos( x3i ))(8M m
5. Simulation results
3m cos(2 x3i )) 3 x4i 2 ml 2 (3m 6((8M 5m) cos(2 x3i ))
coefficient
C
(( M m) sin(2 x3i )))
Di with pole assignment. Fuzzy input u is
/ (2l (4l ( M m) 3ml cos 2 ( x3i )))2
a44 3(C ( M m) m l x4i sin(2 x3i )) / ml 2 (4( M m) 3m cos 2 ( x3i ))
u
K x
i N N
i N
b21 2(8M 5m 3m cos(2 x3i ) / (4( M m) 3m cos ( x3i ))
where
2
25
b41 ((6 cos( x3i ))(8M 5m 3m cos(2 x3i ) 2(8M 11m 3m cos(2 x3i ))
Base on the Lyapunov law: the nonlinear control system can be analyzed by the linearization system. The controllability matrix of the control system
AB
A2 B An 1B
(14)
i
i e and
qi ( x xi ) 2
initial
, the initial angle of condition
of
is
simulation
T
of simulation are shown in Figure 4. As the result of simulation, the system is stable with this
fuzzy input, but it is stable which initial angle of is between 25 . It is necessary for enlarging controllable angle to change fuzzy input. So set
i e q ( x x
(9)
is full‐rank. Rank (S) = 4. So the inverted pendulum robot system is controllable. Fuzzy rule: The state equation of inverted pendulum robot can be shown as.
x f ( x, u ) d
1 2 3 4 0.80 , and q 5 . The results
/ (4l (4( M m) 3m cos 2 ( x3i ))) 2
x (0) 0 0 0.44 0 . The system simulate with
S B
i
2
i
6mx3i sin(2 x3i ))
, feedback
N
2 2
1
1
1i
) 2 q 2 ( x2 x2i ) 2
(15)
The initial angle of simulation
is 50 and initial condition of
x (0) 0 0 0.87 0
simulate 3 times which
T
. The system
1 2 3 4 0.80
were ‐0.80, ‐0.78 and ‐0.82 separately and q1 5, q2 1 . The results of simulation are shown in Figure 5.
(10)
y g ( x) d 0 Set
and
K i can be obtained from every small domain
B
Comprehensive analysis part
(11)
zw Cw x u R nw , so zw Di , the fuzzy T
rule is:
IF
zv Di THEN S is Si ( N i N )
And in this part,
S and Si are follows.
S : x f ( x, u ) d y g ( x) d 0
Si : x Ai x Biu d xi y Ci x d yi www.intechopen.com
(12)
(13)
Figure 4. Result for simulation of θ
The simulation results show that with different poles, the system response different characteristics. With smaller pole, the overshoot of pendulum is smaller and settling time of pendulum is shorter. However, overshoot of cart
Dazhong Wang, Shujing Wu, Liqiang Zhang and Shigenori Okubo: Study of Inverted Pendulum Robot Using Fuzzy Servo Control Method
5
is larger. Settling time of cart has the approximate same performance.
Figure 5. Result for simulation of x from 0s to 15s
6. Conclusion In this paper, mathematical model of inverted pendulum is established based on Lagrange method, and from the simulation results, the fuzzy method [29‐30] can make nonlinear system stable. This fuzzy method adapt to most of nonlinear system. For different needs, the system can provide different response characteristics. In the future, servo system will be established and simulated to improve the system performance by changing the parameters. 7. Acknowledgments This work was financially supported by the Innovation Program of Shanghai Municipal Education Commission (12YZ148), the Project‐sponsored by SRF for ROCS, SEM (2011‐1568) and the Scientific Research Foundation of SUES (2012‐01). The authors would like to thank the editor and the reviewers for their constructive comments and suggestions which improved the quality of the paper. 8. References [1] W. J. Chang, W. H. Huang, W. Chang, “Robust Fuzzy Control of Inverter Pendulum Robot via Time‐Delay Affine T‐S Fuzzy Models,” Proceedings of the International Multi Conference of Engineers and Computer Scientists, March 18‐20, Hong Kong, Vol. II, 2009. [2] W. J. Chang and C. C. Sun, “Constrained Fuzzy Controller Design of Discrete Takagi‐Sugeno Fuzzy Models,” Fuzzy Sets and Systems, vol. 133, no. 1, pp. 37‐55, 2003. [3] C. H. Tsai, C. H. Wang, W. S. Lin, “Robust Fuzzy Model‐Following Control of Robot Manipulators,” IEEE Transactions on fuzzy systems, vol. 8, no. 4, pp. 462‐469, 2000. 6
Int J Adv Robotic Sy, 2012, Vol. 9, 69:2012
[4] W. J. Chang and S. M. Wu, “Continuous Fuzzy Controller Design Subject to Minimizing Control Input Energy with Output Variance Constraints,” European Journal of Control, Vol. 11, No. 3, pp. 269‐277, 2005. [5] B. S. Chen, C. S. Tseng, and H. J. Uang, “Robustness Design of Nonlinear Dynamic Systems via Fuzzy Control,” Fuzzy Sets and Systems, vol. 7, no. 5, pp. 571–585, 1999. [6] M. K. B. Mohamed Nor, S. Okubo, “The Design of Nonlinear Servo System Using Fuzzy Method,” Proceedings of the 2011 Eighth International Conference on Fuzzy Systems and Knowledge Discovery, pp. 540‐544, shanghai, 2011. [7] C. H. Fang, Y. S. Liu, S. W. Kau, L. Hong and C. H. Lee, “A New LMI‐Based Approach to Relaxed Quadratic Stabilization of T‐S Fuzzy Control Systems,” IEEE Trans. on Fuzzy Systems, Vol. 14, No. 3, pp. 386‐397, 2006. [8] W. J. Chang and W. Chang, “Discrete Fuzzy Control of Time‐Delay Affine Takagi‐Sugeno Fuzzy Models with H‐infinity Constraint,” IEE Proceeding, Part D, Control Theory and Applications, Vol. 153, No. 6, pp.745‐752, 2006. [9] R. Ooi, “Balancing a Two‐wheeled Autonomous Robot,” Proceeding of University of Westerm, Australia, Nov. 2003. [10] C. K. Lin, “Nonsingular terminal sliding mode control of robot manipulators using fuzzy wavelet networks”, IEEE Transaction on Fuzzy Systems, vol. 14, no. 6, p.849, 2006. [11] K. P. Valavanis, L. Doitsidis, M. Long, and R. R. Murphy, “A Case Study of Fuzzy‐Logic‐Based Robot Navigation,” IEEE Robotic and Automation Magazine, pp. 93‐107, 2006. [12] T. H. Lee, H.K. Lam, F. H. F. Leung, and P. K. S. Tam, “4 Apractical Fuzzy Logic Controller for the Path Tracking of Wheeled Mobile Robots,” IEEE Control Systems Magazine, pp.60‐65, 2003. [13] R. J. Wai and P. C. Chen, “Robust Neural‐Fuzzy‐Network Control for Robot Manipulator Including Actuator Dynamics,” IEEE Transactions on Industrial Electronics, vol. 53, no. 4, 2006. [14] I. S. F. M. Assal, K. Watanabe, and K. Izumi, “Neural Network‐Based Kinematic Inversion of Industrial Redundant Robots Using Cooperative Fuzzy Hint for the Joint Limits Avoidance”, IEEE/ASME Transaction on Mechatronics, vol. 11, no. 5, pp. 593‐603, 2006. [15] Oscar Castillo, Ricardo Martinez‐Marroquin, Patricia Melin, Fevrier Valdez, José Soria, “Comparative Study of Bio‐Inspired Algorithms Applied to the Optimization of Type‐1 and Type‐2 Fuzzy Controllers for an Autonomous Mobile Robot,” Information Sciences, vol. 192, pp. 19‐38, 2012.
www.intechopen.com
[16] Nohé R. Cázarez‐Castro, Luis T. Aguilar, Oscar Castillo, “Fuzzy Logic Control With Genetic Membership Function Parameters Optimization for the Output Regulation of a Servo Mechanism With Nonlinear Backlash,” Expert Systems Applications, vol. 37, no. 6, pp. 4368‐4378, 2010. [17] Selene L. Cardenas‐Maciel, Oscar Castillo, Luis T. Aguilar, “Generation of Walking Periodic Motions for a Biped Robot via Genetic Algorithms,” Applied Soft Computing, vol. 11, no. 8, pp. 5306‐5314, 2011. [18] Oscar Castillo, Patricia Melin, “Intelligent Adaptive Model‐Based Control Of Robotic Dynamic Systems with a Hybrid Fuzzy‐Neural Approach,” Applied Soft Computing, vol. 3, no. 4, pp. 363‐378, 2003. [19] Leslie Astudillo, Oscar Castillo, Patricia Melin, Arnulfo Alanis Garza, Jose Soria, Luis T. Aguilar, “Intelligent Control of an Autonomous Mobile Robot Using Type‐2 Fuzzy Logic,” Engineering Letters, vol. 13, no. 2, pp. 93‐97 , 2006. [20] A. Izadbakhsh, M. M. Fateh, “A Model‐Free Robust Control Approach for Robot Manipulator,” World Academy of Science, Engineering and Technology, vol. 29, pp. 205‐210, 2007. [21] I. A. Rahman, S. M. Suboh, M. R. Arshad, “Theory and Design Issues of Underwater Manipulator,” Proceedings of International Conference on Control, Instrumentation and Mechatronics Engineering, Johor Malaysia, pp. 725‐731, May, 2007. [22] H. Zhou, Y. Cao, B. k. Li, M. P. Wu, J. H. Yu, H. W. Chen, “Position‐Singularity Analysis of a Class of the 3/6‐Gough‐Stewart Manipulators based on Singularity‐Equivalent‐Mechanism,” International Journal of Advanced Robotic Systems, vol. 9, pp. 1‐9, 2012.
www.intechopen.com
[23] J. H. Ryu, D. S. Kwon and Y. J. Park, “A Robust Controller Design Method for a Flexible Manipulator with a Large Time Varying Payload and Parameter Uncertainties,” Journal of Intelligent and Robotic System, vol. 27, pp. 345‐361, 2000. [24] E. M. Jafarov, M. N. A. Parlakç, Y. Istefanopulos, “A New Variable Structure Pid‐Controller Design for Robot Manipulators,” IEEE Transaction on control systems technology, vol. 13, no. 1, 2005. [25] M. J. Lee and Y. K. Choi, “An Adaptive Neurocontroller using RBFN for Robot Manipulators,” IEEE Transactions on Industrial Electronics, vol. 51, no. 3, pp. 711‐717, 2004. [26] J. Lam, “Control of an Inverted Pendulum,” Proceeding of University of California, Santa Barbara, June, 2004. [27] K. Tanaka and H. O. Wang, “Fuzzy Control Systems Design and Analysis – A Linear Matrix Inequality Approach,” John Wiley & New York, 2001. [28] H. Hikita, S. koyama, and R. Miura, “The Redundancy of Feedback Matrix and the Derivation of Low Feedback Gain Matrix in Pole Assignment,” Transactions of the Society of Instrument and Control Engineers, vol. 11, no. 5, pp. 556‐560, 1975. [29] T. Takagi and M. Sugeno: “Fuzzy Identification of System and its Application to Modeling and Control,” IEEE Transactions on Systems, Man and Cybernetics, vol. 15, no.1 pp. 116‐132, 1985. [30] J. Merline Vinotha, W. Ritha and A. Abraham, “Total Time Minimization of Fuzzy Transportation Problem,” Journal of Intelligent and Fuzzy Systems, vol. 23, no. 2–3, pp. 93‐99, 2012.
Dazhong Wang, Shujing Wu, Liqiang Zhang and Shigenori Okubo: Study of Inverted Pendulum Robot Using Fuzzy Servo Control Method
7