Computationally Efficient Adaptive Type-2 Fuzzy Control of Flexible-Joint Manipulators

Author to whom correspondence should be addressed; E-Mail: wgueaieb@eecs.uottawa.ca;Tel.: +1-(613)-562-5800; Fax: +1-(613)-562-5664.Received: 1 April 2013; in revised form: 4 May 2013 / Accepted: 13 May 2013 /Published: 21 May 2013Abstract: In this paper, we introduce an adaptive type-2 fuzzy logic controller (FLC)for ﬂexible-joint manipulators with structured and unstructured dynamical uncertainties.Simpliﬁed interval fuzzy sets are used for real-time efﬁciency, and internal stability isenhanced by adopting a trade-off strategy between the manipulator’s and the actuators’velocities. Furthermore, the control scheme is independent of the computationally expensivenoisy torque and acceleration signals. The controller is validated through a set ofnumerical simulations and by comparing it against its type-1 counterpart. The ability of theadaptive type-2 FLC in coping with large magnitudes of uncertainties yields an improvedperformance. The stability of the proposed control system is guaranteed using Lyapunovstability theory.Keywords: type-2 fuzzy control; uncertain systems; robot manipulators; ﬂexible structures;adaptive control1. IntroductionFlexible-joint manipulators offer several advantages with respect to their rigid counterpart,such as light weight, lower cost, smaller actuators, larger work volume, better manoeuvrability


