SVM-Based Control System for a Robot Manipulator Regular Paper

Real systems are usually non‐linear,  ill‐defined, have  variable  parameters  and  are  subject  to  external disturbances.  Modelling  these  systems  is  often  an approximation  of  the  physical  phenomena  involved. However,  it  is  from  this  approximate  system  of representation that we propose ‐ in this paper ‐ to build a robust  control,  in  the  sense  that  it  must  ensure  low sensitivity  towards  parameters,  uncertainties,  variations and external disturbances. The computed torque method is a well‐established robot control  technique which takes account of the dynamic coupling between the robot links. However,  its main disadvantage  lies on  the  assumption of  an  exactly  known  dynamic  model  which  is  not realizable in practice. To overcome this issue, we propose the  estimation  of  the  dynamics model  of  the  nonlinear system with a machine  learning  regression method. The output of this regressor is used in conjunction with a PD controller to achieve the tracking trajectory task of a robot manipulator.  In  cases where  some  of  the  parameters  of the  plant  undergo  a  change  in  their  values,  poor performance may  result. To  cope with  this drawback,  a fuzzy  precompensator  is  inserted  to  reinforce  the  SVM computed  torque‐based  controller  and  avoid  any deterioration. The theory is developed and the simulation results are carried out on a two‐degree of freedom robot manipulator to demonstrate  the validity of the proposed approach.


Introduction
For many years, the problem of controlling highly nonlinear systems has received much attention within the control community, especially fast manipulation control.As a result of the strong need to find easy and robust methods to control robots, many solutions have been proposed.When the controlled part of the process is slightly disturbed, classical control laws -such as PIDmay be sufficient if the accuracy requirements and system performance are not too severe.Otherwise, control laws must be developed that ensure the robustness of the processes' behaviour in the face of parameter uncertainties and variations.
One of the most popular and famous techniques is inverse dynamics control -also called the computed torque control.Borrowed from the rigid robot manipulator [1], it can be easily applied to many other nonlinear systems [2].This technique offers a wide variety of advantages.However, it requires precise knowledge of the analytical model of the system in order to compute the feed-forward torques required for the execution of trajectory tracking.Nevertheless, the dynamics of robot manipulators are coupled and highly nonlinear.They contain uncertainties such as friction and un-modelled nonlinearities.This is why a precise model cannot be obtained and why many efforts have been deployed to solve the problem of dynamic uncertainties.Many robot adaptive controllers have been proposed to solve the problem of parameter uncertainties and disturbances.However, few have been proposed to deal with both dynamic and kinematics uncertainties [3,4].To deal with these issues, researchers have demonstrated the positive use of neural networks in learning system uncertainties [5] and in helping in the generation of control laws [6,7,8].In fact, instead of generating the feed-forward signal mathematically, it can be learnt from the feedback signal using neural networks.However, neural networks often suffer from the curse of dimensionality and the over-fitting problem.The theory and application of fuzzy logic is another tool used to control such highly nonlinear systems [9,10].It uses fuzzy linguistic variables and fuzzy logic to allow for smooth interpolation.Fuzzy logic is an alternative way to model human expertise.In [11], the authors combined the advantages of fuzzy and neural network intelligence to improve the overall learning ability and achieve robust control.In our previous work [12], we combined a PID controller with a fuzzy precompensator to control a robot manipulator tracking a pre-specified trajectory.We used fuzzy logic to design a precompensator on the basis of decision-making rules.It is tuned to minimize the output error when the PID controller exhibits significant steadystate error.However, fuzzy control methodology requires the tuning of membership functions and may not scale well to complex systems.It deals with imprecision and vagueness, but not with uncertainty.
Recently, Support Vector Machines (SVMs) have been introduced by Vapnik as an intriguing alternative machine learning method.They were originally designed for pattern recognition and classification tasks [13], and have been successfully used in a wide variety of classification problems, such as 3D object recognition [14], biomedical imaging [15], image compression [16] and remote sensing [17].Furthermore, they exhibit very interesting behaviours when extended to solve regression and function approximation problems.SVMs do not suffer from the over-fitting problem and have a good generalization property.SVMs are based on the idea of structural risk minimization, which shows that the generalization error is bounded by the sum of the training error and a term depending on the Vapnik-Chervonenkis dimension.By minimizing this bound, high generalization capabilities can be achieved.In [18], the authors survey recent developments in the research and application of SVMs in intelligent robot information acquisition and processing.A comparison between two non-parametric regression methods for model approximation is proposed [19].The outcomes yield positive results to the detriment of high computational cost.
Based on the work of Cheah et al. [20], in which they propose an adaptive Jacobian controller for the trajectory tracking of robot with uncertain kinematics and dynamics, we propose to exploit support vector regression for designing an efficient and robust control law to track robot trajectories.As an extension to our previous results [21], this paper studies this subject thoroughly.Uncertainties in robot parameters and nonlinearities can be dealt with more efficiently than model-based techniques.To avoid using online learning, we propose offline learning for the modelʹs system.This model is not overly sensitive to disturbances.This is explained by the fact that the complexity of the modelʹs representation by support vectors is independent of the dimensionality of the input space and depends only upon the number of support vectors.To further improve the performance of the above approach and ultimately lessen error bounds in case the robot undergoes changes in its kinematic and/or dynamic parameters, a fuzzy precompensator is inserted as reinforcement to the proposed scheme [12].Simulations are carried out on a two-degree robot manipulator.The effectiveness of the proposed controller is demonstrated for different operating conditions and the results are very satisfactory.This paper is organized as follows: Section 2 formulates the robot dynamic equations; Section 3 presents the inverse dynamic control concept; Section 4 presents the SVM regression technique and model estimation with non-parametric regression techniques; Section 5 presents the development of the fuzzy precompensator; Section 6 describes the way the fuzzy rule base is obtained using evolutionary programming; Section 7 reports the simulations' results and how the proposed approach provides positive outcomes, thereby justifying their applicability; finally, Section 8 concludes the paper.

