Decentralized Identification and Control in Real-Time of a Robot Manipulator via Recurrent Wavelet First-Order Neural Network

A decentralized recurrent wavelet first-order neural network (RWFONN) structure is presented. The use of a wavelet Morlet activation function allows proposing a neural structure in continuous time of a single layer and a single neuron in order to identify online in a series-parallel configuration, using the filtered error (FE) training algorithm, the dynamics behavior of each joint for a two-degree-of-freedom (DOF) vertical robot manipulator, whose parameters such as friction and inertia are unknown. Based on the RWFONN subsystem, a decentralized neural controller is designed via backstepping approach. The performance of the decentralized wavelet neural controller is validated via real-time results.


Introduction
The control of robotic manipulators is a mature yet fruitful field for research, development, and manufacturing.The industrial robots are basically positioning systems; therefore, the trajectory tracking control problem for this kind of robot manipulators has been a challenging problem to be solved in the last years.In this respect, the field of artificial neural networks (ANNs) has been playing an interesting role and poses a great challenge to its implementation in real-time.Some works have been dealing with the design of neural control schemes in discrete time where the extended Kalman filtering has been used as training algorithm for both recurrent high-order neural networks (RHONNs) [1][2][3] and high-order neural networks (HONNs) [4,5].The neural control schemes in continuous time have been proposed using the filtered error (FE) algorithm as training law for a RHONN [6][7][8].In all of the works referenced above, the identification and control were carried out online at the same time.
The wavelet neural networks (WNNs) structure arises from combining wavelets concept with the ANNs approach in order to achieve a better identification performance [9][10][11][12][13].Unlike sigmoidal activation functions used in conventional ANNs, these are replaced by a wavelet activation function in the WNN.WNNs have proved to be better than ANNs in the sense that their structure can provide more potential to enrich the mapping relationship between inputs and outputs [9].WNNs simultaneously possess the advantages of ANN learning ability and wavelet decomposition ability.WNNs-based control systems have been adopted widely for control of complex dynamical systems owing to their fast learning properties and good generalization capability [10,11].Moreover, recurrent wavelet neural networks (RWNNs), which combine properties such as dynamic response of recurrent neural networks (RNNs) and the fast convergence of a WNN, have been proposed to identify and control nonlinear systems [14][15][16][17][18].An intelligent control system using recurrent wavelet-based Elman neural network for position control of a permanent-magnet synchronous motor servo drive was proposed in [19].In [20,21], a self-recurrent wavelet neural network structure was proposed in order to identify a synchronous generator and the nonlinearities introduced in the system due to actuator saturation.In [22], 2 Mathematical Problems in Engineering two types of Haar wavelet neural network, feedforward and RWNN, were used to model discrete-time nonlinear systems.Some researches have been carried out in real-time with interesting results, such as in [23], where an adaptive RWNN uncertainty observer was proposed to estimate the required lumped uncertainty and the backstepping approach was used to control the motion of a linear synchronous motor drive system.A novel global PID control scheme for nonlinear MIMO systems was proposed and synthesized for a robot manipulator in [24].Inverse dynamics identification was based on a radial basis neural network with daughter RASP1 wavelets activation functions in cascade with an infinite impulse response filter in the output to prune irrelevant signals and nodes.In [25], an intelligent control system based on a four-layer RWNN, trained via gradient descent method and which includes Gaussian wavelet functions, and using the sliding mode approach was proposed to achieve trajectory tracking for an UAV.
The use of WNNs and RWNNs is not a new theme in the literature; however, the implementation of these structures involves the use of multiple layers with multiple neurons.The use of offline training algorithms and a little bit of applications in real-time have generated a major motivation in the development of this work.Signal and images decomposition using a space of basis functions having local support in both the time and frequency domains has proven their usefulness in signal and images processing.Such motivations across various fields have led to the development of wavelets.Some view wavelets as a new basis for representing functions.Where the Fourier series maps a one-dimensional function of a continuous variable into a one-dimensional sequence of coefficients, the wavelet expansion maps it into a twodimensional array of coefficients that allows localizing the signal in both time and frequency simultaneously.Wavelet algorithms are defined to process data at different scales of resolution in both the time and frequency domains and are useful tools for multichannel signal processing, for example, estimation or filtering, and multiresolution signal analysis (MRA).The MRA shows how orthonormal wavelet bases can be used as a tool to describe mathematically the increment of information needed to go from a coarse approximation to a higher resolution of approximation.For all of the above, we propose a continuous-time decentralized wavelet neural identification and control scheme based on the structure of a RHONN model where sigmoidal activation functions and high-order connections between them are replaced by a wavelet (Morlet) activation function.The resulting structure has been called recurrent wavelet first-order neural network (RWFONN), from which the design of the controller is carried out using the backstepping approach.The training for the RWFONN is performed online in a series-parallel configuration using the FE algorithm, shaping a new neural structure of a single layer and a single neuron, where its capacity for identification of more complex dynamics increases with the implementation of a wavelet Morlet.The performance of the proposed scheme for trajectory tracking is validated via experimental results when it is applied to a vertical robot manipulator of two DOF with unknown parameters.

