Recursive Terminal Sliding-Mode Control Method for Nonlinear System Based on Double Hidden Layer Fuzzy Emotional Recurrent Neural Network

Aiming at the problem of the coexistence of nonlinearity and uncertainty in the control systems, a novel control method which combines the double hidden layer fuzzy emotional recurrent neural network (DHLFERNN) and the recursive terminal sliding mode control (RTSMC) is proposed. Firstly, a novel double hidden layer fuzzy emotional recurrent neural network (DHLFERNN) is designed. The proposed DHLFERNN can be considered as a combination of a fuzzy neural network (FNN) and a double hidden layer recurrent neural network (DHLRNN) in the framework of brain emotional learning (BEL), which could make the controller obtain higher nonlinear approximation ability. Secondly, a recursive terminal sliding mode control (RTSMC) method based on the DHLFERNN is proposed. In this method, the nonlinear sliding-mode equivalent control term is approximated by the proposed DHLFERNN, which makes the controller possess a good nonlinear approximation ability when the nonlinear model cannot be obtained exactly. Finally, the stability of closed-loop system is proved by the Lyapunov method, and the adaptive law of each parameter in DHLFERNN is derived. The proposed method is verified on an inverted pendulum system, and the comparison with other control methods proves that the proposed method has faster convergence speed and higher control accuracy.