Problem formulation
The dynamic equations of the robot manipulator are found through the use of the Lagrangian formulation, and the dynamic equation of an n-degree of freedom manipulator can be written as: where n q   is the generalized joint coordinate; nxn M(q)   is the symmetric positive definite inertia matrix, bounded as (q)I m M(q) I m   for some constant m and function (q) m , vector n q ) q C(q,     presents the centrifugal and Coriolis torques, bounded as the vectors of gravitational torques and friction respectively, bounded as q a a ) q F( G(q) , and n τ   is the vector of applied joint torques.The design of the controllers for the fine motion of the manipulator may be considered in two stages: the primary controller, which is nothing but the inverse dynamics of the manipulator inserted in the feedforward path to compensate for the nonlinear effects and which attempts to cancel the nonlinear terms in the model.However, the mathematical model used is usually not exact, and since the system is subject to disturbances, undesirable errors can be corrected by means of an additional controller, called a secondary controller (cf.Fig. 1).

Inverse Dynamics Control
Let us consider the robot dynamics given by equation (1).The objective in using the inverse dynamic control is to eliminate the nonlinearities in the dynamics, as shown in Fig. 1.The inverse dynamic control technique is based on a controller command apprehending a priori knowledge about the system written in a dynamic model.This approach is often referred to as the computed torque method.Since the control objective is trajectory tracking in a joint space, the desired trajectories are joint angles, velocities and accelerations.The tracking errors are defined as: where the measurements of q and q  are required in the subsequent design.To conform to the inverse nonlinear control given in Fig. 1, we rewrite equation (1) as: where: V(q,q) = C(q,q)q + G(q) + F(q)     (4)  V(q,q) is a term that contains all the forces acting on the system.The functions C, G and F are defined as above.The problem is to determine the input vector (t) so that q(t) will track the desired trajectory d q (t) with tolerable errors.The input will be generated as : where: and:   d d d q , q q and denote the desired position, velocity and acceleration, respectively.Under ideal conditions and perfect knowledge of the parameter values with no disturbances, controller (6) causes the exact cancellation of the nonlinear expression in equation (3); that is, if V(q ,q ) = V(q,q) , d M(q ) = M(q) and (0) q q(0) d


, then (t) q q(t) d  for all t  0. The implementation and the proper operation of the primary controller in equation (6) require that the dynamical model and the numerical values of the parameters are accurately known.If this is not the case, the cancellation of the nonlinear terms may not be perfect.Therefore, the secondary controller given by equation ( 7) is needed to compensate for the effects of internal modelling errors and disturbances.It will regulate small deviations of the system response about a nominal trajectory.Hence, it will be designed on the basis of a model obtained by the linearizing equation ( 3) about the pre-specified trajectory.For the analysis of the control system specified by equations ( 3) and ( 5), the following equalities are assumed: After substituting equation (3) into equation ( 5) and recognizing the relations (8) in the resulting equation, we obtain the following error equation: The stability and the dynamics of the error are controlled by the feedback gains p K and v K .They can be chosen so that the error equation is stable [1].They can, for example, be tuned so that the eigenvalues of system in equation ( 8) assume the values that result in the acceptable responses of the system states.Unfortunately, in practice, robot dynamics cannot be modelled exactly; they are usually subject to torque disturbance and/or modelling errors.In this case, the closed-loop system will be different to that of equation (9).By equating equations (3) and (5) and by taking the estimates of d M(q ) and  d d V(q ,q ) as  M(q) and   V(q,q) respectively, we obtain: e + K e + K e = M (q) M(q)q + V(q,q) + νʹ (10) where represent errors in the dynamic model.ν ʹ is a vector function due to all the disturbances being completely unknown, but it is known to be upper bounded.The error equation ( 10) may be written in the form: where  θ is the vector of the parameter errors and   Y(q, q, q) is a matrix of functions.
In this work, and instead of using the analytical dynamics model and mathematically computing the required feedforward compensation, we propose to use a kernel regressor to learn the feed-forward torques and a servo feedback control scheme to improve robustness.This may have the advantages of not only approximating and compensating for unknown system functions but also for unknown system properties, such as friction.In this case, and in absence of unknown disturbances, the second term of equation ( 10) is zero and the stability and the dynamics of the system are governed by equation (9).In the sequel, the learning feed-forward control is developed using the support vector machine (SVM).
If we approximate the model using a regression technique, equation ( 5) is changed to: u T(q , q , q ) M(q ) K e K e (12) such that T(q , q , q ) = M(q )q V(q , q ) ,  d M(q ) and   d d V(q , q ) are the approximate of d M(q ) and  d d V(q , q ) respectively, determined by an appropriate kernel regressor.Actually, the inverse dynamics control based on SVM models will have the structure shown in Fig. 2. x feature space X.To each vector i x , we associate a target i y  {−1, +1}.The linear SVM classification approach consists of looking for a separation between the two classes in X by means of an optimal hyperplane that maximizes the separating margin.In the nonlinear case, which is the most commonly used since the data is often linearly non-separable, they are first mapped with a kernel method in a higher dimensional feature space, i.e. , where f(x) represents the discriminant function associated with the hyperplane in the transformed space and is defined as: The optimal hyperplane defined by the weight vector is that which minimizes a cost function that expresses a combination of two criteria, namely: 1) margin maximization and 2) error minimization.It is expressed as: This cost function minimization is subject to the constraints: and: where i ξ is the so-called slack variable introduced to account for non-separable data.The constant C represents a regularization parameter that allows the control of the shape of the discriminant function and, consequently, the decision boundary when data is non-separable.The above optimization problem can be reformulated through a Lagrange function for which the Lagrange multipliers can be found by means of a dual optimization leading to a quadratic programming solution [22], i.e.: Under the constraints:  is the vector of the Lagrange multipliers.The final result is a discriminant function conveniently expressed as a function of the data in the original dimensional feature space X.

