Neural-Network Estimation of the Variable Plant for Adaptive Sliding-Mode Controller

The Lyapunov based theoretical development of a neural-network sliding-mode based estimation of highly non-linear and variable robot plant for a direct-drive robot controller is shown in the paper. Derived adaptive control law was tested for four types of robot neuralnetwork sliding-mode controllers: centralized, simplified centralized, decentralized and simplified decentralized, which were verified on a real laboratory direct-drive 3 D.O.F. PUMA like mechanism. Centralized and decentralized control approaches estimate only a part of the variable robot dynamic model (torque model due to friction, Coriolis, centripetal and centrifugal forces) and use only the part of a dynamic plant model (the so called estimated inertia matrix M). Both simplified methods do not need any plant model parameter for an accurate estimation of the direct-drive robot plant, but need some more time to learn dynamic model parameters. All four types of the neural network continuous slidingmode controllers were successfully tested for algorithm’s adaptation capability for sudden changes in the manipulator dynamics (load).


INTRODUCTION
Control techniques based on soft computing methods (neural network, fuzzy logic, genetic algorithm, particle swarm algorithm, fractal theory etc. or their combinations) [1] and especially neural network control techniques have been proven to be useful to control highly nonlinear robot arm control plants for more than two decades [2] to [8].Therefore, the neural network control methods have been used with high interest in mobile robotics [9] to [11], especially for the dynamic and kinematic control in recent years.The research of the kinematic and dynamic neural network control of robot arm has also been evolving for two decades.
A number of publications dealing with the topic of the robot arm trajectory tracking neural network controller based on the computed torque method [12] to [15], etc. have been published.In sources [12] and [14], there was an attempt to replace the estimated model of the real mechanism (the vector h due to Coriolis forces and the inertia matrix M) with two neural networks.The disadvantage of this method is that it requires generalized learning [12] in addition to specialized learning or a time-consuming convergence of neural network learning [14] if generalized learning is not implemented.In order to speed up the convergence without generalized learning, the source [13] retained the complete compensator based on the computed torque method and added a neural network approximating an unstructured uncertainty, which would not be compensated by the computed torque method itself (friction torque) and would introduce an error into the control system if used with this method.The disadvantage of the method described in the source [13] is that the parameters of the inertia matrix M and vector h (torques due to Coriolis, centrifugal and centripetal forces) have to be known.
The sources [16] to [19] successfully deal with the neural network control based on an estimation of kinematics and dynamics of geared robot arms.The source [15] tried to adapt neural network controller based on the computed torque method also to high nonlinear direct drive (DD) robot arm dynamics and obtained good results in the tracking experiments, while the steady-state test and the sudden load change test had not been reported.The published paper [20] resolved the steady state problem.In order to diminish the drawbacks of all the above mentioned methods, a sliding-mode neural network controller was chosen as a robust control scheme [21], where only nominal (average) values of inertia matrix parameters were used, while the differences between actual inertia matrix parameters and nominal inertia matrix parameters torque terms due to Coriollis forces, gravitational forces and friction forces (structured uncertainties) were estimated by neural network.This was done due to the fear that the robot behaviour would be unpredictable during the first few moments of neural network learning.This method was successfully upgraded and used also for visual positioning control of robot mechanism [22] where a special four-layer neural network structure made possible to estimate the complete robot dynamics and kinematics.The next two reports [23] and [24] had shown that neural network based control approach could be effectively used also for direct driven piezo electric actuated micro robot mechanisms.
The theoretical development of a full and simplified centralized and decentralized neural-network controller based on the theory of continuous sliding-mode control for DD robot arm mechanism is shown in the paper.Derived equations, based on Lyapunov theory, of the adaptive neural network controller were verified on a real laboratory directdrive 3. D.O.F PUMA like mechanism.The newly developed neural network continuous sliding-mode centralized and decentralized controllers, as full and simplified sub-methods were successfully tested for adaptation capability of the algorithm for sudden load changes in the manipulator dynamics.All the mentioned tests were made on a real laboratory 3 D.O.F.DD robot mechanisms.
The main idea presented in the paper is to give the neural network controller only a part of robot dynamic, which does not include the coupling effect between axes, so the structual and unstructual uncertainties increase.It is shown in the paper that a neural network as a part of control law is able to learn the missing part of the robot dynamics which should be included in the control law during the learning procedure.Four methods, which have more or less robot dynamic, included in the neural network control law are presented and compared.

