Neural Adaptive Control of a Robot Joint Using Secondary Encoders

. Using industrial robots for machining applications in flexible manufacturing processes lacks a high accuracy. The main reason for the deviation is the flexibility of the gearbox. Secondary Encoders (SE) as an additional, high precision angle sensor offer a huge potential of detecting gearbox deviations. This paper aims to use SE to reduce gearbox compliances with a feed forward, adaptive neural control. The control network is trained with a second network for system identification. The presented algorithm is capable of online application and optimizes the robot accuracy in a nonlinear simulation.


Introduction
Using industrial robots in machining processes offers great potential regarding process flexibility while remaining low cost [1], [2], [3]. The main drawback of robots compared to machining tools is the lack of Tool-Center-Point (TCP) accuracy. One way of improving this accuracy is using secondary encoders (SE) on the main axes of the robot in order to reduce gearbox compliances [4], [5]. [6] has shown, that SE are able to improve robot accuracy in a cascade control using stiff control parameters and optimizing SE for disturbance compensation only. In order to overcome the drawbacks of a stiff cascade control configuration, the guiding behaviour of the axes needs to be improved by a feed forward control. However, a model based control needs good model knowledge, which is difficult to obtain. [2] shows that especially the friction model of the gearbox is complicated, e.g. because the gearbox temperature changes more than 80 ∘ during machining. Furthermore, a good control needs additional sensor information, which are usually not available on standard robots and imply a costly update. Therefore, this paper aims to overcome the drawbacks of bad model knowledge by using black-box system identification and adjusting the control accordingly. Due to nonlinear physical effects of the robot, e.g. gearbox friction and backlash, the algorithm has to be capable of nonlinear system identification. In addition, the algorithm has to be ready for online usage.
This paper is organized as follows. First, a concept -neural adaptive control -is introduced and explained. Next, system identification using Runge-Kutta Neural Networks (RKNN) for nonlinear modelling is presented. Afterwards, a Multi-Layer-Perceptron (MLP) as feed forward controller is shown. Finally, a nonlinear simulation model of the robot axis is presented and simulation results using the proposed algorithm are demonstrated.

Concept
An overview of neural adaptive control is given in [7], [8]. The core idea used in this paper is to separate the tasks of system identification and controller design. The signal concept used in this paper is shown in Fig. 1. A controller network (⋅) is used to modify the feed forward reference trajectory , which in our case is the arm reference angle . Depending on the reference, the controller creates a modified reference arm angle = . Before the controller is trained is equal to . Using an unmodified reference as input is possible because a closed loop system is utilized. For training the controller in a simulation environment, a model of the measured system is needed. In a comparative study [9] of multi-axis robot system identification, RKNN achieve a high prediction accuracy while remaining a good generalization. RKNN are explained in [10] and combine neural networks with the Runge-Kutta differential equation solver. The RKNN is trained to approximate the measured arm angle = with the simulated arm anglê =̂ as good as possible.