Now, rather than dealing with outputs y {±1}
 , regression estimation is concerned with estimating real valued functions.The SVM regression technique stems from the idea of deducing an estimate   ĝ x of the true and unknown relationship   y = g x between the vector of observations x and the desired biophysical parameter y from a given set of T N training samples.In our case, T N will include labelled as well as semi-labelled samples, such that ĝ(x) , first, has a maximum deviation from the desired targets i y , (i=1,…, NT) and, second, is as smooth as possible [22].This is usually performed by mapping the data from the original d-dimensional feature space to a higher dimensional transformed feature space -i.e., -in order to increase the flatness of the function and to approximate it in a linear way as follows: where w * is a vector of weights and b * is the offset.'Flatness' means that one seeks a small w, and one way to ensure this is by minimizing the norm -i.e.  2 w .The optimal linear function in the higher dimensional transformed feature space is that which minimizes the following cost function: Subject to the following constraints: (20) where  > 0 is a predefined constant which controls the noise tolerance.
where K(,) is a kernel function and W is the subset of indices (i=1, 2, …, NT) corresponding to the non-zero Lagrange multipliers i α or * i α ʹ s .The training samples associated to non-zero weights are called support vectors.
The kernel K(,) should be chosen so that it satisfies the condition imposed by Mercer's theorem [25,26].
Examples of common nonlinear kernels that fulfil Mercer's condition are the polynomial and the Gaussian kernel functions.

