Upload
cheng-hao
View
212
Download
0
Embed Size (px)
Citation preview
Abstract—This paper presents a fuzzy parallel distributed compensation (PDC) control design for balancing a two-wheeled inverted pendulum (TWIP). A Takagi-Sugeno (T-S) fuzzy model can be firstly constructed from the nonlinear system model of the TWIP. Based on the T-S fuzzy model, a PDC controller is designed with the aid of linear matrix inequality (LMI) concept. The stability of the fuzzy balance control can be guaranteed by solving the inequalities of LMI. Finally, one simulation and its equivalent experiment are given to demonstrate the effectiveness and feasibility of the control scheme.
I. INTRODUCTION
two-wheeled inverted pendulum (TWIP) is a self-balancing vehicle with two wheels attached on both
sides of its chassis. The vehicle is with only two wheels (no the other supporting wheel) and keeps balance by itself. When the pendulum falls down due to the gravity, the motors generate torques and the wheels rotate at the same time to keep its balance. Emphatically, the primary challenge of the control is to find the torque of the driving motors such that the TWIP can stand on its upright posture stably.
There have been many researches on the design and study of the TWIP (see [1], [3], [4], [5] and [12]-[14]). Firstly, in Ha and Tuta [5], a dynamic model of a TWIP was presented using Lagrange’s equation and the equations were linearized in the vertical to design an optimal controller for its posture control. Then, the conventional controller was used to be the moving platform of a humanoid robot [12]. In Grasser et al. [4], another dynamic model was derived using a Newtonian approach and the equations were also linearized around an operating point to design a controller. In Pathak et al. [14], a control approach was designed via the system partial feedback linearization. The study [1] concentrates on dynamic modeling and model identification. However, no control law was discussed. In Fiacchini et al. [3], a physical dynamics of a personal pendulum vehicle was proposed, and two controllers (linear and nonlinear) have been developed and applied. In addition, the recent effort [13] brought up a PISMC controller, which was also designed to its
Manuscript received January 12, 2009. W. J. Wang is with the Department of Electrical Engineering, National
Central University, Jhongli, Taoyuan 32001, Taiwan, and also with the Department of Electrical Engineering, National Taipei University of Technology, Taipei 10608, Taiwan (phone: 886-3-4227151, ext. 34456; fax: 886-3-4255830; e-mail: [email protected]).
C. H. Huang is with the Department of Electrical Engineering, National Central University, Jhongli, Taoyuan 32001, Taiwan (e-mail: [email protected]).
quasi-equilibrium state. Overview the former researches, they all used the linearization model and the stability issue was not discussed enough.
In recent years, fuzzy control utilizing the Takagi-Sugeno (T-S) fuzzy model has been used in many applications. For example, the Pendubot (see [2], [7] and [8]) and the trailers (see [15] and [17]). In other words, the fuzzy control has been widely and successfully applied to a lot of nonlinear control processes. In the fuzzy control, many theoretical works using linear matrix inequalities (LMIs) have been discussed (see [6], [9]-[11] and [16]). In the fuzzy control approaches, the nonlinear system is firstly transferred to a T-S fuzzy model. Then the so-called parallel distributed compensation (PDC) (see [18] and [19]) controller is constructed according to the T-S fuzzy model, and the stability issue and the stabilizing fuzzy controller are accomplished by LMIs.
In this paper, we propose a fuzzy PDC control design for balancing a TWIP. The physical dynamics, proposed by [3], are linearized into two state equations to build two local models. Then, the two local models are summarized to be our presented T-S fuzzy model. The fuzzy controller can be carried via the concept of PDC. Meantime, the stability issue and the stabilizing fuzzy controller are accomplished by the theoretical work [6] of LMIs.
This paper is organized as follows. In Section II, the dynamics of a TWIP is described and the equivalent T-S fuzzy model is obtained. In Section III, the fuzzy PDC controller for balancing a TWIP is carried out. Simulation results and experiment results will be demonstrated in Section IV. At the end, the conclusion is given in Section V.
Model-Based Fuzzy Control Application to a Self-Balancing Two-Wheeled Inverted Pendulum
Wen-June Wang, Fellow, IEEE, and Cheng-Hao Huang
A
Fig. 1. The photograph of the two-wheeled inverted pendulum.
2009 IEEE International Symposium on Intelligent ControlPart of 2009 IEEE Multi-conference on Systems and ControlSaint Petersburg, Russia, July 8-10, 2009
978-1-4244-4603-2/09/$25.00 ©2009 IEEE 1158
II. MODEL OF THE TWIP
The frame of a TWIP is shown in Fig. 1. The TWIP is a kind of robot which has two driving wheels attached on the left and right sides, respectively, of its chassis. There is no other supporting wheel for its balance, so the function for balancing control is necessary. The main task is to find the driving torque of both left and right side motors such that the TWIP balance holds. Referring to [3], the dynamics of a TWIP is described as follows. Its coordinate system with geometric parameters of a TWIP is defined and shown in Fig. 2, where is the inclination angle of the pendulum, is the
wheel’s rotation angle, l is the length between the wheel axle and the gravity center of the pendulum, r is the radius of the wheel, and g is the gravity acceleration. The masses of the pendulum and the cart are represented as
PM and CM ,
respectively. Firstly, according to physical concepts, the equilibrium of forces on the x axis can be obtained as follows [3].
xPCP flMrMM cos)( (1)
where xf is the exerted force by wheels along the x axis. And
RLx fff , where Lf and
Rf denotes the forces from left and
right wheels, respectively. Secondly, the equilibrium of moments around the pendulum’s rotating point is focused to yield the following equation.
0sincos 2 glMlMlrM PPP (2)
Three variables, including the angle of the pendulum , the
angular velocity of the pendulum , and the angular velocity
of the wheels , are interested to be the state vector of the TWIP system. So the state vector can be defined as
Ttttt )()()()( x . For the T-S fuzzy modeling, the
inclination angle of the pendulum is assumed as 66)( π,π-t . Meantime, the desired state of the TWIP
is defined as Tddd dx , where d ,
d and
d are the
desired values of )(t , )(t and )(t , respectively. Then the
error between the current state and the desired state can be represented as follows.
.)(
)()()(
)()()()(
dxx
e
t
ttt
tetetet
T
T
ddd
(3)
Furthermore, the control input is designed as the driving torque to motors, i.e., rtftu x )()( . Assuming the TWIP is
in an upright posture ( 0d ), the T-S fuzzy model of the
state error system can be described as a set of If-then rules for the TWIP.
Model rule i: If )(te
is i , then )()()( tutt ii BeAe , )2,1( i . (4)
Here, the system matrices are
,
00
00)(
010
rM
gMlM
gMM
C
P
C
CP1A
,
1
1
0
2
rM
lrM
C
C1B
,
00))1((
00))1((
)(
010
2
2
rMM
gMlMM
gMM
CP
P
CP
CP
2A
,
))1((
1))1((
0
22
2
rMM
lrMM
CP
CP
2B
where )6(
)6sin(
and )6cos( . The membership
functions of the e
are described by (5) and (6) and shown in
Fig. 3.
;otherwise,
)1)((
)()(sin
0)(,1
)(1
te
tete
te
te (5)
.otherwise,
)1)((
)(sin)(
0)(,0
)(2
te
tete
te
te (6)
(a) (b)
Fig. 2. The WIP coordinate with geometric parameters. (a) Slanted view. (b) Side view.
Fig. 3. Membership functions.
1159
TABLE I GEOMETRIC PARAMETERS AND VALUES OF THE WIP
Item Symbol Value Unit
Mass of the pendulum MP 9.1 [kg]
Mass of the cart MC 25.2 [kg]
Length between the wheel axle and the center of gravity of the
pendulum l 0.5 [m]
Radius of the wheel r 0.1 [m]
Gravity acceleration g 9.8 [m/s2]
Therefore the defuzzification of the above fuzzy model (4) can be carried out as
2
1
)()()()(i
i tuttet ii BeAe . (7)
III. PDC DESIGN FOR BALANCING CONTROL
For coping with the balancing problem of the TWIP, a fuzzy balancing controller is designed to keep the TWIP holding on its upright posture. According to the T-S fuzzy model, a fuzzy balancing controller is constructed via a so-called parallel distributed compensation (PDC) design approach. Base on the concept of PDC [18, 19], each control rule is derived to compensate each model rule of a fuzzy system. For the fuzzy model (4), the following fuzzy controller via the PDC is employed.
Control rule i: If )(te
is i , then )()( ttu eFi , )2,1( i , (8)
where 1F and
2F are the local feedback gains.
Finally, the resulting overall fuzzy controller is represented as
2
1
)()()(i
i ttetu eFi . (9)
The PDC fuzzy controller design is to determine the local feedback gains
iF in the consequent parts. By substituting
equation (9) into equation (7), the fuzzy model can be obtained as follows.
)(2
)()(2)()(
)()()()(
21
2
1i
2
2
1
2
1
ttetette
ttetet
i
i jji
eGG
eG
eFBAe
2112ii
jii
(10)
where jiiij FBAG . To guarantee the stability of the
closed-loop system, the results in Theorem 7 of [6] can be applied to the fuzzy control system (10).
Lemma 1: The equilibrium of the fuzzy control system of (10) is quadratically stable in the large if there exist symmetric matrices P and
ijW such that (11a)-(11d) are satisfied.
0P (11a)
0WPGPG iiiiTii , )2,1( i (11b)
0W2
GGPP
2
GG12
2112
T
2112
(11c)
0WW
WWW
2212
1211
~ (11d)
□
Define three matrices 1 PX , XFN ii and XXWY ijij ,
and then substitute iN and
ijY into the inequalities
(11b)-(11d) to yield the following LMIs (12a)-(12d), respectively.
0X (12a)
0YNBBNXAXA iiiiTi
Tii
Ti , )2,1( i (12b)
XAXAXAXA 2T21
T1
02YNBBNNBBN 1212T2
T121
T1
T2 (12c)
0YY
YY
2212
1211
(12d)
Consequently, the feedback gains iF , a common P , and the
symmetric matrices ijW can be obtained as follows.
1XP (13)
1ii XNF , )2,1( i (14)
1ij
1ij XYXW , )2( ji (15)
from the solutions X , iN and
ijY . By the result of [16], we
have Lemma 2: Suppose that the initial error vector )0(e is
unknown, but the upper bound is known, i.e., )0(e .
Then the control input can be enforced to satisfy the constraint )(tu , if the following LMIs are added to
Lemma 1.
XI 2 (16)
0IN
NX
i
Ti
2
, )2,1( i (17)
where and are predefined positive scalars. □
IV. SIMULATION AND EXPERIMENT RESULTS
The geometric parameters and values of the TWIP are provided in TABLE I.
1160
Substituting the parameters into the fuzzy model (4) yields their system matrices as follows.
0035.3889-
0026.6778
010
1A,
3.9683
0.7937-
0
1B,
0026.8430-
0023.3660
010
2A,
3.6397
0.6304-
0
2B.
In the fuzzy balancing control, the desired state of the TWIP is initiated on the upright posture, i.e., T000dx .
Because the TWIP is modeled in 66)( π,π-t , so that
the initial error vector is assumed as T00)0()0( e , where
6)0( . Referring to Lemma 2, the constraint of the initial
error vector can be translated as 6)0( e , i.e., the upper
bound of the initial error vector 6 . Besides, the
constraint of the control signal is selected as 40)( tu , i.e.,
40 . According to Lemma 1 and Lemma 2, with setting
6 and 40 , MATLAB LMI toolbox can be used to
solve such LMI conditions (12a)-(12d), (16) and (17). The two local controllers (8) are constructed via PDC, and their local feedback gains
1F and 2F are determined as follows.
0.01329.222046.97811F ,
0.016210.204249.74702 F .
Then, the positive define P and the symmetric matrices ijW
are obtained as
0
0.00000.00040.0022
0.00040.09150.4524
0.00220.45242.2418
P
,
0
0.00000.00060.00340.0000-0.0001-0.0003-
0.00060.11960.62430.0001-0.0145-0.0724-
0.00340.62433.27630.0003-0.0724-0.3628-
0.0000-0.0001-0.0003-0.00000.00090.0041
0.0001-0.0145-0.0724-0.00090.20100.9463
0.0003-0.0724-0.3628-0.00410.94634.4694
~
2212
1211
WW
WWW
.
Therefore the sufficient conditions (12a)-(12d) for ensuring stability are satisfied. The added conditions (16) and (17) are also satisfied for maintaining control constraints.
A. Simulation Results
The robustness of the fuzzy balancing control is verified in the first simulation, shown in Fig. 4. There are three plots selected in a simulation figure, including the inclination angle of the pendulum, )(t , the angular velocity of the pendulum,
)(t , and the angular velocity of the wheel, )(t ,
respectively. The desired state is the upright posture, i.e.,
T000dx . An emphasis is that a pulse disturbance of
torque, )(td , is added in the simulation.
otherwise.,0
0.7;0.5where,]m-Nt[5)(
ttd (18)
Therefore the control torque of the TWIP system is translated as )()()( tdtutu f . In Fig. 4, one can find the
fuzzy balancing control is efficient against the control disturbance, and all states of the TWIP system go back their originals quickly.
B. Experiment Results
An equivalent TWIP is built practically in the laboratory to illustrate effectiveness of the proposed control algorithm. The prototype of the TWIP system is shown in Fig. 1. A tilt sensor and a gyroscope are installed on the chassis to detect the inclination angle and the angular velocity of the pendulum, respectively. Both wheels are driven by 24V-DC rim motors, which are invented by Elebike Company Ltd. The TWIP system has two rotary encoders (2048 counts-per-revolution) to measure wheels’ rotation and their angular velocities. The main controller of the TWIP is a Nios development board, which is a soft-core embedded system and is manufactured by Altera Corporation. The chip of the board is the EP1S10F780 which is the Stratix Series of Altera chip. This chip is a 32-bit RISC processor that provides 8321 gates and operates at the system clock of 50MHz. The proposed control algorithm can be implemented in the Nios development board. Therefore the real-time state, detected by the tilt sensor, the gyroscope, and encoders, can be processed by the Nios development board to compute the control input for the TWIP system.
To verify the feasibility of the proposed PDC control design, the experiment is given with same settings of the simulation. The experiment result is demonstrated in Fig. 5 and its corresponding sequential image stills are shown in Fig. 6. There are three plots selected in Fig. 5. The first plot is the inclination angle of the pendulum, )(t , detected by the tilt
Fig. 4. Simulation results of the balancing control.
1161
sensor. The second plot is the angular velocity of the pendulum, )(t , detected by the gyroscope. The third plot is
the mean value of the angular velocity of the two wheels, )(t ,
i.e., )()(2
1)( ttt RL , where )(tL and )(tR are the
measured values from the left and right encoders, respectively. In Fig. 6, the TWIP goes to the vertical quickly and keeps its balance automatically. It’s obvious that the fuzzy balancing control applies to the practical TWIP system successfully.
V. CONCLUSION
A fuzzy PDC control design is proposed in this paper. Practical hardware architectures are established to realize a TWIP system with the balancing behavior. Simulation and the equivalent experiment results are given to demonstrate the feasibility that the fuzzy PDC controller can be implemented in a practical TWIP.
ACKNOWLEDGE
This paper is supported by National Science of Council of Taiwan under the Grant NSC 95-2221-E-008-127-MY3.
REFERENCES [1] M. Baloh and M. Parent, “Modeling and model verification of an
intelligent self-balancing two-wheeled vehicle for an autonomous urban transportation system,” in Proc. Conf. Comp. Intelligence, Robot. Autonom. Syst., Singapore, Dec. 2003.
[2] O. Begovich, E. N. Sanchez and M. Maldonado, “Takagi-Sugeno fuzzy scheme for real-time trajectory tracking of an underactuated robot,” IEEE Trans. Control Syst. Technol., vol. 10, no. 1, pp. 14-20, Jan. 2002.
[3] M. Fiacchini, A. Viguria, R. Cano, A. Prieto, F. R. Rubio, J. Aracil and C. Canudas-de-Wit, “Design and experimentation of a personal pendulum vehicle,” in 7th Portuguese Conference on Automatic Control (CONTROLO’06), pp. 11-13, Portugal, Sep. 2006.
[4] F. Grasser, A. D’Arrigo, S. Colombi and A. C. Rufer, “JOE: a mobile, inverted pendulum,” IEEE Trans. Ind. Electron., vol. 49, no. 1, pp. 107-114, Feb. 2002.
[5] Y. S. Ha and S. Yuta, “Trajectory tracking control for navigation of the inverse pendulum type self-contained mobile robot,” Robot. Auton. Syst., vol. 17, pp. 65-80, 1996.
[6] E. Kim and H. Lee, “New approaches to relaxed quadratic stability condition of fuzzy control systems,” IEEE Trans. Fuzzy Syst., vol. 8, no. 5, pp. 523-534, Oct. 2000.
Fig. 6. Nine sequential image stills for the real experiment of the balancing control. Image stills 01-03: experiment result of the disturbance effect, the WIP goes back and leans positively; Image stills 04-09: experiment result of the performance of the fuzzy balancing controller, the WIP reaches to the upright posture quickly.
Fig. 5. Experiment results of the balancing control.
1162
[7] X. Lai, J. H. She, Y. Ohyama and Z. Cai, “Fuzzy control strategy for acrobats combing model-free and model-based control,” IEE Proc.-Control Theory Appl., vol. 146, no. 6, pp. 505-510, Nov. 1999.
[8] W. Li, K. Tanaka and H. O. Wang, “Acrobatic control of a pendubot,” IEEE Trans. Fuzzy Syst., vol. 12, no. 4, Aug. 2004.
[9] W. W. Lin, W. J. Wang and S. H. Yang, “A novel stabilization criterion for large-scale T-S fuzzy systems,” IEEE Trans. Syst. Man Cybern. Part B-Cybern., vol. 37, no. 4, pp. 1074-1079, Aug. 2007.
[10] X. Liu and Q. Zhang, “New approaches to controller designs based on fuzzy observers for T-S fuzzy systems via LMI.,” Automatica, vol. 39, pp. 1571-1582, April 2003.
[11] X. Liu and Q. Zhang, “Approaches to quadratic stability conditions and control designs for T-S fuzzy systems,” IEEE Trans. Fuzzy Syst., vol. 11, no. 6, pp. 830-839, Dec. 2003.
[12] T. Miyashita and H. Ishiguro, “Human-like natural behavior generation based on involuntary motions for humanoid robots,” Robot. Auton. Syst., vol. 48, pp. 203-212, 2004.
[13] S. W. Nawawi, M. N. Ahmad, J. H. S. Osman, A. R. Husain and M. F. Abdollah, “Controller design for two-wheels inverted pendulum mobile robot using PISMC,” in Proc. 4th IEEE Student Conf. on Research and Development (SCOReD 2006), Malaysia, pp. 194-199.
[14] K. Pathak, J. Franch and S. K. Agrawal, “Velocity and position control of a wheeled inverted pendulum by partial feedback linearization,” IEEE Trans. Robot., vol. 21, no. 3, pp. 505-513, June 2005.
[15] K. Tanaka, S. Hori and H. O. Wang, “Multiobjective control of a vehicle with tripe trailers,” IEEE-ASME Trans. Mechatron., vol. 7, no. 3, pp. 357-368, Sep. 2002.
[16] K. Tanaka, T. Ikeda and H. O. Wang, “Fuzzy regulators and fuzzy observers: relaxed stability conditions and LMI-based designs,” IEEE Trans. Fuzzy Syst., vol. 6, no. 2, pp. 250-265, May 1998.
[17] K. Tanaka and T. Kosaki, “Backing control problem of a mobile robot with multiple trailers: fuzzy modeling and LMI-based design,” IEEE Trans. Syst. Man Cybern. Part C-Appl. Rev., vol. 28, no. 3, pp. 329-337, Aug. 1998.
[18] H. O. Wang, K. Tanaka and M. F. Griffin, “Parallel distributed compensation of nonlinear systems by Takagi-Sugeno fuzzy model,” in Proc. 4th IEEE Fuzzy Syst., pp. 531-538, 1995.
[19] H. O. Wang, K. Tanaka and M. F. Griffin, “An approach to fuzzy control of nonlinear system: stability and design issues,” IEEE Trans. Fuzzy Syst., vol. 4, no. 1, pp. 14-23, Feb. 1996.
1163