Abstract
The performance of robot manipulators with nonadaptive controllers might degrade significantly due to the open loop unstable system and the effect of some uncertainties on the robot model or environment. A novel Neural Network PID controller (NNP) is proposed in order to improve the system performance and its robustness. The Neural Network (NN) technique is applied to compensate for the effect of the uncertainties of the robot model. With the NN compensator introduced, the system errors and the NN weights with large dispersion are guaranteed to be bounded in the Lyapunov sense. The weights of the NN compensator are adaptively tuned.
The simulation results show the effectiveness of the model validation approach and its efficiency to guarantee a stable and accurate trajectory tracking process in the presence of uncertainties.
Keywords
1. Introduction
In highly automated factories, robot manipulators are often employed to increase the production volume and improve the product quality. Model-based control schemes, such as computed-torque control schemes, are widely used among different types of robot control schemes [1],[2]. No matter how well the parameter settings of these model-based controllers are adjusted, the system performance might degrade in the presence of modelled or unmodelled uncertainties. In recent years in order to overcome this problem several approaches have been taken in order to solve the problem of motion tracking in the presence of uncertainties such as adaptive control [1],[3]-[6], sliding-mode control [7],[8], variable structure control (VSC) [9] and most recently robust adaptive control [10]. In sliding-mode control, chattering often occurs in control torque signals. Fuzzy boundary-layers might be employed to reduce the chattering levels with some accuracy trade-offs [11],[12]. Although these techniques improve system performance, they tend to increase the complexity of system dynamics, which requires special attention regarding system stability. The use of neural networks in control systems has increased in recent years, since, as they do not require any detailed knowledge of mathematical and control theories, they reduce the development cost of controllers for complex systems, particularly nonlinear ones.
Neural networks have previously been applied to the control of manipulators [13]-[15]. Owing to the universal approximator property of NN, feedforward NN compensators are sometimes included in model-based controllers [16]-[19]. The success of fuzzy logic has recently encouraged researchers to use it for industrial processes. Nevertheless, the main problem of fuzzy logic is that there is no systematic procedure for the design of a fuzzy controller. Therefore, it is used with a neural network system (neuro-fuzzy algorithm) [20]-[22]. Neural or fuzzy-based sliding-mode controls are also possible. Another choice could be the gradient method [11],[23] which is widely used. However, there is no guarantee of error convergence or system stability when using the gradient method. To overcome these problems, stable-in-the-Lyapunov-sense adaptation algorithms are proposed [24]-[26]. However, in [24], an explicit positive-definite matrix has to be computed as needed in the adaptation algorithms and there is no guarantee of boundedness of the NN weights. In [25]-[28], the boundary problem is solved and the system stability is maintained even in the presence of uncertainties in the desired NN weights. [29]-[30] used fuzzy neural approaches to control the position of the manipulator and [31] proposed a position controller for robot manipulators using a neuro controller with genetic algorithm-based training. The disadvantage of these approaches lies in the use of the selection matrices for the former, whereas the choice of the input to the neural networks depends directly on the desired task, and hence their applications are limited to simple cases, which limits the diversity of the tasks in an imposed constrained motion. In [32], it was shown that neural networks are very effective at compensating for motion/force tracking in the case of a simple planar surface. Recently, [33], [34] proposed a new model free adaptive approach based on feedback linearization in which the measured signal is taken to a specific level with error less than a defined value and then some experimental rules are applied to the system to keep output error near zero. The major advantage of the model free adaptive controller (MFAC) is that there is no need for identification of the system dynamic and only output error is required. Because MFAC and NNP do not rely on a mathematical model of the system and both use adaptive rules for updating their parameters, the results of MFAC and NNP are compared in this study.
The other aim of this paper is to improve controller robustness of the controller by applying a neural network technique in order to compensate for the effect of uncertainties in the robot model. We show that this control strategy is robust with respect to payload and link mass uncertainties.
The rest of the paper is organized as follows: in Section 2, the nonlinear dynamic of the robot manipulator is described. The design procedure of NNP is represented in sections 3. In Section 4, simulation results are illustrated to highlight the advantages of the proposed method. Finally a conclusion is given in Section 5.
2. Nonlinear Model of Articulated Manipulator
The articulated robot manipulator shown in Figure 1 is a so-called “revolute robot manipulator”, “anthropomorphic robot manipulator” or “elbow manipulator”. It is composed of five main components: base, body, shoulder, elbow and forearm. The body or first joint is moved around the vertical axis and its angle is tagged as θ1. The shoulder or second joint turns around its own horizontal axis and its angle is named θ2. The last joint or robot elbow is worked as in the previous joint and its angle is called θ3 [35].