Robot Model Estimation with Support Vector Regression
In this second part of the section, we will generate the approximate model of the robot manipulator with nonparametric regression techniques.We consider a twolink robot manipulator whose dynamics equations are derived using the Euler-Lagrange formulation.Based on relation (6), the equations of the motion of the two-link manipulator are expressed for each joint as: τ = M (q)q , τ = V (q ,q ), τ = M (q)q , τ = V (q ,q ) where T 1

M and T 2
M are the row vectors of the inertia matrix and 1 V and 2 V are vectors regrouping the terms of the Coriolis and centrifugal torques as well as the gravity and friction torques.A model identification procedure is carried out to identify these terms using SVM regression.Each term is identified separately to getat the end -four approximate models, namely M , M , V and V which are used to generate the following approximate robot manipulator torques: The purpose of the PD-controller is to servo the system so that the actual displacement of the joint will track a desired angular displacement specified by a pre-planned trajectory.The starting point is the use of the desired joint angle, velocity and acceleration trajectories to generate the corresponding torques for every sampling time.The obtained torque vectors are stored with the position, velocity and acceleration vectors in lookup tables to be referred to afterwards by the SVM regressor for training.
The entries of the svmtrain function are, consequently, the torques V and V .In this work we have adopted the nonlinear SVM regressor based on the Gaussian kernel [27] as a result of the good performances generally achieved by this type of kernel.It is worth mentioning that the performance of SVMs depends on the choice of kernels and there is no theory which states a way to choose good kernels but rather experiment with specific problems.A typical example of such a kernel is represented by the Gaussian function: where the parameter γ is inversely proportional to the width of the Gaussian kernel.
During the training phase, the SVM regressor was selected according to a k-fold cross-validation (CV) procedure by first randomly splitting the training data into k mutually exclusive subsets (folds) of equal size [28].Then, we trained, k times, an SVM classifier modelled with the predefined values of C and γ.Each time, we left out one of the subsets from training and used it (the omitted subset) only to obtain an estimate of the classification accuracy.From k instances of training and mean square error computation, the average accuracy yielded a prediction of the regression accuracy of the considered SVM regressor.The best SVM regression parameter values were chosen to maximize such a prediction.It is noteworthy that when k is equal to the number of samples, the k-fold CV becomes a leave-oneout CV procedure.

Discussion
To study the stability of the system, consider equation ( 9) which describes the evolution of errors relative to the desired trajectory.If the model is perfect and if there is no noise and no initial error, There will be an exact tracking trajectory.In fact, the values of the gains Kp and Kv can be adjusted so that the eigenvalues of the system in equation ( 8) assume values that result in acceptable responses to the system states.However, and in case of any inaccuracy in the manipulator model, the analysis of the resulting closed-loop system becomes difficult and the stability of the system may be lost.To overcome this problem, we proposed a support vector machine in learning feedforward control.The advantage of this scheme is its ability to learn unknown system properties -such as friction -that can be compensated in this way.
Unfortunately, some external disturbances or noise cannot be compensated and instability may result.This leads us to propose -in the next section -a fuzzy precompensator, which when added to the proposed scheme helps in obtaining good transient responses and stability in face of disturbances and noise, and discards any analysis of any eventual solution of the differential equation governing the system.

