Abstract
In this paper, a robust and chattering-free sliding-mode control strategy using recurrent neural networks (RNNs) and H∞ approach for a class of nonlinear systems with uncertainties is proposed. The dynamic and algebraic models of the RNN are extracted based on the nominal model of the system and formulation of a quadratic programming problem. For tuning the parameters of the sliding surface, the performance index and the switching coefficient, a robust approach based on the H∞ method is developed. To this end, the control law is divided into two parts: (1) the main term, which includes the feedback error and (2) other terms, which include the network states, the reference input and its derivatives and the effects of the uncertainties. The feedback error gain is tuned by solving a linear matrix inequality. The neural optimizer determines the sliding-mode control law without being directly affected by the uncertainties. By applying the proposed method to the continuous-stirred reactor tank and the inverted pendulum problems, the performance of the proposed controller has been evaluated in terms of the tracking accuracy, elimination of the chattering, robustness against the uncertainties and feasibility of the control signals. Moreover, the results are compared with the conventional and twisting sliding-mode control methods.
Introduction
Achieving performance goals such as transient response and good accuracy in the steady state, feasibility of the solution and robustness in the face of uncertainties and nonlinearities are essential in nonlinear control systems. Robust control methods can be appropriate strategies for the realization of system regulation or tracking in the presence of model mismatches and disturbances in the system dynamics.
Methods such as H∞ control approaches are perfect tools for tuning control parameters in linear systems with uncertainties. In this approach, the state or output feedback gains are tuned based on the infinite norm of the closed-loop transfer function and the relation between the robust stability and solving the linear matrix inequalities (LMIs). However, development of the H∞-based approaches for nonlinear systems is a difficult task. Variable structure methods with high accuracy and good performance are appropriate approaches for the linear and nonlinear systems, especially in the case of model uncertainties and nonlinearities. Sliding-mode control (SMC) method is an example of such methods, where the definition of a stable sliding surface causes the system states to move along the sliding surface and remain on it from any initial condition.
Generally, the SMC law consists of an equivalent control law to achieve nominal stability of the closed-loop system and a switching control law to provide its robustness. However, there are major issues regarding the design of this control method including chattering phenomenon (Feng et al., 2014), optimal sliding surface (Das and Mahanta, 2014) and robustness of the closed-loop system (Moradi and Majd, 2015; Yang et al., 2016). Adverse fluctuations around the sliding surface, technically known as the chattering, are one of the major challenges in the SMCs. The chattering is caused by the switching nature of the control law due to the non-idealities in the switching term such as time delay, high-frequency effects of the parasites and the unmolded dynamics, which results in dramatic decline in the control system performance and damage to the actuators (Incremona et al., 2017). Numerous strategies have been developed in recent years to remove or reduce the effects of chattering.
The boundary layer is the simplest approach, where the approximation of the switching function with the saturation operator causes the system trajectories to converge to the area around the sliding surface (Saghafinia et al., 2014). In addition, hyperbolic tangent function (Aghababa and Akbari, 2012) and fuzzy logic (Li et al., 2017; Niknam et al., 2014) have been employed in order to approximate the switching function. The fundamental problem with these methods is the lack of good accuracy of the closed-loop performance. By using an integrator between the controller and the main system, the chattering can be eliminated (Mobayen, 2014; Wang et al., 2017). In this approach, a switching is included in the derivation of the control signal that removes the chattering in the control signal. Nevertheless, sensitivity to the measurement noise and the initial conditions, integration drift and need to estimate the derivatives of the uncertainties are some of the problems with this SMC method. The high-order SMCs have been considered by many researchers during the last decade. The premise in these approaches is forming a sliding manifold as a function of the sliding surface and its derivatives such that the switching function is implicitly or explicitly excluded from the control law. As a result, the chattering is significantly reduced or completely eliminated. The most significant high-order SMCs are twisting and super twisting (Benbouhenni et al., 2018; Evangelista et al., 2013; Shtessel et al., 2017), sub-optimal (Ferrara and Incremona, 2015; Liu and Li, 2014), methods based on the reaching law modification (Mondal and Mahanta, 2012) and the method based on the high-order derivatives of the sliding surface (Ding et al., 2015; Bartolini et al., 2016; Shtessel et al., 2014a). In these methods, the sign of the sliding surface and its derivative is used. This provides more degrees of freedom to the control law. However, this method can only reduce, and not eliminate, the chattering. In the modified reaching law, the sliding surface and its sign are simultaneously used for the convergence of the states towards the sliding surface. The high-order derivatives of the sliding surface can also be used to remove the switching term directly from the control signal. Therefore, it can be expected that the chattering is reduced or eliminated. Major challenges in the design of the high-order SMCs include sensitivity to the measurement noise and initial conditions, which increase the design complexity, inability to remove chattering completely and differentiator problems. Further issues regarding the high-order SMCs are finite-time convergence (Behnamgol and Vali, 2015; Song et al., 2017) and chattering analysis (Ren et al., 2016; Shtessel et al., 2014b).
Conventionally, the optimization problem in the SMCs is defined as finding an optimum sliding manifold corresponding to an integral performance index. The index is defined based on the tracking, regulation and minimization of the control costs. In the majority of these methods, the switching is designed separately from the optimized term. Particularly, the main goal of these methods is dealing with the uncertainties (Tang et al., 2008). Therefore, optimality is merely taken into account in the sliding-surface parameters or in the equivalent control law. This means that the sliding-mode law is not optimal. Since the impacts of uncertainties are included in the sliding-mode gain, the optimality of the control law tends to diminish. On the other hand, it is possible to increase the signal amplitude, especially in the transient conditions. To address this problem, a number of studies have employed a saturation operator in designing the control law (Ding and Zheng, 2016; Huang et al., 2016; Li et al., 2016). In general, the saturation function causes a performance decline in the closed-loop control system and requires a systematic method to guide the optimal control law within its permissible range. In general, in the optimal SMC methods, the constrained optimization problem is not developed and only a tuning of the sliding-surface parameters is considered.
In this paper, a constrained optimal and chattering-free SMC method using recurrent neural networks (RNNs) and H∞ robust method is developed. In the proposed approach, the optimality is realized using the definition of a performance index based on the derivative of the sliding surface and minimization of the control cost. Moreover, the optimization problem, which is solved using the RNN, considers the physical limitations of the actuator. Accordingly, the switching is explicitly removed from the control law, yielding a chattering-free SMC. In addition, in order to obtain robustness against uncertainties in the system parameters, the coefficients of the sliding surface and the performance index are determined using the H∞ approach, which is based on the infinite norm of the closed-loop transfer function. Furthermore, the convergence analysis of the RNN is performed using the Lyapunov stability theory.
The advantages of the proposed control method can be summarized as follows:
Explicit elimination of the switching function in the SMC law and hence, complete removal of the chattering;
Access to the optimal control law by defining a quadratic performance index and solving it using the RNN;
Considering the constraints on the control signals and improving their applicability in the practical systems;
Making use of a neural optimizer with a simple structure and solid convergence analysis;
Automatic offline adjustment of the control parameters using the H∞ algorithm without any need for real-time calculations;
High-rate convergence of solving the optimization problem and the ability to develop it for the real-time applications;
No need for input matrix inversion and hence, avoiding the singularity problem in the control law;
No need for any adaptation to the dynamic model of the system;
Applicability of the proposed method to linear and nonlinear systems;
Ability to deal with the structural and non-structural uncertainties.
This paper is organized as follows. In Section 2, the dynamic model of the system is presented along with the assumptions, which are necessary to design the control law. The constrained SMC problem is presented in Section 3. In Section 4, the dynamic model of the RNN for solving the constrained quadratic programming (QP) problem is introduced and the convergence analysis is provided. In Section 5, the problem of H∞ control is described for robustness of the closed-loop system in the presence of uncertainties. Section 6 shows simulating example and discussions. Conclusions are drawn in Section 7.
Problem statement
Consider the following nonlinear single-input single-output (SISO) dynamic system
where
where
The purpose of the proposed control scheme is to design the sliding-mode control law without any chattering. Moreover, the control signal should be optimal considering the system constraints. In addition, the closed-loop system should be robust against uncertainties in the system parameters. The design of this controller is performed in the following steps: (1) defining a suitable performance index based on the derivatives of the sliding surface and constructing a constraint QP problem; (2) formulating the dynamic and algebraic models of the RNN for solving the constraint optimization problem and extracting the control law for the normal operation of the system; (3) using the
Introducing constrained optimal sliding-mode controller
Let the relative degree of the system in (2) be m. Then
The sliding surface is defined in the integral–derivative form as follows
where
where
Differentiating the sliding surface in (4) yields
Based on the relative degree of the system (m) and the nominal dynamic model in (1), it gives
which can be rewritten as
where
Substituting (8) in (5) yields
Simplifying (9) gives
The third term in (10) is independent of the control signal, which is the optimization variable. Hence, this term can be ignored in the optimization problem. Therefore, the constraint optimization problem can be stated as follows
To guarantee stability of the closed-loop system, the states of the system must move toward the sliding surface from any initial condition and remain on it. This means that the reaching law
By defining
Equation (13) represents a constrained QP problem with static and dynamic constraints that will be solved using RNNs in this paper. This provides good tracking performance of the closed-loop system in addition to the minimum control cost and satisfying the control constraints and the reaching law (i.e. the fundamental condition of the SMC).
It should be noted that the optimization problem in (13) denotes a QP with linear and nonlinear constraints and hence, in general, it is a nonlinear optimization problem.
Recurrent neural network for solving QP problem
In order to solve the constrained optimization problem in (13), the dynamic model of the RNN that is based on the variational inequality (VI) and the projection theorems, will be used. First, the primary optimization problem will be converted to a dual problem. Then, based on the Karush-Kuhn-Tucker (KKT) optimal conditions (Kinderlehrer and Stampacchia, 1980), the dynamic and algebraic model of the RNN will be derived (Liu and Wang, 2006). To formulate the control law, some preliminaries must be introduced first.
Suppose
which is known as the VI. If the control signal is the optimization variable, one can write
Based on the fixed-point theorem, the optimal solution of VI in (14) corresponds to the optimal solution of the following projection problem (Kinderlehrer and Stampacchia, 1980)
where
where
First, the QP Problem in (13) is converted to the following dual problem (Liu and Wang, 2006)
where
Defining a new variable
According to the constrained space in (13), we have
where
Based on (16) and inevitability of
Since the optimal solution of the problem in (17) is equivalent to the optimal solution of the projection theorem in (20), the dynamic model of the RNN can be considered as follows
where
The block diagram of the PRNN including its dynamic model and the output equation is shown in Figure 1. As this figure shows, the activation functions are piecewise linear. Moreover, when the number of constraints increases, the network can perform parallel processing. The simplicity of the network structure along with the parallel processing and the piecewise-linear form of the activation functions provides a fast solver for the constraint optimization problem in hand. This makes it very suitable for real-time applications.