SYNTESIS OF CONTINUOUS NEURAL-NETWORK SLIDING-MODE CONTROLLER
A well known mathematical note of robot mechanism dynamics, Eq. (1), is transformed into an n-dimensional state-space system of equations with regard to the control value u, Eq. ( 2), because the Lyapunov theory for searching the control law can only be used in the following way.
(2) where: and d is an unknown disturbance, B is an actual input matrix,  B is an estimated input matrix, u is a control vector, x is a state space vector of mechanism, and t stands for time.Our goal is to prove the function stability σ(x, t) = 0 (Eq.( 4)) for the robot system (Eq.( 2)).This means that after transient time, defined with parameters of the matrix G, the difference between the actual and the desired vector of state space variables x and will equal zero and will be stable for all disturbances.Function σ(x, t) = 0 will be stable if the Lyapunov function V > 0 and the first Lyapunov time derivative of function  V < 0. The selected Lyapunov function V (Eq.( 5)) is always greater than zero for whichever selected vector x r , x and matrix G.However, it is not always possible to get the negative first derivative of the Lyapunov time-dependent function  V (Eq. ( 6) for every x r , x and G.According to the following equation: where x r is a vector of the desired state space variable and G is the matrix defining the control of system dynamics, we cannot prove the robot system stability (Eq.( 2)).Nevertheless, we can look for suitable conditions for control law u, where the robot system will be stable.This is done in the following way.
For the simplest Lyapunov function V to determine the control law u, the following equation has been selected: The following is derived from the Eq. ( 5): Owing to the fact that  V is not always less than zero for all x r , x and G, the first desired Lyapunov negative time function derivative has been defined as: where D is a diagonal matrix with positive diagonal elements.
If the Eq. ( 7) and the derivative of Lyapunov's Eq. ( 6) are made equal, the result is: The Eq. ( 8) is valid if both or at least one of multiplicators equals zero.Since the first multiplicand, the term σ T , does not equal zero during the transient response, the control law can be calculated on the basis of the second multiplicand (Eq.( 9)): If Eq. ( 4) is differentiated and the Eq. ( 2) is inserted into the recently calculated derivative, we get the following result: After Eq. ( 10) has been inserted into the implementation condition of control law Eq.( 9), the result is as follows: Since the term (f + ΔB•u + d) is unknown and not measurable, it is, therefore, approximated with the neural network N = [o 1 ... o i ] T (see Fig. 1) by changing the Eq. ( 11) into: Since the term (f + ΔB•u + d) is unknown and not measurable, a classic supervised weight learning of neural network cannot be used.Therefore, a socalled on-line neural network estimator has been developed (Fig. 2), estimating a learning signal (that is the difference between the target and the output of a neural network).
The result after Eq. ( 4) has been differentiated is the following:

Fig. 2. Neural network on-line estimator
After Eqs. ( 12) and ( 13) have been inserted into the basic equation of mechanism dynamics (Eq.( 2)), the result is as follows: where we have substituted Z = (f + ΔB•u + d).To learn the weights of a neural network hidden layer the traditionally back-propagation rule [25] is used.

Centralized Control Law for Three Degrees of Freedom Mechanism
In the previous section, the control law for a general robot mechanism with n-degrees of freedom has been derived; in this section, detailed equations of control law for a direct drive robot mechanism with three degrees of freedom, which is shown in Fig. 4, will be derived.

T M T
where T, h  , G  f , and T n (see Eq. ( 1)) are column vectors of the 3×1 dimension, M  is the matrix of the 3×3 dimension, and θ = [θ 1 θ 1 θ 1 ] T is the column vector of the 3×1 dimension of all three axes of the robot and where M  , h  and G  f are estimated and simplificated values of real M, h and G f (see Eq. ( 1)).Only nominal or average parameters of the matrix M  have been selected.This means that all 9 parameters of the matrix M  are constant while the robot hand is moving.This is, of course, only a rough simplification of how things really look like; for it is a common fact that the parameters of matrix M  vary according to individual axis movements in robot's working space.The previous equation can also be rewritten in the following form (see also Eq. ( 3)): where: and where u is calculated vector of T done by control law (Eq.( 19)).
Because of that the unknown variable part ΔB exists and is estimated by the neural network (see Eq. ( 14)).The dimension of vector f is 6×1 and the dimension of the matrix  B is 6×3.The control law u of the 3×1 dimension is illustrated in the following equation: where: and Coefficients of the matrices G in D are selected in such a way that they enable the fastest convergence of neural network algorithm possible.The column vector N is of the 6×1 dimension and represents the outputs of the neural network o i with i = 1, ..., 6.
The neural network of centralized neural network sliding mode controller (CNNSMC) consists of 9 inputs; these are: three actual positions, three actual velocities, and three differences between the desired and the actual position.All of them lie in the joint space of the robot mechanism.The scheme of CNNSMC is shown in Fig. 3. Eq. ( 1) is simplified for the first single axis (θ1) of DD robot mechanism (Eq.( 25)): where scalars T 1 , h  1 , g  1 and t n1 are torques needed to move the single axis.h  1 is torque due to Coriollis centripetal and centrifugal forces, g  1 is a torque due to gravitational forces and t n1 is unknown torque disturbance.J  1 is an average, constant and rough approximation of the single axis inertia parameter.Scalars J  1 , h  1 , g  1 are estimated and simplificated values of real M, h and G f (see Eq. ( 1)).
Eq. ( 25) has been transformed as follows for the first single axis: where ∆B B B = −  and where: The dimensions of the vectors f 1 , B 1 ,  B 1 are 2×1.The control law u 1 is described by the following equation: where: The coefficients K p1 , K v1 and constant d 1 are selected in such a manner that the most rapid convergence of the neural network (N 1 is an output of ) .and    r (32) The column vector N 1 is of the 2×1 dimension and represents the outputs of the neural network o i (i = a, b).The variable of control law u 1 is a scalar.
The learning procedure for all weights of the neural network output layer is: where j = 1, ..., 5 (a number of neurons in the hidden layer), i = 2 (indexes: a, b -the number of neurons in the output layer), l = 3 (three neural network inputs were used: an actual position, an actual velocity and a difference between desired and actual positions in the joint space) and g'(*) is the first derivative of sigmoidal function.Fig. 3 also shows the scheme of the single axis controller.The remaining two D.O.F.single axis controllers are the same as the described one in this subsection.Every single axis controller has the equal number of inputs and outputs of the neural network, the equal on-line estimator, the same control law etc.The difference between equations developed in current subsection and equations needed for the second and third axis is that all indexes "1" in Eqs. ( 25) to (34) are changed from "1" to "2" for the second axis and from "1" to "3" for the third axis.In fact, there are three equal control laws: u 1 , u 2 and u 3 ; the only differences between the above mentioned control laws for all three axes are different values for parameters d k , K pk , K vk and of course different inputs θ k ,  θ θ k and  θ k , where k = 1, 2, 3.

Simplified Centralized and Decentralized Control Laws
Centralized and decentralized control approaches estimate a part of the variable robot dynamic model (torque model due to friction, Coriolis, centripetal and centrifugal forces) and use only the part of a dynamic plant model -the so called estimated inertia matrix M (see Eqs. ( 1) to ( 3), ( 11) and ( 12)).If Eq. ( 3) is rewritten as: where C is a matrix, which includes the simple unity diagonal matrix I instead of M  , for CNNSMC, so Eq. ( 18) is changed to: where I is a unity diagonal matrix of 3×3 dimension.Consequently, Eq. ( 19) is also changed to: while matrices G, D and vectors N,  x r and σ are not changed in comparison to the control law of CNNSMC (see Eqs. ( 16) to ( 24)).Eq. (37) represents the control law for a simplified centralized neuralnetwork sliding-mode controller (SCNNSMC).
The equation development for the case of simplified decentralized neural-network sliding-mode controller (SDNNSMC) is similar as for the case of the SCNNSMC.Here, Eq. ( 28) is changed to: Therefore, the control law for the SDNNSMC is rewritten from Eq. (29) as: where vectors G 1 ,  x r1 , N 1 and scalar variables d 1 and σ 1 are not changed in comparison to the control law of DNNSMC (see Eqs. ( 25) to (34)).
As it is seen from Eqs. ( 35) to (39), both simplified control laws do not need any plant model parameters for accurate estimation of the direct-drive robot mechanism dynamics.

APLICATION ON A REAL MECHANISM
The scheme of a direct-drive three degrees of freedom mechanism is illustrated in Fig. 4, while in Fig. 5 the photo of the robot mechanism is shown.The Dynaserv's AC-motors with maximum torque of 220, 160 and 60 Nm, and the nominal angular velocity 1 to 2 rotations per second were used.The mechanism is made of aluminium, which is fixed on the AC-motors.A robot wrist can be added to the top of the third axe of the robot.
Since the robot is expected to perform manipulation tasks, the complete system has been tested with all four developed controllers described in previous section to perform the following tasks: • performance of the PTP movement with the static error less than 0.1 mm, and • robustness when the top of the robot is disturbed with sudden load changes.To satisfy the above mentioned demands, a robot controller with the sufficient computed power had to be developed.For a parallel execution of algorithms a transputer network of 8 transputers, one PowerPC, and one ordinary personal computer have been used; all have the possibility of working in parallel.
A robot computer controller is described in a source [21].The sampling time T s = 2 ms is the execution time of all algorithms needed for the robot computer control.
The position error of the robot tip (Eq.( 40)) or a trajectory tracking error in the task space has been used to measure the quality of all four robot controller performances: where X di , Y di , Z di are reference trajectories in the i th sampling time in the task space and X i , Y i , Z i are the actual trajectories in the i th sampling time in the task space.

The Test of Sudden Load Changes
The position error of a robot tip in a stationary position for the centralized neural-network slidingmode controller (CNNSMC) is shown in Fig. 6, when sudden load changes occurred (approximately 80% of the maximal torque on the robot tip).The initial weights of neural network were randomly chosen between −1 and +1 learning rate η = 1e   The results are almost the same for the test of sudden load changes in the case of CNNSMC and DNNSMC.The difference is found in the first few seconds of Figs. 6 and 7 (PTP movement).The point to point robot tip movement is executed during this time (all three axis start in the same positions and finish in position 1 rd).It could be observed that the dynamic error is higher and the set-up time is longer in a case of DNNSMC.The sudden load changes of robot tip position for SCNNSMC and SDNNSMC are presented in Figs. 8 and 9.

Summary of Results
The quality of the presented DNNSMC is practically the same as for CNNSMC.The disadvantage of DNNSMC against CNNSMC is that the CNNSMC has a shorter set-up time and a smaller dynamic error during the PTP movement (see Figs. 6 and 7).The advantage of DNNSMC against CNNSMC is that DNNSMC has three completely separated control law equations with three remarkably smaller neural networks (each neural network has 5 neurons in the hidden layer, two outputs and three inputs).Therefore, a learning procedure of the neural network can be made for each axis separately which is remarkably easier than in a case of one neural network of CNNSMC with nine inputs, eighty neurons in the hidden layer and six outputs.Due to this reason the robot control computer hardware could run more axes at the same sampling time in the case of DNNSMC than in the case of CNNSMC.The average execution time for CNNSMC was 1.75 ms, while the average execution time for all three DNNSMCs was 1.05 ms.This sampling time also includes the complete direct  and inverse kinematics, interpolators, etc., for the robot controller.If a comparison between both simplified (SCNNSMC and SDNNSMC) methods against "full" methods (CNNSMC and DNNSMC) is made, the next observation can be seen: both simplified methods need a remarkably greater set-up time than the other two.In case of the initial PTP movement the setup time is approximately 5 s in case of SCNNSMC against 2 s for the CNNSMC.Also, the set-up time for the transient responses to changes is smaller in the case of "full" methods against simplified methods.The set-up time for the transient responses to load changes is 1 s for CNNSMC, 2 s for DNNSMC and SCNNSMC and 5 s for SDNNSMC.
The observation of peak values of a position error of PTP movement and during the load changes is also important for the quality comparison between the mentioned four methods (see Figs. 6 to 9).It can be seen that the best results, the smallest peak values of the position error of the robot tip for PTP movement is observed for CNNSMC (4 mm) and DNNSMC (16 mm) while the peak values of position error during load changes (disturbances) have almost the same values (4 to 5 mm) for CNNSMC and DNNSMC.The peak values of position error for PTP movement is higher for both simplified methods: SCNNSMC (32 mm) and SDNNSMC (18 mm), while an interesting effect can be observed when the position error of the robot tip during the load changes is measured.In the case of SCNNSMC the peak position error continuously decreases from the first load change (66 mm) to next load changes and it is only 5 mm in the end of experiment, which is practically the same result as for CNNSMC and DNNSMC.This means that in the case of SCNNSM there is a longer learning period because the neural network sliding-mode estimator has to learn complete robot dynamic and not only a part as in the case of "full" methods.The worst results, which means the highest peak position error of the orbot tip was measured in the case of SDNNSMC (10 to 17 mm).
The steady-state position error of the robot tip was the smallest in the case of CNNSMC after the PTP movement and after load changes (practically zero) and almost zero in the case of DNNSMC, while in the case of SCNNSMC decreasing value of steady state position error is measured from the beginning of the experiment to the end of experiment.The worst result, the highest value of the steady-state position error is measured in the case of SDNNSMC where the steady state error is constantly between 0.5 to 1 mm.

CONCLUSIONS
This paper has presented the experimental development and laboratory implementation of four: centralized, decentralized, simplified centralized and simplified decentralized neural network continuous sliding-mode controllers for manipulation tasks for the real direct-drive 3 D.O.F.PUMA like robot manipulator.The neural network sliding-mode structure of the controller has been used to estimate and compensate structured (the inertia matrix) and unstructured (torques due to Coriollis forces, gravitational forces, friction forces, etc.) uncertainties of the robot manipulator.The adaptive and selfimproving capability of the neural network controllers to the unstructured effects (sudden load changes) has been shown for all four neural network controllers.

Fig. 9 .
Fig. 9. Position error of the robot tip for SDNNSMC during load changes in the stationary position test