# Filling Control of a Conical Tank Using a Compact Neuro-Fuzzy Adaptive Control System

Authors: Helbert Espitia-Cuchango; Iván Machón-González; Hilario López-García
Journal: Complexity
 (2022)

---

## Abstract

This document describes the implementation of a conical tank control system using an adaptive neurofuzzy system. For implementation, an indirect approach is used where the controller is optimized using the model obtained during the plant identification carried out using data obtained during the system operation. Furthermore, implementation includes training of neuro fuzzy-systems and application to control a conical tank. Regarding plant identification, preliminary training takes place using data obtained for different input values. The controller configuration is established considering the analogy with a discrete-time linear system. The simulation shows that the control system manages to approach the desired response given by the considered reference model.


---

## Body

## 1. Introduction

Adaptive control is framed in the field of control systems to face uncertainties. According to [1], adaptive control systems are suitable for monitoring performance using varied and unknown parameters [1]. The main difference between adaptive and linear controllers lies in the adjustment capacity of the controller to manage unknown uncertainties in the model [2].With regard to developments of adaptive control, controller technique designs are proposed to manage nonlinear and time-varying uncertainties. Such developments can cover larger systems with higher nonlinear uncertainties. Adaptive control has real-world actual applications such as developments in nonlinear systems with variable control gain in time, as observed in [3].Simultaneously, adaptive dynamic programming (ADP) has proven its efficiency as an effective method for the optimum control of nonlinear systems. Nevertheless, since the structure of the ADP requires a control input to satisfy the condition of initial permissible control, then control performance may be deteriorated due to abrupt parameter changes or a failure in the system. According to [4], for this reason, a multiple model adaptive control (MMAC) is proposed employing multiple ADP models where combined sub-controllers are run in parallel offering multiple initial conditions in different settings, including the configuration of a commutation rate to determine suitable initial conditions for the current system.As stated in [5], parameter convergence in the adaptive control produces improvements in the system performance, including accurate online identification, exponential monitoring, and robust adaptation without parameter deviation. Nevertheless, parameter convergence must fulfill the strong persistent-excitation (PE) or sufficient-excitement (SE) as a guarantee of parameter convergence in the classic adaptive control.According to [6], techniques based on gradient calculations offer efficient and practical methods to adjust the parameters in the adaptive control system. An alternative to enhance the performance of the adaptive control system employing gradient-based algorithms consists of an adequate preliminary configuration of the systems used for plant identification, and the controller. In this regard, a fuzzy system allows the establishment of a structure and a system preliminary configuration employed to identify the plant and the controller optimization [7]. Additionally, only data training is required when implementing the adaptive control system for the plant model adjustment, which is useful in highly complex systems with uncertainty and variance [1].


### 1.1. Adaptive Control Systems

Regarding adaptive control application developments, [8] presents an extension of model reference adaptive control (MRAC) to systems based on the fractional calculus theory employed for adaptive control. The authors designed two laws: one of control and one of incommensurable fractional adaptation for both the fractional plant and the fractional reference model. The stability and convergence are analyzed including the fractional integrator model in frequency and the theory of Lyapunov.Meanwhile, [9] proposes a scheme for nonlinear plants that gain variable control in time and plant coefficients with variability in time, which requires a Brunovsky-type plant model with approximating polynomials. The authors added a scheme of robust control to the plant. A combination of entries is used to achieve sturdiness with dead zone updating laws.Considering [10], the cabin pressure control system (CPCS) is an essential part that guarantees the aircraft structure and the crew’s safety; however, the CPCS shows potential flaws in sensors and actuators. Consequently, authors in [10] suggest a reconfiguration method based on simple adaptive control in compensation for these adverse effects.According to [11], nonlinear systems can be modeled as linear systems in parts of multiple operative points. Each operative point is modeled as a switch among constituent linear systems. Regarding [11], an adaptive linear switch controller by parts is proposed to enhance the response time and tracking performance of a control system for a hydraulic actuator, which is essentially linear by parts. The controller, which consists of proportional, integral, and derivative controllers (PID) and MRAC chooses adaptatively the proportion of both components to achieve faster time response and improved tracking performance.Related work with adaptive control is seen in [12] where the objective is the proper diagnostic and flaw estimations in an automotive magnetorheological damper; in addition, the authors suggest a robust linear parameter-varying (LPV) estimate the lack of power caused by a leak in the damper of one side of the vehicle. An adaptive system of vibration control or adaptive vibration control system (AVCS) is also suggested after identifying the faulty damper to diminish the effect of the failure by using compensation forces from the operational dampers.


### 1.2. Control Systems with Neural Networks

In terms of control development systems employing neural networks, [13] proposes a control strategy of nonlinear systems with unknown dynamics through a set of local linear models from a gas neural network under supervision. The direct model of the plant comprises a linear approximation by parts of the nonlinear system, and each neuron represents a local linear model for which a linear controller is designed. The neural gas model works simultaneously as an observer and controller. A control of feedback status is used through the estimation of status variables of the local transfer function emanating from the local linear model.According to [14], the control of a ship’s rudder during a mission on the sea reveals complexity. In this regard, [14] proposes a quantum neural network (QNN) to make use of the learning capacity and learning speed to work as the feedback control hierarchy model for planning strategy and intelligent control of the ship.Another work is observed in [15] considering the advantages of a radial basis function (RBF) and a traditional PID which is suggested as a controller based on the supervision control method of neural network RBF (PID-RBF); this method performs the adaptive adjustment of the stable tracking signal of the system. The authors also display a PID controller rooted in the supervision control strategy of neural networks; this control strategy adopts the supervision control method feed-forward and feedback.Meanwhile, in [16] the design of an adaptive switch controller (ASC) for a multiple input multiple output (MIMO) system is proposed. The suggested method performs the change online between the neural adaptive PID controller (APID) and the neural indirect adaptive controller (IAC). Considering the scheme IAC based on a neural network, the law of adaptation is established by the method of gradient descent (GD). The adaptive controller PID is built based on the neural network that combines the PID control and the explicit neural structure. The training strategy consists of the adjustment of the neural controller line weights employing the backpropagation algorithm to choose the suitable PID gains so that the error between the reference signal and the actual output of the system converges to zero.In reference to other adaptive controls with neural network approaches, in [17] an adaptive dynamic surface control scheme based on a neural network is proposed, and a transformed function of error tracking for a system of control excitation of the generator equipped with a static VAR compensator (SVC) and unknown parameters. The predetermined efficiency of the error tracking is guaranteed by combining the transformed function of the error tracking.About recent and noteworthy developments, a neural network-based adaptive control approach for stabilizing the air gap in a non-linear maglev vehicle is proposed by [18]. The system is designed considering the asymptotic stability associated with the control law. The controller includes a radial neural network connected inside the controller to deal with uncertainty. Lyapunov stability analysis is used to demonstrate the stability of the maglev control system. Simulation outcomes show that the control scheme obtains more suitable levitation performance, achieving accurate estimation of disturbances.


### 1.3. Fuzzy Adaptive Control Systems