Block diagram of the projection RNN.
Based on the proposed approach, the control law is formulated using the PRNN by solving the QP problem in (13). It should be noted that there is no explicit switching function in the proposed control signal in (21). This is similar to the dynamic sliding-mode and high-order sliding-mode control methods. The switching function exists only in the reaching law as a dynamic constraint. In other words, the switching function only affects the bounds of the optimization problem. In fact, the PRNN finds an optimal solution for the control signal in the feasible control space and avoids the critical bounds, which create chattering.
In the following, convergence analysis of the PRNN using the Lyapunov stability theory will be presented. First, the following lemmas should be considered.
The time derivative of (25) is
Using the dynamic model of the PRNN in (22) yields
By defining
Based on Lemma 1 for the optimal point
Using Lemma 2, (29) can be reformulated as
which can be rewritten as
Moreover, based on (21)
Therefore, (31) can be represented as follows
The relation in (33) shows that the time derivative of the Lyapunov function is negative. Therefore, the PRNN in (22) is asymptotic convergent to its equilibrium point.
Equation (33) shows stability of the PRNN. The network, which includes the dynamics and output equations, is derived for minimization of the QP problem in (13). The QP problem has been obtained by reformulating the optimization problem in (5) for the control signal (u) as the optimization variable. Therefore, minimizing the QP is equal to minimizing the primary problem in (5). Moreover, equation (33) has been obtained using some lemmas about the projection theorem and variational inequality and only concludes that the time derivative of the Lyapunov function in (28) is negative.
It should be noted that, the PRNN-based SMC in (21) has been derived based on the nominal model of the system. In order to insure robustness of the closed-loop system against uncertainties in the system parameters, the control parameters such as the weighting coefficients of the performance index (q and p) and the parameters of the sliding surface (λ i ) will be obtained using the H∞ approach, which will be described in the next section.
Parameter fine tuning using H∞ control strategy
An important goal in the SMC approaches is to encounter model uncertainties and external disturbance. In this way, ensuring robustness of the closed-loop system is essential. For this purpose, the
Consider the dynamic model in (2). By defining the tracking error as
where
Considering
where
The control law in (21) can be written as
Equation (36) can be decomposed into an error feedback and a feedback including the neural network states and the reference inputs. In other words
where
The aim of the H∞ strategy is to determine the error feedback gain
where
where
The control law
Matrix
The closed-loop transfer function between
The block diagram of the proposed PRNN-based optimal SMC using the H∞ strategy is shown in Figure 2. As this figure shows, the control parameters have been determined offline using the H∞ algorithm. Then, using the data received from the sliding surface and the control constraints, the SMC law is applied to the system based on the dynamic model of the RNN.

Block diagram of the proposed optimal sliding-mode controller.
where
The control law
the inequalities in (41) can be rewritten as
By defining
where
Simplifying (46) gives
The second part of (47) can be rewritten as
Therefore
which is the same as (45).
For satisfying (45), it is sufficient that there exists matrix
where
in which
Using the right and left factors of matrices
By defining
Suppose there exists
Or equivalently
which can be simplified as
Manipulating (56) gives (Iwasaki and Skelton, 1994)
where
Inequality (57) is equivalent to
Using (59), the solution of (57) can be given as follows (Iwasaki and Skelton, 1994)
Therefore
where
Hence, the robust feedback control law, which can be determined explicitly using (61), is a solution of the LMI problem in (45).
The procedure for finding the control parameters using the
Compute matrix
Select
Select an arbitrary positive
Compute matrices
Compute matrices
Compute
Compute the feedback gain
Compute the control parameters, i.e. q, p, and
Simulating examples
where

Schematic view of CSTR system.
Based on the proposed control structure, the dynamics of CSTR is decomposed into linear and nonlinear parts as follows
By considering the reactant temperature as the output, the relative degree of the system is equal to zero. Therefore, the sliding surface is defined as follows
where
It should be noted that the nonlinear part of (64) is considered as the uncertainty. Moreover, since the variations of
The sampling time is 0.2 sec. The limitations on the control signal is

