Trajectory Tracking of Robot Manipulators Using Adaptive Fuzzy Neural Control YANG GAO*, MENG JOO ER*, NIKOS MASTORAKIS , W. E. LEITHEAD† AND D.J. LEITH† * Instrumentation and Systems Engineering Laboratory School of Electrical and Electronic Engineering, Nanyang Technological University Block S1, Nanyang Avenue, Singapore 639798 REPUBLIC OF SINGAPORE #
Military Institutions of University Education Hellenic Naval Academy Terma Hatzikyriakou, 18539, Piraeus, GREECE †
Industrial Control Centre, Department of Electrical and Electronic Engineering, Graham Hills Building University of Strathclyde 50, George Street, Glasgow G1 1QE, Scotland, UNITED KINGDOM.
[email protected],
[email protected]
Abstract— This paper presents a new control scheme utilizing fuzzy neural networks for trajectory control of robot manipulators. The adaptive capability of the fuzzy neural controller ensures that high performance can be achieved and maintained under time-varying conditions. This intelligent control scheme consists of two portions. In the first portion, the fuzzy neural networks with dynamic structure, in short DFNNs, are constructed to estimate dynamics of the robot model. The second portion is the fuzzy neural controller, which is built based on model learning and on-line weight adjustment. Computer simulations of a two-link robot manipulator demonstrate the effectiveness and efficiency of the proposed scheme. 1. Introduction Robots are one of the most important machinery for industrial automation
nowadays. As the manipulators are usually used to perform high-precision tasks, robot controllers are required to control the motion of manipulators effectively and accurately. However, as a robot manipulator is a multivariable nonlinear coupling dynamic system, it is difficult to obtain an accurate mathematical model so that classical or modern control laws can be applied [1]. Furthermore, system parameters such as manipulator mass properties and unknown loads are invariably not known in advance. As a consequence of unknown static friction forces at the joints and uncertainties in the link parameters, modelling errors exist. To accommodate system complexity and uncertainties, learning and adaptive techniques must be incorporated [2] and [3]. Conventional adaptive controllers based on non-linear laws are difficult to derive.
1
To complicate matters, their complexity always grows exponentially with the number of unknown parameters. As such, heavy computational burden is required and it hinders real-time applications [4]. Frequently, a simplified system model is used for real-time applications. However, oversimplifications may lead to a non-robust, unstable or conditionally stable system [5] and [6]. Hence, there is a need for model-free adaptive control strategies. In the last decades, numerous control strategies with a human-like inference and adaptation ability have been proposed. Significant advances have been made in two distinct technological areas, namely fuzzy logic and neural networks. The integration of fuzzy logic and neural networks has given birth to an emerging technological field–Fuzzy Neural Networks (FNNs). The FNNs have the potential of complementing the individual strengths of these two technologies and overcoming their individual drawbacks, so as to produce a powerful representation flexibility and numerical processing capability [7]. As a result, FNNs have become one of the most active and exciting control strategies in solving many complicated real-life-engineering problems. The FNNs algorithm can compensate for environmental variations such as payload mass and disturbance torque during the operating process and the design of FNNs control law does not require precise mathematical descriptions of the control system. Apparently, such control strategy provides a rather feasible alternative for a complex, non-linear, time-varying and uncertain plant like a robot manipulator. This paper shows that through the use of Dynamic Fuzzy Neural Networks (DFNNs) learning algorithm, the controlled robot model could be successfully modelled. Based on the model learning
results, adaptive fuzzy neural controller learns unmodelled disturbance of the actual manipulator on line. The error convergence of the trained fuzzy neural network is fast in response to an untrained trajectory. 2. Dynamic Fuzzy Neural Networks (D-FNNs) Even though fuzzy logic and neural networks are different methodologies toward intelligent control, they have some important common properties. Firstly, they are both model-free estimators [4]. In other words, given a specific input, its output can be obtained without system models. Furthermore, they share a common objective that is to emulate the operation of the human brain. In a sense, neural networks behave more like the “hardware” of a human brain while the fuzzy logic acts as the “software”. The D-FNNs algorithm is a newly developed fuzzy neural network algorithm that has the following salient features: dynamic self-organizing structure, fast speed, generalisation and flexibility in learning [8]. The structure of D-FNNs is based on Ellipsoidal Basis Function (EBF) to perform TSK model-based fuzzy system (see Fig. 2-1). • Layer 1 defines input space. • Layer 2 represents the membership function associated with the input linguistic variables, which are in the form of Gaussian function. MFk ( X ) = exp[−
( X − C)2 ] σ2
k = 1,2...r (2.1)
• Layer 3 represents the possible IF part of fuzzy rules. The number of EBF units
2
implies the number of fuzzy rules. The outputs are, r
φ j = ∏ MFk
j = 1,2...u
(2.2)
k =1
• Layer 4 completes the THEN part of the fuzzy rules. The output variable is the weighted sum of incoming signals, u
yi = ∑ φ j w j
i = 1, 2...s
(2.3)
j =1
The weight is chosen as a TSK model, i.e. wj = k0 + k1x1 +⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅+ krxr (2.4) where ks are real-valued parameters. The unique feature of D-FNNs learning algorithm is that the network starts with zero fuzzy rules. As the system starts to learn, fuzzy rules can be generated based on the network performance. The insignificant fuzzy rules can also be deleted using Error Reduction Ratio method [9,10]. Therefore, not only the parameters of the network can be adjusted, but also the structure can be self-adaptive. Layer 1
2
3
4
x1 y1 ys
3. Adaptive Fuzzy Neural Control Scheme 3.1
Robot Model Estimation
In the context of using Fuzzy Neural Networks (FNNs) directly in non-linear control strategies, FNNs are viewed as a means of system estimation, or even a framework for knowledge representation. The knowledge about the system dynamics and the mapping characteristics are implicitly stored within the network [11]. Therefore, training a FNN using input-output data from a non-linear system becomes a central issue to its use in control. In this paper, a generalised learning scheme proposed by Tomochika et al. is attempted [12] (see Fig. 3-1). According to them, as far as robotic manipulators are concerned, information of the dynamical model can be obtained to a certain extent. The FNN can be trained using the obtained dynamical model. Since no actual operation of the manipulator is necessary in generalised learning, model learning is efficient. After model learning, the FNN can be trained to learn structured or unstructured uncertainties by actually operating the manipulator on line. Here, a synthetic training signal is introduced to the system. The system output is then used as an input to the FNN. The FNN’s output is compared with the training signal and the error is used to train the FNN. This structure will clearly result in a good representation of the inverse model of the plant using the FNN.
xr
Fig.2-1: Architecture of D-FNNs
3
•
Torque
Robot Model
••
θ d ,θ d ,θ d
+ _ FNN
D-FNN Learning
Algorith
Fig. 3-1: robot model estimation
However, there are drawbacks in this kind of direct inverse training approach: • If the actual inputs of the FNN are outside its input training space, direct inverse estimation performance may be poor. • If the non-linear system mapping is not one-to-one, an incorrect inverse may result. Therefore, before using the direct inverse estimation method, a few assumptions have to be made in this paper: • As long as the inverse estimation of a FNN is used for control purpose, its actual inputs will be within its input training space. To ensure that this assumption is valid, the synthetic training signal should be properly chosen during learning. • The robot model mapping used in this project is one-to-one. 3.2
Fuzzy Neural Controller
FNN that is trained with the robot inverse dynamics has immediate utility for control. In the literature on neural network architectures for nonlinear
system control, a large number of control structures have been proposed and used [11]. In this paper, parallel neuro-control architecture is used to implement our fuzzy neural controller. The basic idea of this approach is to learn an approximation of the system’s inverse characteristics and then to use it to generate the appropriate control signal (see Fig. 3-2). Firstly, the inverse robot model is obtained by FNN A based on the theory descried in Section 3.1. FNN B is simply a copy of the structure and weights of FNN A, which will produce the desired torque to drive the robot. It is connected in parallel with a conventional controller and makes system response faster and more accurate. Furthermore, the error signal e is used to adjust weights of the FNN B to compensate for the error due to robot model estimation or unmodelled disturbances. The control idea is to train FNN B such that a squared error can be minimised. The squared error is defined as, E=
1 1 (t i − y i ) 2 = ∑ (e i ) 2 ∑ 2 i 2 i
(3.1)
To derive the weight adjustment algorithm, we use the steepest descent (gradient) method to minimise E. Thus, we have, ∆ω j = ∆ω j (new) − ∆ω j (old ) = −η
∂E , ∂ω j
η>0
(3.2)
where η is a learning rate. Using the chain rule yields, ∂E ∂E ∂y i = • ∂ω j ∂y i ∂ω j
(3.3)
From Eq. (3.1) and (2.3), we obtain,
4
∂E = −(t i − y i ) ∂y i u ∂y i = ∑φ j ∂ω j j =1
(3.4)
Thus, Eq. (3.2) becomes,
M ∈ R2×2, manipulator inertia matrix Q ∈ R2×1, a vector representing centrifugal, Coriolis and friction forces τd ∈ R2×1, a vector of unknown terms arising from unmodelled dynamics and external disturbances
u
∆ω j = −η • [−(t i − y i )] • ∑ φ j
(3.5)
j =1
Y
θ2
y
FNN B
Disturbances +
+
e
+ t Robot
PD
_
+
θ1
FNNA
Fig. 4-1: 2-DOF robot manipulator
D-FNN Learning Algorithm
Fig. 3-2: Parallel type fuzzy neural control scheme 4. Simulation Study Simulations were carried out to verify the proposed fuzzy neural controller compensating for unmodelled disturbances. The manipulator used for the simulation is a typical two-degree-offreedom SCARA-type robot as depicted in Fig. 4-1. The dynamic equation manipulator is given by, ••
of
the
•
τ = M (θ )θ + Q(θ ,θ ) + τ d where τ
X
∈ R2×1, a vector of joint torque
(4.1)
The fuzzy neural networks were trained with the robot model defined by Eq. (4.1) without the disturbance torque τd. Since the outputs of the models are uniquely determined by the link positions and velocities, it is possible to randomly choose the combination of the inputs. Thus, the FNN can be properly trained. According to [12], if the networks do not learn the nonlinearities over the whole working space of the robot manipulator, the networks have to learn further when the desired trajectory is changed. As far as the tracking performance is the main factor of concern, the inputs to the model and FNN are simply chosen to be the desired trajectories and the outputs is the corresponding torque for our case. Since we can restrict the working space of the robot manipulator, it is easy to define the ranges of the inputs, i.e. the link positions and velocities. The ranges of the inputs used for simulation are listed in Table 4.1. Using the dynamic fuzzy neural network, the fuzzy rules or Gaussian 5
membership functions were automatically generated as shown in Fig. 4-2. It can be seen that the fuzzy rules are evenly distributed over the input training interval. This keeps with the aspiration of “local representation” in fuzzy logic and the fuzzy rules extracted are implied to be meaningful. The model estimation errors of the output torque in terms of percentages are also shown in Fig. 4-3. The modelling errors are reasonably small with respect to the output training space.
Variables θ1 θ2 •
θ1 •
θ2
Range
-1.5~1.5 (rad) -0.7~0.7 (rad) -3π~ 3π (rad/s) -1.4π~1.4π (rad/s)
Number of Learning Data 100 100 100 100
Table 4.1: Inputs of Robot Model Estimation In the simulation of trajectory control by the fuzzy neural controller, the desired trajectories in terms of link angular positions were chosen to be 1.5sin(2πt) and 0.7cos(2πt) for θ1 and θ2 respectively. The uncertainty τd was assumed to be 100sin(2πt) and 50sin(2πt), which are comparable values with respect to control torque for the robot manipulator. The proportional gain Kp and the differential gain Kv of the conventional PD controllers were set at 25 and 7 respectively.
the sampling period was 1ms. The clearly demonstrates that the two links were able to track the desired trajectories from the third trial onwards. The tracking error convergence is also fast as shown in Fig. 4-4. The tracking error E is defined as follows: E = (θd1-θ1)2 +(θd2-θ2)2
(4.2)
where θd1 and θd2 are the desired trajectories on the θ1-θ2 plane at the ith sampling period. θ1 and θ2 are the actual trajectories.
5. Conclusions In this paper, inverse dynamics estimation of 2 DOF robot manipulator using the D-FNNs algorithm was demonstrated. An adaptive fuzzy neural control scheme was proposed and its adaptive capability to unmodelled effects was demonstrated. And the error convergence rate with the fuzzy neural controller was found to be fast. Acknowledgements M.J. Er acknowledges the generous support provided by the Nanyang Technological University and the Association of Commonwealth Universities for the work presented. Gaussian Membership Functions 1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1
Fig. 4-3 shows the simulation results of trajectory control by proposed controller. The figure shows the first trial, second trial, and third trial onwards results of writing a circle on the θ1-θ2 plane. It took about one second for one trial, and
0 -1.5
-1
0.5 -0.5 0 Input Training Variable Theta 1
1
1.5
(a)
6
Gaussian Membership Functions 1 0.9 0.8 0.7 0.6
1
0.5
actual desired
0.8
0.4
0.6
0.3 0.4
0.2 0.2
theta 2
0.1 0 -0.9
-0.6
-0.3 0 0.3 Input Training Variable Theta 2
0.6
0.9
0 -0.2 -0.4
(b)
-0.6 -0.8
Fig. 4-2: Gaussian membership functions of input variables in EBF units: (a) For θ1; (b) For θ2.
-1 -2
-1.5
-1
-0.5
0 theta 1
0.5
1
1.5
2
(a)
1
Estimation Error of Output Torque 1 in Percentage (%) 0.2
actual desired
0.8 0.1 0.6 0
0.4
-0.1
theta 2
0.2
-0.2
0
-0.3
-0.2
-0.4
-0.4 -0.6
-0.5
-0.8 -0.6 -1 -2
-0.7 0
10
20
30
40 50 60 Learning Data
70
80
90
-1.5
-1
-0.5
100
0
0.5
1
1.5
2
theta 1
(b)
(a) Estimation Error of Output Torque 2 in Percentage (%) 0.6
0.4
0.2
0
-0.2
-0.4
-0.6
-0.8 0
10
20
30
40 50 60 Learning Data
70
80
90
100
(b) Fig. 4-3: Robot model estimation errors: (a) For output torque 1; (b) For output torque 2.
7
1 actual desired
0.8 0.6 0.4
theta 2
0.2 0 -0.2 -0.4 -0.6 -0.8 -1 -2
-1.5
-1
-0.5
0
0.5
1
1.5
2
theta 1
(c) Fig. 4-4: Trajectory tracking results using fuzzy neural controller: (a) First trial; (b) second trial; (c) third trial onwards. 9
x 10
-4
Tracking Error E
8 7 6 5 4 3 2 1 0 1
2
Trail Number
3
4
Fig. 4.5: Tracking error convergence REFERENCES [1] Craig, J J, 1988, Adaptive Control of Mechanical Manipulator, AddisonWesley. [2] Slotine, J E, and Li, W, 1988, ‘Adaptive Manipulator Control: A Case Study.’ IEEE Trans, Automation Control, Vol. 33, No. 11, Nov, pp.995-1003. [3] Hisa, T C,1986, ’Adaptive Control of Robot Manipulators – A Review.’ IEEE Conf, Robotics and Automation, San Francisco, CA. [4] Ziauddin, S M, and Zalzala, A M S, 1995, ‘Implementation of Fast-
Globally-State Adaptive Robot Control on a Multi-Processor Network.’ Control Engineering Practice, Vol. 3, No. 11, pp. 15531562. [5] Codourey. A and Burdef, E, 1994, ‘Body-Oriented Method for Finding a Linear Form of the Dynamic of Fully Parallel Robots.’ Proc. IEEE Int. Conf. Robotics and Automation, Vol. 2, pp. 1612-1618. [6] Dejager, B and Jos, B, 1994, ‘Experimental Evaluation of Robot Controllers.’ Proc. IEEE Conf. Decision and Control, Vol. 1, pp. 363-368. [7] Kim, S H, Kim, Y H, Sim, K B and Jeon, H T, 1993, On developing an Adaptive Neural-Fuzzy Control System, IEEE/RSJ International Conference on Intelligent Robots and Systems Yokohama, Japan July 26-30. [8] Wu, S Q, 2000, Dynamic Fuzzy Neural Networks: Principle, Algorithm and Application, Ph.D. Thesis, Singapore, Nanyang Technological University. [9] Chen, S C, Cowan, F N and Grant, P M, 1991, ‘Orthogonal Least Squares Learning Algorithm for Radial Basis Function Network,’ IEEE Trans Neural Networks Vol. 2, pp. 302309. [10] Wang, L X, and Mendel, J M, 1992, ‘Fuzzy Basis Function, Universal Approximation, and Orthogonal Least Squares Learning,’ IEEE Trans Neural Networks, Vol. 3, pp. 807-814. [11] Sigeru, O, Marzuki, K, and Rubiyah, Y, 1995, Neuro-Control and its Applications, SpringerVerlag. [12] Tomochika, O, Tatsuya, S, Takeshi, F, Shigeru, O, and Yoshiki, U, 1991, ‘Trajectory Control of Robotic Manipulators Using Neural Networks’ IEEE Trans Industrial Electronics, Vol. 38, No. 3.
8