Runge-Kutta-Neural-Networks
For the state network (⋅), the output network ℎ(⋅) and the initial network (⋅), MLPs with a single hidden layer are applied [11]. Using a MLP, we obtain the network equations with the continuous state vector ( ), the estimated discrete state vector̂ at time step , input and estimated output̂ . The activation function (⋅) is a hyperbolic tangent. Weight matrices and bias terms use the following index convention. Low-indices , and are used for (⋅), ℎ(⋅) and (⋅) network respectively. Low-indices , and represent statêsignal, input signal and regression vector̃ respectively. The regression vector consists of a measured input and output sequencẽ = [ , , ..., , , , ..., ] with ∈ ℕ and ∈ ℕ . Highindices and ℎ denote output and hidden layer respectively. For a compact notation, all model network weights and bias terms are summarized in Θ = [ , , , . Note that (1) is continous time, while (2) and (3) are discrete time equations. Calculating (1) requires a solution of the differential equation. This is done by using the 4-stage Runge-Kutta algorithm [10]. Incorporating the RK algorithm leads to with the time step length ℎ. The input is assumed to be constant during one time interval. The RKNN is trained using fmincon from the MATLAB optimization toolbox with the SQP algorithm. The cost function for training is arg min using (2), (3) and (4) for calculatinĝ . The regularisation parameter is . The number of time steps used for training the model is ∈ ℕ with ≫ and ≫ .

MLP Controller
In [12], a chaotic Lur'e Problem is solved using a similar concept. Based on that work, a MLP is chosen feed forward control network (⋅) and is defined by with the partial reference trajectorỹ = [ , , ..., ] with an arbitrary number of future time steps ∈ ℕ . For a compact notation, all weights and bias terms of network (⋅) are summarized in Θ = [ , , , ]. The optimization is also done by the MATLAB optimization toolbox, with the cost function arg min and the weighting factors and . The simulated output̂ is calculated using (2), (3) and (4). The input for the RKNN is calculated with (6). The number of time steps used for training the controller is ∈ ℕ with ≫ .

Simulation Model
The presented algorithm is tested with a closed loop nonlinear model of a single robot joint. Due to the longest lever, axis 2 of a KUKA Quantec Ultra SE is chosen. The complete model is presented in [6] and this paper will cover a summary only. The open loop robot joint model is a two-mass-oscillator including nonlinear stiffness and nonlinear friction. Fig. 2 shows the model with the physical relations described in Tab. 1. The real robot is pictured in Fig. 3. The motor torque serves as actuating variable and generates an acceleration of the motor inertia which rotates the gearbox. The gearbox, acting as a nonlinear spring, encounters the motor torque, overcomes the gearbox friction and accelerates the arm inertia. Using the model in Fig. 2, the nonlinear model can be obtained by calculating the sum of torques around motor and arm inertia with the friction torquê and the elastic spring torquê .  Motor friction as well as all electro-mechanical effects are neglected. Since the KUKA Quantec has a hydraulic counterweight acting on axis 2, both counterweight and gravity effects are neglected in this work. Temperature effects that have an influence on the friction are neglected, too, and require further research. The stiffness is modelled with backlash, lost-motion, and linear elasticity. Lost-motion describes an effect in between backlash and linear elasticity, where not all tooth flanks are yet in full contact. During backlash equals 0. In the lost-motion range, the stiffness is modelled linear with a lower slope and an offset. In the full-contact range, the stiffness is modelled as a linear function with an offset. The stiffness coefficients are defined as and , for lost-motion and full-contact respectively. We further define the angular ranges and , for backlash and lost-motion respectively. With the torsion angle the following condition is defined.
The gearbox friction is modelled as coulomb and viscous friction. According to [2], [13], and [14] the Stribeck effect can be neglected. With the linear friction constant and the coulomb friction torque , the friction conditions for the model are defined.
In order to augment the open loop model of the axis to a closed loop model, a feed back controller is introduced. This cascade controller is configured as P-PI-controller with the Laplace transform variable and the control parameters , and . The controller uses both, the measured arm angle obtained by the SE and the motor speeḋ . The modified arm reference angle is the input whereas the measured arm angle is the output of the closed loop system.

Simulations Results
The main result of this paper is presented in Fig. 6. The simulation is divided into three subsections. First, from 0 to 1 , the input-output relation of the system is only measured and the unmodified reference is used as input. Then, a RKNN is trained for 500 iterations. Using the RKNN, a controller network is trained for 100 iterations. Finally, from 1.5 to 2.5 seconds, the controller network is used online. The training result of the RKNN is shown in Fig. 6. With a Maximum-Error of 0.016°, the RKNN achieves 96 % accuracy with respect to the angle amplitude of 0.52°. Unlike other training algorithms, the data set is not split into a training and validation set. This is for simplicity only. A second data set for validation would require the effort of measuring a second, physical trajectory. However, a validation data set implies the advantages of a better evaluation of the trained network. Since the training data set of the RKNN needs to cover the complete system dynamics, a rather long data set is chosen. To shorten calculation time, the number of time steps in the training data set are reduced by an interpolation. Therefore, the step length for training can be unequal to the step length of data logging. The training of the control network is done on both, random created trajectories and the unmodified reference trajectory. Using different trajectories improves the generality of the controller network.

Conclusion
All in all, the proposed algorithm achieves a Root-Mean-Square-Error between the reference and actual arm angle of 0.0026°and a Maximum-Error of 0.012°. With respect to the Maximum-Error without this algorithm of 0.121°, this is an improvement of 90 %. The simulation results prove that it is possible to define the robot joint as a black-box and to optimize it with the help of RKKN without physical model knowledge.
The algorithm achieves to overcome the challenges of backlash, lost-motion and nonlinear stiffness in simulation. Further research is required how stability constrains can be incorporated. Only with this advancement, the network controller could be designed as feed back controller and an open loop model could be applied. As a starting point, the NLq Theory [15] presents a unified framework for neural adaptive control with global asymptotic stability criteria. Furthermore, the continuous online update of both, the model and the control network, need further research. Finally, the algorithm needs to be implemented and tested on the real robot.