I. INTRODUCTION
Nowadays, the nonlinear control has been one of the hot topics in the field of control. The main difficulties for the nonlinear control include two aspects: one is the mathematical model is often difficult to obtain, the other is the systems usually operate in an uncertain environments. Therefore, it is necessary to develop an effective control method with both unknown nonlinear approximation ability and uncertainty handling ability.
On the one hand, for the nonlinear systems with unknown model, artificial neural network has developed rapidly in The associate editor coordinating the review of this manuscript and approving it for publication was Mohammad Alshabi . recent years with its powerful nonlinear approximation ability [1]. When the system model is unknown, RBF neural network can effectively improve the performance of the control system. In particular, integrating artificial neural networks with other algorithms has become the focus in recent years. Yang and Liu proposed a RBFNN adaptive control method for a class of nonlinear systems [2]. Tong Yang et al. proposed adaptive optimal motion control for uncertain underactuated mechatronic systems with actuator constraints. For some unknown dynamics of the underactuated systems, radial basis function (RBF) neural networks were used to approximate them [3]. Shen et al. proposed a distributed secondary voltage sliding mode control method for islanded microgrid based on RBF neural network [4]. For nonholonomic wheeled mobile robots with model uncertainties, Park et al. proposed adaptive neural sliding mode control [5]. Tong Yang, Ning Sun proposed neuroadaptive control for complicated underactuated systems with simultaneous output and velocity constraints. Aiming at the unknown parameters/structures of the driven subsystem, the RBFNN is used for online approximation [6]. However, in some complicated environments, it is necessary but difficult for a single hidden layer RBF neural network to approximate a complicated nonlinear function. Furthermore, a single hidden layer RBF neural network sometimes needs a large number of neurons, which will result in overlong training time and high computational complexity. Fortunately, the parameters in depth neural network are usually less than those in RBF neural network with single hidden layer, and it can also achieve higher control accuracy. Ahmadi et al. proposed a new method of human iris recognition based on multilayer perceptron neural network and particle swarm optimization algorithm, which make the neural network train and improve its generalization performance [7]. Fei et al. combined double hidden layer recurrent neural network (DHLRNN) with global sliding mode to form an adaptive global sliding mode controller based on double hidden layer recurrent neural network [8]. In addition, fuzzy neural network (FNN) is also a universal approximator, which combines the advantages of fuzzy logic system and neural network. Hsu proposed a self-organizing adaptive fuzzy neural controller for nonlinear systems in order to improve the performance of fuzzy neural networks [9]. Wai designed a SMC scheme based on FNN, which relieved the requirements for accurate model and solved the chattering problem in SMC system [10]. It is worth noting that in recent years, due to its fast response speed and strong nonlinear approximation ability, the emotional neural network has received more and more attention as a new type of neural network [11], [12].
For emotional neural networks, a classical emotional architecture is based on the computing model originally proposed by Moren and Balkenius [13]. Moren's brain emotional learning model (BEL) consists of the amygdala, the orbitofrontal cortex (OFC), the sensory cortex and the thalamus, and the amygdala is the main part of emotional learning. The data first enters the thalamus, which is regarded as a simple identity function, then, the sensory cortex receives the output of thalamus and distributes it to the amygdala and the OFC. Total output of the BEL model is calculated by subtracting the output of the OFC from the output of amygdala. Weights of the amygdala parts can only be increased, but the weights of the OFC can be decreased or increased, which can inhibit the incorrect reaction of amygdala. In 2004, Lucas et al. developed a brain emotional learning-based intelligent controller (BELBIC). This is the first time that BEL model has been used as a controller of the system, and it shows excellent control action and robustness to the system with disturbances and parameters uncertainty [14]. In 2014, Lotfi and Akbarzadeh-T designed an limbic-based artificial emotional neural network (LiAENN) based on Moren's BEL model, and it was applied to the face detection and the emotion recognition [15]. In 2019, Parsapoor comprehensively reviewed the brain emotional learning-inspired models (BELiMs) from the aspects of history, theory, structure and function [16], then she verified BELiMs in the time series prediction problem. In 2020, F. Baghbani et al. proposed a Continuous Radial Basis Emotional Neural Network (CRBENN), and a direct adaptive robust emotional neuro control approach (DARENC) is obtained by combining CRBENN with the sliding mode control. An important contribution is that it gives the proof of the system stability based on the Lyapunov method [17].
On the other hand, nonlinear control systems often contain unknown disturbances, which increases the design difficulty of the controller. Sliding mode control (SMC) method is insensitive to matched disturbances, so it is usually regarded as a classic method for designing nonlinear controllers [18], [19]. But, the traditional SMC often adopts the linear sliding surface, and the states of the system can only asymptotically converge to zero. Fortunately, the terminal SMC (TSMC) algorithm has attracted more and more attention because it can achieve finite time convergence [20]. Generally, the whole process of sliding mode control includes the arrival mode stage and the sliding mode stage, while the system is robust to parameter uncertainty only in sliding mode stage. For the arrival mode stage, we can set the initial value of recursive terminal sliding mode control (RTSMC) to make the sliding variable start on the sliding mode surface, thus reducing the arrival time [21]. Even though, an unavoidable problem is that in the sliding mode stage, the control law is usually strongly dependent on the nonlinear mathematical model of the system. If a neural network with fast response and strong approximation ability can be used to approximate the equivalent control part, the performance of the controller will be greatly improved when the model is difficult to establish accurately.
Based on the above thinking, this paper proposes a double hidden layer fuzzy emotional recurrent neural network (DHLFERNN). Different from the existing neural networks, DHLFERNN not only combines the advantages of DHLRNN and fuzzy neural network based on the framework of the emotion neural network, but also considers the expected penalty signal sent by the amygdala to the OFC, as well as the internal loop of the amygdala and the OFC, so it better improves the nonlinear approximation accuracy. Next, DHLFERNN is used to approximate a nonlinear recursive terminal sliding mode equivalent control term to form an efficient compound controller.The main contributions of in this paper are as follows: (1) A novel emotional recurrent neural network with faster response speed and higher approximation accuracy is constructed. Firstly, a fuzzy neural network with fuzzy reasoning ability is introduced into the OFC, which can decreases the rely on the expert knowledge. Secondly, taking a DHLRNN into the Amygdala, which can use fewer nodes of the neural network while having higher approximation accuracy. Finally, the above two neural networks are put into the framework of BEL, to form the proposed DHLFERNN, which could obtain a better approximation performance.
(2) In order to deal with the disturbances, and also to further improve the control system performance, a recursive terminal sliding mode surface is combined with the proposed DHLFERNN, aiming at improving the control accuracy of the system and the convergence speed of the error on a higher level when the system model is unknown, meanwhile, the robustness of the controlled system is ensured.
(3) By the Lyapunov stability theory, the stability of the whole closed-loop system is proved, and the adaptive law of each parameter in DHLFERNN is obtained. As far as we know, there is no research to combine the emotional neural network with the RTSMC, not to mention giving a complete stability proof for the proposed method.