Introduction
Flexible-joint manipulators offer several advantages with respect to their rigid counterpart, such as light weight, lower cost, smaller actuators, larger work volume, better manoeuvrability and transportability, higher operational speed, power efficiency, and larger number of applications.Thus, they are often required to operate at high speed to yield high productivity.The conflicting requirements between high speed and high accuracy make the robotic control task a challenging research problem.Reducing the weight of the arms and/or increasing the operation speed make many industrial flexible-joint manipulators face arm vibration problems, particularly in high speed motion, because of the low stiffness.This can be resolved by increasing the stiffness.However, it increases the mass, depleting the advantages listed above.Typical challenges include severe friction nonlinearities, coupling stemming from the manipulator's flexibility, varying operating conditions, structured and unstructured dynamical uncertainties, and external disturbances.
Flexibility and nonlinear friction may have some destabilizing effects when failing to compensate for modeling uncertainties in controlling flexible structures.These phenomena have been thoroughly studied in many control systems for high quality servomechanisms.Several studies show these negative consequences, such as severe tracking errors, limit cycles, chattering, and excessive noise [1,2].Many control laws have been proposed for flexible joints [1,3,4], including classical, robust and adaptive control laws, using techniques such as singular perturbations and energy methods [5], but they generally consider (structured) parametric uncertainties only.Several models and compensation schemes have been proposed.Adaptive control techniques have been regarded among the most promising solutions to such type of problems.However, not much has been achieved yet for systems that exhibit both flexibility and severe nonlinearities.
Flexible-joint manipulators are governed by complex dynamics and hence controlling them depends on their dynamic models.There are many modeling techniques for mechanical systems, such as Lagrangian approach, Hamilton's principle, and Kane method.Yet, the system is inevitably subjected to the ubiquitous presence of high, particularly unstructured, modeling nonlinearities, such as Coulomb friction and external disturbances.The presence of such uncertainties on a manipulator driven through a flexible joint significantly changes the system's dynamics as opposed to when the load is driven with a rigid joint [6,7].In this case, solving the inverse dynamics of the system is not realizable since the motor position is not uniquely defined at standstill.This last condition also illustrates that the actuator's state cannot be observed continuously from the load output.Henceforth, only an approximate inverse model can be realized.Therefore, modeling the system's dynamics based on presumably accurate mathematical models cannot be applied efficiently in this case.This raises the urgency to consider alternative approaches for the control of this type of manipulator systems to keep up with their increasingly demanding design requirements.
Various control techniques were proposed over the years to control flexible-joint manipulators [8][9][10].De Luca et al. [11] and Khorasani [12] proposed feedback linearization-based controllers.However, these controllers depend on excessively noisy joint acceleration and jerk signal measurements and are hence unreliable in most real-world robotic systems.On the other hand, C. de Wit [13] proposed a robust control scheme for friction overcompensation due to uncertainties in friction models.Even as such, the suggested controllers require the full a priori knowledge of the system's dynamics.This problem has been partially overcome by several adaptive control schemes [14][15][16].Most of these control techniques capitalize on the singular perturbation theory to extend the adaptive control theory developed for rigid bodies to flexible ones [17][18][19][20].M. Spong [21] reduced the flexible-joint manipulators model to the standard rigid manipulators model as the joint stiffness tends to infinity.This model has been widely used by many researchers to achieve better tracking performance.For example, F. Ghorbel et al. [5] used a rigid manipulator's conventional method as slow controller and a fast feedback control law to damp out the oscillations of the joint flexibility modes.In a similar way, K. Khorasani et al. [22] illustrated how standard adaptive control schemes for rigid robots may be generalized for flexible-joint manipulators under a certain set of assumptions.Although many of these controllers are shown to be quite performant in theory, they failed to address important issues that might stand against their practical implementation, like basing the control laws on joint torques and their derivative [23,24], for instance, which are well known to be extremely noisy in real-life applications.
Moreover, such type of control algorithms uses online continuous estimation through well-defined adaptation laws of a set of the plant's physical parameters to approximate the system's dynamics.For it to provide a satisfactory performance, a typical adaptive control algorithm assumes that the dynamic model is perfectly known and free of significant external (unmodeled) disturbances.In other words, the controller is only robust to parametric or structured (also called modeled) uncertainties and possibly to minor unstructured uncertainties.Moreover, the unknown physical parameters must have constant or slowly varying nominal values.An explicit linear parameterization of the uncertain dynamics parameters also has to exist, and even if it does, it might not be trivial to derive, especially with complex dynamic systems.Although the latter condition is guaranteed for robotic systems, it might not be the case for many other dynamic models.Although some conventional adaptive control techniques, proposed in the literature, did indeed tackle external disturbance attenuation in addition to the compensation for parametric uncertainties, they did not take into consideration the effects of modeling uncertainties [14].
There is an increasing interest in developing new adaptive control schemes for robot manipulators [25,26].For example, in [25] an adaptive neural network based sliding mode control was developed.The authors in [27] developed a neural network and an estimator to estimate the external perturbation on flexible robot manipulators.This work does not consider uncertainty in the robot parameters and was validated in simulations only.In another work, an adaptive based output-feedback control strategy for global position stabilization was developed in [28].Although this work guarantees the adaptive regulation objective without the need for velocity feedback, it does not consider parameter uncertainties.A voltage-based adaptive control methodology for flexible joint manipulators was developed in [29,30].The advantage of this work is that it is not torque-based control.However, it does not consider dynamic parameter uncertainties and was validated only in simulations.
In the literature, several papers on the robust control of robot manipulators have been developed, most of which use sliding mode techniques [31][32][33].In [31] a multiple model/control strategy was proposed.It uses sliding mode control to reduce the high gain control for robot manipulators with large parameter uncertainty.In another work, a digital sliding mode controller for manipulators with three joints was developed by Corradini et al. [32].This controller is not adaptive and uses sliding mode structure, which is prone to chattering.
On the other hand, computational intelligence tools, such as artificial neural networks and fuzzy logic controllers, have been credited in various applications as powerful tools capable of providing robust controllers for mathematically ill-defined systems that may be subjected to structured and unstructured uncertainties [34,35].The universal approximation theorem has been the main driving force behind the increasing popularity of such methods as it shows that they are theoretically capable of uniformly approximating any continuous real function to any degree of accuracy.This has led to the recent advances in the area of intelligent control [36,37].Various neural network and fuzzy logic models have been applied in the control of flexible joint manipulators, which have led to a satisfactory performance [9,10].H. Chaoui et al. [38][39][40][41] used a neural network based adaptive control approach inspired by sliding mode control to learn the system's dynamics.A time-delay neurofuzzy network was suggested in [42], where a linear observer was used to estimate the joint velocity signals and eliminated the need to measure them explicitly.Subudhi et al. [43] presented a hybrid architecture composed of a neural network to control the slow dynamic subsystem and an H ∞ to control the fast subsystem.A feedback linearization technique using a Takagi-Sugeno neurofuzzy engine was adopted in [44].Despite the success witnessed by neural network-based control systems, they remain incapable of incorporating any human-like expertise already acquired about the dynamics of the system in hand, which is considered one of the main weaknesses of such soft computing methodologies.In another work, an adaptive neural network based sliding mode control was developed in citeSun-2011.However, only simulations were used to verify the results.Type-1 FLCs have also been developed for robot manipulators.Some of these control techniques have hybridized type-1 FLCs with sliding mode control to achieve good robustness; e.g., Li and Huang [45] developed an MIMO adaptive sliding mode based manipulator.However, only simulations were performed to validate the theory.
As type-2 FLCs can handle uncertainties more effectively than type-1 FLCs, they are becoming a more viable tool for the control of uncertain systems [46].Melin and Castillo [47,48] reviewed genetic algorithms, particle swarm and ant colony optimization methods in the design of optimal type-2 fuzzy systems for different applications.The authors concluded that although genetic algorithms have been used more frequently, the other two methods are rapidly gaining ground for the design of optimum type-2 FLCs.The same authors adopted the chemical reaction algorithm (CRA) to tune the parameters of type-1 and type-2 FLCs for a unicycle tracking applications [49].
While several type-1 FLCs have been developed for robot manipulators [50], very few interval type-2 FLCs have been devised for this purpose [51][52][53].In [52], a type-2 fuzzy controller was developed and tested on a parallel robot.Most recently, in [53], a type-2 TSK fuzzy controller was used to control a modular robot.Chen developed a sliding mode based type-2 FLC for trajectory tracking.The computational complexity of the hybrid controller is rather significant because of its learning structure.In all of these works, it was concluded that type-2 FLCs can outperform their type-1 counterparts despite noise and uncertainty.
The present work contributes to the merits and the latest developments of type-2 fuzzy logic theory for the design and implementation of an adaptive type-2 FLC for the control of flexible-joint robot manipulators with uncertain dynamics.The combination of high, particularly unstructured, nonlinearities, such as in the form of Coulomb friction, and manipulator's joint elasticity changes significantly the system's dynamics.In this case, the system's inverse dynamic model cannot be found and only an approximation can be made.Therefore, modeling the system's dynamics based on presumably accurate mathematical models cannot be applied efficiently in this case.Conventional type-1 fuzzy logic systems (FLSs) can be used to identify the behavior of this highly nonlinear system with various types of uncertainties.However, type-1 fuzzy sets may not fully capture the uncertainties in the system due to membership functions and knowledge base imprecision.Hence, higher types of fuzzy sets have to be considered.However, the computational complexity of operations on fuzzy sets increases with the increasing type of the fuzzy set.Therefore, interval type-2 fuzzy sets are adopted in this work for their simplicity and efficiency to capture the severe nonlinearities of flexible-joint robot manipulators.Thus far, type-2 FLSs have been used in very few control applications, such as nonlinear control and mobile robot navigation [54].The work presented in this manuscript has two main contributions: (i) it devises a novel adaptive control law for type-2 FLCs; and (ii) it proposes a computationally efficient inference mechanism for such type of controllers, which are reputed for their typically high computational complexity, to make them more suitable for real-time applications.This work represents one of the scarce attempts in developing adaptive type-2 FLC to control flexible-joint manipulators with uncertain dynamics.To the best of our knowledge, adaptive type-2 FLCs with a Mamdani structure have not yet been developed for the control of robot manipulators.As shall be detailed later, and unlike other types of control systems proposed in the literature, the proposed adaptive type-2 FLC is proven to be stable by Lyapunov stability theory and does not depend on the excessively noisy acceleration signals or joint torque measures [23,24].We also present a comparative study between the proposed adaptive type-2 FLC and its type-1 counterpart to better assess their respective performances in various operating conditions.
The rest of the paper is organized as follows: Section 2 outlines the dynamical model of a typical flexible-joint manipulator.In Section 3, an overview of type-2 fuzzy logic systems is presented.In Section 4, we present interval type-2 FLSs and describe the functionality of a type-2 fuzzy inference engine.The design of the proposed controller is detailed in Section 5.In Section 6, simulation results are reported and discussed before concluding the paper with a few remarks about this important, yet complex, control problem in Section 7.