Analysis and Design
In order to compensate for losses, a fuzzy precompensator is integrated into the existing system.This is simply achieved by placing it in front of the SVMinverse dynamics controller (Fig. 3).The fuzzy precompensator compensates for dynamic changes in the system and unpredictable external disturbances.It helps the inverse dynamics controller to provide the necessary actions that allow the end effector track the desired trajectory with minimum errors.The block diagram of the precompensator is shown in Fig. 4.
The two inputs to the PD controller are e (k) i and e (k) i  , where: is the trajectory tracking error vector and its first-order derivative is given by (26), where i refers to the i -th joint and n to the number of joints.
The output of the precompensator is considered now as the new reference input to the system; one can write: (28) where:

Stability Analysis
The presence of the fuzzy precompensator introduces a new joint position reference c q , such that: In this case, ( 11) is rewritten as: where To study the stability of the tracking errors, we start by writing the system (31) in the state space: where Bν is a 2nx1 with an upper bound.
A is the Hurwitz matrix: In [27], it is seen that the adaptive control system designed for structured uncertainties will exhibit robustness in relation to bounded external disturbances.If we can compensate for the disturbing terms in equation (32), we may obtain disturbance rejection over the entire workspace of the robot manipulator.This can be done by synthesizing fuzzy control rules from human experts or using evolutionary algorithms.Our task is to guarantee the stability of the closed system in the sense that the state x remains uniformly bounded in face of parameter uncertainties and unknown disturbances.Looking at Fig. 4, the 2nx1 vector function approximator = F(e, e) is used to compensate any disturbances by providing the right amount of signal.Let us define the Lyapunov function candidate: where P is a symmetric positive definite matrix satisfying the Lyapunov equation: for a given symmetric, positive definite matrix Q.Because A is stable, such P always exists.Using ( 32) and ( 35), the time derivative of V is obtained as: Our goal is to design c u such that   V 0 -i.e., the controller c u guarantees that x is decreasing.Therefore we should always have: To implement this command online, the fuzzy precompensator should provide the quantity that should be added in such a way that constraint (37) is always satisfied.Therefore, the idea is to analyse the output response.
An increase in the command signal is needed whenever the error is around zero and the change-in-error is negative.Correspondingly, an increase in the command is necessary when we observe an increase in the error and the change-in-error.The other rules are obtained in a similar manner.For example, suppose that the error is zero and that the change-in-error is negative.This means that the output is increasing, heading in the direction of an overshoot.To compensate for this, we have to decrease the command signal.This corresponds to applying a correction term that is negative.The fuzzy precompensator is based on the Takagi-Sugeno type fuzzy model [30].The realization of the function F[e(k),Δe(k)] obeys the procedures of fuzzification, fuzzy rule inference and defuzzification.Each membership function is a map from the universe of discourse to the interval [- where  i is the support value at which the membership function reaches the maximum value and (k) is the consequent of the i -th implication; the weight (  i ), implies the overall truth of the premise of the i -th implication, calculated as: CF is a scaling factor, defined for the three universes of discourse and whose values are chosen as: CFe=3.15;CF  e=5; CF  =10.0.The main difficulty in designing a fuzzy logic controller is the efficient formulation of the fuzzy If-Then rules.It is well-known that if it is easy to produce the antecedent parts of a fuzzy control rule, it will be difficult to produce the consequent parts of the rules without expert knowledge.The derivation of such rules is often based on the experience of skilled operators, the use of heuristic thinking [31,32] or by modelling an expertʹs action [33].

Evolutionary Programming
In recent years, due to the availability of powerful computer platforms, the theory of evolutionary algorithms gained popularity to the problem of parameter optimization, although its origins can be traced back to the 1960s.They represent a well known family of optimization methods that have proven very attractive both for their stability and their effectiveness.These techniques have been exploited successfully in a broad range of applications including, for instance, biology, chemistry, control systems and image processing.This method is regarded as a parallel global search technique evaluating many points in the parameter space and it is more likely to converge towards a global solution.These algorithms perform a search by evolving a population of candidate individuals modelled with "chromosomes".From one generation to the next, the population (set of candidate individuals) is improved by mechanisms inspired by genetics -i.e., through the use of both deterministic and nondeterministic genetic operators.Evolutionary programming (EP) is used to obtain the optimal consequent parts of the fuzzy precompensator rules.

Representation
Each individual chromosome represents a complete rulebase solution.
The components (a = m , a = m , ... , a = m ) determine the consequent parts of the fuzzy rules, and the remaining components i I designates the i -th individual in which aj describes the j - th consequent part and the standard deviations, as was defined above.The algorithm seeks many local optima and increases the likelihood of finding the global optimum representing the problem goal.

Initialization
The algorithm is initiated by designating an initial population formed by 20 identical individuals.The number 20 is only an experiment number.Each solution is taken as a pair of real-valued vectors ( )=number of rules. i m is the consequent part vector of the fuzzy If-Then rules and is an adaptable standard deviation vector.Initially, chromosomes in the current population are selected for reproduction according to the roulette wheel spinning method [34].The adaptable standard deviations i have been assigned an ad hoc choice of  σ 0.05 i ; i=1,...,49.

Evaluation
The fitness function is evaluated for each set of rules and based on the function chosen to be: where:

Generation
Generation in EP differs from that in GAs.The variation operators such as crossover and mutation perform differently.In fact, one child from one parent is generated by adding a normally distributed random value with an expectation zero and a unity standard deviation [35] as: respectively, where n is the total number of rules to be evolved (in our case, n=49).
To help the system operating in a convergence and a stable region, certain constraints are utilized that are derived when the following assumptions are made: The values -2 and 2 are chosen as lower and upper limits, successively and arbitrarily.To explain the natural meaning of the above assumptions, it is necessary to establish the link that gives input and output values based either on experience, a system step response or phase plane trajectory, so as to form the rule base.For example, if the reference signal is kept constant while the error is positive and the error change is negative, this means that the output is increasing towards an overshoot.Therefore, the input to the system should correspond to a negative value.After creating the new generation, a fitness score is evaluated for each new member m i  .

Selection
The next generation is selected based solely on the fitness values of the individuals.The selection is conducted by taking a random uniform sample of individuals of a size equal to half the population size among that of all the parents and offspring.Each solution from offspring and parent individuals is evaluated against the ʺqʺ randomly chosen individuals.For each comparison, a ʺwinʺ is assigned if an individual score is better than or equal to that of its opponent, and the 20 new individuals with the greatest number of wins are retained as parents for the next generation.Their associated adaptable standard deviations are included.

Computer Simulation and Comparison
For simulation and comparison and without lost of generalities, a two-link robot manipulator was used to analyse and test the performance of the proposed approach.The rigid manipulator was modelled as two rigid links of lengths l1=0.432m and l2=.0432m with corresponding masses m1=15.91Kgand m2=11.36Kg.
The simulations were carried out using the fourth-order Runge-Kutta algorithm, with the step h=0.01.The objective is to track the desired joint trajectories chosen to be: Two Matlab SVM libraries are used.The trainer SVM classifier, svmtrain, has the following syntax: model=svmtrain(training_label_vector,training_inst ance_matrix,ʹlibsvm_optionsʹ) ( and the prediction class of the new input data according to a pre-trained model, svmpredict, having the following syntax: During the training phase, we used a 3-fold CV, whereas the values of C and γ are found to be (8192, 0.25), (2048, 0.25), (5064, 0.25) and (1991, 0.25) for the four models M , M , V and V respectively.It is worth mentioning that the quality of SVM models depends on the proper settings of the SVMs' meta-parameters.However, there is no consensus on a given method for the choice of these parameters.In our case, the parameters are determined by a simple loop using a prepared Matlab script, summarized by the following algorithm:
Step 2) Set the initial value and the final value of cost C Step 3) Set the initial value and the final value of  in the kernel function Step 4) Train an SVM classifier on the feature Space and assign the result to rate equ.(46) Step 5) If the rate is greater than or equal to best_rate, set best_rate as equal to rate, best_C as equal to C and best_ as equal to .
Step 6) Increment  by some amount Step 7) If  is not equal to final ,go to step 4 Step 8) Increment C by some amount Step 9) If C is not equal to Cfinal, go to step 4