3-DOF articulated robot manipulator scheme [35]
The main objective of control of the robot manipulator is to achieve tracking accuracy in high-speed and high-precision applications. Thus, to have easy control, decrease the computational cost of the controlling process and in order to have got better performance of this system, three motors were employed to make relative torques for every elbow (joint). l1, l2 and l3 are the length of the first, second and third elbow of the robot respectively. The dynamic model of the manipulator is described by the following equation
where M(q) ∈ RN×N is a symmetric positively defined inertia matrix, h(q, q̈) ∈ RN×1 is the vector of Coriolis and centrifugal forces and G(q) ∈ RN×1 is the gravity forces vector. q∈RN×1 denotes a generalized position vector in joint-space that in this example q1, q2, q3 are θ1, θ2, θ3 respectively and τ ∈ RN×1 is a vector of driving torques and finally N is a number of joints. G(q), h(q,q̈), M (q) are described as
Two important issues are investigated in the robot system, “kinematic” and “inverse kinematic”. Robot control actions are executed in the joint coordinates while robot motions are specified in the Cartesian coordinates. Conversion of the position and orientation of a robot manipulator end-effector from Cartesian space to joint space, called the inverse kinematics problem, is an important fundamental issue in calculating the desired joint angles for the robot manipulator. In other words, kinematics relate to the movement of the robot dynamic in terms of joint angles and inverse kinematics relate to the movement of robot in terms of x, y and z (Cartesian coordinates). Their equations are given below.
Kinematic equations:
Inverse kinematic equations:
where a3, a2 are l3, l2 respectively and the value of the robot manipulator parameters are shown in Table 1.
Parameters of 3-DOF Robot Manipulator
3. PID with NN Compensator Approach
In this section, the main reason for using the NN in the mathematical framework is illustrated and the effectiveness of the proposed approach in attenuating uncertainties is then proved.
The relation between the joint velocity and the Cartesian space velocity can be expressed as
Where J(q) represents the n×n Jacobian matrix of the manipulator which is supposed to be nonsingular. By differentiating (7), the Cartesian acceleration term can be expressed as
Then the equation of robot motion in the joint space can also be represented in Cartesian space coordinates as
Substituting (9) into (1) yields
The actuator forces are related to the joint torques of the actuators through the Jacobian of the mechanism, consider the following
The model of the robot in Cartesian space is thus given by
where
this leads to the following control structure
Where U is defined as
D̂, Ĥ are the estimates of D and H, respectively; F is the n×1 vector of generalized forces at the end-effector; U is the n×1 vector of the decoupled end-effector; Ka, Kv, and Kp are coefficients of the PID controller. Combining (13), (14) and (15) yields the closed-loop tracking error dynamic equation
where
It is should be noted that while the dynamic model is known perfectly, ΔD, ΔH are zeros.
NNP is proposed to achieve disturbance rejection and cancel some drawbacks of uncertainties. The proposed scheme is given in Figure 2. The idea is that the neural network output φ cancels out the uncertainties caused by an inaccurate robot model. The output signal φ of the neural network is added to the control input U whose dimension equals the number of degrees of freedom of the robot manipulator. Therefore, the vector φ is three dimensional. The control law becomes

