A NOVEL QUAUT ATIVE CONTROL METHOD TO INVERTED PEN ...
14th World Congress ofTFAC
C-2a-14-4
Copyright © 1999 IF AC 14th Triennial World Congress, Beijing, P.R. China
A NOVEL QUALITATIVE CONTROL METHOD TO INVERTED PENDULUM SYSTEMS! Deyi Li Hui Cheo' Jianhua Fan' and Chengzhi Shen# The Institute ofElectronic System Engineering No. 6 Wan Shou Road, Beijing, China, 100036
[email protected] *The lllanjing Communications Engineering Institute. China #Beijing University ofAeronautics and Astronautics. China
Abstract: A new mathematical representation of qualitative concepts is presented by a cloud model in this paper. With the new model, a novel imitating-human control mechanism for inverted pendulum systems driven by single motor is proposed not only serving as foundations of qualitative control engine, but also integrating fuzziness and randomness in uncertainty reasoning. A case study is given to e""l>lore a good comprehensibility of human-intelligence control methods. The architecture and objectoriented programming of such a control engine to inverted pendulum systems based on cloud generators and qualitative rule constructors show the advantages in implementations. The physical experimental results with robustness are given and evaluated. Copvrifi[ht © 19991FAC
Keywords: Modeling, Qualitative Control, Uncertainty, Robustness.
1. INTRODUCTION It is worthwhile to model human knowledge and
emulate human behavior in real-time control systems (H.meier, et al.,1990;K.Furuta, et a1.,1992; JEker, et al., 1996). Many researchers who are interested in fuzzy logic, intelligence automation, neural networks and soft computing focus their attention on fuzziness and randomness to attack uncertainty in human thinking and human control (C.Anderson,1989; H.Tai and Shenoi, 1994; D. Saez and Cipriano, 1997; L.K.Wong, et al.,1997). Human being can well control many unstable objects by simply using their approximate, qualitative knowledge and experiences, such as riding a bicycle, making a long flexible pole upright on his forehead. Therefore, to stabilize an inverted pendulum system has become a very challenging and hot subject in imitating such a human- intelligence and automation for about thirty years. The kernel of inverted pendulum control systems is very much the same as robot control, space
aircraft control, and many other unstable systems. An inverted pendulum is also very often used as an experimental instrument· on which many control approaches can be examined to explore new control theories. As stated elsewhere this experiment is 'the jewel in the crown of every control department'. Many papers on stabilizing single, double and triple link inverted pendulum systems rely only on computer simulations to validate their approaches. As discussed later in this paper, physical uncertainties not included in the simulation models could cause substantial difference between experimental and simulation results. It is well known (H.meier,et al.,1990;T.Yamakawa,1989; L.K.Wong, et al.,1997) that the successful control of a triple inverted pendulum using a single motor has not been well solved yct. The powerful combination of advanced computer technologies with state-of-the-art experimental hardware would make it possible if only modem control theory can take into account the uncertainty in physical systems. This paper deals with
This research is supported by the Natural Science Foundation of China undel' contract 69775016. 1495
Copyright 1999 IF AC
ISBN: 008 0432484
A NOVEL QUALTT ATIVE CONTROL METHOD TO INVERTED PEN ...
14th World Congress ofTFAC
a novel qualitative model accomplished in this area, and intends to model and test the actual uncertainties in physical inverted pendulum systems.
2.The QUALITATIVE CONTROL STRATEGY OF INVERTED PENDULUM SYSTEMS 2.1 Problems with Conventional Afathematicai and
Fuzzy Control }vfethods Inverted pendulum control system has a very simple structure. A pole is hinged to a motor-driven cart that moves on rail tracks to its right and left. The pole has only one degree freedom (rotation about the hinge point). The primary control tasks are to keep the multi-link inverted pendulum vertically balanced and keep the cart within the rail trnck boundaries. The experimental block diagr.i.m is shown in Fig. I, and the dynamics of the inverted pendulum system are characterized by eight state variables: x position of the cart on the rail; X velocity of the cart; (j], (j 2, () 3 angle with the lower, middle and upper pole to the vertical axis respectively; (j], 8 2 , () 3 angle velocity with the lower, middle and upper pole to the vertical axis respectively.
Fig.l Experimental block diagram Such an inverted pendulum is nonlinear, and all physical systems are nonlinear to a certain extent. Conventional nonlinear control schemes often require a prior knmvledge on mathematical structure and accurate parameters, which are very often not accessible. For example, according to control theory, the mathematical model for the pendulum can be constructed using Lagarange method under some assumptions (D. Saez and A. Cipriano, I 997)The nonlinear system equation resulting from the Lagarange method can then be written in the foHowing fonn: ~(~)_~+ ~T +~=1.ij+Fj dt O4lj
arj
Oqj
O4lj
0=1 .. 4)
(1)
U=(KsUO 0 0]
T
where u (in V) is the control input from the computer to the analogue amplifier, Ks (in NIV) is the overall electronic systems input conversion gain and Fj is the coulomb friction term in the jth coordinate direction. The nonlinear system equation resulting from the Lagrange method can then be written in the following fonn. To find a stabilizing controller for the pendulum, the equation of motion has to be linearized about the vertical position. The linearized model, which then becomes the basic foundation for all stabilization methodologies, is represented in state sp
(2)
As a matter of fact, a physical multiple-link inverted pendulum is a multivariate, nonlinear, fast reaction and unstable system with a lot of uncertainties under an environment. And there is no accurate mathematical model to fully describe it. However, human experts in theses cases may well achieve the control by control rules which are squeezed out from their long experience and represented· by intuitive natural language. The natural languages play a very important role in representing the uncertainty in human control and reasoning. As an alternative for conventional control theory and methods, fuzzy set theory and fuzzy control techniques have been very flourishing for many years. However, as a foundation of fuzzy set theory, the concept of "membership function' , proposed by L. A. Zadeh in 1965 faces some challenges and criticisms. Does there really exist a unique value to which a particular element satisfies the property that characterizes the fuzzy set? How do we set up, measure, and judge the shape of a membership function? It is also argued(Deyi Li, et al.,1997) that the membership function frequently takes on fuzzy values itself This type of fuzzy set is called ultra fuzzy set, level 2 fuzzy set, or interval-valued fuzzy set Many applications of fuzzy set theory use triangular functions for simplicity, but other types of membership functions are also used in pmctice, such as sine function, trapezoid, and bell function. Tht:refore, fuzzy logic theory has been challenged starting from the concept of membership functions. Almost all results in fuzzy control systems are claimed to be dependent on the original membership functions chosen. Besides, the amount of precise computation involved in constructing membership functions can be formidable, especially when they are nonlinear. The product-summation composition and center-of-gravity calculation are most popular ways of defuzzification in the design of fuzzy logic controllers, Unfortunately there is no a clear theoretical
1496
Copyright 1999 IF AC
ISBN: 008 0432484
A NOVEL QUALTT ATIVE CONTROL METHOD TO INVERTED PEN ...
interpretation of these operations. Furthermore, the fuzzy inference mechanism has no room to allow
inheritance of fuzziness(Deyi Li,1998). After the mapping associated 'With a membership function, the uncertainty of a fuzzy concept becomes very certain, fixed to that degree for ever. The fuzzy characteristics of the original linguistic term are not passed on the next step of inference at all. That does not keep with the fuzzy thinking of humans.
2.2 Qualitative Representation
So, a very fundamental question arises: "How mathematically natural are qualitative models to represent the uncertainty in human thinking?" The powerful mathematical tools to represent uncertainty in human thinking and human control are fuzzy set theory and probability theory. The both should enrich each other to model uncertainty. That is our qualitative control strategy. Our point of departure in the qualitative control strategy is to represent qualitative knowledge in linguistic terms.
14th World Congress ofTFAC
adhered on the fuzziness from the statistical point of view. We can see the integrated uncertainty of fuzziness and randomness and the convergent properties of the cloud model. The cloud concept provides a means of both qualitative and quantitative characterization of linguistic terms. The bell-shaped clouds, called normal clouds are most fundamental and useful in representing linguistic terms. Since some people may get used to the concept of conventional membership functions, we could also use the normal membership function to represent the mathematical expected curve (MEC) of the cloud modeL The digital parameters of a normal cloud characterizes the quantitative meaning of a linguistic atom. The Gaussian distribution transformation is used in a very effective way in characterizing normal clouds. A normal cloud shown in Fig.2 is described with only three digital characteristics, expected value (Ex), entropy (En) and hyper entropy (He).The description of three digital characteristics can be seen in (Deyi Li ,1997).
3. MAPPING BETWEEN QUALITATIVE AND QUANTITATIVE KNOWLEDGE
3.1 Cloud Models Fig.2 A normal cloud with Ex,En,He. Following the important characteristics of linguistic variables and terms, we define a new concept of cloud models to represent linguistic terms. Let U be the set, U = {u}, as the universe of discourse, and T, a linguistic term associated with U. The membership degree of u in U to the linguistic term T, Cr (u), is a random variable ,vith a probability distribution. Cr(u) takes values in [0,1], A membership cloud is a mapping from the universe of discourse U to the unit interval [0, I]. The concept of membership clouds is often pictured as The geometry of two-dimensional graphs. membership clouds is a great aid in understanding the uncertainty. It is important to see the properties of the clouds. First of all, the mapping from all u in U to the interval [0, I], is an one-point to multi-point transition, producing a membership cloud, rather than a membership curve. Secondly, any particular drop of the cloud may be paid little attention to, however, the total shape of the cloud, which is visible, elastic, boundless and movable, is most important. That is why we use the terminology "cloud" to name it. Thirdly, the mathematics expected curve (MEC) of a membership cloud may be considered as its membership function from the fuzzy set theory point of view. Finally, the definition has effectively integrated the fuzziness and randonmess of a linguistic term in a unified way. In the cloud, fuzziness lies at the center, and there may be nothing to do with probability, but there is a probability
3.2 Cloud Generators
Given three digital chaIacteristics Ex, En, and He, to represent a linguistic term, a set of cloud drops may be generated by the following algorithm: 1) Produce a random value x which satisfies with the normal distribution probability of mean = Ex, and standard error = En; 2) Produce a random value En' which satisfies Vi'ith the normal distribution probability of mean = En, and standard error = He;
ex
Ex) 2 . 2 2(E N )
3) calculate y ~e 4) let (x, y) be a cloud drop in the universe of discourse; 5) repeat 1-4 until the number of drops required all generated The idea of using only three digital characteristics to generate a cloud is creative. A series of linguistic term generators have been implemented both in hardware and soih'lare and are a patented invention in China. The generator could produce as many drops of the cloud as you like. This kind of generators is called a forward cloud generator. Cloud-drops may also be generated upon conditions. Figure 3 shows the generator producing drops under a given numerical value u in the universe of discourse U. It is easy to set up a half-up or half-down normal cloud generator with
1497
Copyright 1999 IF AC
ISBN: 008 0432484
14th World Congress oflFAC
A NOVEL QUALITATIVE CONTROL METHOD TO INVERTED PEN ...
5. QUALITATIVE CONTROL MECHANISM IN INVERTED PENDULUM SYSTEMS
the similar strategy, if there is a need to represent such a linguistic term.
~~ =El He x
CG
t
j~) Ex
~
• En3 CG He
~)
Fig. 3 Generators on condition
It is natural to think about the generator mechanism in an inverse way. Given a number of drops, as samples of a nonnal cloud, the three digital characteristics Ex, En, and He could be obtained to represent the corresponding linguistic term. lbis kind of cloud generators may be called backward cloud generators. Since linguistic terms are represented by the cloud model, the forward and backward cloud generators can be served interchangeably to bridge the gap between quantitative and qualitative knowledge. 4
5.} The Imitating-human Control to an One-link Inverted Pendulum System
As to the control of a one-link inverted pendulum, the human qualitative knowledge could be represented in a 5-rule set as following: 1. IF (0 is Negative-Large) THEN (f is Negative-Large) 2. IF (8 is Negatiye-Swall) THEN (j is Negative-Small) 3. IF (8 is Zero) THEN (j is Zero) 4. IF (8 is Positive-Swa11) THEN (j is Positive-SmaUe)
5.
IF
(8 is Positive-Large) THEN (f is
Positive-Large)
CONSTRUCTION OF QUALITATIVE RULES BY USING ClOUD MODELS
4.1 Qualitative Rule Constructor Implemented in
Hardware
CG· l
We may inunediately use two forward cloud generators to construct a qualitative rule, "If A then B," if the digital characteristics of the linguistic terms A and B in that rule are given. See Figure 4, in which, the membership degree, mu, produced by an input x to the generator CGA represents the activated strength of the rule which goes to control the generator CGB la produce a set of drops y quantitatively. The output uncertainty in responding to a same input value is a feature which actually happens with a hmnan controller.
~: :=!1 =:;j He
CGA
1
Xi _ _ _ _....._
!~ ~. . _C~_B___'r:OP(i)
Fig. 4 A qualitative rule implemented by cloud generators 4.2 The Inference Engine with Rule Constructors
Generally speaking, there are a set of rules in a qualitative controller. The rule set is summed up by human experts from their experiences. These specified rules very often put the focus on the nonlinear characteristics, where necessary, in a complex control system. Therefore, all the activated rules will make contributions to a particular input, if more than one rule is fired by an input value in the controller.
output
x Fig. 5 The construction of a rule set in which the underlined terms are all linguistic tenus implemented in cloud generators. The 5-rule set can be easily implemented in hardware by using the rule construction technology described above. This kind of 5-rule set, named RS(8), may be treated as a basic objet in progra:mrnmg,. However, if there is a requirement that the cart position must be kept in more or less the center of the rail while balancing the pendul~ another 5-rule set, RS(x), may be added. And at this time, the hmnan control knowledge says that if the pendulum is basically upright, please pay more attention to the position of the cart being at the center of the rail. As a matter of fact, the qualitative knowledge " pay more attention" shows the control priority of 8 is higher than x with uncertainty. The control strategy to take account of this knowledge is realized by using linguistic terms, soft-zeroes (SZx,sze:,>za'Sz" ) _ The linguistic term, soft-zero, is very much interesting. The entropy of soft-zero, SZe , can effectively control the probability of activating RS(e) in control cycles. Once again, soft-zero is also implemented in the cloud model. If the human-
1498
Copyright 1999 IFAC
ISBN: 0 08 043248 4
A NOVEL QUALTT ATIVE CONTROL METHOD TO INVERTED PEN ...
14th World Congress ofTFAC
intelligence control takes the de and dx into account as well, and the priority of activating RS(O), RS(x), RS( iJ), and RS( x) is given in the same sequence, then the control strategy is also determinated by the digital characteristics of the linguistic terms, softzeros which make the mapping between the qualitative and quantitative values. The control block diagram is given in Fig.6.
Setup Parameters & Initialization
Setup Parameters & Initialization
yes yes
~_-.:"yes
X
yes Fig.7 Flow chart of operations of a triple inverted pendulum control system. Fig.6 Flow chart of the control mechanism of an one-link inverted pendulum 6. EXPERIMENTS AND EVALUATIONS
5.2 The Concept of an EqUivalent Cart to Multi-link Inverted Pendulum Systems
6.1
The
Physical
Experiments
and
Testing
Environments In order to be able to make a good understanding and representation of human intelligence on a multi-link inverted pendulum control mechanism, we may set up a new concept., called "an equivalent cart". That is to say that an n-link inverted pendulum is considered as an one-link inverted pendulum supported by an equivalent cart, which is an n-l link inverted pendulum itself. Again the n-llink inverted pendulum is another one link inverted pendulum supported by an equivalent cart which is an n-2link inverted pendulum itself, and so on. Therefore, the qualitative control strategy becomes to pay more attention to keep the one link inverted pendulum first while balancing the equivalent cart. 5.3 The Imitating-human Control to a Double or Triple-inverted Pendulum System
Based on the control strategy of one-link inverted pendulum and the concept of an equivalent cart, the qualitative control process for a double and triple inverted pendulum system becomes much simple. The flow chart of a triple inverted pendulum is given in Fig.7.
For evaluating the qualitative control method, a physical experimental inverted pendulum system driven by single motor is shown in Fig.8.The stabilization of a double inverted pendulum has been succeeded by using the cloud model.
Fig.8 A real testing bed sho'Wing the robustness of the system The sensor for detecting x is a rotating resistance meter WXD7 with resistance of lOkO, the sensors for detecting 81,82, and 83 are the same bearing-rotated resistance meters WDD35Dl with resistance of 2k.Q and rotating range of 360 degrees. The mil effective length is 80c~ and the DC motor is driven bet\veen 5V and+5V An AID DIA board is used to connect the pendulum instrument to a personal computer with 166MHz under Windows95.
1499
Copyright 1999 IF AC
ISBN: 008 0432484
A NOVEL QUALITATIVE CONTROL METHOD TO INVERTED PEN ...
6. 2 Test Results and Evaluations
In this section we present the results of the experimental performance study on a double inverted pendulum control system. To make the study more meaningful, all the pre-definitions related to the digital characteristics of linguistic terms used in rule sets RS(x), RS(8a, RS( x) and RS( el) are made as similar as possible. A unified rule set is given , in which the digital characteristics of clouds for input and output are both in the range of [-100, 100]. The Ex, En, and He of clouds are represented in the form (Ex, En, He) , as shown in table 1. Then, it is mapped to particular physical scales of RS(x), RS(8[), RS( x) and RS(& 1) respectively. By using the cloud modeJ, the double inverted pendulum is successfully controlled, which can be stabilized over a long period of time (several hoursf).The variation of 8 1 and 8 2 is shown in Fig.lO(a). The cart of the double inverted pendulum can even move forward or backward as designed just like a walking robot as shown in Fig.lO(b). Experiments also show the strong robustness that the control method is not sensitive to the change of pole length, cart mass and other physical factors. We can even make a bundle of flowers stand upward with the pole ",ithout changing any parameters at all. The
14th World Congress ofIFAC
A new uncertainty representation, cloud model, is presented integrating randomness and fuzziness with three digital characteristics Ex, En, and He. A soft inference mechanism has been developed to capture the qualitative knowledge contained in the human intelbgence. The fuzziness and randomness are not only complementary, but also inseparable. And the experiments to imitating human control mechanism in inverted pendulum control systems are made showing the advantages in large scale qualitative control implementation. However, to develop sound foundations oflrnowledge representation and human reasoning in knowledge base systems will require a lot of work. This paper will lead to comparative studies, something that has been
lacking in previous reports. We have passed the stage from mathematical computing to information processing by using computers. And we are stepping on the stage from information processing to logic reasoning. By means of soft computation, computing with words, we may jump up from hard reasoning, as the conventional logic does, to a new stage, human thinking.
REFERENCES C.Anderson (1989), Learning to Control an Inverted
Table I Digital Characteristics of Clouds in the Unified Rule Set Linguistic Terms
Unified Values
Negative-Large Negative-Small Zero Positive-Small Positive-Large
(-100,207,0.023) (-38,12.6,0.015) (0,7.6,0.01) (38,12.6,0.015) (100,20.7,0,023)
successful results encourage us to use these novel methods to balance triple-inverted pendulum, which are undergoing at the time of writing. Multidimensional clouds genemtors are being developed.
.2Q
.
~o
Q
-30
Fig. I 0 the position of cart ,9, and 9 2 of double inverted pendulum when it is stabilized 7. CONCLUSION
Pendulum Using Neural Network, IEEE Control Systems Magazine, 31-36. Deyi Li (1997). On Representing Uncertainty in Commonsense Knowledge, PACESlSPICIS'97 Conference Proceedings 291-298, Singapore, 24-27 . Deyi Li(1998). Uncertainty Reasoning Based on Cloud Models in Controllers, Computers and Mathematics with Applications, Elsevier SCience, No.3, Vol.35, 99-123,. D.Saez and A. Cipriano(l 997), Design of Fuzzy Model based Predictive Controllers and its Application to an Inverted Pendulum, Fuzzy-IEEE '97, 915-919. H.meier, Z .Farwig and H. Unbehauen(1990). Discrete Computer Control of a Triple-inverted Pendulum, Optimal Control Applications and Methods, VoJ.ll 157-172. H.Tai and S.Shenoi(l994). Robust Fuzzy Controllers, 85-90. IEker and J.Astron(I996). A Nonlinear ObsenTer for the Inverted Pendulum, Proceedings ofthe 1996 IEEE Int. Conference on Control Applications, 332-337. K.Furuta and M.Yamakita(1992). Swing-up Control of Inverted Pendulum Using Pseudo-state Feedback, J of Systems and Control Eng. 263-269. L.K.Wong, F.Leung & P.Tarn (1997), The Design of Stable Fuzzy Controllers with Combination of Convemtional Controllers, Proceedings of ISlE '97, Portugal, 993-997. T.Yamakawa (1989), Stabilization of Inverted Pendulum by a high-speed Fuzzy Logic Controller Hardware System, Fuzzy Sets and Systems, Vo1.32, 161-180.
1500
Copyright 1999 IF AC
ISBN: 0 08 043248 4