End
The ε value of the intensive tube was fixed to 10 -3 .On the other hand, the rule base of the fuzzy precompensator is found by running the evolutionary algorithm with a population of 20 for about 500 generations.The resultant rule-base is depicted in Table 1.
First, the classical computed torque controller is implemented.As stated before, the values of the gains p K and v K can be adjusted so that the eigenvalues of the system in equation ( 9) assume the values that result in the acceptable responses of the system states.
To have an idea of the precision of the system, we propose to evaluate the proposed scheme in terms of the rising time and the settling time.We tested the position control in terms of RMS values, given by equation ( 48), when the first joint is made to move from 0 to (/4) and the second joint from 0 to (-/4).  The simulation is carried out for the three cases for a lap of time equal to 1.12 sec.We report in Table 2 the results of the simulations, from where it is clear that the SVM precompensated system based on computed torque provides better results compared to the computed torque and the computed torque-based SVM approaches.Moreover, we show in Figs.On the other, and for better illustration, we have plotted the desired and measured trajectories to show the tracking performances of the three techniques without perturbation (Figs. 8, 9 and 10).One can see that the tracking performances are excellent, since nonlinearities are cancelled.
The trajectory tracking obtained using the SVM regressorbased inverse dynamic control which shows excellent tracking and a surprisingly better curve response in the transient part of the first joint -as can be seen in Fig. 9 -as determined by the accuracy of the regression model.These results illustrate the good performance of the SVM regression algorithm in approximating nonlinear functions and does not care about errors so long as they are less than , but will not accept any deviation larger than this.
The transient responses for the two joints are further improved (Figs. 10) when inserting the fuzzy precompensator in the previous configuration.In fact, the fuzzy precompensator is designed such that the inputs act like input reinforcement having the amount that must be added to the process input to compensate for current poor performances.
To see the precision performance when perturbations are added, simulations were carried out by suddenly doubling the mass of the second link at time 2.5 sec and changing the values of both the viscous and Coulomb friction coefficients at the learning stage.In this case, the precision is relatively degraded for the computed torque method because the original design is perturbed and the parameters of the PD controller need to be updated to new values (cf.Figs.11).
However, for the SVM regressor-based inverse dynamic control, the error tolerance seems to be much better for the two joints (Figs.12).We explain this fact by the concept that states that the complexity of the modelʹs representation by support vectors is independent of the dimensionality of the input space, depending instead only upon the number of support vectors.Now, to further improve the performance of the above approach and achieve global asymptotical tracking with fast transient responses and disturbance rejection, we activate the precompensator in the controlled system.In this case, the system can track the reference input much better despite any disturbances, as shown by Fig. 13.The evolution of joint position errors are depicted in Figs.14, 15 and 16.They illustrate the tracking performances experienced by each method.One can note that in the absence of perturbations, the performances are almost the same.However, in presence of perturbation, the tracking performances are degraded for the computed torque and the SVM-based inverse dynamic, but remain adequate for the SVM-based inverse dynamics reinforced with the fuzzy precompensator, as is depicted in Figs.17, 18 and 19 respectively.In fact, with the third scheme the maximum position errors are effectively decreased.This could be explained by the ability of the fuzzy precompensator to work around the goal positions, even though the PD controller parameters need not to be well tuned.
On the other hand, the quality of tracking can be measured in terms of the normalized mean square error, defined as the Mean squared error/variance of the target, given by expression (49) as: where: and N is the number of samples.
Table 3 gives the normalized squared error (nMSE) of the three studied methods when no perturbation is considered.When analyzing the results obtained, we come to the conclusion that the proposed novel approach attained excellent performances and that it is not contingent upon any assumptions related to the actual system.Comparing control quality using the three methods, the nMSE of the modelled system is mostly the same as the real system, due to better approximation.
Using the required stored torques, we can solve for the time-consuming torque calculation, for which the values have to be provided as fast as the servo-loop.The role of the fuzzy precompensator is obvious through the results obtained in Table 4, which shows the performances achieved by this controller when the system is perturbed.
It is also important to have an idea of the effort developed on the joints.If we assume that each joint is driven by a DC motor via a transmission gear system, the control inputs are obtained in terms of voltage by multiplying the calculated torques by , where N represents the gear ratio and m K is the torque constant, such that: for the first DC motor satisfactory, as is clear from Figs. 22 and 25.The demand in energy to conduct the experiment with this controller is much less than that of its predecessors.Moreover, one can reduce any initial chattering by carefully tuning the scaling factor CF in (37) or by choosing small initial amplitude responses.Comparing the three approaches, we come to the conclusion that the proposed scheme has the significant advantage in improving performance relative to the computed torque or the fixed gain controller.The simulation results showed that the computed torque based on SVM learning is a very interesting approach when a precise model of the robot manipulator is unknown or when the system is confronted with disturbances and uncertainties.SVMbased computed torque can achieve a relative low tracking error.In cases where high performances are needed, we can always support SVM-based computed torque with a fuzzy precompensator, which provides the amount needed by the plant when variations in the load or changes in the parameters of the plant are observed.

