Open access peer-reviewed chapter - ONLINE FIRST

Compensatory of Adaptive Neural Fuzzy Inference System

By Rabah Mellah, Hocine Khati, Hand Talem and Said Guermah

Submitted: June 4th 2020Reviewed: January 16th 2021Published: February 15th 2021

DOI: 10.5772/intechopen.96050

Downloaded: 16

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 e1and e2and one outputu. The entry x1is associated with two fuzzy sets A1and A2. As for the two fuzzy sets associated with the second entry x2are B1and B2. The output uis modeled by a fuzzy Sugeno-type system, composed of the following four rules [17]:

Rule1:ifx1isA1andx2isB1thenu1=f1x1x2=a1x1+b1x2+c1E1
Rule2:ifx1isA1andx2isB2thenu2=f2x1x2=a2x1+b2x2+c2E2
Rule3:ifx1isA2andx2isB1thenu3=f3x1x2=a3x1+b3x2+c3E3
Rule4:ifx1isA2andx2isB2thenu4=f4x1x2=a4x1+b4x2+c4E4

Let us denote Ok,ithe node in the ith position of the kth layer. The node functions in the same layer are of the same function family as defined below.

The input layer is denoted Layer 1 and any node iin this layer is a square node with a node function that describes the membership function. Hence O1,iis the membership function ofAi, and it specifies the degree to which a given variable x satisfies its quantifierAi. We select the membership function in such a way the maximum of which is equal to unity and the minimum equal to zero.

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

Figure 1.

Structure of the regulator ANFIS.

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.

O2,1=O1,1.O1,3=w1O2,2=O1,1.O1,4=w2O2,3=O1,2.O1,3=w3O2,4=O1,2.O1,4=w4E5

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 ith rule.

O3,i=wik=14wkfori=1,4E6

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

O4,i=O3,ifi=viaie+biΔe+ciE7

where viis the output of the node I of layer 3 and aibiciis the set of update parameters.

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

O5,i=iO4,ififori=1..4E8

Considering x1and x2are the position error eand its derivative e: x1x2=ee.We associate two fuzzy sets for each of the inputs x1and x2namely N (Negative) and P (Positive). μNand μPrepresent the degrees of membership appropriate to variables xiwith respect to the fuzzy subsets Aiand Bi, defined by the following membership functions (Figure 2) [17]:

Figure 2.

Membership functions.

Fori=1,2
μNxi=1,ifxi<10.5xi+0.5,if1<xi<10,ifxi>1E9
μPxi=0,ifxi<10.5xi+0.5,if1<xi<11,ifxi>1E10

2.1 Learning algorithm

The learning process consists of identifying the consequence parameters ai,biand cifor i = 1,2,….4. Thus, let us assume ydand yare respectively the desired and actual outputs of system. In this work, we consider that the consequence parameters are adjusted by the minimization of the following objective function:

ek=12e2E11

where e=ydy.

In addition, let be Φithe vector of parameters to be adjusted. Our objective is to find the parameters ai,biand ciof the vector Φiusing the gradient descent method combined with the approach of extended Kalman filter. This is equivalent to writing:

Φik+1=ΦikαkJΦiE12

We have:

JΦi=eyΦi=eyuuΦiE13

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

Φik+1=Φik+αkyuuΦieE14

In our case, yucannot be evaluated, but can be estimated using the extended Kalman filter equations. Consequently, Eq. (14) can be written as:

Φik+1=Φik+KΨieE15

where

K=αkyuE16
Ψi=uΦi=uaiubiuciE17

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

Φik+1=Φik+KkeE18

Where Kkis the Kalman gain defined as follows:

Kk=PkHTkHkPkHTk+RkE19

Where Hkis the Jacobian matrix (observation matrix of the system); Pkis the covariance estimation matrix of the error and is the covariance matrix of the process noise.

Taking Hk=ΨiT,Pk=λ1and Rk=λ2,the gain Kkcan be written:

Kk=λ1ΨiTλ1Ψi+λ2Ψi=λ1λ1ΨiTΨi+λ2ΨiE20