Modeling of a Flexible-Joint Manipulator
The schematic representation for the ith flexible-joint in a multi-joint manipulator is shown in Figure 1.The actuator is coupled to a flexible transmission through an r:1 reduction gear.The transmission is dynamically simplified as a linear torsional spring linked directly to the load (e.g., manipulator link.)Consider a robot manipulator with n revolute flexible joints.Using Euler-Lagrange formulation, the dynamic equations of the manipulator can be written as: where, q ∈ R n :vector of links' positions θ ∈ R n :vector of motors' positions M (q) ∈ R n×n :manipulator's positive definite inertial matrix C(q, q) ∈ R n×n :matrix of Coriolis and centrifugal terms G(q) ∈ R n :vector of gravitational torques J m ∈ R n×n :motors' diagonal inertial matrix τ t ∈ R n :vector of transmission torques τ m ∈ R n :motors' generalized torque vector (control input) τ f l ∈ R n :load friction vector τ f m ∈ R n :motors' friction vector τ dl ∈ R n :load's unmodeled dynamics and external disturbance vector τ dm ∈ R n :motors' unmodeled dynamics and external disturbance vector K ∈ R n×n :diagonal matrix of joints' stiffness coefficients r ∈ R:gear ratio The dynamics of a robotic manipulator is characterized by the following properties: Property 1 The inertia matrix M (q) is characterized by the following properties.

