Robot parameters.

## Abstract

The traditional approach to fuzzy design is based on knowledge acquired by expert operators formulated into rules. However, operators may not be able to translate their knowledge and experience into a fuzzy logic controller. In addition, most adaptive fuzzy controllers present difficulties in determining appropriate fuzzy rules and appropriate membership functions. This chapter presents adaptive neural-fuzzy controller equipped with compensatory fuzzy control in order to adjust membership functions, and as well to optimize the adaptive reasoning by using a compensatory learning algorithm. An analysis of stability and transparency based on a passivity framework is carried out. The resulting controllers are implemented on a two degree of freedom robotic system. The simulation results obtained show a fairly high accuracy in terms of position and velocity tracking, what highlights the effectiveness of the proposed controllers.

### Keywords

- control
- fuzzy logic
- neural-fuzzy
- compensatory fuzzy
- Kalman filter
- manipulator robot

## 1. Introduction

The advantage of fuzzy control is that the fuzzy system can model any continuous (sufficiently smooth) nonlinear function in a compact set and the modeling error decreases [1]. Fuzzy logic resembles human analysis in its use of inaccurate information to create decisions. Many such problems can be formulated as the minimization of functional defined over a class of admissible domains [2]. However, the difficulty in deploying fuzzy clustering strategies along with the high calculating cost and without update the parameters were their disadvantage [3].

On the other hand, a major concern of researchers is turned towards the combination of fuzzy logic and neural network. In this combination, a fuzzy reasoning is followed within multilayered hierarchical neural network. The parameters are represented by connection weights or involved in unit functions. They are learned the actual data [4]. In the near past, ANFIS (Adaptive Neural Fuzzy Inference System) models have become very popular for two reasons: the first reason is that in calibrating of non-linear relationships they offer more advantages over conventional modeling techniques, namely the ability to handle large amounts of noisy data from dynamic and non-linear systems, particularly when the underlying physical relationships are not fully understood. The second reason is that they facilitate the solving of linear systems which include the interpolation modeling such as time series [5].

The reason why authors used ANFIS is that it not only includes the characteristics of both methods but also eliminates some disadvantages in case of their lonely use [6]. Unfortunately, conventional neural fuzzy systems can only optimize the fuzzy membership functions under specially defined fuzzy operators which are unchangeable forever, which makes it use the local optimization technique rather than the global optimization technique [7, 8]. Thus an adaptive neural fuzzy controller with compensatory fuzzy is most suitable in an environment where system dynamics change dramatically, become highly nonlinear, and in principle not fully known.

On the ground of these observations, several optimal and systematic methods have been developed for the design of neural fuzzy controllers with compensatory fuzzy. Among these methods, we have retained the compensatory adaptive neural fuzzy inference system approach which consists in adjusting not only fuzzy membership functions but also dynamically optimize the adaptive fuzzy reasoning. Besides that, ANFIS is a class of adaptive networks that are functionally equivalent to a first order Takagi-Sugeno fuzzy model.

Recently compensatory adaptive neural fuzzy inference system control has gained more attention from the control Community in general, as adaptive fuzzy systems are of crucial importance in several areas. The compensatory adaptive neural fuzzy inference system is preferred to deal with nonlinearities and complexity by working on data characterized by incompleteness and inaccuracy. Therefore, it offers powerful skills, such as adaptive adjustment, parallelism, tolerance error and generalization for the neural fuzzy controller. Thus the optimal methods are used to adjust and optimize the parameters of neural fuzzy controllers through an optimization algorithm in order to improve the control performance [9].

In this chapter, we will present and analyze in section 2 the structure of adaptive neural fuzzy inference system (ANFIS), based on concepts such as fuzzy logic, optimization techniques. This approach is carried out in order to remove a control constraint relating to the need to have a model as faithful as possible, knowing that the modeling errors and the imperfections of the models, contribute to significantly degrade the performance of the conventional control laws [10].