Hence Eq. (18) reduces:

Φik+1=Φik+λ1λ1ΨiTΨi+λ2ΨieE21

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

K=λ1λ1ΨiTΨi+λ2E22

Finally, the vector of consequence parameters Φican be adjusted by the following relation:

Φik+1=Φik+KΨieE23

2.2 Stability analysis of the control system

From Eq. (23), we can consider for a very short time Te, this relation:

Φ̇i=Φik+1ΦikTe=KΨieTe=K1ΨieE24

Where K1=KTe

Hence:

Φ̇i=K1ΨieuE25

Where eu=K1eis the error between the controller’s desired output udand actual output u.

Let be Φi=ΦidΦi,where Φiis the vector of the consequence parameters and Φidthe vector of the desired consequence parameters.

Φ̇i=Φ̇idΦ̇i=ΨieuE26

For linear variation, the error euis defined by [18]:

eu=udu=i=14ΨiTΦidΨiTΦi=i=14ΨiTΦidΦi=i=14ΨiTΦiE27

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

V=12i=14ΦiTΦiE28

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

V̇=i=14Φ̇iTΦiE29

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

V̇=i=14ΨieuTΦi=euTi=14ΨiTΦi=euTeuE30

Consequently, from Eq. (30), we find that V̇0,so we conclude that the system is asymptotically stable in the sense of Lyapunov according to the LaSalle theorem.

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:

u=i=14aie+bie+ciwii=14wiE31

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

zi=wiE32
mi=wi12E33

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

Ciziqiγi=zi1γimiγiE34

Where γiϵ01is compensatory degree. Finally, the crisp value of the compensatory neural-fuzzy inference is derived as [13, 14]:

u=i=14aie+bie+ciwi1γi2i=14wi1γi2E35

For simplicity, we define:

αi=1γi2E36

Then we have:

u=i=14aie+bie+ciwiαii=14wiαiE37

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

Figure 3.

Structure of CANFIS controller.

3.1 Learning algorithm

Consider as for ANFIS two dimensional data vectors, x=eeand one dimensional output data vectoru2. In order to limit the computation time, we have optimally adjusted the consequence parameters and compensatory degree by minimizing the following objective function:

J=12ydy2E38

Where ydand yare respectively desired and actual values of output system. Now let Φ2ifor i = 1….4, be the vector of update parameters. We aim to determine vector Φ2ithrough the extended Kalman filter which consists in linearizing the output around the control input at each sampling period. This is equivalent to writing [16, 19, 20]:

JΦ2i=Ju2=ydyyu2u2Φ2i=K.Ψ2ieE39

In which

Ψ2i=u2Φ2iE40
K2=λ1λ1Ψ2iTΨ2i+λ2E41

Where λ1and λ2are adaptation gains for varying the convergence rate. Further, to eliminate the constraintγi01, we redefine γias follows [7]:

pi2pi2+ri2E42

Where piand riare update parameters such that γi01. Consequently, the vector of update parameters is given as Φ2iT=aibicipirifor CANFIS. According to the definition, we have [17]:

u2ai=ewiαii=14wiαiE43
u2bi=ewiαii=14wiαiE44
u2ci=wiαii=14wiαiE45
u2γi=12i=14aie+bie+cizilnwii=14ziE46
u2pi=2piqi2pi2+qi2u2γiE47
u2ri=2qipi2pi2+ri2u2γiE48

Finally, the vector of parameters Φ2iis adjusted using the following equation:

Φ2ik+1=Φ2ik+KΨ2ieE49

Where Ψ2iT=u2aiu2biu2ciu2piu2ri.

3.2 Stability analysis of the control system

From Eq. (48), we can consider for a very short time Te, this relation:

Φ̇2i=Φ2ik+1Φ2ikTe=KΨ2ieTe=K1Ψ2ieE50

Where K1=KTe

Hence:

Φ̇2i=K1Ψ2ieuE51

Where eu=K1eis the error between the controller’s desired output udand actual output u.