Conclusion
In this paper, we propose a novel approach to nonlinear system control based on model dynamic compensation using one type of regressor brought from machine learning concepts, reinforced by a fuzzy precompensator.The idea is based on the computed torque method, which has been one of the successful tools used to control robot manipulators, since it eliminates the nonlinear parts of the system allowing the mechanical system to be controlled solely by a servo feedback PD controller.Unfortunately, the computed torque method gives rise to some drawbacks due to uncertainties in parameters and unforeseen perturbations.In this work, we propose a kernel regressor which is used to predict the feedforward torques when the desired trajectories are given.The learning is done offline and the results are most likely comparable to the computed torque method.The introduction of the fuzzy precompensator within the controlled system demonstrated improved performances due to fast transient responses and disturbance rejection.For the purpose of comparison, we included in the simulation results obtained by the computed torque control method.The simulation results show a better tracking trajectory, achieved by the SVM-based inverse dynamics control whenever any variation in the parameters occurred.Disturbance rejection and sensitivity were further improved when we inserted the fuzzy precompensator as part of the controller in order to reinforce the previous actions.All the simulation results were presented to demonstrate and prove the simplicity and the applicability of the SVM regression approach reinforced by a fuzzy precompensator to stabilize the robot manipulator with reduced steady-state error and less demand on effort.

