Intelligent Control Using a Neuro-Fuzzy Network
Moenes Iskarous and Kazuhiko Kawamura Center for Intelligent Systems Vanderbilt University Nashville, TN 37235, U.S.A. fmoenes,
[email protected]
Abstract
Intelligent control techniques have emerged to overcome some de ciencies in conventional control methods in dealing with complex real-world systems. These problems include knowledge adaptation, learning, and expert knowledge incorporation. In this paper, a hybrid network that combines fuzzy inferencing and neural networks is used to model and to control complex dynamic systems. The network takes advantage of the learning algorithms developed for neural networks to generate the knowledge base used in fuzzy inferencing. The network is used to model and to control a robot arm with exible pneumatic actuator. Comparison with a nonlinear control technique used for the robot joints is also presented.
1 Introduction
Since the basic theory of automatic control was founded in the middle of this century, the area of automatic control has progressed along dierent directions. Starting with linear control techniques, the control eld has advanced to state-space representation, optimal, nonlinear, adaptive, and robust control techniques. More recently neural networks and fuzzy systems have been used to implement intelligent control systems. An intelligent control system should be able to learn and to take action in a way similar to humans. It should also be able to incorporate fuzziness and imprecision which exist in real-world systems. Control system design includes dierent activities such as modeling, analysis, implementation, and veri cation [1]. These activities were traditionally conducted using mathematical techniques. The problem with this approach is that mathematical models are not always available in real-world systems [2]. The other problem that faces control system engineers is how to incorporate the knowledge of a human expert in the controller design since this knowledge is not in a mathematical form. Neural networks can be trained to capture the behavior of the human expert while controlling a system. In this case, the network mimics the input/output mapping of the human expert without providing any explanation to its operation. On the other hand, the human expert may be able to formulate the knowledge in a linguistic form which provides
an explanation to the control operation. Fuzzy logic can use the linguistic formulation to mimic the operation of the human expert. The main advantage of neural networks is their ability to learn complex mapping functions from examples. One of the problems with neural networks is scaling up. The training time increases a great deal with the increase in the system complexity and the network size. Neural networks have been used eectively for the identi cation and control of complex nonlinear dynamic systems. They are considered model free controllers since they don't require a mathematical model of the system to be controlled. Another problem in neural control however is how to teach the controller and by whom. Barto [3] as well as Narenda and Parthasarathy [4] proposed a dynamic backpropagation network by using tapped delays on the inputs and the outputs of the network to implement the dynamicity. The dynamic backpropagation network can then be used to identify the model or the inverse model of a plant. On the other hand, fuzzy systems have been applied in various control applications when a pioneering research on fuzzy control was conducted by Mamdani and his colleagues [5, 6]. Fuzzy control is very useful when the process to be controlled is too complex for analysis by conventional quantitative techniques or when the available sources of information are inexact or uncertain. Fuzzy logic control has been applied in a diverse set of domains such as automatic train operation [7], robot control [8, 9, 10], exible manipulator control [11] and servo control [12, 13]. Tzafestas and Papanikolopoulos [14] tune a PID controller using fuzzy linguistic rules based on the plant error and change in error. Shao [15] used a self-organizing fuzzy algorithm to control the temperature of a heater and to control the speed of a motor. The controller performance was initially very crude but it improved after several runs when the self-organizing module modi ed the initial knowledge base. The major problem with self-organizing controllers is the credit assignment problem. To be able to modify the rule to improve the performance of the system, an incremental input-output model is required, which is inverted and used by the self-organizing module. Both neural networks and fuzzy systems have
unique advantages. Neural networks have the advantage in learning while fuzzy systems have the advantage in inferencing. On the other hand, some weaknesses have been identi ed, for example, incorporating existing knowledge in neural networks or learning in fuzzy systems. Global stability is very hard to prove although special case theories have been developed to prove stability in neural or fuzzy systems [16, 17]. In Section 2, dierent techniques to implement neuro-fuzzy systems are presented with examples. This section also explains the network architecture, the learning algorithms and some issues on training and convergence. Section 3 presents the use of the network in modeling and control of complex dynamic systems by developing a fuzzy model of a robot joint that uses pneumatic muscle-like actuator and using the network inverse model to control it. It also presents a comparison between this approach and a nonlinear control approach used to control the robot joints. Finally, Section 4 presents the conclusions and future research.
is the activation function which generates the node output [18, 19, 20]. R1
R2
R3
Inputs
R5
R6
2 Neuro-Fuzzy Network
Recently, new hybrid architectures were proposed to combines neural networks and fuzzy inferencing. Lin and Lee [18, 19] as well as Yang and Stachowicz [20] implemented a self-learning fuzzy logic system embedded in a ve layer network. A modi ed version of the error backpropagation algorithm is used to train the network. Yang and Stachowicz [20] used the network to identify a nonlinear component in a control system. They also used the network to model an optimal PID controller trajectory for a rst order time delay system and to model a control surface for an inverted pendulum controller. In their experiments, the system was able to achieve fast convergence and precise modeling [20]. In this research, although the network architecture is similar to the one used by Yang and Stachowicz [20], there are dierences in the way rules and membership reduction is performed as well as in the strategy for training. The network is also used to generate an inverse model of the system which is used for control. Rule reduction is done several times during training to identify the most important rules and tune the membership functions accordingly. Dierent learning rates were also used to control the tuning speed of the input membership functions, rule and output membership functions relative to each other. Momentum was used to reduce oscillations in the learning error.
2.1 Network Architecture
The main objective in most of neuro-fuzzy research is to model an existing system. The system can be the actual plant or a controller or a human operator. The result is a fuzzy system containing rules and membership functions that model the plant. As shown in Figure 1, the network is composed of ve layers. Each layer is composed of several nodes. Two functions are used for every node. The rst function is the integration function which combines information from the previous layer. The second function
Output
R4
R7
1
2
3
4
5
Figure 1: Self-Learning Neuro-Fuzzy Network Layer 1: This is the input layer which transmits the
inputs to their corresponding membership functions in the next layer. Layer 2: This layer contains the input membership functions implemented as Gaussians. The second layer is not fully connected with the rst layer. The connections exists only between the input nodes in the rst layer and their corresponding membership nodes in the second layer. Layer 3: This layer represents the fuzzy rules. Each node in layer 3 performs a fuzzy AND operation using the algebraic product. The rule association is done between membership functions of dierent inputs. The output of each node in layer 3 represents the strength of ring the rule de ned by that node. The synapses connecting layer 2 with layer 3 are either 1 or 0 to indicate the existence or the nonexistence of the corresponding rule. Layer 4: This layer performs the fuzzy OR operation between rules that produce the same consequences. Initially this layer is fully connected to layer 3 which means that any rule can result into any output membership function. As the network is trained, the synapses between layer 3 and layer 4 are enforced or decreased so that the rules are connected to the right output membership functions. Layer 5: This layer uses Gaussian output membership functions and performs the defuzzy cation operation using a modi ed Center Of Area algorithm [18].
2.2 Learning Algorithms
Learning is done in two phases. The rst phase uses a self-organizing learning scheme such as compet-
itive learning to locate initial input and output membership functions. The second learning phase uses a modi ed error backpropagation algorithm to adjust the parameters of the membership functions and the rule weights [18, 19, 20]. 2.2.1
Unsupervised Learning Phase
In this phase, competitive learning is used to identify the initial centers and the spread of the input and output membership functions [18, 19, 20]. This technique is similar to statistical clustering [21]. Once the centers are found, the widths of the membership functions are determined by the rst-nearest-neighbor [18]. 2.2.2
Supervised Learning Phase
In this phase, the network is trained with the input/output data. The learning rule uses the steepest descend algorithm such that it minimizes the error 1 (1) E = (yj , y^j )2 2 where yj is the desired output and y^j is the network output. Yang and Stachowicz [20] provides a detailed explanation of the supervised learning algorithm.
2.3 Issues on Training and Convergence
Dierent learning rates are used to de ne the relative rates of training among the input membership functions, the rules and the output membership functions. It was found, based on the experiments done, that the network is very sensitive to learning rates. High learning rates cause the network learning error to oscillate or it may not converge. It was also found that decaying learning rates improve the convergence of the network. Momentum is also used to stabilize the convergence against oscillation. After the network is trained, the rules with weights below a certain threshold are eliminated and training is continued to tune the membership functions with the new set of rules. This procedure is repeated until the number of rules is not changed. The resulting rules are then the most important ones. A membership function can also be eliminated from the model during training if it completely overlaps with another membership function or if its width is reduced to zero or was driven outside the operating region. Elimination of rules can result in elimination of membership functions that are only used by these rules thus reducing the model size. Also, elimination of membership function leads to rule reduction. The network was tested to identify a prede ned fuzzy model and was able to reduce the excess rules and membership functions to the original ones and to converge to the original model, Convergence of the network is very fast compared to a standard backpropagation network with the same size [18]. This is due to the following resons: Sparse interconnection between the layers.
Only the parameters of the second, forth and fth layers are trained. High lever structure imposed on the network. Identi cation of the initial input and output membership functions. Reduced number of rules.
3 Applications in Modeling and Control of Complex Dynamic System
The neuro-fuzzy network is used to model a nonlinear exible robot joint. The joint uses rubbertuators which are rubber pneumatic actuators developed by Bridgestone Corporation. It consists of a rubber tube covered with a sleeve of inter-twined ber cord. Metal ttings are axed to both ends of the tube. Rubbertuators generate force only when they contract and only in the direction of contraction. Rubbertuators feature hysteresis in their operation which is due to the hysteresis inherent in the rubber, friction between the rubber and cords, and friction between the cords themselves [22]. Two rubbertuators are used in a robot to form one degree of freedom. An example of one degree of freedom is illustrated in Figure 2. If the initial pressure in both rubbertuators is P0. Then, if +P is the pressure applied to one of the rubbertuators, and ,P is applied to the other, then rotation can be obtained in proportion to P in the direction of +P [23]. In this case, the input of the system is P and the output is . Chain
Pully
Link Rubbertuator Decreased Pressure
Increased Pressure
Figure 2: Example of One Degree of Freedom Joint
3.1 Modeling a Rubbertuator Joint
The neuro-fuzzy network is used to model the exible joint using input/output data. The network inputs are the P and (P ) and the output is the angle . The number of the membership functions are 2 for the rst input, 2 for the second input and 4 for the output. In this case, there are 2 2 4 = 16 initial rule. Figure 3 shows the learning error of the network. The rules were reduced based on their weights during training such that only the rules that have weights above 0.5 are kept. Only 5 rules were identi ed by the network to be relevant to the fuzzy model. After
training, the remaining rules had weights of almost unity for which means that they are very important to the model. To model joint, the membership functions of input 2 were not allowed to be tuned so that they don't completely overlap and form one membership function. This is to allow the network model to exhibit hysteresis. If the membership functions for input 2 were allowed to be tuned, a strong local minimum in the energy space will force the membership function to completely overlap and the resulting model will be one nonlinear function which is the median of the hysteresis loop. This is an example of a priori knowledge incorporation in the network model.
Input 1 membership functions 1
0.5
0
-200
-150
-100
-50
0
50
100
150
200
Input 2 membership functions 1 -- initial MF __ final MF
0.5
0 -3
-2
-1
0
1
2
3
Output membership functions 1
6
3
x 10
0.5 error
2
0
-200
-150
-100
-50
0
50
100
150
0 0
100
200
300
400 epoch
500
600
700
800
Figure 3: Learning Error Figure 4 shows the input/output response of the system and of the network. The network was able to model the nonlinearities in the system including the hysteresis. 300
200
to the conclusion that if the rules were not reduced the network would have better modeling error but on the expense of a larger size which may prohibit on-line training.
3.2 Control of a Rubbertuator Joint
The network is used to control the robot joints by continuously modeling every joint and then generate a joint inverse, using the backpropagation algorithm, that drives the joint to the desired output as shown in Figure 6.
__ joint
θi
-- neuro-fuzzy network
NFN Controller
P
θo
Joint
100
angle (pulses)
200
Figure 5: Initial and Final Membership Functions
1
error backpropagation 0
Network inverse
NFN Joint Model
e θn
+ -
-100
Figure 6: Neuro-Fuzzy Network Inverse Control
-200
-300 -250
-200
-150
-100
-50 0 50 100 pressure difference (pulses)
150
200
250
Figure 4: Joint and Network Input/Output relation Figures 5 shows the initial membership functions identi ed by competitive learning and the nal membership functions after tuning and rule reduction. With the small number of rules, the network takes about 1 msec on a 486 machine running under LINUX for one complete forward and backward iteration. It is known that the sum of Gaussian density estimators can approximate any probability density function to any desired degree of accuracy [18]. This leads
The joint inverse is generated numerically at every sample by computing the dependency of the network energy on each input. For a single output, the energy of the network is de ned as 1 E = (yo , yn )2 (2) 2 The objective of control is to force the joint to track the desired output which is equivalent to having zero network energy. In this case, the next energy value is zero and for a single output network 1 dE = , (yo , yn )2 (3) 2
dE
@E @E = @x dx1 + dx2 @x 1
(5)
2
Using this technique, the network was able to generate the inverse model of the joint numerically as every step. The success of this technique depends on the sampling interval and on nding a relation between the inputs such that there is a unique inverse to the model. This technique does not have explicit feedback but the feedback is implied as a part of the continuous training and inversion. Any disturbance in the output will be felt and modeled by the training which will aect the inverse model such that it drives the output to eliminate the disturbance and track the desired output. Dierent variations on this technique can be used. For example, the desired output can be one or more steps ahead which would improve the speed of response but on the expense of the stability of the system. Also how often the network is trained aects the quality of control. The results of control using the neuro-fuzzy network were compared by a nonlinear model inverse technique shown in Figure 7. This technique is based on approximating the input/output inverse relation of the rubbertuator joint by a nonlinear function which was computed o line. Then the model inverse is cascaded with the actual joint in an attempt to cancel the nonlinearities. A closed loop is then used with a PID controller to force the joint output to track the desired trajectory. This technique is very successful compared to just using PID control or fuzzy PID tuning for the control of the rubbertuator joint [24]. The main disadvantage of this technique is that it only approximates the joint with a static model that is not changed during runtime. In this case the inverse does not account for any joint model changes due to changes in the operating point or due to changes in loading. The other disadvantage of this technique is that it requires the PID parameters to be tuned. θi
+
PID Controller
U
NL Joint inverse
P
Joint
-
Figure 7: Nonlinear Inverse Control
θo
Medium speed response 100
joint angle (degrees)
= f (dx1 ) (4) By using the backpropagation algorithm, the terms @E and @E can be computed. Then the amount of @x1 @x2 change in the input that force the output to follow the desired output can be computed from dx2
Figure 8 shows the response of the base joint of the robot arm at medium and high speeds when using the nonlinear inverse controller and the neuro-fuzzy controller. At medium speed, the two responses are very similar though there is a marginal improvement when using the neuro-fuzzy controller. At high speed, the neuro-fuzzy controller has a better response in terms of the overshoot and the settling time.
50 __ nonlinear control 0 -- neuro-fuzzy control -50 -100 1000
2000
3000
4000
5000
6000 msec
7000
8000
9000
10000 11000
8000
9000
10000 11000
High speed response 80
joint angle (degrees)
For the rubbertuator joint, there is a relation between the two inputs to the network model. The second input is the change in the rst input. In general, dx1 and dx2 can be related by
60 40 20 0 1000
2000
3000
4000
5000
6000 msec
7000
Figure 8: Response of the Base Joint The main advantage of the neuro-fuzzy network approach is that there are very few parameters to tune. The model identi cation is done on-line and used to generate the model inverse.
4 Conclusions and Future Research
In this research, a neuro-fuzzy network is used to generate the fuzzy model for a nonlinear exible robot joint and to control it. The response of the joint was compared with a nonlinear model inverse technique. The neuro-fuzzy network showed a similar response to the nonlinear inverse at medium joint speed and a better response at high joint speed. This is because the neuro-fuzzy network model is more accurate than the nonlinear inverse and it can also adapt to changes in the joint model that happens at high speed. Another reason is that the neuro-fuzzy network model includes the hysteresis behavior of the rubbertuator which is not modeled in the nonlinear inverse. An interesting behavior that was noted with the neuro-fuzzy model is that the initial model of the base joint was used as the initial model for the rest of the robot joints and then was allowed to be trained online with the actual input/output data of the joints. After about 50 iterations, which is about 2 seconds, every joint network was able to tune its knowledge base and successfully control its joint. The similarity in the joint structures and actuators is the factor that allowed this behavior to exist. Dierent parameters are still to be investigated such as the eect of the number of times the network
is trained and the eect of the sampling step on the accuracy of the inverse model.
5 Acknowledgements
The authors would like to thank Dr. A.B. Bonds, Todd Pack and Sameh Assad for their help, discussions and ideas about this research.
References
[1] K. J. Astrom, \Where is the intelligence in intelligent control?," IEEE Control Systems Magazine, vol. 11, pp. 37 { 39, Jan. 1991. [2] J. C. Commercon, \Fuzzy control versus classical control," in Proceedings of the 1994 International Fuzzy Systems and Intelligent Control Conference, pp. 131 { 138, Institute for Fuzzy Systems and Intelligent Control, Mar. 1994. [3] A. G. Barto, \Connectionist learning for control: An overview," Tech. Rep. 89, University of Massachusetts, Sept. 1989. [4] K. S. Narendra and K. Parthasarathy, \Identi cation and control of dynamical systems using neural networks," IEEE Transactions on Neural Networks, vol. 1, pp. 4 { 27, March 1990. [5] E. H. Mamdani and S. Assilian, \An experiment in linguistic synhesis with fuzzy logic controller," International Journal of Man-Machine Studies, no. 7, pp. 1 { 13, 1975. [6] E. H. Mamdani, \Applications of fuzzy logic to approximate reasoning using linguistic synthesis," IEEE Transactions on Computers, vol. 26, pp. 1182 { 1191, Dec. 1977. [7] S. Yasunobu and S. Miyamoto, \Automatic train operation system by predictive fuzzy control," in Industrial Applications of Fuzzy Control (M. Sugeno, ed.), pp. 1 { 18, Elsevier Science Publishers B. V., 1985. [8] K. K. Kumbla, J. Moya, and R. Baird, \Fuzzy control of robotic manipulator," in Fuzzy Logic and Control, Software and Hardware Applications (M. Jamshidi, N. Vadiee, and T. J. Ross, eds.), ch. 14, PTR Prentice Hall, 1993. [9] J. Lai and J. Shieh, \On the development of a fuzzy model-based controller for robotic manipulators," in Proceedings of the 1992 IEEE/RJ International Conference on Intelligent Robots and Systems, pp. 287 { 292, July 1992. [10] C. M. Lim and T. Hiyama, \Application of fuzzy logic control to a manipulator," IEEE Transactions on Robotics and Automation, vol. 7, pp. 688 { 691, Oct. 1991. [11] E. Garcia-Benitez, S. Yurkovich, and K. M. Passino, \A fuzzy supervisor for exible manipulator control," in Proceedings of the 1991 IEEE International Symposium on Intelligent Control, pp. 37 { 42, Aug. 1991.
[12] S. Kawaji and T. Maeda, \Fuzzy servo control system for an inverted pendulum," in Proceedings of the International Fuzzy Engineering Symposium '91, vol. 2, pp. 812 { 823, Mar. 1991. [13] Y. F. Li and C. C. Lau, \Applications of fuzzy control for servo systems," in Proceedings of 1988 IEEE International Conference on Robotics and Automation, vol. 3, pp. 1511 { 1519, 1988. [14] S. Tzafestas and N. P. Papanikolopoulos, \Incremental fuzzy expert PID control," IEEE Transactions on Industrial Electronics, vol. 37, pp. 365{ 371, Oct. 1990. [15] S. Shao, \Fuzzy self-organizing controller and its application for dynamic processes," Fuzzy Sets and Systems, no. 26, pp. 151 { 164, 1988. [16] S. Kitamura and T. Kurozumi, \Extended circle criterion, and stability analysis of fuzzy control systems," in Proceedings of the International Fuzzy Engineering Symposium '91, vol. 2, pp. 634 { 643, Nov. 1991. [17] L. Wang, \Stable adaptive fuzzy control for nonlinear systems," IEEE Transactions on Fuzzy Systems, vol. 1, pp. 146 { 155, May 1993. [18] C. Lin and C. S. G. Lee, \Neural-network-based fuzzy logic control and decision system," IEEE Transactions on Computers, vol. 40, pp. 1320 { 1336, Dec. 1991. [19] C. Lin and C. S. G. Lee, \Reinforcement structure/parameter learning for neural-networkbased fuzzy logic control systems," IEEE Transactions on Fuzzy Systems, vol. 2, pp. 46 { 63, Feb. 1994. [20] C. Yang and M. S. Stachowicz, \An algorithm for designing a self-learning fuzzy logic system," in Proceedings of the 1994 International Fuzzy Systems and Intelligent Control Conference, pp. 258 { 267, Institute for Fuzzy Systems and Intelligent Control, Mar. 1994. [21] A. K. John Hertz and R. G. Palmer, Introduction to the Theory of Neural Computation. AddisonWesley Publishing Company, 1991. [22] Bridgestone Corporation, Rubbertuators and Applications for Robotics, Technical Guide No. 1, 1986. [23] M. Iskarous, \A transputer-based parallel controller for the soft arm robot," Master's thesis, Vanderbilt University, Nashville, TN, USA, May 1992. [24] M. Iskarous, R. T. Pack, and K. Kawamura, \A parallel fuzzy controller for a manipulator with
exible joints," in Proceedings of the First Asian Control Conference (ASCC), pp. 619{622, July 1994.