Regarding adaptive control applications with fuzzy logic, in [19] a fuzzy adaptive controller for robotic manipulators is designed, considering external disturbances and modeling errors. The dynamics of the robotic manipulator refers to multiple input and multiple output system. A scheme of adaptive fuzzy logic control is studied employing the sliding control theory, which adopts adaptive fuzzy logic systems to assess uncertainties employing a filtered error to compensate for the approximation errors. By employing Lyapunov’s stability theory, it is demonstrated that errors asymptotically converge to zero.According to [20], for the design of controllers for wheeled mobile robots (WMR) the exact position of the mass center is challenging to measure since WMR is an uncertain non-linear typical system. In this regard, in [20] an adaptive fuzzy control scheme for tracking pathways (routes) for mobile robots is proposed. The fuzzy system is used to approximate the unknown pathways, and a robust controller is built to compensate for the approximation error.On the other hand, [21] presents an adaptive controller for chaotic systems MIMO with system uncertainties. The matrix decomposition theory is utilized by decomposing the control gain matrix into a positive matrix, a diagonal matrix, and a unitary upper triangular matrix. Moreover, an adaptation law proposed called proportional integral (PI) is used for parameter update.In [22] a type 2 fuzzy controller Takagi Sugeno (TS) for a non-linear system is proposed, which combines different types of supervised control as direct, indirect, and compensation to build the controller. Employing the synthesis method of Lyapunov the global stability and the close loop system convergence are analyzed with the condition that all the variables are evenly delimited, besides the adaptive laws of the system parameters are also given.Meanwhile, in [23] an adaptive fuzzy control of variable structure PID is proposed for tracking the position of a permanent magnet synchronous motor (PMSM) employed on an electric extremity exoskeleton robot (EEER). A variable structure of a sliding mode control (SMC) is used regarding the traditional PID. The variable structure is designed according to the surface of the slider mode given by the system state equation. Regarding the system vibration of the slider mode, the fuzzy inference mode is adopted to adjust the PID parameters in an adaptive fashion in real-time to attenuate the vibration and to enhance control accuracy and the dynamic performance of the system. The use of the Lyapunov analysis allows us to demonstrate that this algorithm converges into the sliding surface and guarantees system stability.Regarding relevant developments in neural-fuzzy control, [24] is presented a maglev train system with an adaptive neural-fuzzy robust position control architecture. The proposal also discusses the design and execution of the magnetic suspension controller, including the construction of a mathematical model system with magnetic suspension. The authors carry out the proportional integral derivative (PID) controller analysis to demonstrate its sensitivity to disturbances. In addition, a sliding mode controller is introduced as a means to reject parameter perturbations and disturbances by employing an adaptive fuzzy approximator, the neural-fuzzy switching law, and sliding mode control. The experimental results evidence that the robust controller noticeably decreases parameter perturbations and disturbance.


### 1.4. Article Focus and Document Organization

Regarding previous works that support the development shown in this paper, [25] is described the design methodology for fuzzy inference systems based on boolean relations; in this order, the proposed adaptive control system is rooted in the use of compact fuzzy systems based on boolean relations described in [26], where neuro-fuzzy architectures I and II are proposed for identification and control.In previous implementations using fuzzy systems-based boolean relations, in [27] the adaptive control for a power distribution system is implemented, and in [28] the control of a MIMO system is performed. In the training of the neuro-fuzzy controller, in [29] a system to control an automatic voltage regulator is designed and optimized by employing architecture II for the controller. Meanwhile, reference [30] displays the optimization of a PI controller based on architecture II. It is noteworthy that works in references [29, 30] consider linear models of plants.In this work, for the implementation of the control system, architecture I is used for identification, and architecture II for control. The deduction of the training equations and the simulation of the system are presented, verifying the performance of the adaptive control system.The configuration of the controller with architecture II is achieved using fuzzy sets to model positive and negative values. On the other hand, for the identification with architecture I, a preliminary identification is made with data obtained from the plant for different input values, since the assignment of the fuzzy sets in architecture I is carried out by distributing the fuzzy sets in the universes of discourse associated with the inputs.According to [31] adaptive control problems, it is sought to determine stabilization schemes that counter the effect of uncertain parameters in a robustness perspective. In this order, the scheme proposed displays an alternative for adaptive control using fuzzy compact systems that describe a direct logical relationship between inputs to outputs. The proposed adaptive control system employs a fuzzy compact system for identification, and another for the controller, in a way that the identification and controller training is performed iteratively.The document is organized as follows. Section2 describes the adaptive control system employed, then Section 3 shows the architecture of the neuro-fuzzy system used for plant identification and the respective training equations. Subsequently, Section 4 describes the architecture of the neuro-fuzzy controller and the respective deduction of the equations for the optimization of the controller. In Section 5, the dynamic model of the conical tank is described, with the experimental results shown in Section 6. Finally, the discussion and conclusions of the work are presented in Sections 7 and 8.


## 1.1. Adaptive Control Systems

Regarding adaptive control application developments, [8] presents an extension of model reference adaptive control (MRAC) to systems based on the fractional calculus theory employed for adaptive control. The authors designed two laws: one of control and one of incommensurable fractional adaptation for both the fractional plant and the fractional reference model. The stability and convergence are analyzed including the fractional integrator model in frequency and the theory of Lyapunov.Meanwhile, [9] proposes a scheme for nonlinear plants that gain variable control in time and plant coefficients with variability in time, which requires a Brunovsky-type plant model with approximating polynomials. The authors added a scheme of robust control to the plant. A combination of entries is used to achieve sturdiness with dead zone updating laws.Considering [10], the cabin pressure control system (CPCS) is an essential part that guarantees the aircraft structure and the crew’s safety; however, the CPCS shows potential flaws in sensors and actuators. Consequently, authors in [10] suggest a reconfiguration method based on simple adaptive control in compensation for these adverse effects.According to [11], nonlinear systems can be modeled as linear systems in parts of multiple operative points. Each operative point is modeled as a switch among constituent linear systems. Regarding [11], an adaptive linear switch controller by parts is proposed to enhance the response time and tracking performance of a control system for a hydraulic actuator, which is essentially linear by parts. The controller, which consists of proportional, integral, and derivative controllers (PID) and MRAC chooses adaptatively the proportion of both components to achieve faster time response and improved tracking performance.Related work with adaptive control is seen in [12] where the objective is the proper diagnostic and flaw estimations in an automotive magnetorheological damper; in addition, the authors suggest a robust linear parameter-varying (LPV) estimate the lack of power caused by a leak in the damper of one side of the vehicle. An adaptive system of vibration control or adaptive vibration control system (AVCS) is also suggested after identifying the faulty damper to diminish the effect of the failure by using compensation forces from the operational dampers.


## 1.2. Control Systems with Neural Networks