Recurrent Wavelet First-Order Neural Network Model
Consider the RHONN model [26] where the state of each neuron is governed by a differential equation of the form where    is the state of the th neuron,    and    are positive real constants,    is the th adjustable synaptic weight connecting the th state to the th neuron,  represents the total number of weights used to identify the plant behavior, and   is the activation function for each one of the connections.Each   is either an external input or the state of a neuron through a sigmoidal function; that is,   = (   ), where (⋅) is a sigmoidal nonlinearity.In a recurrent second-order neural network, the total input to the neuron not only is a linear combination of the components   , but also may be the product of two or more elements represented by triplets  1  2  3 , quadruplets, and so forth.{ 1 ,  2 , . . .,   } is a collection of  nonordered subsets of {1, 2, . . .,  + } and   () are nonnegative integers.This class of neural networks form a RHONN.
The input vector for each neuron is given by . . .

𝑠 (𝑥
where is the vector of external control inputs to the network.
Introducing a -dimensional vector z, defined as the RHONN model (1) can be rewritten as Replacing now the vector z by a wavelet vector , considering that higher-order terms   will not be used, the RHONN model (1) can be rewritten as The adjustable parameter vector is defined by , so (5) becomes where the vectors w   , for  = 1, 2, . . ., , represent the adjustable weights of the network, while the coefficients    , for  = 1, 2, . . ., , are part of the underlying network architecture and are fixed during training.The structure in form (6) here is called RWFONN.
This RWFONN, that is, a neuron with a single connection of first-order, is the most simple structure for a RHONN and is an expansion of the first-order Hopfield [27] and Cohen-Grossberg [28] models.The sigmoidal activation function (⋅) is replaced by the real version of the modified wavelet Morlet [29,30] of form () =  − 2 / cos(), with parameters  and  representing expansion and dilation, respectively.Properties about wavelet functions are described in [31][32][33][34][35].

Approximation Properties of the RWFONN.
In the following, the problem of approximating a general nonlinear dynamical system by a RWFONN is described.The inputoutput behavior of the system to be approximated is given by where   ∈ R  is the input to the system,    ∈ R  is the state of the system, and  : R +  → R  is a smooth vector field defined on a compact set D ⊂ R + , where  and  are constants.The approximation problem consists in determining and using wavelet activation function for continuous time, if there exist weights w   such that (6) approximates the input-output behavior of an arbitrary dynamical system of form (7). Assume that (⋅) is continuous and satisfies a local Lipschitz condition such that (7) has a unique solution and (   (),   ()) ∈ D for all  in some time interval   = { : 0 ≤  ≤ }, where   represents the time period over which the approximation is performed.Based on the above assumptions, the next theorem, which is strictly an existence result and does not provide any constructive method in order to obtain the correct weights w *   , proves that if a sufficiently large number of weights are allowed in (6), then it is possible to approximate any dynamical system to any degree of accuracy.
Theorem 1. Suppose that system (7) and the RWFONN model ( 6) are initially at the same state    (0) = x   (0).Then, for any  > 0 and any finite  > 0, there exists an integer  and a vector w *   ∈ R  such that the state x   () of the RWFONN model (6), with  number of weights whose values w   = w *   , satisfies Proof.The proof proceeds along the same lines as the proof in [36].The dynamic behavior of the RWFONN model is described by Assuming that each    is positive, then the boundedinput bounded-output (BIBO) stability for each neuron    is guaranteed.By adding and subtracting −      , system (7) can be rewritten as where with    (0) = 0.By assumption, (   (),   ()) ∈ D ∀ ∈ [0, ], where D is a compact subset of R + . Let It can be seen that D  is also a compact subset of R + and where  is a constant.The solution to the differential equation ( 11) can be expressed as Since each    is a positive real constant, there exists a positive constant  such that ‖ Now, consider that (x   (),   ()) ∈ D  ∀ ∈ [0, ].From (15), taking norms on both sides and using ( 13), (14) where   0 is the initial state of the system.As is standard in systems identification procedures, here it is assumed that the input   () and the state    () remain bounded for all  ≥ 0. Based on the definition for    (   ,   ) given by (3), this implies that    (   ,   ) is also bounded.In the sequel, unless there exists confusion, the arguments of the vector field  will be omitted.Next, the approach for estimating the unknown parameters w *   of the RWFONN model ( 19) is described.Considering (19) as the differential equation describing the dynamics of the unknown system, the identifier structure is chosen with the same form as in (6), where w   is the estimate of the unknown weight vector w *   .From ( 6) and ( 19), the identification error which can be rewritten as where (w   )  = (w   )  −(w *   )  denotes the parametric error [35].The weights w   are adjusted according to the learning law where the adaptive gain Γ   ∈ R × is a positive definite matrix.Stability and convergence properties for the weight adjustment law given above are analyzed in [37].The following theorem establishes that this identification scheme has convergence properties with the gradient method for adjusting the weights.

Neural Backstepping Controller Design
Consider now the mathematical model of an -DOF robot manipulator given by  = M (q) q + C (q, q ) q + g (q) + f ( q ) , ( where  is a  × 1 input vector that represents the torques applied to each joint; q, q , and q ∈ R  are the states of the system corresponding to position, velocity, and acceleration for each joint, respectively; M(q) q ∈ R × represents the contribution of the inertial forces to the dynamical equation; hence the matrix M represents the inertia matrix of the manipulator; C(q, q ) q ∈ R  represents the Coriolis forces, g(q) ∈ R  represents the gravitational forces, and f( q ) ∈ R  is a vector that combines both viscous and Coulomb friction terms, that is, the so-called friction vector [38].In this work, as a continuity of [35], a decentralized RWFONN trained via FE algorithm (21) with weights adjustment law ( 22) is proposed for identification and control of a two-DOF vertical robot manipulator.From (6), the decentralized RWFONN model is given as follows: with  = 1 for the       (⋅) term, where  = 1, 2 denotes the number of the joints;  = 1, 2 is for the number of states of the th RWFONN model;   represents the measurable local angular position and q  is for the calculated local angular velocity;   is the control input.It must be noticed that this decentralized neural scheme is in the form of a strictfeedback system as that proposed in [8]; then, the use of the backstepping approach is still being suitable for the design of the neural controller.For each th joint the identification error between the neural identifier and the joint variable is defined as   1 =   1 −   for the angular position and   2 =   2 − q  for the angular velocity.To update online the synaptic weights, the adaptive learning laws are given by ẇ  11 = −Γ  11   11 (  )  1 and ẇ  21 = −Γ  21   21 ( q  )  2 , with Γ   > 0 as the adaptive gain and with  1 = 2,  1 = 0.1, and  2 = 0.01 for    11 and  2 =  3 = 2 for   21 .Next, our objective is to design a feedback control law () to force the system output to follow a desired trajectory.The decentralized neural control scheme is based on the following.
Denoting   as the identification error and the trajectory tracking error between the states of the neural network for position and the desired trajectory as   = |  1 −   |, the output tracking error is rewritten as where q = |  −   |.Consequently, the error dynamics is given as Considering ( 21), ( 24), and the error dynamics is then described by The decentralized wavelet neural controller design can be formulated as follows.
Theorem 3.For a neural identifier in a strict-feedback form (24) the dynamics of (26) and the neural network tracking error (28) with control law (41) and positive values for   1 and   2 have an asymptotically stable equilibrium point and the output tracking error (26) tends to zero.
Proof.Assuming that the system is Lipschitz, we proceed by proposing the augmented Lyapunov-like function with taken from [36].Considering ( 21)-( 22), the time derivative of ( 31) is then given by [36] V The time derivative of   1 (⋅) along the solution of ( 28) is Mathematical Problems in Engineering  In order to guarantee that (33) is negative definite, the desired dynamics for   2 is proposed as with   1 > 0 a real value.Now, proposing the augmented Lyapunov-like function Link 2 (rad)  and introducing the error the time derivative of ( 36) is given by From ( 37) and ( 24), q  2 is rewritten as  From all of the above, (38) takes the form In order for (40) to be negative definite, the control law is proposed as From (34), considering ( 28) and ( 24), we have  Accordingly, with   2 > 0 a real value.

Real-Time Results
4.1.Robot Description.In order to evaluate in real-time the performance of the decentralized neural backstepping control scheme proposed, it is implemented on a 2-DOF robot manipulator, of our own design and unknown parameters shown in Figure 1, whose displacements are involved on the vertical plane [38].The robot manipulator consists of two rigid links; brushless direct-drive servos are used to drive the joints, the first one with a 16 : 1 gear reduction for link 1 and direct connection of the last one for link 2. The robot arm is constituted by the MTR-70-3S-AA and MTR-55-3S-AA servomotors, manufactured by FESTO Pneumatic AG, for link 1 and link 2, respectively.Incremental encoders embedded on the servomotors deliver information, via RS-422 protocol, related with the angular displacements.Both servomotors exhibit a resolution of 4096 pulses/rev, that is, an accuracy of 0.00153398 rad/pulse.The angular velocities are computed via numerical differentiation of the angular position's signal.According to the actuator's manufacturer, the direct-drive servomotors are able to supply torques within the following bound: Considering that servo drives are controlled by means of a data acquisition board (DAB) using two analog channels of ±10 Vdc, with a sampling time of 0.0005 s, the voltage-torque relationship has been established as it is shown in Table 1.

Tracking Neural Control.
For validating the experimental results we are using the following bounded desired trajectories: where  small magnitude so that it is possible to show the transient response of the controller, (b) they incorporate a sinusoidal term to evaluate the provision to relatively rapid periodic signals, where the nonlinearities of the robot dynamics are really important, and (c) they present a term that gently increases to keep the robot in a state of operation without saturating the actuators [38].
The decentralized neural backstepping control scheme proposed is depicted in 2.
It should be noticed that for a robot manipulator with more than 2 DOF, a decentralized RWFONN controller must be implemented for each joint added.

Real-Time Experiments.
To evaluate the efficiency and speed of the identification RWFONN scheme and the performance and robustness of the decentralized neural backstepping control scheme, we propose the next experiments under the following criteria: (i) for joint 1: zero initial conditions for both plant and RWFONN, with a delay of 2 seconds for the controller; for joint 2: zero initial conditions for both plant and RWFONN with a delay of 1 second for the controller; (ii) for joints 1 and 2: trajectory tracking of a step signal, with zero initial conditions for both plant and RWFONN; (iii) for joint 1: zero initial conditions for both plant and RWFONN, adding a payload of 0.325 kg; for joint 2: zero initial conditions for both plant and RWFONN, adding a payload of 0.100 kg.
Figure 3 illustrates real-time results about identification of the plant behavior and trajectory tracking performed by the RWFONN.Figure 4 shows the identification error, that is, the difference between the plant dynamics and the RWFONN.
From Figure 5, it can be shown that tracking errors tend to occur at a small region near zero.In Figure 6, the applied torques to each joint are shown in their corresponding  max values, according to Table 1.It can be seen that both control signals are always inside the prescribed limits given by the actuators manufacturer.Figure 7 illustrates real-time results about identification of the plant behavior and trajectory tracking performed in a decentralized way by a first-order RNN, with sigmoidal functions, via a control law synthesized by a recursive method as was proposed in [6].The corresponding applied torques to each joint from the firstorder RNN control scheme are shown in Figure 8. From Figures 9-12, trajectory tracking for a step signal performed by both RWFONN and first-order RNN, as well as their corresponding exerted torques, is presented.From Figures 7-12, it has been shown that the RWFONN control scheme performs much better than the first-order RNN controller when showing a good speed for convergence to the signals to track and a less control effort.From Figures 13 and 14, real-time results about the performance of the decentralized neural control scheme here proposed are shown for the case when payloads are added to each link.

Conclusion
The real-time results validate the efficiency of the continuoustime decentralized wavelet neural control scheme proposed for trajectory tracking.Furthermore, it is shown that effects due to friction and gravitational forces, which can be seen as physical interconnections between the subsystems of the whole system, are absorbed by the local neural controllers.Moreover, the decentralized wavelet neural controllers exhibit a good performance in spite of forced delays and more even when payloads on each link of the robot manipulator are added.

Figure 1 :
Figure 1: Two-DOF vertical robotic arm.From left to right: without payload on each link, with payload in both links.

+−Figure 2 :
Figure 2: Block diagram for the decentralized neural control scheme proposed.

Figure 3 :
Figure 3: Identification and trajectory tracking performed by the decentralized RWFONN control scheme.

Figure 5 :Applied torque u 1 Applied torque u 2
Figure 5: Tracking errors between desired trajectory and robot manipulator.

Figure 6 :
Figure 6: Applied torques for each joint via decentralized RWFONN controller.

Figure 8 :
Figure 8: Applied torques for each joint of the robot manipulator via first-order RNN controller.

Figure 9 :
Figure 9: Identification and trajectory tracking for a step signal via decentralized RWFONN control.

Figure 14 :
Figure 14: Exerted torques by the decentralized RWFONN control scheme when payloads are added to each joint of the robot manipulator.
where  is the required degree of approximation.    (   ,   ) satisfies the conditions of the Stone-Weierstrass theorem and it can therefore approximate, over a compact domain, any continuous function.The preprocessing of the input via a continuous invertible function does not affect the ability of a network to approximate continuous functions.Therefore, it can be shown that if  is large enough, that is, the number of weights is large enough, then there exist weight values w    ,   ).
= w *   such that (w *   )     (x   ,   ) can approximate (   ,   ), in a compact domain, to any degree of accuracy for all (x ,   ) does not belong to D  ∀ ∈ [0, ].Then, by the continuity of x   (), there exists a  * , where 0 ≤  * ≤ , such that (x   ( * ),   ( * )) ∈ D  where D  denotes the boundary of D  .Furthermore, carrying out the same analysis for  ∈ [0,  * ] it results |x   () −    ()| ≤ /2.Hence, (18) holds for all  ∈ [0, ].2.2.Filtered Error Training Algorithm.Under the assumption that the unknown system is exactly modeled by a RWFONN architecture of form (6), the weight adjustment law and the FE training algorithm for this RWFONN are next summarized.Based on the assumptions of no modeling error, there exist unknown weight vectors w *   such that each state    of the unknown dynamical system (7) satisfies

Table 1 :
Admissible signals by the servomotors.