Anthropomorphic robot manipulator with PID controller and neural network compensator
Combining (8), (10) and (17) yields the corresponding closed-loop system error as
In order to drive this error to zero in the presence of the uncertainties, the output of the neural compensator is required to be
Since the control objective is to generate φ such that V tends to zero, here we propose using V as the error signal for training the neural network. Thus, the ideal value of φ at V=0 is the same as the uncertainties given by (19). Equation (19) is nonlinear and depends on the position, velocity and acceleration of the end-effector. So V is considered as neural network input. The weight updating law minimizes the objective function J, which is a quadratic function of the training signal V
Differentiating (20) and using (18) yields the gradient of J
The adaptation of the weights is obtained by using the algorithm of retropropagation of the gradient given by the following equation
Where e˜ is the update rate and μ is the momentum coefficient.
The three layer feedforward neural network structure which is depicted in Figure 3 is used as the compensator. It is composed of linear input layer, output layer and a nonlinear intermediate hidden layer which uses a sigmoid function and is bounded in magnitude between −1 and 1 in accordance with the following equation

Neural Network Compensator
The input is
So this presented algorithm can cancel the effect of modelled or unmodelled uncertainties while it achieves a good tracking performance of the desired trajectory.
4. Simulation Results
For evaluating the performance of the proposed method, two 3-D desired trajectories are considered; in the first the path tracking property of the system is studied by both controllers (NNP and MFAC) and in the second case, uncertainties are enforced on the system while using the NNP controller.
For each trajectory, an asymmetric 3-D curve is produced as the desired path, then the desired angles are obtained using the inverse kinematic equations. The obtained angles are assumed as manipulator target angles. Then desired input is given to the system to be tracked by the articulated robot manipulator. Finally the tracked position which is given by the kinematic equation is acquired using system outputs (actual angels q1, q2, q3). Figure 4 illustrates the system response in Cartesian space gained by NNP and the corresponding 3-D tracking curve can be seen in Figure 5. The same simulation is executed using the MFAC method and the results are shown in Figure 6 and Figure 7. The result clarifies that the NNP can track the desired trajectory more efficiently than MFAC generally. As it is clear from Figure 5, the NNP controller is able to reduce the error in a short time and afterward, the output keeps track of the desired path with an extremely small tracking error. Furthermore, it is seen that the NNP controller is able to keep the error small, even in sharp edges, while with MFAC (Figure 7) there is a large tracking error both at the beginning and after reaching the desired path.

Simulation results for the 3-DOF articulated robot manipulator in tracking first path using NNP (a) Cartesian space, (b) joint angle

Simulation results for the 3-DOF articulated robot manipulator in tracking the desired curve using NNP in 3-D Cartesian coordinates

Simulation results for the 3-DOF articulated robot manipulator using MFAC (a) Cartesian space, (b) joint angle

Simulation results for the 3-DOF articulated robot manipulator in tracking the desired curve using MFAC in 3-D Cartesian coordinates
In Figure 8 and 9, a 30% payload uncertainty and 10% link mass uncertainties are applied to the system. At the beginning it takes a few seconds for the NN to adapt the parameters to the new condition, but after this transient period it can follow the path very well. Clearly NNP can successfully attenuate the negative effects of the uncertainties due to its adaptive nature.

Simulation results for the 3-DOF articulated robot manipulator using NNP (a) without uncertainties, (b) with uncertainties

Actual and desired 3-D curve in Cartesian coordinates using NNP without uncertainties, (b) with uncertainties
5. Conclusion
In this study, we aimed to introduce a new intelligent adaptive controller with a simple structure that can adapt itself to system dynamic uncertainties. Thus, with this procedure we can add an uncertainty rejecting property to PID controllers, which are employed in great numbers by different industries. Simulation results confirm the satisfactory tracking and robustness performances of the proposed controller.
