A Fast Adaptive Artificial Neural Network Controller for Flexible Link Manipulators

This paper describes a hybrid approach to the problem of controlling flexible link manipulators in the dynamic phase of the trajectory. A flexible beam/arm is an appealing option for civil and military applications, such as space-based robot manipulators. However, flexibility brings with it unwanted oscillations and severe chattering which may even lead to an unstable system. To tackle these challenges, a novel control architecture scheme is presented. First, a neural network controller based on the robot’s dynamic equation of motion is elaborated. Its aim is to produce a fast and stable control of the joint position and velocity and damp the vibration of each arm. Then, an adaptive Cerebellar Model Articulation Controller (CMAC) is implemented to balance unmodeled dynamics, enhancing the precision of the control. Efficiency of the new controller obtained is tested on a two-link flexible manipulator. Simulation results on a dynamic trajectory with a sinusoidal form show the effectiveness of the proposed control strategy. Keywords—Adaptive control; CMAC neural network; artificial neural network; nonlinear control; flexible-link manipulator; dynamic motion equation


INTRODUCTION
The trajectory control of a manipulator robot can be decomposed into two parts.Tracking the desired trajectory on the dynamic phase of the movement and positioning the tip of the link on the final phase of the movement.While the majority of the existing researches on the control of flexible link manipulators concentrate on the positioning phase of the movement, very few of them deal with the dynamic phase of the movement.This paper presents a new control system structure to deal with the tracking control problem of flexible link manipulators on the dynamic phase of the trajectory.
The use of knowledge-based modeling, whereby mathematical equations are derived in order to describe a process, based on a physical analysis, is important to elaborate effective controllers.However, this may lead to a complex controller design if the model of the system to be controlled is more complex and time consuming.Therefore, the controller presented in this paper is based on Artificial Neural Networks (ANNs) that approximate the dynamic model of the robot.
Using ANNs, replacing nonlinear modeling, may simplify the structure of the controller, reduce its computation time and enhance its reactivity without a loss in the accuracy of the tracking control.This is important when real time control is needed.
The main advantage of neural networks control techniques among others is that they use nonlinear regression algorithms that can model high dimensional systems with extreme flexibility due to their learning ability.
To reduce the modeling error between the actual system and its representation, an adaptive Cerebellar Model Articulation Controller (CMAC) is added.The advantages of using a CMAC in the adaptive controller are as follows.The CMAC is fast in terms of convergence speed and computation time.Because of the associative and local generalization properties of the CMAC, the number of training cycles to converge is orders of magnitude smaller with the CMAC than with other neural networks [1].The learning law and the output function of the CMAC are simple, so the CMAC needs fewer computations and less time to make adjustments and produce outputs than other neural networks, in which complex update laws and nonlinear sigmoid output functions are involved.
CMAC networks were used in many military applications.In [2], they were applied to the control of a parallel hybridelectric propulsion system for a small unmanned aerial vehicle (UAV).The CMAC controller saves on the required memory compared to a lookup table by two orders of magnitude.The hybrid-electric UAV with the CMAC controller uses 37.8% less energy than a two-stroke gasoline-powered UAV during a three-hour intelligence, surveillance, or reconnaissance mission.
Demand for increased productivity in industry has led to the use of lighter robots with faster response and lower energy consumption.Flexible-link manipulators have relatively smaller actuators, higher payload to weight ratio and, generally, less overall cost.The drawbacks are a reduction in the stiffness of the manipulator structure which results in an increase in robot deflection and poor performances due to the effect of mechanical vibration in the links.
Trajectory following control of flexible-link manipulator system has been an important research area in the last three decades.A non-rigid link bears resemblance to a flexible (cantilever) beam often used as a starting point in modeling the dynamics of a flexible link [3].
Well-known approaches such as Euler-Lagrange's equation and Hamilton's principle commonly used in modeling the motion of rigid-link manipulator have been applied to derive the general equation of motion for flexible link manipulator.
Infinite-dimensional manipulator system is commonly approximated by a finite-dimensional model for controller design.Finite element method is used to derive the dynamic model leading to a computationally attractive form for the displacement bending [4].However, most of the control techniques for non-rigid manipulators are inspired by classical controls.A bibliographical study presents some of them.
A multi-step control strategy was used in [5][6][7][8][9][10][11], which consists of superimposing to the control of the rigid body, the techniques of shaping or correction of the elastic effects.Other algorithms use the techniques of decoupling [12,13], others are based on the method of the singular perturbation approach [14][15][16] or use non-collocated feedback [17].Sliding mode control algorithms were successfully applied for maneuvering planar flexible manipulators while suppressing vibrations [18,19].
New techniques, based on swarm intelligence have also been used to elaborate optimal controllers for vibration suppression [41].
The majority of the existing non-linear controls nevertheless are subjected to constraints such as: frequency and damping of the mode shapes known exactly a priori or complex online computing like matrix inversion or computation of the dynamics of the manipulator.Other control techniques suffer from the lack of robustness facing significant variation of the dynamic parameters of the manipulator, particularly the payload.
The presented control law has several distinguished advantages.It is easy to compute since it does not require the computation of all or part of the dynamic model.This robust controller design method maximizes the control performance guaranteeing good precision when regulating the tip position of the flexible arm in the presence of large structured and unstructured uncertainties.
The reminder of this article is organized as follows.In Section 2, a two-link planar flexible manipulator is modeled according to Euler-Lagrange's formulation and finite element method for the discretization.Section 3 presents the non-linear control.Stability analysis of this control method is carried out in Section 4. Section 5 presents the approach used to reduce the complexity of the controller.In Section 6 an adaptive controller is added to enhance the precision of the control.Section 7 describes simulation results.Tests have been carried out for the hybrid controller and compared to those obtained with the nonlinear controller used solely.Results show the efficiency of the hybrid control strategy facing an important variation of the dynamic parameters.Finally, conclusion is presented in Section 8.