In terms of control development systems employing neural networks, [13] proposes a control strategy of nonlinear systems with unknown dynamics through a set of local linear models from a gas neural network under supervision. The direct model of the plant comprises a linear approximation by parts of the nonlinear system, and each neuron represents a local linear model for which a linear controller is designed. The neural gas model works simultaneously as an observer and controller. A control of feedback status is used through the estimation of status variables of the local transfer function emanating from the local linear model.According to [14], the control of a ship’s rudder during a mission on the sea reveals complexity. In this regard, [14] proposes a quantum neural network (QNN) to make use of the learning capacity and learning speed to work as the feedback control hierarchy model for planning strategy and intelligent control of the ship.Another work is observed in [15] considering the advantages of a radial basis function (RBF) and a traditional PID which is suggested as a controller based on the supervision control method of neural network RBF (PID-RBF); this method performs the adaptive adjustment of the stable tracking signal of the system. The authors also display a PID controller rooted in the supervision control strategy of neural networks; this control strategy adopts the supervision control method feed-forward and feedback.Meanwhile, in [16] the design of an adaptive switch controller (ASC) for a multiple input multiple output (MIMO) system is proposed. The suggested method performs the change online between the neural adaptive PID controller (APID) and the neural indirect adaptive controller (IAC). Considering the scheme IAC based on a neural network, the law of adaptation is established by the method of gradient descent (GD). The adaptive controller PID is built based on the neural network that combines the PID control and the explicit neural structure. The training strategy consists of the adjustment of the neural controller line weights employing the backpropagation algorithm to choose the suitable PID gains so that the error between the reference signal and the actual output of the system converges to zero.In reference to other adaptive controls with neural network approaches, in [17] an adaptive dynamic surface control scheme based on a neural network is proposed, and a transformed function of error tracking for a system of control excitation of the generator equipped with a static VAR compensator (SVC) and unknown parameters. The predetermined efficiency of the error tracking is guaranteed by combining the transformed function of the error tracking.About recent and noteworthy developments, a neural network-based adaptive control approach for stabilizing the air gap in a non-linear maglev vehicle is proposed by [18]. The system is designed considering the asymptotic stability associated with the control law. The controller includes a radial neural network connected inside the controller to deal with uncertainty. Lyapunov stability analysis is used to demonstrate the stability of the maglev control system. Simulation outcomes show that the control scheme obtains more suitable levitation performance, achieving accurate estimation of disturbances.


## 1.3. Fuzzy Adaptive Control Systems

Regarding adaptive control applications with fuzzy logic, in [19] a fuzzy adaptive controller for robotic manipulators is designed, considering external disturbances and modeling errors. The dynamics of the robotic manipulator refers to multiple input and multiple output system. A scheme of adaptive fuzzy logic control is studied employing the sliding control theory, which adopts adaptive fuzzy logic systems to assess uncertainties employing a filtered error to compensate for the approximation errors. By employing Lyapunov’s stability theory, it is demonstrated that errors asymptotically converge to zero.According to [20], for the design of controllers for wheeled mobile robots (WMR) the exact position of the mass center is challenging to measure since WMR is an uncertain non-linear typical system. In this regard, in [20] an adaptive fuzzy control scheme for tracking pathways (routes) for mobile robots is proposed. The fuzzy system is used to approximate the unknown pathways, and a robust controller is built to compensate for the approximation error.On the other hand, [21] presents an adaptive controller for chaotic systems MIMO with system uncertainties. The matrix decomposition theory is utilized by decomposing the control gain matrix into a positive matrix, a diagonal matrix, and a unitary upper triangular matrix. Moreover, an adaptation law proposed called proportional integral (PI) is used for parameter update.In [22] a type 2 fuzzy controller Takagi Sugeno (TS) for a non-linear system is proposed, which combines different types of supervised control as direct, indirect, and compensation to build the controller. Employing the synthesis method of Lyapunov the global stability and the close loop system convergence are analyzed with the condition that all the variables are evenly delimited, besides the adaptive laws of the system parameters are also given.Meanwhile, in [23] an adaptive fuzzy control of variable structure PID is proposed for tracking the position of a permanent magnet synchronous motor (PMSM) employed on an electric extremity exoskeleton robot (EEER). A variable structure of a sliding mode control (SMC) is used regarding the traditional PID. The variable structure is designed according to the surface of the slider mode given by the system state equation. Regarding the system vibration of the slider mode, the fuzzy inference mode is adopted to adjust the PID parameters in an adaptive fashion in real-time to attenuate the vibration and to enhance control accuracy and the dynamic performance of the system. The use of the Lyapunov analysis allows us to demonstrate that this algorithm converges into the sliding surface and guarantees system stability.Regarding relevant developments in neural-fuzzy control, [24] is presented a maglev train system with an adaptive neural-fuzzy robust position control architecture. The proposal also discusses the design and execution of the magnetic suspension controller, including the construction of a mathematical model system with magnetic suspension. The authors carry out the proportional integral derivative (PID) controller analysis to demonstrate its sensitivity to disturbances. In addition, a sliding mode controller is introduced as a means to reject parameter perturbations and disturbances by employing an adaptive fuzzy approximator, the neural-fuzzy switching law, and sliding mode control. The experimental results evidence that the robust controller noticeably decreases parameter perturbations and disturbance.


## 1.4. Article Focus and Document Organization

Regarding previous works that support the development shown in this paper, [25] is described the design methodology for fuzzy inference systems based on boolean relations; in this order, the proposed adaptive control system is rooted in the use of compact fuzzy systems based on boolean relations described in [26], where neuro-fuzzy architectures I and II are proposed for identification and control.In previous implementations using fuzzy systems-based boolean relations, in [27] the adaptive control for a power distribution system is implemented, and in [28] the control of a MIMO system is performed. In the training of the neuro-fuzzy controller, in [29] a system to control an automatic voltage regulator is designed and optimized by employing architecture II for the controller. Meanwhile, reference [30] displays the optimization of a PI controller based on architecture II. It is noteworthy that works in references [29, 30] consider linear models of plants.In this work, for the implementation of the control system, architecture I is used for identification, and architecture II for control. The deduction of the training equations and the simulation of the system are presented, verifying the performance of the adaptive control system.The configuration of the controller with architecture II is achieved using fuzzy sets to model positive and negative values. On the other hand, for the identification with architecture I, a preliminary identification is made with data obtained from the plant for different input values, since the assignment of the fuzzy sets in architecture I is carried out by distributing the fuzzy sets in the universes of discourse associated with the inputs.According to [31] adaptive control problems, it is sought to determine stabilization schemes that counter the effect of uncertain parameters in a robustness perspective. In this order, the scheme proposed displays an alternative for adaptive control using fuzzy compact systems that describe a direct logical relationship between inputs to outputs. The proposed adaptive control system employs a fuzzy compact system for identification, and another for the controller, in a way that the identification and controller training is performed iteratively.The document is organized as follows. Section2 describes the adaptive control system employed, then Section 3 shows the architecture of the neuro-fuzzy system used for plant identification and the respective training equations. Subsequently, Section 4 describes the architecture of the neuro-fuzzy controller and the respective deduction of the equations for the optimization of the controller. In Section 5, the dynamic model of the conical tank is described, with the experimental results shown in Section 6. Finally, the discussion and conclusions of the work are presented in Sections 7 and 8.


## 2. Adaptive Neuro-Fuzzy Control System