Section 3 presents the mathematical formalism appropriate to the compensatory neural fuzzy inference system controller proposed. The effectiveness of the proposed control is highlighted by some simulation results in Section 4. Finally this paper is concluded with a summary and an outlook to future research directions in Section 5.

## 2. Presentation of adaptive neural fuzzy inference system (ANFIS)

Jang was the first to present ANFIS as a multi-layer adaptive network-based fuzzy inference system [11]. One can compare this method to a fuzzy inference system besides that it uses back- propagation in minimizing the errors. The operation of a FIS is similar to that of both fuzzy logic (FL) and artificial neural networks (ANN). ln both (ANN) and (FL), the input passes through the input layer (via the input membership function) and the output appears in output layer (via the output membership function). This type of advanced fuzzy logic uses neural networks. Hence, a learning algorithm can be used to change the parameters until an optimal solution is found. It follows that ANFIS uses either back-propagation or a combination of least squares estimation and back-propagation to estimate the membership function parameters [12]. Neural-Fuzzy system has newly known more attraction in research communities than other types of fuzzy expert systems. The reason of it combines the advantages of learning ability of neural network and reasoning ability of fuzzy logic to successfully solve many non-linear and complex real-world problems [13].

The regulator ANFIS is computationally very efficient, as it favors mathematical analysis, and works well with linear, adaptive, and optimization techniques. The fuzzy reasoning is performed with operators min and prod [14].

The conclusions of fuzzy rules are numeric values calculated from the inputs, so the final value is obtained by performing a weighted average of the conclusions [15, 16].

To simplify understanding and without loss of generalities, let us consider a fuzzy regulator with two inputs

Let us denote * ith*position of the

*layer. The node functions in the same layer are of the same function family as defined below.*kth

The input layer is denoted Layer 1 and any node

The structure of the regulator ANFIS is given by the following figure (Figure 1):

Through this structure we can see five layers described as follows:

* Layer 1*: The function of node at this layer is identical to the membership function in the fuzzification process:

* Layer 2*: generate the degree of activation of a rule.

* Layer 3*: Each node of this layer is a circular node denoted by N. The output node represents the normalized activation degree according to the

*th rule.*i

* Layer 4*: Each node of this layer is a square node with a function described as follows:

where

* Layer 5*: In this layer, there is only one node that determines the overall output by using the following expression:

Considering * N (Negative)*and

*.*P (Positive)

### 2.1 Learning algorithm

The learning process consists of identifying the consequence parameters * i = 1,2,….4*. Thus, let us assume

where

In addition, let be

We have:

From Eqs. (12) and (13), it follows:

In our case,

where

The Eq. (15) can be identified to extended Kalman filter equation:

Where

Where

Taking

Hence Eq. (18) reduces:

By identification between Eqs. (15) and (21), we have:

Finally, the vector of consequence parameters

### 2.2 Stability analysis of the control system

From Eq. (23), we can consider for a very short time

Where

Hence:

Where

Let be

For linear variation, the error

Consider the following Lyapunov function [19, 20, 21]:

Differentiating * V*with respect to time yields, we obtain [17]:

From Eqs. (26), (27) and (29), we obtain:

Consequently, from Eq. (30), we find that

## 3. Compensatory adaptive neural fuzzy inference system (CANFIS)

The other class of inference systems that can deal this type of analytic information in conclusion of rules inference was proposed by Sugeno and his staff.

As for our contribution here, it consists in adding a compensatory fuzzy part to adjust consequence parameters and as well to dynamically optimize the adaptive fuzzy reasoning. In addition to this, ANFIS represents a class of adaptive networks that are functionally equivalent to a first order Takagi-Sugeno fuzzy model. As performed above, by taking a center-average deffuzzifier mapping, the crisp value of the output * u*is given as:

We consider the pessimistic and optimistic operation given respectively as follows:

By using these two operations, our contribution is to add the compensatory form formulated as [7]:

Where

For simplicity, we define:

Then we have:

The structure of the CANFIS controller with compensatory fuzzy for two input and one output, is shown by Figure 3 [9].

### 3.1 Learning algorithm

Consider as for ANFIS two dimensional data vectors,

Where

In which

Where

Where

Finally, the vector of parameters

Where

### 3.2 Stability analysis of the control system

From Eq. (48), we can consider for a very short time

Where

Hence:

Where

Let be

For linear variation, the error

Consider the following Lyapunov function:

Differentiating * V*with respect to time yields, we obtain:

From Eqs. (51), (52) and (54), we obtain:

Consequently, from Eq. (55), we find that

## 4. Simulation results and interpretation

We applied in simulation the neural-fuzzy command equipped with a compensator explained above, to the two-joint robot in a performance environment described by the following joint trajectories:

With

The compact form of the dynamic model relating to the two-joint robot is given as follows:

Where.

The parameters relating to the dynamic model of this robot are given in the following table (Table 1):

Parameter | Value |
---|---|

Mass of the link 1 | |

Mass of the link 2 | |

Link length 1 | |

Link length 2 | |

Gravity | |

Distance to the center of mass of link 1 | |

Distance to the center of mass of link 2 | |

Moment of inertia of the center of mass | |

Moment of inertia of the center of mass |

Figures 4 and 5 show the time evolution position and velocity errors and the torque applied to each joint of manipulator Robot with neuro-fuzzy controller and neuro-fuzzy controller respectively. Through these graphics, we can see that, the Neural –fuzzy controllers and compensatory Neural-fuzzy controllers provide a good tracking performance.

On the one hand, we can observe that the tracking errors are limited by low values, and the dynamics of the errors in position vary little compared to that of the errors in speed. This is physically explained by the fact that the position depends only on the environment while the velocity in addition to the environment depends on the Jacobean matrix. On the other hand, the command paths are smooth, which facilitates their implementation. This is achieved through the appropriate choice of parameters of the control structures.

In order to test the capacity of adaptation and robustness of the proposed approach, we have added in our simulation at time

The results obtained are illustrated by Figures 6 and 7, where we note that the tracking errors show peaks especially at the moment of the introduction of the disturbances, which are rejected quickly, by the Neural – fuzzy controllers and Compensatory Neural-fuzzy structure of the regulator, which allows to conclude that the tracking performance is very little affected by these disturbances. This is due to the low sensitivity to disturbance of the input data of the proposed control strategy.

## 5. Conclusion

In this chapter, we have proposed and presented a control strategy based on a neuro-fuzzy inference system regulator with a fuzzy compensator to control the manipulator robot with two joints

It is important to note that the compensatory neural fuzzy inference system is more powerful than fuzzy systems or neural networks, since it can incorporate these advantages:

Adaptive fuzzy reasoning method using fuzzy compensator can make the fuzzy system adaptive and efficient more.

The neuro-fuzzy compensation system tolerates errors, because it is effective regardless of the choice of initial fuzzy rules (good or bad) for learning.

The speed of convergence of the learning algorithm is faster than that of the back propagation algorithm.

The learning algorithm not only adjusts membership functions, but also optimizes the dynamics of fuzzy reasoning by adjusting the degree of compensation. As a result, fuzzy neuro systems with a fuzzy compensator are more efficient than conventional neuro-fuzzy systems.

This control strategy has the advantage of requiring only measurements of output variables. The simulations indicate that a complete stabilization of the system is indeed observed.

In conclusion, we wanted, at the end of this chapter, to try to identify a broad-spectrum methodology that opens the field to a possible standardization of the design of control laws based on a neuro-fuzzy structure equipped with a compensator, in order to controlling a poorly understood and imprecise dynamic system. It would be interesting in the context of experimental tests to judge the performance of the methods proposed on real systems.