II. DYNAMIQUE MODELLING
The system considered here consists of two links connected with a rotating joint moving in a horizontal plane as shown in Fig. 1.The first and the second link are composed of a flexible beam cantilevered onto a rigid rotating joint.It is assumed that the links can be bent freely in the horizontal plane but are stiff in the vertical bending and torsion.Thus, the Euler-Bernoulli beam theory is sufficient to describe the flexural motion of the links.Lagrange's equation and model expansion method can be utilized to develop the dynamic modeling of the robot.
As shown in Fig. 1, { } α are the elastic displacements, they describe deflection and section rotation of the tip for the first and the second arm, respectively.
Motion of each manipulator's arm is described by one rigid and one elastic variable [1]: (1) Torques applied to the manipulator joints are given by:

O x y  
is given by: With, ( , ) x y the coordinates of 1 M in a non deformed link, f the deflection at the abscissa x and ,x x Finite-element theory allows to write the approximation [4]: With, 1 L the length of the first link, 1 f and 1 α are the deflection and the section rotation of the tip of the first link, respectively.
Bernoulli-Euler beam theory states that for a link with small elasticity, deflection and section rotation can be considered linearly dependent.Therefore, the section rotation can be written [42]: With, tan(.) is the tangent function.The value of 1 α is considered here in radians.
The same reasoning can be made for an arbitrary point 2 M on the link 2.
The kinetic energy i T of the link i (with =1, 2 i ) is then given by: where ( ) is the velocity of i M on the flexible link i.
i L , i S and i ρ are the length, the section and the mass density of link i ( =1, 2 i ), respectively.Now, the total kinetic energy T can be written as [43]: The potential energy U can be written as [27]: the term on the right-hand side in (9) describes the potential energy due to elastic deformation of the links.The term relative to the gravity is not present here as the manipulator moves on a horizontal plane.i f is the deflection at the abscissa i x of the link i. i E is the Young's modulus and i I the second area moment of inertia of the considered link.
Then the potential energy can be reduced to the more condensed form: Where, K is the symmetric stiffness matrix.The first two rows and columns of K are zeros as U does not depend on r q so it can be written The dynamic motion equation can be derived in terms of the Lagrange-Euler formulation: Where  is the Lagrangian function and T U = −  .Substituting ( 8) and ( 10) into (11a) and (11b) yields to [20]: where r L Γ is the torque vector [ ] T 1 2 , ,0,0 Γ Γ applied to the joint, A (q) is the (4×4) inertia matrix, B (q, q)  is the (4×4) matrix of Coriolis and centrifugal terms, K is the (4×4) stiffness matrix.

III. NONLINEAR CONTROL
This control law consists of a proportional and derivative (PD) part completed by a reduced model which contains only the rigid part of the whole nonlinear dynamic model of the flexible manipulator.It is a generalization of the classically known 'computed torque' used to control rigid manipulator [44,45].Dynamic equation of motion (12) can be rewritten as: or, = + + + r r r r re e re e Γ A q B q A q B q     (13a) er r er r e e e e e e 0 A q B q A q B q K q    

(13b)
Therefore, the following control law is proposed: Where d r q , d r q  and d r q  define the desired angular trajectory.
= − d r r r q q q  , = − d r r r q q q     are angular position and velocity errors, respectively.pr K and vr K are positive gain constants.