Let be Φ2i=Φ2idΦ2i,where Φ2iis the vector of the consequence parameters and Φ2idthe vector of the desired consequence parameters.

Φ̇2i=Φ̇2idΦ̇2i=Ψ2ieuE52

For linear variation, the error euis defined by:

eu=udu=i=14Ψ2iTΦ2idΨ2iTΦ2i
=i=14Ψ2iTΦ2idΦ2i=i=14Ψ2iTΦ2iE53

Consider the following Lyapunov function:

V=12i=14Φ2iTΦ2iE54

Differentiating V with respect to time yields, we obtain:

V̇=i=14Φ̇2iTΦ2iE55

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

V̇=i=14Ψ2ieuTΦ2i=euTi=14Ψ2iTΦ2i=euTeuE56

Consequently, from Eq. (55), we find that V̇0,so we conclude that the system is asymptotically stable in the sense of Lyapunov according to the LaSalle theorem.

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:

qir=π61cos6tE57

With i=1.2.

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

τ=M11M12M21M22Mqq¨+C11qq̇C12qq̇C21qq̇C22qq̇Cqq̇q̇+G1qG2qGqE58

Where.

q=q1q2: Vector of joint position variables.

q̇=q̇1q̇2: Vector of joint velocity variables.

q¨=q¨1q¨2: Vector of joint acceleration variables.

τ=τ1τ2: Vector of torques applied to joint.

Mq: Inertial matrix.

Cqq̇: Matrix of terms centripetal and coriolis.

Gq: Vector of gravitational effects

M11q=m1lc12+m2l12+m2lc22+m2l1lc2cosq2+I1+I2
M12q=M21q=m2lc22+m2l1lc2cosq2+I2
M22q=m2lc22+I2
C11qq̇=m2l1lc2sinq2q̇2
C12qq̇=m2l1lc2sinq2q̇1+q̇2
C21qq̇=m2l1lc2sinq2
C22qq̇=0
G1q=m1lc1+m2l1gsinq1+m2glc2sinq1+q2
G2q=m2glc2sinq1+q2

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

ParameterValue
Mass of the link 1 m16.5225kg
Mass of the link 2 m22.0458kg
Link length 1 l10.26m
Link length 2 l20.26m
Gravity g9.81m/s2
Distance to the center of mass of link 1 lc10.0983m
Distance to the center of mass of link 2 lc20.0229m
Moment of inertia of the center of mass m10.1213kg.m2
Moment of inertia of the center of mass m20.0116kg.m2

Table 1.

Robot parameters.

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.

Figure 4.

Motion errors tracking and torques behavior with neural-fuzzy without disturbances.

Figure 5.

Motion errors tracking and torques behavior with compensatory neural-fuzzy with without disturbances.

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 t=5sthe combined friction and external torque disturbance for each joint, given as follows.

τfi=38.3q̇i+18.9cosqiE59

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.

Figure 6.

Motion errors tracking and torques behavior with neural –fuzzy with disturbances.

Figure 7.

Motion errors tracking and torques behavior with compensatory neural –fuzzy with disturbances.

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.

Download for free

chapter PDF

© 2021 The Author(s). Licensee IntechOpen. This chapter is distributed under the terms of the Creative Commons Attribution 3.0 License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

How to cite and reference

Link to this chapter Copy to clipboard

Cite this chapter Copy to clipboard

Rabah Mellah, Hocine Khati, Hand Talem and Said Guermah (February 15th 2021). Compensatory of Adaptive Neural Fuzzy Inference System [Online First], IntechOpen, DOI: 10.5772/intechopen.96050. Available from:

chapter statistics

16total chapter downloads

More statistics for editors and authors

Login to your personal dashboard for more detailed statistics on your publications.

Access personal reporting

We are IntechOpen, the world's leading publisher of Open Access books. Built by scientists, for scientists. Our readership spans scientists, professors, researchers, librarians, and students, as well as business professionals. We share our knowledge and peer-reveiwed research papers with libraries, scientific and engineering societies, and also work with corporate R&D departments and government entities.

More About Us