Both adaptive control and robust control are techniques employed when the mathematical model is incapable of representing the actual system accurately. The purpose of robust control is to determine a law of control to maintain the system response and the error signal within the limits predetermined when having uncertainty in the model. As a goal, adaptive control searches the adaptability of the closed-loop system to variant behavioral circumstances in the system dynamics and disturbances [32]. In addition, adaptive control allows the observation of two dynamic behaviors in constant evolution with different time lapses. Consequently, parameter changes can be observed at a slow scale and thus the rate of adjustment of the parameters. Likewise, on a fast scale, the closed-loop dynamics in the system are observed [32].The adaptive control technique is capable of facing disturbances, uncertainties, and variances of operative conditions in the system dynamic employing an adaptation law with direct and indirect methods [33]. Thus, indirect methods estimate the plant parameters for adjusting the controller, while direct methods utilize the estimated parameters directly in the adaptive controller [2]. The indirect method is based on the certainty equivalence principle (CEP), where the model of the system is adjusted by observing its behavior through time to consequently design a control policy regarding the obtained model as veracious [34].The model reference adaptive control (MRAC) employs a reference model (consequent with the desired behavior) to define the adaptive laws to ensure output tracking [35]. Besides, it must be considered that changes in the operating conditions may demand a restart of the adaptation procedure.The employed architecture applies two neuro-fuzzy systems: one for the controller, and another for the plant model. Under this scheme, the plant is firstly identified, and later the training of the controller takes place. Figure1 shows the indirect adaptive control scheme and the neuro-fuzzy systems employed. In this diagram, the section of the reference model corresponds to the system’s desired behavior.Figure 1
Control schemes using neuro-fuzzy systems.Plant identification can be performed offline to obtain data from the plant in an open loop using different input signals to represent the plant behavior; this is to set an initial neuro-fuzzy model. When the identification control system is in operation, identification is performed online to obtain the training data to measure the plant during operation.In the adaptive control, the offline identification allows an initial configuration for the model of the plant employing the back propagation algorithm [36]. Then, as observed in Figure 1, the model is progressively adjusted online taking input and output data from the plant. Considering the scheme in Figure 1 after identification, the model is used in the control loop to train the controller using dynamic back propagation [37, 38].The adaptive neuro-fuzzy control system process is observed in Figure2; its implementation firstly includes plant identification, and later the neuro-fuzzy controller training. As observed in the scheme, the plant model is integrated with the control loop for training the controller.Figure 2
Algorithm for the process of adaptive control.As observed, the adaptive control process in Figure2 includes the following steps:Step 1: Definition of the structures and initial configurations of the controller and the neuro-fuzzy model. As an option, a controller’s previous training and plant identification can be performed.Step 2: Put into operation the control system with the actual plant and the neuro-fuzzy controller.Step 3: Input-output data are taken during system operation.Step 4: The collected data is used for new training (parameter adjustment) for the neuro-fuzzy system used for plant identification.Step 5: Controller training is performed employing the adjusted model.Step 6: If the operation of the control is unfinished, the whole process is repeated from Step 2 for the next time interval.As observed both plant identification and controller training are carried out iteratively in a way that the plant’s output reaches the desired referenced value after a variation in the plant takes place.


## 3. Architecture for Plant Identification

Regarding plant identification, it must be borne that an approach to the system model consists of the estimation of a neural structure capable of performing the same function [39]. For neuro-fuzzy plant identification, three samples are used for the input and two for the output. The scheme is displayed in Figure 3. The output can be seen as a non-linear function where z−1 represents an element of memory (delay).Figure 3
Neuro-fuzzy system for the plant.From this point of view, the result is a set of output dataysn given by (1), where Hp represents the vector of parameters in the neuro-fuzzy system.(1)ysn=fpun,un−1,un−2,yn−1,yn−2,Hp.Regarding [26], architecture I is employed in plant identification (compact fuzzy system) using Gaussian fuzzy sets. Figure 4 illustrates an example. Such architecture is similar to that conventionally employed in radial basis neural networks [40].Figure 4
Gaussian fuzzy set.Equation (2) shows the input-output expression employing the product as t-norm and using Gaussian fuzzy sets. The equation associated with the inference process is(2)fw=∑l=1Myl∏i=1Nexp−wi−δilρil2.In this way, the respective activation function is(3)Yl=∏i=1Nexp−wi−δilρil2.Then, the system output is calculated as(4)f=∑l=1MylYl,where M is the number of fuzzy rules, N the number of inputs to the system, yl is the respective virtual actuator, δil and ρil are the center and the standard deviation of the Gaussian fuzzy sets. Additionally, wi∈un−1,un−2,en,en−1,en−2 is the data of input to the system; in general, all input variables are represented as w.The representation of the associated neuro-fuzzy network can be seen in Figure5. The first layer corresponds to the producer of the Gaussian functions, that is, the calculation of Yl. In the second, the multiplication of Yl and the virtual actuators yl is performed. Finally, in the third layer, the inference output fw is determined.Figure 5
Representation of the neuro-fuzzy network.Taking into account the methodology for the design of compact fuzzy systems presented in [26] the rules that implement the structure of Figure 5 can be represented as shown in Boole Table 1. In general, for l=1,…,5 these rules are described as follows:Table 1
Rules associated with the structure of the neuro-fuzzy system are used for identification.
μ1,1⋯μ5,1μ1,2⋯μ5,2μ1,3⋯μ5,3μ1,4⋯μ5,4μ1,5⋯μ5,5Y1Y2Y3Y4Y5111XXXXXXXXXXXX10000XXX111XXXXXXXXX01000XXXXXX111XXXXXX00100XXXXXXXXX111XXX00010XXXXXXXXXXXX11100001Ifw1 is μ1,l and w2 is μ2,l and w3 is μ3,l and w4 is μ4,l and w5 is μ5,l. Then the activation function is Yl.As observed, the activation functionYl simultaneously depends on μi,l for i=1,…,5, In this way, the output is calculated using (5) as(5)f=y1Y1+y2Y2+y3Y3+y4Y4+y5Y5.


### 3.1. Training Equations for Plant Identification

Regarding the Back Propagation algorithm and using the descending gradient algorithm to determine the system parameters, the goal is to minimize the error corresponding to(6)Jp=12fwn−yn2,where wn is the input data to the system, and yn the desired output data for a time n. These data correspond to the respective training input-output pairs.Takingα as the learning rate to carry out the training of the parameters, the derivatives of the error are calculated having(7)ylk+1=ylk−α∂Jp∂yl|n,δilk+1=δilk−α∂Jp∂δil|n,ρilk+1=ρilk−α∂Jp∂σil|n.where to update the parameters, the following equations are used:(8)ylk+1=ylk−αf−yYlδilk+1=δilk−αf−yylkYl2win−δilkρilk2ρilk+1=ρilk−αf−yylkYl2win−δilk2ρilk3.Using the previous equations, the algorithm for training parameters of the neuro-fuzzy system can be seen in Figure6.Figure 6
Algorithm for plant identification.Considering Figure6, the algorithm for the adaptation (training) of parameters of the neuro-fuzzy system consists of the following steps:Step 1: Determine the neuro-fuzzy system choosingM , N and the initial parameters.Step 2: For the current value ofn=1,2,…,NT, establish the respective input-output data pair wn,yn.Step 3: Calculate the output of the neuro-fuzzy system for an input-output pairwn,yn, at the k -th training stage, k=0,1,2,…,KT.Step 4: Update parametersylk+1, δilk+1, and ρilk+1, using the learning rate α.Step 5: Return to step 2 withk=k+1, until the error Jpk is smaller than a ε defined, or until k is equal to a certain number.Step 6: Until all the data is finished, return to Step 2 withn=n+1 to update the parameters using the following input-output pair wn+1,yn+1.In the first step, it should be noted that the higherM is, the more parameters there are, allowing greater adaptability but with greater calculation requirements. The initial value of the parameters must also be specified, that is, yl0 , δil0 , and ρil0, which can be determined according to the linguistic rules of the expert, or chosen in a way that the membership functions uniformly cover the input values. Additionally, if the learning rate α is chosen with a very large value, it may cause the algorithm not to converge, while a very small value may cause the algorithm to require more time to reach the optimal value [7].