Property 2
The Coriolis and centripetal term C(q, q) has the following properties.

Friction Modeling
Friction is highly nonlinear and it is therefore important to capture the essence of the friction phenomena with models of reasonable complexity.The behavior of friction has been extensively examined lately, a good accurate representation was introduced in [4] as the sum of Coulomb, viscous, and static friction terms.The model of such a memoryless linear or angular friction F ∈ R n operating along a linear or angular displacement rate vector ẋ = ( ẋ1 , . . ., ẋn ) T ∈ R n can be expressed as where . ., F sn ) are the Coulomb, viscous and static friction positive definite diagonal matrices, respectively, and Υ( ẋ) = diag(e −( ẋ1 /ηs 1 ) 2 , . . ., e −( ẋn/ηsn ) 2 ) is a positive definite diagonal matrix representing the rate of decay of the static friction for some decay rate scalars η s 1 , . . ., η sn , along the n degrees of freedom.The term sign( ẋ) ∈ R n is the vector (sign( ẋ1 ), . . ., sign( ẋn )) T defined by Note the friction's high sensitivity and nonlinearity in the vicinity of ẋ = 0, as illustrated in Figure 2. At very low velocity, manipulators are likely to exhibit undesirable stick-slip, a cycle of stop and motion.Friction will act as a constraint and not as a motion generator [55].τ is the control input and is a very small constant.

Friction
In a single stage speed reduction system, a lumped flexibility model can be used if the dominant flexion appears in the gear teeth.In the following, the input gears inertia are combined with the actuators inertia J m while the output gears inertia is lumped with the load inertia M (q).As shown in [38] and the references therein, this model reduction method has been used in multi-stage reduction systems, such as planetary gears, and in multi-mass flexibility models, like harmonic drives, for instance.

Problem Statement
Given the desired trajectories q d and qd , the aim is to design a control law τ m which ensures that the manipulator's position q and velocity q track their desired trajectories under unknown or uncertain dynamics and in the presence of external disturbances.The proposed controller uses q, q, and θ as the system's measurable states.The manipulator's parameters, M (q), C(q, q), G(q), J m , τ f l , τ f m , τ dl , τ dm are assumed to be unknown or uncertain.