IV. STABILOITY ANALYSIS
In this section a Lyapunov stability analysis of the nonlinear control given in ( 14) is presented.
By subtracting the control law ( 14) from the dynamic motion equation (13a), the error equation is written: With =− = − e e e q 0 q q  and = − = − e e e q 0 q q     representing the elastic stabilization errors.
In addition, rewriting the coupling equation (13b) according to the trajectory and the elastic stabilization error variables gives: er r er r e e er r e e e e A q B q A q A q B q B q K q Equations ( 15) and ( 16) allow to write the global error equation: Where the positive constant matrices p K and v K are , respectively, and The following Lyapunov function is considered to study the stability of the global system, Differentiating V , using (17) and the fact that A is symmetric positive-definite [46], gives: The property of passivity of the flexible manipulator provides that ( The Lyapunov second method provides that the asymptotic stability of the control is borne out if the following conditions are met.V is strictly positive everywhere except in = q 0  where it is 0 and V  is strictly negative everywhere except in = q 0  where it is 0.
These conditions are always met if the desired angular velocities and accelerations are not too significant for a given tuning of vr K , so that V  remains essentially negative to ensure the control stability.

V. REDUCING THE COMPUTATIONAL BURDREN USING ARTIFICIAL NEURAL NETWORKS
The nonlinear law presented in ( 14) has some major advantages as it uses information extracted from the dynamic motion equations of the system to control the manipulator.Physical characteristics like the passivity of the system can then be used to elaborate a stable controller [27].
The drawback is that, using the model of the system in the construction of the controller can lead to a complex controller [1].Computing such a controller can be time consuming.This is mainly the case with flexible manipulators as they are governed by complex equations which lead generally to a huge model.Using such a model can be incompatible with real time control.To avoid this problem, the proposed here is to approximate parts of the model (which will be used in the controller) with ANNs.The main feature that makes ANNs ideal technology for controller systems is that they are nonlinear regression algorithms that can model highdimensional systems and have the extreme flexibility due to their learning ability.In addition their computation is very fast.
Hence, the functions r A and r B are approximated with the ANNs r Α ΝΝ and r B NN , respectively.Then, their outputs will be used in addition to the PD part of ( 14) to elaborate the first controller: r r e r r r e r e r Γ A NN (q , q ) q B NN (q , q , q , q ) q     Multi Layer Perceptron (MLP) model is adopted in the neural network design scheme of r Α ΝΝ and r B NN , with three-layered networks consisting of input, hidden and output layers.A sigmoid function is used in the hidden layer and a linear function in the output layer.There are 8 neurons in the hidden layer of r Α ΝΝ and 12 neurons in the hidden layer of r B ΝΝ .
Back-propagation algorithm is adopted to perform supervised learning.The two distinct phases to the operation of back-propagation learning include the forward phase and the backward phase.
In the forward phase the input signal propagate through the network layer by layer, producing a response at the output of the network.
In this control scheme, the input signals of the input layer for r Α ΝΝ are the rigid and elastic position of the two links: . For r B NN the inputs are rigid and elastic position and velocity of the two links: The actual response of r Α ΝΝ and r B NN so produced are then compared with the desired response of r Α and r B respectively, generating error signals that are then propagated in a backward direction through the network.
In the backward phase, the delta rule learning makes the output error between the output value and the desired output value change the weights and reduce the error.The training is made off line so that it does not disturb the real time control.

VI. ADAPTIVE CMAC NEURAL CONTROL
To reduce the modeling error between the actual system and its representation, an adaptive Cerebellar Model Articulation Controller (CMAC) is added.
The overall robotic manipulator control system obtained is shown in Fig. 2. It can be written: where Γ is the overall controller's output (torque), NN Γ is the neural network controller's output as defined in (21) and

Γ
is the CMAC adaptive neural controller's output.
The CMAC offers the potential of parallel computation with high flexibility; it can improve the controller's response time, important for robotic dynamic tracking.The fast convergence of its algorithm is essential for online adaptation.Therefore, the CMAC is used in the adaptive control part of the proposed control strategy.
CMAC is an associative memory neural network in that each of inputs maps to a subset of weights whose values are summed to produce outputs.An important concept used here is generalization that assumes that similar states require similar control efforts.The use of generalization speeds up learning because a group of memory cells that are close is updated in each control cycle.Generally, all the memory cells in a hypercubic region are updated in each control cycle.On the other hand, input vectors that are far away from each other will generate independent outputs [1].
The Cerebellar Model Articulation Controller (CMAC) network was first developed by Albus [48] to approximate the information processing characteristics of the human cerebellum.Miller [49] later developed a practical implementation of the CMAC neural network that could be applied to real-time control applications.
On a typical Albus CMAC neurons are called receptive fields and are organized as follows.The total collection of receptive fields is divided into L N layers.The layers represent parallel N-dimensional hyperspaces for a network with N inputs.The receptive fields in each of the layers have rectangular boundaries and are organized so as to span the input space without overlap.Any input vector excites one receptive field from each layer, for a total of L N excited receptive fields for any input.Each of the layers of receptive fields is identical in organization, but each layer is offset by a quantity L Q relative to the others in the input hyperspace.
The width of the receptive fields produces input generalization, while the offset of the adjacent layers input quantization.The ratio of the width of each receptive field to the offset between adjacent layers must be equal to L N for all dimensions of the input space.The integer parameter L N is referred to as the generalization parameter.
A two-dimensional CMAC (2D CMAC), is presented as an example.The structure of a 2D CMAC is shown in Fig. 3.The two-dimensional input vector is defined by two input variables, x 1 and x 2 , quantized into three discrete regions, called receptive fields.
It is noted that the width of receptive fields affects the generalization capability of the CMAC network.For the first layer, the variable x 1 is divided into receptive fields A, B, and C and the variable x 2 is divided into receptive fields a, b, and c.The areas Aa, Ab, Ac, Ba, Bb, Bc, Ca, Cb, and Cc formed by quantized regions are called hypercubes.
By shifting each block a small interval L Q , different hypercubes can be obtained.In Fig. 3, there are 27 hypercubes used to distinguish 49 different states in the 2D CMAC.For example, let the hypercubes Bb, Fe, and Hh be addressed by the state (x 1 , x 2 ) = (4, 3), only these three hypercubes are one, and the others are zero.The trained data are stored into these regions.The CMAC network is a local network.For a given input vector, only a few of the networks nodes (or hypercube cells) will be active and will effectively contribute to the corresponding network output.The general architecture of the CMAC network is shown in Fig. 4. The basic idea of the CMAC network is to store learned data into overlapping regions in a way that the data can easily be recalled but use less storage space.Furthermore, the action of storing weight information in the CMAC network is similar to that of the cerebellum in humans.

Robot
In the CMAC network used, each nonlinear output function i y of the CMAC network corresponds to one CMAC controller's output (torque) CMAC Γ i (with =1, 2 i ).
The vector of nonlinear output functions y = f(x) is approximated using two primary mappings, S: Q → A and P: A → D. Here, Q is a 4-dimensional input space corresponding to the angular position and velocity of joint 1 and joint 2, A is a A N -dimensional association space, and D is a 2-dimensional output space corresponding to the CMAC adaptive neural controller's torque .

CMAC Γ
The function S(x) maps each point x in the input space onto an association vector a = S(x)∈ A that has L N nonzero elements, with L N < A N .
For a conventional CMAC, the association matrix contains only binary elements, either zero or one.The function P(a) computes an output vector y by projecting the association vector onto a matrix T 1 2 [ , ] = W W W of adjustable weights so that each output i y can be obtained by evaluating the inner product of the two vectors a and i W with =1, 2 i . Finally, each actual output i y is derived as follows: where j a represents the j th element of the association vector a and , i j W the j th element of the weight vector i W with =1, 2 i .The basic concept of the adaptive CMAC neural network used in the second controller is to produce an output that forms a part of the overall control torque that is used to drive the manipulator joint to track the desired trajectory.
Errors between the joint's desired and actual position/velocity values are then used to train the CMAC neural controller.Training is made online and the weight adjustment W ∆ is given by: where d y and y are the vectors of the desired and actual outputs of the CMAC network, respectively.pn K and vn K are positive gain constants.β is the learning rate.

VII. SIMULATION ANALYSIS
Performance of the hybrid controller given in ( 22) is tested using a dynamic trajectory having a sinusoidal form: T is chosen equal to 20 seconds to avoid the destabilization of the control law induced by fast dynamics.
Parameters of the first controller as follows: Let suppose that the actual values of the parameters of the robot are such as specified in Table 1.To test the robustness of the control strategy proposed, the extreme case where the estimated values of the dynamic parameters of the robot: ) are considered the tenth of their actual values given in Table 1.
These estimated values are then used to compute r Α and r B and therefore r Α ΝΝ and r B ΝΝ .
This will drive the first controller to produce an incorrect torque.It is interesting to see how the second controller deals with this error and how it will correct it.
In order to better appreciate the effectiveness of the hybrid controller given in (6), its results will be compared with the nonlinear controller given in (4).
The goal here is to simulate an important error due to a bad estimation of the parameters (or ignorance of some of them).It is supposed that if the hybrid controller can handle this important error, it can a fortiori handle a small one.For simplicity on the simulation tests, dynamic parameters are equally bad estimated.Even if it is not always the case on practice, this will not affect the adaptive CMAC controller, which is in charge of compensating these errors, because this controller considers the global error (the resultant of the sum of all errors).Fig. 5 to Fig. 14 illustrate the results obtained with the hybrid controller applied to the two-link flexible manipulator.These figures describe the evolution of: angular position, error on position, deflection, angular velocity and error on the angular velocity, for the joints 1-2, respectively.Table 2 and Table 3 present the maximum error and the root mean square (RMS) error on the angular position and velocity obtained with the two types of control strategy used for the joints 1-2, respectively.
Results of the nonlinear control are reported in dashed line for comparison.The desired trajectory (target) is reported on Fig. 5, Fig. 8, Fig. 10 and Fig. 13 in dotted line.For the position control (see Fig. 5 and Fig. 10), it is noticed that the angular trajectory obtained with the hybrid controller matches perfectly the target, with an error of no more than 0.012 rad (0.7 deg) for the first and the second links (see Fig. 6 and Fig. 11), whereas it reaches 1.2 rad (69 deg) with the nonlinear controller (see Tables 2-3).
Velocity tracking with the hybrid controller is good (see Fig. 8 and Fig. 13) and the error induced is acceptable, whereas the nonlinear controller strongly deviates from the target.Velocity error obtained with the hybrid controller is lower than 0.024 rad/s (1.35 deg/s) for the first and the second links (see Fig. 9 and Fig. 14), whereas it reaches 0.696 rad/s (20.9 deg/s) with the nonlinear controller (see Tables 2-3).
The proposed controller deals well with the elasticity of the links (see Fig. 7 and Fig. 12).As the manipulator is on the dynamic phase of the movement, with an imposed position and velocity, the deflection of the links can't be avoided.The purpose here is rather to dampen the vibrations.It is noticed from Fig. 7 and Fig. 12 that whenever vibrations appear they are lessened.
With the nonlinear controller, the presences of high frequency oscillations at the tip of the links and in the angular velocity tracking are noticed.Using the nonlinear controller with faster trajectory and/or more flexible links lead to the destabilization of the trajectory control due to the presence of these oscillations.Here a better behavior of the trajectory tracking system is achieved with the hybrid controller.Results obtained demonstrate the good performance of the proposed control strategy.