## 3.1. Training Equations for Plant Identification

Regarding the Back Propagation algorithm and using the descending gradient algorithm to determine the system parameters, the goal is to minimize the error corresponding to(6)Jp=12fwn−yn2,where wn is the input data to the system, and yn the desired output data for a time n. These data correspond to the respective training input-output pairs.Takingα as the learning rate to carry out the training of the parameters, the derivatives of the error are calculated having(7)ylk+1=ylk−α∂Jp∂yl|n,δilk+1=δilk−α∂Jp∂δil|n,ρilk+1=ρilk−α∂Jp∂σil|n.where to update the parameters, the following equations are used:(8)ylk+1=ylk−αf−yYlδilk+1=δilk−αf−yylkYl2win−δilkρilk2ρilk+1=ρilk−αf−yylkYl2win−δilk2ρilk3.Using the previous equations, the algorithm for training parameters of the neuro-fuzzy system can be seen in Figure6.Figure 6
Algorithm for plant identification.Considering Figure6, the algorithm for the adaptation (training) of parameters of the neuro-fuzzy system consists of the following steps:Step 1: Determine the neuro-fuzzy system choosingM , N and the initial parameters.Step 2: For the current value ofn=1,2,…,NT, establish the respective input-output data pair wn,yn.Step 3: Calculate the output of the neuro-fuzzy system for an input-output pairwn,yn, at the k -th training stage, k=0,1,2,…,KT.Step 4: Update parametersylk+1, δilk+1, and ρilk+1, using the learning rate α.Step 5: Return to step 2 withk=k+1, until the error Jpk is smaller than a ε defined, or until k is equal to a certain number.Step 6: Until all the data is finished, return to Step 2 withn=n+1 to update the parameters using the following input-output pair wn+1,yn+1.In the first step, it should be noted that the higherM is, the more parameters there are, allowing greater adaptability but with greater calculation requirements. The initial value of the parameters must also be specified, that is, yl0 , δil0 , and ρil0, which can be determined according to the linguistic rules of the expert, or chosen in a way that the membership functions uniformly cover the input values. Additionally, if the learning rate α is chosen with a very large value, it may cause the algorithm not to converge, while a very small value may cause the algorithm to require more time to reach the optimal value [7].


## 4. Controller Architecture

To implement the controller, a scheme with two input delay elements and two output delay elements is used, as can be seen in Figure7. In this scheme, en is the error signal that enters the controller and un is the controller output corresponding to the control action.Figure 7
Input and output configuration used for the controller.Under this approach, the control action is given by (9), where, Hc corresponds to the parameter vector of the neuro-fuzzy system.(9)un=fcun−1,un−2,en,en−1,en−2,Hc.The controller implementation is carried out using a compact fuzzy system with architecture II employing the fuzzy sets shown in Figure8. Specifically, in Figure 8(a), a sigmoidal fuzzy set is employed to model positive values for the universe of discourse, while in Figure 8(b), negative values are represented for the error en and the control action un,Figure 8
Fuzzy sets are employed to model positive and negative values. (a) A fuzzy set is employed to model positive values. (b) A fuzzy set is used to model negative values.
(a)(b)Considering the fuzzy sets shown in Figure8 and the general structure of the controller given by Equation 10, the scheme of Figure 9 is established, where the proposed fuzzy controller is shown.Figure 9
Scheme of the neuro-fuzzy control system.Regarding Figure9, the controller output can be calculated as:(10)un=∑i=15∑j=12vijμijxi,where xi∈un−1,un−2,en,en−1,en−2,, For each input xi, a function fi can be defined as(11)fi=∑j=12vijμijxi,namely,(12)fi=vi1μi1xi+vi2μi2xi.Meanwhile, the membership functionμijxi corresponds to(13)μijxi=11+e−σijxi−γij.For derivative calculations, (13) can be represented as (14) In this way, the set of parameters of the controller corresponds to Hc=vij,σij,γij and a possible parameter of this is represented as hc=hij∈Hc :(14)μijxi=1+e−σijxi−γij−1.Regarding the design methodology displayed in [26] for compact fuzzy systems based on Boolean relations, the rules used to implement the structure of Figure 9 can be represented as shown in Boole Table 2. In general, the rules for the fuzzy system are described asIfxi is μi,1Then the activation function is Yi,1Ifxi is μi,2Then the activation function is Yi,2Table 2
Rules associated with the structure of the neuro-fuzzy system used for control.
μ1,1μ1,2μ2,1μ2,2μ3,1μ3,2μ4,1μ4,2μ5,1μ5,2Y1,1Y1,2Y2,1Y2,2Y3,1Y3,2Y4,1Y4,2Y5,1Y5,21XXXXXXXXX1000000000X1XXXXXXXX0100000000XX1XXXXXXX0010000000XXX1XXXXXX0001000000XXXX1XXXXX0000100000XXXXX1XXXX0000010000XXXXXX1XXX0000001000XXXXXXX1XX0000000100XXXXXXXX1X0000000010XXXXXXXXX10000000001wherei is the index associated with the input, and j the fuzzy set negative for j=1 or positive with j=2, As observed, in this case, the activation function is Yi,j is equal to μi,j as presented in [26].


### 4.1. Equations for Controller Parameter Training

The reference model (desired behavior) and the plant’s neuro-fuzzy model are employed for training the neuro-fuzzy controller. Considering thatyr is the response of the reference model, firstly, the performance function used for the training process is(15)Jc=12yrn−yn2=12en2.Secondly, the equation associated with the plant is(16)yn=fpyn−1,yn−2,un,un−1,un−2.Meanwhile, the error equation is(17)en=yrn−yn.Considering the expression forfi , and the architecture of the controller (Figure 9), the dynamics of the controller are given by(18)un=f1un−1+f2un−2+f3en+f4en−1+f5en−2.The derivative of the plant output with respect to the controller parameters is(19)dyndhc=ddhcfpyn−1,yn−2,un,un−1,un−2.The respective derivative of the erroren=yrn−yn for a control parameter hc is(20)dendhc=−dyndhc.In the same way, the derivative of the control actionun with respect to hij is(21)dundhij=df1endhij+df2en−1dhij+df3en−2dhij+df4un−1dhij+df5un−2dhij.As can be seen, the respective derivatives of the parameters with respect to the plant and the controller must be calculated.


### 4.2. Derivatives of the Controller Parameters with respect to the Plant