Type-2 FLSs
A type-2 FLS is comprised of five components: fuzzifier, rule base, fuzzy inference engine, type-reducer and defuzzifier.A block diagram of a typical type-2 FLS is depicted in Figure 3.A type-2 fuzzy set is defined by a fuzzy membership function, where the membership value or grade for each element of this set is a fuzzy set in the interval [0, 1] rather than a crisp value.As such, the footprint of uncertainty (FOU) provides type-2 FLSs with additional degrees of freedom, making the membership functions of type-2 fuzzy sets three dimensional functions.Therefore, type-2 fuzzy sets can handle more types of uncertainties with higher magnitudes using a smaller rule base than their type-1 counterparts.
A type-2 fuzzy set, denoted as Ã, is characterized by a type-2 membership function µ Ã(x, u), where x ∈ X and u ∈ J x ⊆ [0, 1], i.e., For a continuous universe of discourse, Ã can be expressed as where J x is referred to as the primary membership of x.As in type-1 fuzzy logic, discrete fuzzy sets are represented by the symbol instead of .The secondary membership function associated to x = x , for a given x ∈ X, is the type-1 membership function defined by µ Ã(x = x , u), ∀u ∈ J x .The uncertainty in the primary membership of a type-2 fuzzy set Ã is represented by the FOU and is illustrated in Figure 4.Note that the FOU is also the union of all primary memberships.The upper and lower membership functions, denoted by µ Ã(x) and µ Ã(x), respectively, are two type-1 membership functions that represent the upper and lower bounds for the footprint of uncertainty of an interval type-2 membership function µ Ã(x, u), respectively [56].
The structure of rules in the type-2 FLS and its inference engine is similar to those in type-1 FLS.The inference engine combines rules and provides a mapping from input type-2 fuzzy sets to output type-2 fuzzy sets.In this process, unions and intersections of type-2 sets as well as compositions of type-2 relations are used.The output of the type-2 inference engine is a type-2 set.Using extension principle, type-1 defuzzification can derive a crisp output from type-1 fuzzy set; similarly, for a higher type set as type-2, this operation derives the type-2 sets to a type-1 set.This process is the so called "type-reduction".

Interval Type-2 FLSs
The computation intensity of type-2 FLSs has been behind the development of interval fuzzy sets [56,57] as it provides a simplified and efficient way to compute meet and join operations and perform type-reduction for FLSs.It distributes the uncertainty evenly among all admissible primary memberships and offers a balanced trade-off between performance and complexity.Before proceeding further, a few concepts need to be introduced.An FLS with an interval singleton type-2 fuzzifier and product or minimum t-norm satisfies the following properties [57]: 1. the firing strength of the lth fuzzy rule is an interval type-1 fuzzy set defined as where with the t-norm operator denoted by " ".
2. the fired output consequent set of the lth rule is a type-1 fuzzy set characterized by a membership function 1/b l ∀y ∈ Y with µ Gl (y) and µ Gl (y) being the lower and upper membership grades of µ Gl (y).
3. if N out of a total of L fuzzy rules in the FLS fire, where N ≤ L, then the overall aggregated output fuzzy set is defined by a type-1 membership function µ B (y) obtained by combining the fired output consequent sets into one.In other words, µ B (y) = N l=1 µ Bl (y), where µ Bl (y) is defined in Equation ( 5).
The following is a brief description of the different stages of the type-2 fuzzy logic inference engine.

Type-2 Fuzzification
In the fuzzification stage, the crisp input vector with n elements x = (x 1 , . . ., x n ) T in the universe of discourse X 1 × X 2 × . . .× X n is mapped into type-2 fuzzy sets [56,57].The type-2 fuzzification process is schematically depicted in Figure 5.The upper and lower membership functions are computed for each point of the universe of discourse, resulting in an interval type-1 set [f l , f l ] for each rule l.