Figure 1 .
Figure 1.Primary and secondary robot manipulator control

Figure 2 .
Figure 2. SVM-based inverse dynamics control 4. Support Vector Regression and Model Estimation 4.1 Regression with the SVM For a better understanding of the support vector machine, let us first consider a supervised binary classification problem.Let us assume that the training set consists of N vectors   d i >d).The membership decision rule is based on the function sgn[f(x)]

1 3 ττ
and τ , as well as the position and acceleration vectors needed to implement   and τ , as well as the position and velocity vectors, are needed to implement   1 2

9 F 10 Φ
= PE.TE (42) j N (0,1) indicates that the random variable is sampled anew for each value of the counter j.The step size  is controlled by equation (44).The parameters  and ʹ are the learning rates and adopt the conventional values of 5, 6 and 7 the input step responses when the two links are moving in opposite directions.One can see the better performances observed on the computed torque-based SVM reinforced by the fuzzy precompensator (Figs.7).The robustness of the last controller is obvious compared with the other two controllers when unknown payloads are added.In fact, this controller succeeded in rejecting the perturbation and maintaining its desired step response.On the other hand, the other two controllers show mediocre performances when the plant is perturbed, and the outputs move away from their desired step responses (Figs.5 and Figs. 6).

Table 1 .
Fuzzy logic rules for the precompensator.

Table 2 .
Values of the position tracking error as RMSE.

Table 3 .
23 report on Figs.20, 21 and 22 the curves of the control inputs when the robot manipulator evolves over the entire workspace without perturbations.On the other hand, we depict in Figs.23, 24 and 25 the curves of the control inputs when the robot manipulator is perturbed by doubling the mass of the second link.The comparison between the Figures shows that the controller has compensated for the mass disturbance by an increase demand in energy.There is no doubt that the results obtained by the SVM-based computed torque controller enhanced with the fuzzy precompensator are highly Tracking error as the nMSE for each joint using reference trajectories without perturbation

Table 4 .
Tracking error as the nMSE for each joint using reference trajectories with perturbation.