In order to have a compact expression for the plant dynamics, the representationwi∈yn−1,yn−2,un,un−1,un−2 is used. In this way, the equation to calculate the output of the plant model is(22)y=∑l=1Myl∏i=1Nexp−wi−δilρil2,with(23)μilwi=exp−wi−δilρil2,then(24)y=∑l=1Myl∏i=1Nμilwi,y=y1∏i=1Nμi1wi+y2∏i=1Nμi2wi+y3∏i=1Nμi3wi+⋯.Using the auxiliary indexj to consider the case where j≠i, the respective derivative (for the products) is(25)ddhc∏i=1Nμilwi=∑i=1N∏j=1j≠iNμjlwjdμilwidwidwidhc,taking(26)Pil=dμilwidwi∏j=1j≠iNμjlwj,with(27)dμilwidwi=ddwie−wi−δil/ρil2=−2e−wi−δil/ρil2wi−δilρil2.In this way, it is obtained:(28)dydhc=y1∑i=1NPi1dwidhc+y2∑i=1NPi2dwidhc+y3∑i=1NPi3dwidhc+⋯,dydhc=∑i=1Ny1Pi1+y2Pi2+y3Pi3+⋯dwidhc,dydhc=∑i=1N∑l=1MylPildwidhc,Namely:(29)dydhc=∑l=1MylP1ldw1dhc+∑l=1MylP2ldw2dhc+∑l=1MylP3ldw3dhc+⋯,with(30)Ci=∑l=1MylPil,then, finally, it is established that(31)dyndhij=C1dw1dhij+C2dw2dhij+C3dw3dhij+C4dw4dhij+C5dw5dhij.


### 4.3. Derivatives of the Controller Parameters with respect to the Controller

In this procedure, the auxiliary indexl is used to consider the case where l≠i, thus, to determine the respective derivatives of the controller parameters considering the controller equations,(32)dflxldhij=ddhijvl1μl1xl+ddhijvl2μl2xl,where l=1,…,5, i=1,…,5 and j=1,2; therefore, there are different cases for values of i and l, For the case when l≠i(33)dflxldhij=ddxlvl1μl1xldxldhij+ddxlvl2μl2xldxldhijdflxldhij=ddxlvl1μl1xl+ddxlvl2μl2xldxldhij.Forj=1.2, the respective derivatives are(34)ddxlvljμljxl=ddxlvlj1+e−σljxl−γlj−1,ddxlvljμljxl=vlj1+e−σljxl−γlj−2e−σljxl−γljσlj.On the other hand, whenl=i and j=1(35)dfixidhi1=ddhi1vi1μi1xi+ddxivi2μi2xidxidhi1.Also, whenl=i and j=2, the respective derivatives are(36)dfixidhi2=ddxivi1μi1xidxidhi2+ddhi2vi2μi2xi.In order to develop the above equations, first:(37)ddxivijμijxi=vij1+e−σijxi−γij−2e−σijxi−γijσij.Second, for the other derivatives,(38)ddhijvijμijxi=ddhijvij1+e−σijxi−γij−1.For the parameterhij=vij,(39)ddvijvijμijxi=1+e−σijxi−γij−1−vij1+e−σijxi−γij−2e−σijxi−γij−σijdxidvij.Taking the parameterhij=σij, it is established that(40)ddσijvijμijxi=−vij1+e−σijxi−γij−2e−σijxi−γijγij−xi−σijdxidσij.With the parameterhij=γij, it is determined that:(41)ddγijvijμijxi=−vij1+e−σijxi−γij−2e−σijxi−γijσij−σijdxidγij.In general, these equations can be written as(42)ddvijvijμijxi=Fvij+Kvijdxidvij,ddσijvijμijxi=Fσij+Kσijdxidσij,ddγijvijμijxi=Fγij+Kγijdxidγij,where(43)Fvij=1+e−σijxi−γij−1,Fσij=−vij1+e−σijxi−γij−2e−σijxi−γijγij−xi,Fγij=−vij1+e−σijxi−γij−2e−σijxi−γijσij,Kvij=vij1+e−σijxi−γij−2e−σijxi−γijσij,Kσij=vij1+e−σijxi−γij−2e−σijxi−γijσij,Kγij=vij1+e−σijxi−γij−2e−σijxi−γijσij.In general, considering a parameterhij , the derivatives can be represented in the form(44)ddhijvijμijxi=Fhij+Khijdxidhij.Regarding the case whenl=i and j=1 of the, it is obtained:(45)dfixidhi1=ddhi1vi2μi2xi+ddxivi2μi2xidxidhi1=Fhi1+Khi1dxidhi1+ddxivi2μi2xidxidhi1=Fhi1+Khi1+ddxivi2μi2xidxidhi1.Also, whenl=i and j=2 in it is established that(46)dfixidhi2=ddxivi1μi1xidxidhi2+ddhi2vi2μi2xi=ddxivi2μi2xidxidhi2+Fhi2+Khi2dxidhi2=Fhi2+ddxivi2μi2xi+Khi2dxidhi2.


### 4.4. Controller Training Process

Takingwi∈yn−1,yn−2,un,un−1,un−2 and xi∈un−1,un−2,en,en−1,en−2, in general the equations that implement the dynamics of the training parameters are(47)dendhij=−dydhij,dyndhij=C1dw1dhij+C2dw2dhij+C3dw3dhij+C4dw4dhij+C5dw5dhij,dundhij=df1x1dhij+df2x2dhij+df3x3dhij+df4x4dhij+df5x5dhij.In the last equation, ifl≠i, then,(48)dflxldhij=ddxlvl1μl1xl+ddxlvl2μl2xldxldhij.On the other hand, ifl=i, it is determined that(49)dfixidhi1=Fhi1+Khi1+ddxivi2μi2xidxidhi1,dfixidhi2=Fhi2+ddxivi1μi1xi+Khi2dxidhi2.Finally, the following equation is employed to update the parameters:(50)hijk+1=hijk−αendendhij,where α corresponds to the learning rate. Considering each parameter, it is obtained that(51)vijk+1=vijk−αendendvij,σijk+1=σijk−αendendσij,γijk+1=γijk−αendendγij.Considering the previous equations in Figure10, the algorithm for training the neuro-fuzzy controller can be observed.Figure 10
Algorithm for training the neuro-fuzzy controller.Regarding the flowchart in Figure10, the steps of the algorithm used to train the neuro-fuzzy controller are as follows:Step 1: Establish the plant model and choose the initial configuration of the controller parameters.Step 2: Calculate the reference model responseyr (desired response).Step 3: In thek -th training stage, k=0,1,2,…,KT, for the current n value of simulation, the output of the control system is calculated using the neuro-fuzzy model of the plant.Step 4: Carry out the parameter adjustment of the neuro-fuzzy controller (in auxiliary variables) using the respective equations that involve the dynamics of the control system, and the respective derivatives (equations (51), (54), and subsequent).Step 5: Untiln is equal to the defined value NT (simulation time), return to Step 3 for the next simulation step n=n+1 (where the output of the control system is calculated).Step 6: In the case of completing the simulation time, the newly optimized controller parameters are updated.Step 7: Return to Step 3 for a new iterationk=k+1, until Jck=∑n=1NTJck,n is smaller than a ε defined, or until k is equal to a defined number KT.It should be noted that in Step 4 of the algorithm the parameters to be adjusted are stored in auxiliary variables, since during this step the controller parameters do not change.


## 4.1. Equations for Controller Parameter Training