Type-2 Fuzzy Rule Base
Type-2 IF-THEN rules have the same structure as their type-1 counterpart.However, the antecedents and the consequents are represented by interval type-2 fuzzy sets.Thus, the l th rule is of the form:

Type-2 Fuzzy Inference Engine
A type-2 fuzzy inference engine provides a mapping from the input type-2 fuzzy sets to the output ones.Each rule l in the knowledge base is interpreted as a type-2 fuzzy implication that, when aggregated with the fuzzified inputs, infers a type-2 fuzzy set Bl such that: The t-norm and t-conorm used for the type-2 FLC herein are the "minimum" and "maximum" operators, respectively.These operators have been accredited in the literature for their computational efficiency and satisfactory performance.

Type Reduction
Type-reduction is an "extended version" of type-1 defuzzification methods (using the extension principle) because this operation reduces a type-2 output fuzzy set to a type-1 fuzzy set, which is called the "type-reduced set".Several type-reduction methods have been suggested in the literature, such as the center-of-sums, the height, the modified height and the center-of-sets.The calculation of type-reduced sets is performed in two stages.First, the centroids of the type-2 interval consequent sets of the fuzzy rules are computed.This is conducted ahead of time and is not part of the control cycle.In the second stage, the type-reduced sets are computed at each control cycle before being defuzzified [54].

Calculation of the Rule Consequents Centroids
The centroid of the t th output fuzzy set y t k is a type-1 interval set determined by its left and right most points, y t lk and y t rk , respectively, which are expressed by [57]: Algorithm 1 describes the iterative procedures for computing y t rk and y t lk [54].Without loss of generality, we assume that y z , z = 1, . . ., Z, are arranged in an ascending order; i.e., y 1 ≤ y 2 ≤ . . .≤ y Z .
Note that both algorithms are guaranteed to converge in at most Z iterations.However, as mentioned earlier, these procedures are conducted ahead of time and are not part of the control cycle.Such a property helps alleviate the heavy computational burden that is usually associated to computational intelligence-based controllers in general.

Calculation of the Type-Reduced Set
Using the centroid method, the center-of-sets type reduction reduces the resulting type-2 fuzzy sets to an interval type-1 fuzzy set [y i lk , y i rk ] for each rule i.The inferred interval type-1 fuzzy set is then defined by [y lk , y rk ], such as: where f i l , f i r are the firing strengths corresponding to y i lk and y i rk of rule i, to minimize y i lk and maximize y i rk .Algorithms 2 and 3 reveal the iterative procedures to compute y lk and y rk , respectively [57].Without loss of generality, we here assume that the pre-computed y i lk , i = 1, . . ., L, are arranged in an ascending order; i.e., y 1 lk ≤ y 2 lk ≤ . . .≤ y L lk .Hence, y lk and y rk can be mathematically expressed as: It is worth pointing out that both procedures are proven to converge in no more than L iterations, where L is the total number of rules [57].In this work, we are concerned with adaptive type-2 FLC, and hence, Algorithms 1-3 will be replaced with the adaptive mechanism explained in the next section.As such, we overcome the heavy computational burden traditionally associated to computational intelligence-based controllers.