VIII. CONCLUSION
The goal here is to search for control techniques that improve the performance of flexible manipulators on the dynamic phase of the trajectory and reduce the computational burden.
The main idea is to combine two control techniques, nonlinear control and neural network control.
The new control strategy presented is composed of two controllers.A static feed forward artificial neural network controller and an adaptive CMAC neural network controller.The first controller is elaborated by approximating the robot's dynamic equation of motion with an artificial neural network and adding a proportional and derivative term.The aim of the first controller is to provide a stable and fast control, based on the dynamic model of the system.While the first controller provides the main of the control, the adaptive CMAC neural network strategy ensure that the real trajectory matches the desired one by compensating errors due to structured and unstructured uncertainties, increasing the precision of the control.
Using ANNs in the place of the nonlinear model allowed simplifying the structure of the controller reducing its computation time and enhancing its reactivity.
Simulation results on a dynamic trajectory with a sinusoidal form show the effectiveness of the proposed control strategy.
Despite obtaining an efficient control structure, current effort does not include a stability analysis of the overall control scheme.Future work includes exploiting sliding mode control to improve stability and performance of the control strategy proposed.

Fig. 1 . 1 M
Fig. 1.Two-link manipulator with flexible arms Let us consider an arbitrary point 1 M on the link 1.The expression of 1 M in the moving coordinate frame { } 1 1 1

J 2 O
are, the mass moment of inertia at the origin and at the end of link i, respectively.Note that the first and the second terms on the right-hand side in(8) are kinetic energy of the flexible links 1 and 2, respectively.The third term is due to moment of inertia of the portion of the mass of the first actuator relative to link 1.The fourth and the fifth terms are due to moment of inertia of the portion of the mass of the second actuator in relation to link 1 and portion of the mass of the second actuator in relation to link 2, respectively.The sixth term is due to moment of inertia of mass at C (payload).The seventh and the eighth terms are kinetic energy of mass at and C respectively.