Temperature response of CSTR using the proposed control algorithm.

Control signal.

Satisfaction of reaching law.

Behavior of reactant concentration.

Variations of nonlinear terms of CSTR.
Based on the results, it can be observed that no chattering exists in state variables as well as in the control signal. Moreover, the control method is capable of effectively realizing the performance goals by avoiding singularity in the control law and keeping its magnitude in the predefined range. As mentioned in the previous sections, the simple structure of the PRNN makes it suitable for real time applications. This issue can be seen in Figure 9, where the computational time required to obtain the control signal corresponding to each sample, is much less than the sampling time. Figure 10 shows that the proposed approach is also able to track a sinusoidal input with fast converging time.

Computational time required to obtain control signal corresponding to each sample.

Tracking of sinusoidal input using the proposed approach.
Hence, the advantages of the proposed method may be summarized as follows: (1) removing the chattering, (2) optimality of the control signal, (3) feasibility of the solution, (4) offline fine tuning of the control parameters for robustness against uncertainties in the system parameters, (5) avoiding singularities, (6) online optimization, (7) simple structure of the neural optimizer, (8) powerful convergence analysis.
Next, performance of the proposed algorithm will be compared with the classic SMC (Slotine and Li, 1991) and the second-order SMC known as the twisting algorithm (Evangelista et al., 2013). Considering the sliding surface in (65). Then, the control law for the classic SMC is equal to
In the twisting algorithm, a switching term based on the time derivative of the sliding surface is added to the control law
where

Temperature response of CSTR using conventional SMC.

Control signal of classic SMC.
Figures 13 and 14 show performance of the twisting algorithm. Increasing the switching gains (e.g.,

Temperature response of CSTR using twisting algorithm.

Control signal using twisting algorithm.
Compression between the control methods
Next, for more evaluations, it is supposed that an uncertainty has been occurred in the parameter

Temperature response of CSTR with parametric uncertainties and external disturbances.

Control signals for responses in Figure 15.
where M, m, l and g are mass of the cart, mass and length of the pendulum and gravity acceleration constant, respectively, x and
in which
where
where
where
where r is the wheel radius. By considering the state vector as
where
in which
The numeral values of the parameters have been selected as (Campbell et al., 2008)
The initial states of the inverted pendulum and the constraints on the input signal are considered as

Trajectory of the pendulum angle.

Control signals.

Trajectory of the pendulum angle in twisting algorithm by applying control limits.

Control signals obtained by twisting algorithm.
Conclusion
In this paper, an optimal and robust SMC method using RNNs based on the projection theorem and the H∞ strategy was designed. The cost function includes the derivative of the sliding surface and the control cost. The constraints were the control signal limitations and the reaching law of the SMC. The convergence of the neural optimizer was analyzed using the Lyapunov stability theory. Adjusting the control parameters in the presence of model uncertainties has been performed by solving an LMI problem and an appropriate analysis method. Convergence speed of the RNN was considerably high, which could make it a viable tool for solving online optimization problems. The proposed method was compared with the classic and twisting SMCs, which suffer from chattering, inappropriate transient responses, and violating the input constraints. It was shown that the proposed algorithm is able to remove chattering from the control signals, avoids the singularity and encounter the parametric and non-parametric uncertainties in the model. Moreover, it is able to consider the actuator limits and has an offline methodology to adjust the control parameters. Simple structure of the neural optimizer and its convergence analysis are some other benefits of the proposed algorithm.
Footnotes
Appendix
Declaration of conflicting interests
The author(s) declared no potential conflict of interests with respect to the research, authorship and/or publication of this article.
Funding
The author(s) received no financial support for the research, authorship, and/or publication of this article.