Control Strategy
Let ∆q = q d − q and ∆θ = θ d − θ denote the links' and actuators' position errors, respectively, with θ d being the unknown desired time-dependent motor position vector.The control strategy is based on the design of an adaptive controller that not only leads to a precise tracking of the system's nominal desired signals but also improves the motors' internal stability.Should the motors' desired position θ d have been available, the control strategy would be based on tracking ∆q and ∆θ to zero.Since that is not the case, we define the following compounded velocity error signal: for a diagonal matrix λ = diag(λ 1 , λ 2 , . . ., λ n ) with λ i ∈ [0, 1], i = 1, . . ., n.The feedback gain λ is introduced to provide a trade-off between the link tracking performance and internal stability, due to the high nonlinear coupling between the two.Note how a choice of λ i = 1, ∀ i ∈ {1, . . ., n}, completely annihilates the motor's internal stability factor.The fuzzy control strategy is based on a human operator experience to interpret a situation and initiate its control action.A block diagram for the fuzzy controller is illustrated in Figure 6.Given the desired control signals q d and qd , the link's position error ∆q and the compounded velocity error ∆ ˙ r are computed.The FLC takes these two inputs and provides a control action τ m that is proportional to the input values.These signals are quantized into 5 levels represented by a set of linguistic variables: Negative Large (NL), Negative Small (NS), Zero (Z), Positive Small (PS), and Positive Large (PL).In this study, triangular membership functions are used, mainly due to their high computational and performance efficiencies [58].To assess the performance of both types of controllers, the proposed fuzzy controller is implemented in two different ways: the first is based on a type-1 fuzzy control scheme while the second is based on a type-2.The input membership functions adopted by both types of control systems are shown in Figure 7.In order to perform a fair comparison between type-1 and type-2 FLCs, the type-2 membership functions have been designed such that they are very similar to those of type-1 and have small blurbs in their FOUs.The fuzzy rules of the two control techniques are the same, they were chosen heuristically and can be refined by an expert (see Table 1).These rules are based on three hypotheses: (i) when the input signals are far from their respective nominal zero-valued surfaces, then the FLC's output assumes a high value; (ii) when the inputs are approaching the nominal zero-valued surfaces, the output is adjusted to a smaller value for a smoother approach; (iii) once the inputs are on the nominal zero-valued surfaces, then the output is set to zero.This way, the FLC forces the link position error ∆q and the compounded velocity error ∆ ˙ r to approach zero.It is worth mentioning that an empirical study was conducted beforehand to tune the input membership functions.The center of area method is used for defuzzification.
where w ∈ R z×m is a weight matrix and Φ is a m-dimensional vector of known functions (regressor).[w m lz w m rz ] Layer 2 Layer 1 Antecedents Layer 3 Layer 4
Recall Euler-Lagrange formulation (1): M (q)q + C(q, q) q + G(q) + τ f l + τ dl − τ t = 0 where q, q, q, θ ∈ R n .Substituting for τ t , and letting the stiffness constant K tend to infinity (singular perturbation), we obtain the following rigid model [16]: M t (q)q + C(q, q) q + G(q) + τ F rd = τ m (13) where, Using the linear in parameters property of the manipulator dynamics, we can approximate the model with a linear regression: M t (q)q r + C(q, q) qr + G(q) + τ F rd = Φ(q r , qr , q, q) T w The control law is: where K D is a positive diagonal matrix gain and the sign • denotes the parameter estimate vector.
Theorem 1 Consider the nonlinear system in Equation ( 1) with reference signal (11) and control law (14).The adaptive control law is asymptotically stable and the tracking error converges to zero with the following adaptation law: where Γ = diag(γ 1 , γ 2 , . . ., γ n ) and γ i is a positive constant, i = 1, . . ., n.
Proof: Taking the derivative of the error signal s yields , displacement (θ − q) → 0. We get: Substituting M q from Equation ( 13): M t (q) ṡ = M t (q)q r + C(q, q) qr + G(q) + τ F rd − C(q, q)s − τ m The linear in parameters property yields Set Equation ( 15) becomes where w = w − ŵ.
Choose the following Lyapunov candidate: Taking the derivative of V: Substituting for M t (q) ṡ: s T {( Ṁt (q) − 2C(q, q))}s = 0 due to the skew-symmetry property.Hence, Setting the adaptation law as Therefore V , and so s, w and ŵ, are bounded and converge to finite values.It follows from Equation ( 16) that τ m is bounded, which implies that all the terms in Equation ( 17), including ṡ, are bounded.Thus, V = −2s T K D ṡ is also bounded.Hence, from Barbalet's Lemma, it implies that lim t→∞ V = 0. Therefore, lim t→∞ s = 0.