The reference model (desired behavior) and the plant’s neuro-fuzzy model are employed for training the neuro-fuzzy controller. Considering thatyr is the response of the reference model, firstly, the performance function used for the training process is(15)Jc=12yrn−yn2=12en2.Secondly, the equation associated with the plant is(16)yn=fpyn−1,yn−2,un,un−1,un−2.Meanwhile, the error equation is(17)en=yrn−yn.Considering the expression forfi , and the architecture of the controller (Figure 9), the dynamics of the controller are given by(18)un=f1un−1+f2un−2+f3en+f4en−1+f5en−2.The derivative of the plant output with respect to the controller parameters is(19)dyndhc=ddhcfpyn−1,yn−2,un,un−1,un−2.The respective derivative of the erroren=yrn−yn for a control parameter hc is(20)dendhc=−dyndhc.In the same way, the derivative of the control actionun with respect to hij is(21)dundhij=df1endhij+df2en−1dhij+df3en−2dhij+df4un−1dhij+df5un−2dhij.As can be seen, the respective derivatives of the parameters with respect to the plant and the controller must be calculated.


## 4.2. Derivatives of the Controller Parameters with respect to the Plant

In order to have a compact expression for the plant dynamics, the representationwi∈yn−1,yn−2,un,un−1,un−2 is used. In this way, the equation to calculate the output of the plant model is(22)y=∑l=1Myl∏i=1Nexp−wi−δilρil2,with(23)μilwi=exp−wi−δilρil2,then(24)y=∑l=1Myl∏i=1Nμilwi,y=y1∏i=1Nμi1wi+y2∏i=1Nμi2wi+y3∏i=1Nμi3wi+⋯.Using the auxiliary indexj to consider the case where j≠i, the respective derivative (for the products) is(25)ddhc∏i=1Nμilwi=∑i=1N∏j=1j≠iNμjlwjdμilwidwidwidhc,taking(26)Pil=dμilwidwi∏j=1j≠iNμjlwj,with(27)dμilwidwi=ddwie−wi−δil/ρil2=−2e−wi−δil/ρil2wi−δilρil2.In this way, it is obtained:(28)dydhc=y1∑i=1NPi1dwidhc+y2∑i=1NPi2dwidhc+y3∑i=1NPi3dwidhc+⋯,dydhc=∑i=1Ny1Pi1+y2Pi2+y3Pi3+⋯dwidhc,dydhc=∑i=1N∑l=1MylPildwidhc,Namely:(29)dydhc=∑l=1MylP1ldw1dhc+∑l=1MylP2ldw2dhc+∑l=1MylP3ldw3dhc+⋯,with(30)Ci=∑l=1MylPil,then, finally, it is established that(31)dyndhij=C1dw1dhij+C2dw2dhij+C3dw3dhij+C4dw4dhij+C5dw5dhij.


## 4.3. Derivatives of the Controller Parameters with respect to the Controller

In this procedure, the auxiliary indexl is used to consider the case where l≠i, thus, to determine the respective derivatives of the controller parameters considering the controller equations,(32)dflxldhij=ddhijvl1μl1xl+ddhijvl2μl2xl,where l=1,…,5, i=1,…,5 and j=1,2; therefore, there are different cases for values of i and l, For the case when l≠i(33)dflxldhij=ddxlvl1μl1xldxldhij+ddxlvl2μl2xldxldhijdflxldhij=ddxlvl1μl1xl+ddxlvl2μl2xldxldhij.Forj=1.2, the respective derivatives are(34)ddxlvljμljxl=ddxlvlj1+e−σljxl−γlj−1,ddxlvljμljxl=vlj1+e−σljxl−γlj−2e−σljxl−γljσlj.On the other hand, whenl=i and j=1(35)dfixidhi1=ddhi1vi1μi1xi+ddxivi2μi2xidxidhi1.Also, whenl=i and j=2, the respective derivatives are(36)dfixidhi2=ddxivi1μi1xidxidhi2+ddhi2vi2μi2xi.In order to develop the above equations, first:(37)ddxivijμijxi=vij1+e−σijxi−γij−2e−σijxi−γijσij.Second, for the other derivatives,(38)ddhijvijμijxi=ddhijvij1+e−σijxi−γij−1.For the parameterhij=vij,(39)ddvijvijμijxi=1+e−σijxi−γij−1−vij1+e−σijxi−γij−2e−σijxi−γij−σijdxidvij.Taking the parameterhij=σij, it is established that(40)ddσijvijμijxi=−vij1+e−σijxi−γij−2e−σijxi−γijγij−xi−σijdxidσij.With the parameterhij=γij, it is determined that:(41)ddγijvijμijxi=−vij1+e−σijxi−γij−2e−σijxi−γijσij−σijdxidγij.In general, these equations can be written as(42)ddvijvijμijxi=Fvij+Kvijdxidvij,ddσijvijμijxi=Fσij+Kσijdxidσij,ddγijvijμijxi=Fγij+Kγijdxidγij,where(43)Fvij=1+e−σijxi−γij−1,Fσij=−vij1+e−σijxi−γij−2e−σijxi−γijγij−xi,Fγij=−vij1+e−σijxi−γij−2e−σijxi−γijσij,Kvij=vij1+e−σijxi−γij−2e−σijxi−γijσij,Kσij=vij1+e−σijxi−γij−2e−σijxi−γijσij,Kγij=vij1+e−σijxi−γij−2e−σijxi−γijσij.In general, considering a parameterhij , the derivatives can be represented in the form(44)ddhijvijμijxi=Fhij+Khijdxidhij.Regarding the case whenl=i and j=1 of the, it is obtained:(45)dfixidhi1=ddhi1vi2μi2xi+ddxivi2μi2xidxidhi1=Fhi1+Khi1dxidhi1+ddxivi2μi2xidxidhi1=Fhi1+Khi1+ddxivi2μi2xidxidhi1.Also, whenl=i and j=2 in it is established that(46)dfixidhi2=ddxivi1μi1xidxidhi2+ddhi2vi2μi2xi=ddxivi2μi2xidxidhi2+Fhi2+Khi2dxidhi2=Fhi2+ddxivi2μi2xi+Khi2dxidhi2.


## 4.4. Controller Training Process

Takingwi∈yn−1,yn−2,un,un−1,un−2 and xi∈un−1,un−2,en,en−1,en−2, in general the equations that implement the dynamics of the training parameters are(47)dendhij=−dydhij,dyndhij=C1dw1dhij+C2dw2dhij+C3dw3dhij+C4dw4dhij+C5dw5dhij,dundhij=df1x1dhij+df2x2dhij+df3x3dhij+df4x4dhij+df5x5dhij.In the last equation, ifl≠i, then,(48)dflxldhij=ddxlvl1μl1xl+ddxlvl2μl2xldxldhij.On the other hand, ifl=i, it is determined that(49)dfixidhi1=Fhi1+Khi1+ddxivi2μi2xidxidhi1,dfixidhi2=Fhi2+ddxivi1μi1xi+Khi2dxidhi2.Finally, the following equation is employed to update the parameters:(50)hijk+1=hijk−αendendhij,where α corresponds to the learning rate. Considering each parameter, it is obtained that(51)vijk+1=vijk−αendendvij,σijk+1=σijk−αendendσij,γijk+1=γijk−αendendγij.Considering the previous equations in Figure10, the algorithm for training the neuro-fuzzy controller can be observed.Figure 10
Algorithm for training the neuro-fuzzy controller.Regarding the flowchart in Figure10, the steps of the algorithm used to train the neuro-fuzzy controller are as follows:Step 1: Establish the plant model and choose the initial configuration of the controller parameters.Step 2: Calculate the reference model responseyr (desired response).Step 3: In thek -th training stage, k=0,1,2,…,KT, for the current n value of simulation, the output of the control system is calculated using the neuro-fuzzy model of the plant.Step 4: Carry out the parameter adjustment of the neuro-fuzzy controller (in auxiliary variables) using the respective equations that involve the dynamics of the control system, and the respective derivatives (equations (51), (54), and subsequent).Step 5: Untiln is equal to the defined value NT (simulation time), return to Step 3 for the next simulation step n=n+1 (where the output of the control system is calculated).Step 6: In the case of completing the simulation time, the newly optimized controller parameters are updated.Step 7: Return to Step 3 for a new iterationk=k+1, until Jck=∑n=1NTJck,n is smaller than a ε defined, or until k is equal to a defined number KT.It should be noted that in Step 4 of the algorithm the parameters to be adjusted are stored in auxiliary variables, since during this step the controller parameters do not change.


## 5. Conical Tank Model

The conical tank system is a single input single output (SISO) process. The output of this process is the levelht and the input to the process is the liquid flow Fi , The scheme of the conical tank considered can be seen in Figure 11.Figure 11
Conical tank diagram.For this system, a liquid with constant density enters at a volumetric rateFi in a conical tank of height Hm and maximum radius Rm , The output of the tank is F0=Kvh , where h is the height of the liquid in the tank, and Kv is the valve coefficient. The process has high non-linearity due to changes in the process gain, and the time constant with respect to the height of the liquid in the tank [41].Considering the inputFi, and the output Fo, according to the law of mass conservation, the accumulation is the mass that enters minus the mass that leaves. Since mass conservation manifests as an increase or decrease in volume, accumulation is the change in volume with respect to time.(52)dVdt=Fi−Fo.Considering Figure11, the circular cone has volume:(53)V=π3r2h.From the geometry of the tank, it is observed that:(54)r=RmHmh.Then:(55)V=π3RmHm2h3.Taking the derivative with respect to time:(56)dVdt=πRmHm2h2dhdt.In this way,(57)dhdt=Fi−KvhπRm/Hm2h2.The block diagram of this system is shown in Figure12, where the non-linearities present in the hydraulic system can be seen. Tank parameters are displayed in Table 3.Figure 12
Block diagram associated with the conical tank.Table 3
Conical tank parameters.
ParameterDescriptionValueRmMax radius0.48mHmMax height1.2mFiInput flow0.0072 m3/s (max)KvValve coefficient0.0067m2/shHeightVariableFoOutflowVariablerRadius dependent ofhVariable


## 6. Results

A systematic location of the Gaussian membership functions in the range−1.51.5 with variance 2, and virtual actuators started in zero, is carried out for the fuzzy system initial configuration (employed for plant identification). As this assignment is systematic, it requires previous training before using it in the adaptive control system. The data used to perform the training can be seen in Figure 13.Figure 13
Data of the plant in an open loop.Plant identification is performed by using 400 training epochs, and the results can be seen in Figure14 obtaining a mean squared error (MSE) of 0.0012.Figure 14
Result of the identification process in open loop.For the initial configuration of the controller are employed functionsfi displaying a linear behavior in the range −2.02.0, as shown in Figure 15; in addition, virtual actuators are started in zero for parameter optimization.Figure 15
Considered shape forfi.The reference model given by the transfer function in is used to carry out controller training. It can be observed that the system has a settling time of 200 1seconds. Figure16 shows the reference model response, namely, the type of expected (desired) behavior when optimizing the controller.(58)Gs=YsRs=150s+1.Figure 16
Reference model response.The simulation of the adaptive control is achieved considering different reference values where the identification of the plant and the training of the controller are carried out iteratively. The simulation result is shown in Figure17, where Figure 17(a) displays the level of the tank when the reference value is changed. In the first iteration, the plant output does not reach the reference value, after several iterations for the plant identification and controller optimization, the plant output reaches the reference value. In this way, it can be seen that the adaptive process allows adjusting the neuro-fuzzy model of the plant and the controller. Meanwhile, Figure 17(b) displays the input flow to the conical tank in, which is required for the system to reach the reference value. In this result, a progressive adjustment is also observed for the input flow to achieve the desired output value.Figure 17
Response of the adaptive control system. (a) Control system output. (b) Input flow to the conical tank.
(a)(b)Furthermore, to observe the operation of the adaptive control system in detail, Figure18 shows progressive adjustments to identify the plant and the controller training; in this way, it is observed that the tank level reaches the reference value. When each adjustment is made, the dynamic system response displays similar behavior to the reference model. Plant identification and controller adjustment are carried out with data obtained during the operation of the plant. In this way, it is observed the correction made by the system when the controller (optimized) comes into operation. Finally, it can be also seen that the greatest adjustment is made in the first iteration of the iterative process.Figure 18
Detail of the adaptive control system response.


## 7. Discussion

Regarding [26] in this work, architecture I was used for plant identification and architecture II for the controller. As can be seen, neuro-fuzzy architecture I present greater complexity than architecture II, whereby previous training for the neuro-fuzzy system was necessary. It is possible to define a strategy to reduce preliminary information aiming at reducing the complexity when settling inference rules in the neuro-fuzzy system.In addition, the distribution of Gaussian sets in architecture I is relevant for the initial configuration. In this development, the distribution was carried out systematically in the respective input universes; nevertheless, different types of fuzzy sets and other alternatives can be considered as part of the assignment and configuration.The development presented in this work may be employed to implement MIMO systems, such as that presented in [28], since MIMO systems can be built from SISO sub-systems with neuro-fuzzy architectures of types I and II.Plant identification is essential when implementing adaptive control, which is rooted in the equivalence principle of certainty. To improve the performance of the control system, it is first necessary to guarantee a suitable identification process. Further works may well consider different configurations and architectures in the membership functions to design neuro-fuzzy systems.The work presented here consists of an application of fuzzy systems based on Boolean relations considering the most relevant aspects in regard to the design and application of an adaptive neuro-fuzzy control system. Regarding developments of the proposed adaptive control system, the implementations developed have mainly focused on displaying different aspects related to the design and training considering various plant types. Consequently, it is expected to carry out a detailed stability analysis of fuzzy systems based on Boolean relations using the Lyapunov functions and the Krasovskii theorem in later work.


## 8. Conclusions

The proposed adaptive neuro-fuzzy control scheme allows the iterative adjustment of the plant model and the controller when there are variations in the plant. Additionally, this work displays the necessary equations and algorithms for training neuro-fuzzy systems.Plant identification is essential for the correct operation of the adaptive control system; for this reason, the initial configuration of the plant model takes place considering the equivalence principle of certainty. Likewise, for plant identification, the amount of available data is limited when having a variety of parameters, which requires progressive adjustment to identify the plant and to optimize the controller.The simulations allow us to observe that the adaptive scheme achieves the adjustment of the plant model and controller with the aim that the system output reaches the expected (desired) value.Further works may consider different configurations and architectures of fuzzy sets, including the mechanisms to determine the initial configuration of neuro-fuzzy systems, aiming to improve the adaptive control system performance.Moreover, SISO sub-systems could be employed with neuro-fuzzy architectures I and II to enhance the implementation of adaptive control MIMO systems.



---

*Source: 4284378-2022-10-29.xml*