II. THE PROPOSED DHLFERNN STRUCTURE
The proposed neural network structure is shown in Figure 1, which includes the amygdala and the OFC. Among them, the amygdala is composed of the DHLRNN, and the OFC is composed of the fuzzy neural network and some special connections from the amygdala. According to the characteristics of the BEL model, the neural network in the OFC will inhibit the inappropriate response of the neural network in the amygdala, so the total output of the network is u = V T − W T . Firstly, compared with single hidden layer RBF neural network, double hidden layer RBF neural network has the advantage of extracting more feature information and reducing the number of neurons [22]. Secondly, the adopted fuzzy neural network gets rid of the dependence on fuzzy logic while possessing the learning ability of neural network. In particular, in the proposed structure of OFC, the final activation function of the neural network is obtained by multiplying the fuzzy neural network with some signals who come from Amygdala, and these signals can be regarded as the expected punishment signals. This structure is more consistent with the biological model of the brain, which will correct the unwanted output [8], [23].
More specifically, the proposed DHLFERNN consists of the following parts: The first part is the input layer: the input signal of the neural network is defined as The amygdala has two subparts, the first subpart is the combination of the base of the amygdala and the lateral part, and the second subpart is the combination of the base of the amygdala and the medial part of the cortex. These two subparts are connected to each other and send signals to each other. The OFC also has two subparts, the first subpart is the inner region of the OFC, and the second subpart is the outer region of the it. These two subparts also have the same connection. In order to realize it, we embed the internal loop into the input of the network [24], which is written as where is the delay time, r 1 and r 2 is the loop weight of the inner loop. The second part is the amygdala, which is realized by DHLRNN.
In the first hidden layer, the characteristic information of the input signal is collected, and the Gaussian radial basis function is adopted as the activation function. The output value of the j th node in this layer is defined as where the center value of the node of Gaussian radial basis function is defined as C 1 = [c 11 , c 12 , . . . , c 1n ] T ∈ R n×1 and the width value of the Gaussian radial basis function node is defined as In the second layer, the Gaussian radial basis function is going to further collect the characteristic information of the first hidden layer. Then the output value of the j th node in this layer is defined as where the center value and base width value of the node are defined as: . Therefore, we can define the activation function of the amygdala as So, the output of amygdala is calculated as . The third part is the OFC, which is composed of the fuzzy neural network, and also realized by Gaussian radial basis function, here we can define the Gaussian radial basis function as Therefore, the Gaussian radial basis function of the j th node for the i th input signal can be described as where m i j and σ i j are center value and base width value of the Gaussian radial basis function. Further, their vector forms can be described as Next, we need to deblur the signals, where the function of the j th node is defined as In order to simulate the link between the amygdala and the OFC, the output from the activation function of the amygdala was introduced into the OFC. The final activation function of OFC is obtained by multiplying the outputs from the two activation functions As the result, the output of the OFC is calculated as where . The fourth part is the output layer: According to the structure shown in Figure 1, the total output is calculated as

III. PROBLEM FORMULATION
Consider the following second-order uncertain system is an unknown positive function, and G n (x) is an known nonlinear functions that satisfies The control target is to make the tracking error converge to zero as accurately as possible. Normally, the traditional sliding mode control adopts a linear sliding surface, and the tracking error can only converge to zero asymptotically when the system states are sliding on the sliding mode surface, i.e. although the asymptotic convergence rate can be changed by adjusting the sliding mode parameters, the tracking error in the system will not converge to zero in finite time. To address this problem, here the RTSMC is considered to ensure the finite time convergence.
Define the tracking error and its derivative as In order to construct the recursive terminal sliding mode controller, a fast nonsingular terminal sliding mode surface ρ is firstly defined as where sig(x) α = |x| α sgn(x), k > 0, γ > 0, and α > 1. Then, the recursive terminal sliding surface is defined as where λ > 0, β ∈ (0, 1). There is a recursive structure between the recursive terminal sliding surface s and the fast nonsingular terminal sliding surface ρ. When the second sliding surface s converges to zero, the first sliding surface reaches the convergence condition, and the first sliding surface ρ also converges to zero in a finite time. Again the corresponding tracking error e reaches the convergence condition and converges to zero in a finite time. According to this order, each sliding surface can be successfully reached.
In addition, in order to reduce the convergence time, the initial value of the integral term is set as: By bringing equation (22) into equation (20), it is easy to see that the initial value of the RTSMC is 0, which means that the control system just starts on the sliding surface s, thus shortening the convergence time.
Further, the derivative of the RTSMC is calculated aṡ Letṡ = 0, one gets the equivalent control law Next, the switching control law is designed as follows where Moreover, unlike traditional symbolic function, the designed switching function in (25) is associated with a integral gain . It can not only ensure that the states of the system speed up to converge when it is far from the sliding mode surface, but also ensure that the states will not pass through the sliding mode surface when the states point is close to the sliding mode surface. Therefore, the chattering phenomenon can be effectively decreased.
At last, the final control law is constructed as follows The schematic diagram of the proposed ideal RTSMC is shown in Fig 2. Lemma 1: For the following first-order differential inequalities:V where V (X ) is a positive definite Lyapunov function with respect to the state x ∈ R, τ > 0, 0 < ς < 1, then for any initial condition V (x(0)) = V (0), finite time calculation of V (X ) converging to the origin is as follows: Theorem 1: For a class of second-order uncertain system (16), if the sliding surface is designed as (19)- (21) and the control law (26) is adopted, the nonlinear system (16) can be guaranteed to be globally asymptotically stable in a finite time.
Proof: A Lyapunov function is selected as Derive equation (29) and substitute equations (20)-(23), one getṡ If k 3 | | ≥ l 0 is satisfied, thenV 1 ≤ 0 is semi-negative definite. By the Lyapunov stability theory, then the nonlinear system (16) can be guaranteed to be globally asymptotically stable.
Remark 1: A similar proof can be found in [25], but here in this paper an integral gain is added to the switching control law according to [23], which can effectively decrease the chattering phenomenon.
Furtherly, follow the literature [21], we give the proof for the finite time convergence of s, ρ and e.
It can be known from Equation (30) and Lemma 1 that the time t s for V 1 to converge from V 1 (0) to 0 under any initial conditions can be calculated as Once s = 0 is established in (20), ρ = −λρ I can be deduced, so ρ and ρ I have the same convergence time. According to formula (20) and (21), it can be calculated aṡ Because ρ = −λρ I , it gives that the ρ in (32) converges to zero in the finite time of When both sliding surfaces are reached, it can be known from equation (19):ė Now, the arrival time of e is analyzed, and the Lyapunov function is selected as The derivative of V e iṡ According to (27), one gets the time of convergence to zero in any initial states: To sum up, fast nonsingular terminal sliding surface ρ and recursive integral terminal sliding surface s will converge to zero in finite time, and the tracking error e will also converge to zero in finite time. The total convergence time is t = t s + t ρ + t e .

IV. RECURRENT TERMINAL SLIDING MODE CONTROL BASED ON DHLFERNN
From (26), it can be seen that the control law depends on the accurate mathematical model. However, it is usually difficult to realize because the accurate mathematical model is hard to obtain. So here in this section, the proposed DHLFERNN is adopted to approximate the equivalent control term in (26).

A. PARAMETER LEARNING OF THE DHLFERNN
When the DHLFERNN is used to approximate the equivalent control law, there exist the optimal parameters W * , C * 1 , C * 2 , B * 1 , B * 2 , m * , σ * , V * , which satisfy the following equation: where F * and * are the optimal value of F and , and ε is the minimum error. The optimal parameters of the DHLFERNN are defined as The equivalent control law u eq of the optimal RTSMC can be approximated by the DHLFERNN when the optimal parameters exist, and it can be expressed aŝ whereF andˆ are the estimated value of F * and * , and W ,Ĉ 1 ,Ĉ 2 ,B 1 ,B 2 ,m,σ , andV are the estimated values for the optimal parameters W * , C * 1 , C * 2 , B * 1 , B * 2 , m * , σ * , and V * . Due to the error between the actual value u eq and the approximate valueû eq , for deriving the adaptive laws of the DHLFERNN, the approximate error of the network will be defined as Next the nonlinear activation function is transformed into partial linear form by Taylor expansion linearization technique. The Taylor expansion of F * at V * =V , The Taylor expansion of * at W * =Ŵ , m * =m, and σ * = σ is available as where O h1 and O h are the high-order term in the expression of the Taylor expansion. F c1 , F c2 , F b 1 , F b2 , m and σ can be described in the following forms.
Taking (42)-(49) into (41) obtains is a combined error, and it is assumed to be bounded.
Remark 2: Compared with the change of , if the sampling interval is set short enough, then it can be assumed that the combined error is bounded. The same assumption could be found in [26], [27].

B. STABILITY ANALYSIS
The block diagram of RTSMC based on the proposed DHLFERNN is shown in Figure 3. Different from the ideal RTSMC block diagram, the recursive terminal sliding mode surface will participate in the learning process of the proposed eight adaptive laws of DHLFERNN. The parameters of DHLFERNN will be adaptively adjusted to the optimal value by the designed adaptive law. To sum up, the following controller is constructed.
The adaptive law of the neural network parameters is as follows:Ẇ Remark 3: In order to improve the control performance in practical application, we adopt the following methods to select the control gain. In our control method, k, γ , λ, α, and β are some positive parameters included in s, we can choose the size of this parameters by trial and error. For the switching control term, it is used to suppress the lumped disturbance and the approximation error generated by the neural network. For the gains k 1 , k 2 and k 3 contained in the switching term can be selected through simple trial and error experiments, however, the larger their values are, the more robust they are. In the adaptive lawẆ ,V ,ċ 1 ,ċ 2 ,ḃ 1 ,ḃ 2ṁ andσ of the emotional neural network parameters, learning factor η w , η v , η c1 , η c2 , η b1 , η b2 , η m , and η σ can be chosen by trial and error and they can determine the convergence rate of parameters, but the difference between η w and η v values cannot be too large, because if there is too much difference, it will lead to the emotional runaway. Suitable learning factor means a faster learning speed, which will enable it to converge to the expected value as quickly as possible. Theorem 2: For an uncertain second-order system (16), when the uncertain disturbances l and unknown nonlinear functions f (x) are bounded, if the sliding surface is designed as (19) -(21), the controller (51) is adopted, and the parameter updating law is designed as (52), then the output tracking error can converge to zero in finite time, and the nonlinear system (16) can be guaranteed to be globally asymptotically stable.
Proof: A positive-definite Lyapunov function is chosen as For convenience, define the following symbol Differentiation of Lyapunov function (53), and using (23) and (51), one can obtain (55), as shown at the bottom of the next page. If the adaptive law (52) is substituted into (55), one obtainṡ Taking into account s − max(s, 0) ≤ s, the formula (56) can be rewritten aṡ Since the unknown disturbance l, approximation error , andṼ TF are all bounded, once k 3 | | > + l +Ṽ TF , it can be guaranteed thatV 2 ≤ 0, which means that both V 2 and s are bounded. Because V 2 (0) is bounded and V 2 (t) is non-incrementally bounded, we can deduce that lim t→∞ t 0 s dt is bounded. Soṡ is also bounded. According to Barbalat's lemma, s(t) will asymptotically converge to zero, i.e., lim t→∞ s = 0. Then according to the previous analysis in Theorem 1, the designed controller can guarantee the globally asymptotical stability of the system and make the output tracking error converge to zero in finite time.

V. SIMULATION AND EXPERIMENTAL RESULTS
To verify the proposed method, here we take a SISO inverted pendulum system as the test model, this model takes the pendulum of the inverted pendulum system as the control VOLUME 10, 2022 object, without considering the control problem of the trolley displacement. The dynamics of the system are as followṡ where d is the disturbance, x 1 and x 2 are the states of the system, and x 1 is the angle of the pendulum from the vertical axis, and x 2 is the angular velocity. In addition, m p = 0.1 kg is the mass of the pendulum, M = 1 kg is the mass of card, g p = 9.8 m s 2 is the gravity constant, and 2l = 0.5 m is the length of the pendulum. The initial value of the states are [x 1 (0), x 2 (0)] = [0.52, 0]. The goal is to design a controller such that the system states follow the desired reference trajectory x 1d = sin(t).
In order to show the superiority of the proposed control method, it is compared with the DARENC, which is a control method of combining emotional neural network with sliding mode control proposed by F. Baghbani et al. in 2020 [17]. In comparison, the parameters of DARENC are consistent with those set in F. Baghbani's paper. Table 1 shows that the performance of the proposed method (RTSMC with DHLFERNN) is compared with that of (DARENC).
In the simulation process, we set the external disturbance of the system as d = 4 sin(3πt). Fig. 4 and Fig. 5 show the trajectories of x 1 and x 2 . According to Fig. 4 and Fig. 5, both methods realize the tracking. According to Fig. 4, it can be clearly seen that the proposed method has faster convergence speed and higher control accuracy than DARENC, and according to Table 1, we can see that the convergence time of DARENC controller is 4.92s, while the convergence time of the controller proposed in this paper is only 0.29s. Fig. 6 shows the error e of the inverted pendulum system, it can be clearly seen from Fig. 6 that the proposed method has smaller tracking error than DARENC. In addition, according to Table 1, the proposed method has smaller Root-Mean-Square Error (RMSE) than DARENC.
To sum up, the results show that compared with DARENC, the controller proposed in this paper has a faster response speed and more better control accuracy while the number of neurons is reduced.
In order to highlight the advantages of the proposed emotional recurrent neural network, another two methods used for comparison are constructed here. In the two methods, the RTSMC shown in formula (20) and the control law shown in formula (51) are still used, but theû eq is approximated bẏ   continuous radial basis emotional neural network (CRBENN) and radial basis function network (RBFNN) respectively. The CRBENN is proposed in [17] and its form iŝ where V j and W j are the corresponding weights of the amygdala and the OFC, µ j and σ j are center value and base width value of the Gaussian radial basis function. The RBFNN is an existing universal neural network [3], [6] and its form iŝ where W j are the weights, µ j and σ j are center value and base width value of the Gaussian radial basis function. Therefore, we have constructed two control methods (RTSMC with CRBENN and RTSMC with RBFNN) different from those proposed in this paper as follows u rbfnn = 1 G n û rbfenn − k 1 s + k 2 sig(s) ν + k 3 | | sgn(s) In the simulation process, we set the external disturbance of the system as d = 0. In order to better illustrate the superiority of the proposed method, both the parameters related to  RTSMC in the proposed method and the constructed methods are set to the same, where k = 15, γ = 3, α = 1.2, λ = 4, β = 0.5, k 1 = 100, k 2 = 200, k 3 = 0.9, k f = −10, and v = 0.9. Table 2 shows that the performance comparison between the proposed method, the RTSMC with CRBENN and the RTSMC with RBFNN. Fig. 7 shows the trajectories of x 1 of RTSMC with DHLFERNN, RTSMC with CRBENN and RTSMC with RBFNN. Fig. 8 shows the error e of RTSMC with DHLFERNN, RTSMC with CRBENN and RTSMC with RBFNN. It can be seen from Fig. 7 that both of them have good performance to track the desired displacement, but the proposed method has a faster convergence speed and higher control accuracy than RTSMC with CRBENN and RTSMC with RBFNN. The same conclusion can be obtained by Fig. 8. In addition, according to Table 2, the proposed method has smaller Root-Mean-Square Error (RMSE) than the RTSMC with CRBENN and RTSMC with RBFNN. Fig. 9 and Fig. 10 show the changes of weights in the amygdala and the OFC of the proposed DHLFERNN. As shown in the figures, it can be concluded that the proposed DHLFERNN conforms to the characteristics of emotional neural network, in other words, the weight V of amygdala can only be increased, while the weight W of OFC can be increased or decreased.

VI. CONCLUSION
In this paper, a new neural network is proposed, which integrates both the DHLRNN and FNN, and then put them into the framework of the emotional model, forming a double hidden fuzzy emotional neural network. Then the proposed DHLFERNN is combined with recursive terminal sliding mode to realize an efficient control for the system considering both the unknown model and the disturbance. By the Lyapunov method, we get the adaptive law of the parameters in the proposed neural network, and prove the stability of the whole closed-loop system. Then it is applied to the inverted pendulum system for simulation experiment. The results show that the proposed method has faster response speed and higher control accuracy than the traditional ones.
Our future research interests mainly include the following three points. First, we hope to improve the performance of our emotional neural network, and add a neural network structure optimization algorithm based on the dynamic nodes to it, which is more consistent with the structure of biological brain neural network. Second, we hope to apply our neural networks to a wider range of control methods such as optimal control. Finally, it needs to further explore the practicality of the proposed controller in the real world to develop its full potential.