Simulation Setup
To demonstrate the performance of the proposed controller, two numerical simulations are carried out on a single link flexible-joint manipulator.Table 2 summarizes the manipulator's physical parameters along with their respective values.The stiffness coefficient and gear ratio are set to be K = 7 N•m/rad and r = 1, respectively.The link's mass and length are taken as m = 0.21 Kg and l = 0.3 m, respectively.The manipulator's dynamics in terms of its physical parameters is defined by: M (q) = I, C(q, q) = 0, and G(q) = mgl sin (q), where g = 9.8 m/s 2 is the gravitational constant and I is the link's rotational inertia given in Table 2.The nonlinear friction model described in Section 2 is considered to model the actuator's and load's mechanical frictions, τ f m and τ f l , respectively.Table 2. Manipulators physical parameters.

Parameter
Link Motor The manipulator's desired position trajectory is taken as the step response of a critically damped second order system with a natural frequency of 3 rad/s, as shown in Figure 9.The feedback gain λ in Equation ( 9) is set to 0.8.The control structure scheme and the system's model are implemented in Simulink TM while the fuzzy control engines are programmed in C. Both controllers are set to operate at a bandwidth of 100 Hz.

Numerical Simulations and Results
Two simulations are carried out to highlight the proposed type-2 FLC as opposed to type-1 in tolerating a higher degree of parametric and modeling uncertainties.In both simulations, the system's dynamics is assumed to be a priori unknown.For each simulation, the system's response is studied taking into account the manipulator's position and velocity errors, the joint's internal stability, and the controller's output torque, τ m .
The first simulation is meant to study the controller's ability to sustain various types and magnitudes of load uncertainties.For this purpose, the load's inertia and the link's mass are both doubled abruptly at 5 s and returned back to their original values at 15 s of the simulation.The results are shown in Figure 10.A slight increase is noticed in the manipulator's position and velocity errors due to a heavier load.However, the error signals and the controller's output under type-1 FLC are fairly fluctuating as opposed to a smooth and steady convergence behavior with the type-2 FLC.It is quite important to notice here the degradation in the actuator's internal stability (Figure 10(e)) under type-1 FLC despite the settling of the load's velocity.The superiority of the adaptive type-2 FLC in compensating for such a type of uncertainty is manifested with a better load position, speed accuracy and control effort performance over its type-1 counterpart.
In the second simulation, the elastic joint's stiffness coefficient is changed abruptly to K = 5 N•m/rad at 5 s and returned back to its original value (K = 7 N•m/rad) at 15 s of the simulation.The controller's performance under such conditions is revealed in Figure 11.As in simulation 1, adaptive type-1 FLC is able to maintain bounded error signals but fails to make them converge smoothly.This is especially clear with the load's position and velocity errors (Figure 11(a) and 11(c)) and the motor's internal stability (Figure 11(e)).On the other hand, it is clear that the adaptive type-2 FLC does indeed maintain these signals smoother and with less control effort than its type-1 counterpart.(h)

Conclusions
In this paper, an adaptive type-2 FLC with a Mamdani inference engine has been proposed for flexible-joint manipulators in the presence of dynamical modeling and parametric uncertainties of various magnitudes.The control strategy takes into account the actuators' relative stability by introducing a trade-off criterion between the actuators' internal stability and the links' position.A comparison of the proposed controller and its type-1 counterpart is performed under similar operating conditions.The simulations show the superiority of the adaptive type-2 FLC in compensating for high magnitude of uncertainties, which confirms the theoretical credentials associated to type-2 FLSs.

Assumption 1
The norm of the unknown disturbance τ d is upper bounded by a scalar b d , i.e., τ d ≤ b d .

Figure 6 .
Figure 6.Block diagram of the proposed fuzzy control scheme.

Table 1 .
Fuzzy rules for type-1 and type-2 FLCs.The adaptive type-2 FLC structure is depicted in Figure 8.It consists of four layers.Input nodes and type-2 fuzzification nodes are shown in layer 1 and layer 2, respectively, forming the antecedent part of the fuzzy rules.Consequent parts are represented by layers 3 and 4, which are constructed with fuzzy rule nodes and output nodes.They are linked by interval weighting factors [w m lz w m rz ].The adaptive type-2 FLC's output can be written as: