IAE Minimization in Sliding Mode Control With Input and Velocity Constraints

In this work an optimal sliding mode controller for second order, nonlinear systems is proposed. First, the sliding surface is selected to obtain finite time convergence to the desired state. Moreover, to ensure robustness with respect to unknown external disturbances and model uncertainties, the surface is time-varying and at the start of the control process it intersects the point, whose coordinates are defined by the initial state. Thus, the existence of the sliding mode is ensured for the whole control process. Next, admissible values of the hyperplane parameters, that ensure satisfaction of velocity and/or control signal constraints are determined. Lastly, optimal values of these parameters, in terms of integral absolute error (IAE) are calculated. The main motivation of this paper was to obtain the good dynamical performance of the system and robustness by eliminating the reaching phase, overcoming the external, unknown disturbances and obtaining a finite-time convergence of the representative point to the desired state. The other main issue was to include some key limitations such as control signal and velocity constraints in order to facilitate the practical application of this strategy.


I. INTRODUCTION
Sliding mode control is one of the well-known variable structure control methods. Its main favorable properties are robustness with respect to external disturbances [10] and minimal requirements of computational power. Due to these advantages sliding mode control is frequently used in electric drives, mechanical systems, and many diverse practical systems [1]- [8], [11], [12]. The basis of this methodology has been developed in the previous century [13], [14], however it still is an active research field both from the theoretical [15] and practical [16] perspective.
The discontinuous nature of the sliding mode control signal makes it particularly suited for controlling power electronic and electric drive systems. In [2] the control of a linear permanent magnet synchronous machine is analyzed. A sliding mode controller is enhanced by a neural network, that compensates for the impact of disturbances. In this way, the chattering can be minimized. To further reduce this unfavorable phenomenon, the sign function in the control law is replaced by a dynamical saturation function, that ''tunes'' the boundary layer to ensure small error and minimal chattering. The proposed approach is tested on an experimental stand The associate editor coordinating the review of this manuscript and approving it for publication was Zhuang Xu . and compared to a sliding mode controller without the neural network. The comparison clearly shows improved control precision and reduced oscillations. A similar task of controlling rotational speed of a Permanent Magnet Synchronous Motor (PMSM) was tackled in [3]. For this task, the authors have chosen a super-twisting sliding mode controller. The parameters of the controller are then adjusted on-line by a neural network, in order to accommodate the unknown, changing levels of disturbances. The proposed approach is tested in simulations as well as on a laboratory stand. The results show significant advantages over typical sliding mode control and linear Proportional Integral Derivative (PID) control.
Sliding mode control is also often used in the recently very active area of Unmanned Aerial Vehicle (UAV) control. In [4] the control of a quadrotor is considered. The authors propose a reaching law that consists of two hyperbolic functions. It allows to achieve fast convergence far away from the switching hyperplane, while reducing the convergence in its vicinity (to limit the risk of inducing oscillations in the system). The sliding mode controller is combined with a ''system dynamics estimator'' used to estimate the wind speed. As is well known, using observers to calculate the values of disturbances can reduce chattering, as it allows to decrease the discontinuous term in the control signal.
The estimator is based on an assumption of limited rate of change of wind speed. As the real wind speed can come in gusts, this assumption seems not realistic. Unfortunately, even though the authors test their approach on a real quadrotor, they do so inside a laboratory, with constant wind speed simulated by a fan. This makes it hard to evaluate, how the solution would perform in the real world. In [5] an adaptive non-singular terminal supertwisting sliding mode controller was used for the related problem of UAV formation control. Formations of UAVs can be useful for e.g. inspection works, such as monitoring photovoltaic panels or electric cables. First a sliding mode trajectory tracking controller for the leader is derived, then, based on the leader trajectory, a formation controller generates trajectories for all of the followers. Finally, the controller designed for the leader is applied in each follower. Computer simulations verify, that the proposed approach ensures formation control robust to the wind disturbances acting on the UAVs. The problem of formation control was solved using a nonsingular terminal sliding mode controller in [6]. The main difference is that in [6] it is assumed that not all UAVs have direct communication with the leader, and the formation must be held using only local distance information. Moreover, [6] utilizes a collision avoidance mechanism based on artificial potential field, which was not considered in [5]. The performance of the proposed approach is validated both in theory and in computer simulations.
In [7] the problem of controlling a bridge crane is analyzed. A time varying sliding mode controller is designed, in which, similarly to the approach in this paper, the sliding hyperplane is chosen to pass through the initial state, which allows to ensure robustness from the start of the control process. The chosen crane model takes into account all of the moving masses separately: the trolley, the hook and the suspended load, and the main task of the controller is to move the load quickly, but without inducing excessive oscillations in the system. The method is compared in computer simulations with two methods with constant sliding hyperplanes and the advantages such as significantly less oscillation and better robustness are clearly visible. In [9] a problem in which minimization of oscillations of moving masses is also important, namely a benchmark problem of position control of a ball located on a beam, was considered. An integral sliding mode controller is used to remove the reaching phase and a smooth version of the sign function is introduced to remove chattering. The remarkable control precision is illustrated in tests on a laboratory stand. In the work [12] a second order sliding mode controller is designed for load frequency control in a multi area power system. First a linear observer is designed to estimate the unknown system states. A sliding mode controller then uses this information to minimize frequency deviations.
More and more commonly, the control is performed through a network system, instead of a direct connection between each actuator or sensor and the controller. This allows to reduce the costs and improve the extensibility.
However, it also introduces some problems, such as varying transmission delays and packet losses. In paper [8] the authors present an extensive review of up-to-date sliding mode control algorithms using networked control.
The sliding mode control paradigm is often used not only for control, but also for observer design. One of the advantages of sliding mode observers is that the estimation error gets driven to zero in finite time [17]- [19], not asymptotically as in ''traditional'' observers. In [1] the problem of state of charge estimation in a vanadium redox battery is analyzed. First, a concentration model is derived and tuned using particle swarm optimization. Then, the system is transformed to the control canonical form and a sliding mode observer is designed. As the state of charge is hard to measure directly, the battery voltage difference between the real system and the observer is used to determine the observation precision in real tests on an experimental battery. Moreover, the color of electrolytes in full charge and discharge state confirms the proper operation of the observer. In [11] a sliding mode observer for stator current and rotor flux linkage is developed for a bearingless induction machine. This type of motors has some significant advantages due to replacing the mechanical bearings by additional windings in the stator. By controlling the current in these windings radial forces can be generated, which keeps the rotor ''levitating'' inside the stator. This allows to greatly increase the attainable rotor speeds and reduces the friction force. The authors propose to use a saturation function to limit the chattering phenomenon in the observer. Simulation results demonstrate, that the proposed observer offers shorter convergence time and smaller steady state error than the Model Reference Adaptive System (MRAS) speed identification usually used for this purpose.
From the practical point of view it is important to take into account some natural limitations. One of the examples may be constraining the velocity of the object to prevent mechanical damage. During our research we found only a few methods in which these bounds are connected with the sliding mode control. This motivated us to analyze such a sliding mode controller, that achieves a good dynamical performance in the presence of some limitations. This work extends the approach presented previously [20], by taking into account the minimization of IAE, instead of the regulation time. This approach is more advantageous, as it ensures minimizing the transient error value, and not only the convergence time to the desired state. Moreover, the approach enables the designer to enforce a priori known bounds on the system velocity and/or the control signal value.

II. SLIDING MODE CONTROLLER DESIGN
In this section the sliding mode controller for the second order continuous-time system will be derived and presented. In order to eliminate the reaching phase and in consequence obtain robustness for the whole regulation process, a timevarying sliding line will be introduced. The next goal of the paper is to achieve a finite-time convergence of the representative point (state vector) to the demand state. An important 28632 VOLUME 10, 2022 issue during the design of the sliding mode controller is to take into account natural external disturbances and limitations resulting from the environmental conditions or design restrictions. In this paper, bounded, unknown external disturbances will be considered as well as constraints imposed on: • control signal, • system's velocity, • both control signal and system's velocity. Furthermore, in order to evaluate the dynamical performance of the system and drive the representative point to the demand state in the shortest possible time, without violating constraints mentioned above, IAE quality index will be calculated and minimized. In the paper, the following second order dynamical system will be considered System's position χ 1 (τ ) and system's velocity χ 2 (τ ) form the state vector. Function γ as well as external disturbances δ are both unknown. However, the absolute value of the sum of these two functions is bounded from above by a positive, known parameter i.e. |γ ( Control signal is denoted by µ and β is a positive parameter. The initial point is given as χ 1 (0) = 0, χ 2 (0) = 0 and the desired state is (0, 0). The main goal of this paper is to eliminate the reaching phase and drive the representative point to the demand state in finite-time, minimizing the IAE, while respecting imposed constraints. In order to achieve that goal a time-varying, non-linear sliding line s (τ ) = 0, where is presented. Function η is described as follows Positive scalar ρ is related to the speed of the sliding line and τ 0 is the time in which the sliding line stops and remains stationary to the end of the control process. These two parameters will be optimized in order to minimize IAE with respect to imposed limitations. Let us observe, that which means, that the representative point belongs to the sliding line at the beginning of the control process. In consequence the reaching phase is eliminated and the system becomes insensitive to the external disturbances for the whole regulation process. The sliding line at the initial moment coincides with the horizontal coordinates axis. After that it starts moving and takes a parabolic shape. Another main issue is the fact that the stable sliding motion has to be ensured. Therefore, the following input is proposed. In order to show that control signal (5) ensures the stable sliding motion, the inequality must be true for any τ > 0. This inequality does not have to be strict due to the fact that the sliding variable at τ = 0 is equal to 0. One can obtain Substituting the derivative of the system's velocity from equation (1) we get When the sign function is smaller than 0, then (8) and is always non-negative due to the fact that the absolute value of the sum of functions γ and δ is always smaller or equal to . When the sign function is equal to 0, then the derivative is also equal to 0. In the last case, when the sign function is positive, the derivative is of the form and is always non-positive. Therefore, inequality (6) is true. Remark: The proposed approach ensures the existence of the sliding motion for the whole control process, while allowing to limit the control signal and/or the system velocity. Therefore, the reaching phase is completely eliminated and an invariance with respect to external disturbances and parameter uncertainties is ensured. Moreover, due to the nonlinearity of the sliding curve, the approach ensures a finite, known a priori time of convergence to the desired state.

III. ADMISSIBLE SETS
This section comprises the calculation and introduction of admissible sets composed of the sliding line parameters ρ and τ 0 . These sets will be derived in presence of constraints mentioned in the previous section. Let us observe, that there are two possible movements of the switching curve. It can stop during the control process and remain fixed to the end of it or it can be non-stationary for the whole regulation time.
In the paper both scenarios will be taken into account. In order to consider limitations imposed on the system, first we have to calculate the state vector. Using equation (2) and the existence of the stable sliding motion, one can express the second state variable as (11) VOLUME 10, 2022 We will start by calculating the square root of the absolute value of the first state variable. Substituting the above equation into the first one in (1) we get Solving the formula (12) using the Bernoulli differential equation one can obtain that Using the continuity property of (13) and comparing corresponding equations for τ = 0, τ = τ 0 and τ = τ f we get that To sum up, the square root of the absolute value of the system's position is In order to get the system's velocity, we substitute (15) into equation (11) obtaining In the case, when the sliding line moves for the whole control process, above results are of the form and the settling time is At this point it is unclear which of the above two strategies is superior, therefore we will analyze both of them. In the following sections we will derive optimal values of ρ, τ 0 for control and velocity constraints taken separately, as well as both at the same time.

A. CONTROL SIGNAL LIMITATION
Our goal is to derive such ρ and τ 0 , that for any τ ≥ 0, where the positive parameter µ max denotes upper and lower control signal limitation. Substituting control signal (5) to the above inequality one gets From the fact that the absolute value is additive and multiplicative we conclude that is true. Moreover, in order to confirm the above transformations, we have to stress the fact that the system's position is non-zero until the end of the control process. Now, two phases will be considered. In the first one, the time will belong to the interval from the moment when the sliding line stops and remains fixed to the end of the control process. The second time interval is from the initial time until the line stops. 1) τ > τ 0 . From (3) one can observe that in this case η is a constant function of the form η(t) = ρτ 0 , i.e. it's derivative with respect to time is always equal to zero. Hence, inequality (22) is of the form and However, the above equation depends on parameter ρ. Therefore, we have to analyze the second case, in which the representative point slides along the moving switching curve. 2) τ ≤ τ 0 .
In this case function η is of the form η (τ ) = ρτ. Therefore, d dτ η (τ ) = ρ. Hence, inequality (22) can be rewritten as follows From the inequality (23) one can obtain that ρ 2 τ 2 2 ≤ |β| µ max − holds for any τ ≤ τ 0 . Therefore, we have to demand that is true. The representative point moves on the sliding line for the whole regulation process, therefore one can observe that the maximum of the absolute value of the system's position is |χ 1 (0)| . Hence, in order to satisfy (26) it is sufficient, that and in consequence In the second case -when the sliding line moves for the whole control process -inequality (25) has to hold on the boundary of the domain. For τ = 0 the ρ limitation is of the form (28).
On the other hand, if τ = τ f , then we have to demand that Let us observe, that (29) is harder to fulfill than (28).

B. SYSTEM'S VELOCITY LIMITATION
In this subsection, the main goal is to derive sliding line parameters for which for any τ ≥ 0. It means that the absolute value of the system's velocity is limited by χ 2 max for the whole regulation process. In order to determine the admissible set, we will first consider the case in which the sliding line is non-stationary for the whole control process, therefore the absolute value of the system's velocity is given by (18). We will start by finding a moment when the velocity reaches its extreme value. Calculating the derivative of the first formula in (18) and equating it to zero in order to find the extreme value we get Hence, we obtain that the extreme value of the system's velocity is obtained at the moment and is equal to In consequence the admissible set is When the sliding line stops at some moment during the regulation process, we will consider two time intervals: τ ∈ [0, τ 0 ] and τ ∈ τ 0 , τ f . When the switching curve is fixed, then from the shape of it we conclude that the maximum value of the system's velocity is obtained at τ = τ 0 . Now we have to analyze the initial time interval. When τ m < τ 0 , the maximum is obtained before the sliding line stops and all of calculations are identical as in the case when the switching curve moves for the whole regulation process. The only other case is when τ m = τ 0 . However, in this case and again the admissible set is given by (34).

C. BOTH CONTROL SIGNAL AND SYSTEM's VELOCITY LIMITATIONS
In this subsection our goal is to combine admissible sets from the two previous subsections in order to satisfy limitations (20) and (30) simultaneously. Therefore, when the sliding line stops during the control process then the ρ constraint is given as and τ 0 limitation is of the form (24). In the second scenario, when the switching curve moves for the whole regulation process, then

IV. IAE MINIMIZATION
In this section first, the formula for the value of IAE will be derived. After that we will minimize that value in three cases: • when the control signal is limited, • when the system's velocity is limited, • when both control signal and velocity are limited. IAE is a popular quality index which can be written as where IAE is denoted by ψ. However, our controller ensures a finite-time convergence to the desired state. Hence, (38) can be rewritten as follows Again, we would like to consider two scenarios: when the sliding line stops during the control process and when it moves for the whole time. Let us start by taking into account the strategy, when the desired state is reached along the fixed switching curve. In this case the absolute value of the system's position can be shown as Calculating the above integral, one can obtain that it takes the form In order to minimize this quality index we have to find the stationary points (if they exist). Calculating partial derivatives of the above function with respect to ρ and τ 0 we obtain Therefore, we have to demand that equations Using the substitution ξ = ρτ 2 0 we can rewrite the above formula as follows Calculating the discriminant of the above quadratic equation we obtain which means, that zero is the only real solution of the equation (48). However, ρ and τ 0 are positive, therefore there are no stationary points and the extreme value of IAE is obtained on the boundary of the admissible set. Now let us focus on the case when the switching curve moves for the whole regulation process. In this case using the equation (17) we have that the absolute value of the system's position is given as In this case IAE is given as the first component in the sum (41). Switching the integrating boundaries to 0, τ f we get Substituting τ f given by (19) to the above equation one obtains Calculating the derivative of the above equation with respect to ρ we have The value of the right hand side of the above formula is always negative. Hence, again, the extreme value of IAE is obtained on the boundary of the admissible set. The next step will be calculating the minimum value of IAE with respect to three limitations described in the previous section.

A. IAE MINIMIZATION WITH CONTROL SIGNAL LIMITATION
In this subsection the IAE will be minimized in the presence of the input constraint. We demand that inequality (20) is true for any τ ≥ 0. Our goal is to calculate the optimal values of ρ and τ 0 . Theorem 1: If the absolute value of the control signal is bounded from above by µ max for any τ ≥ 0, then the minimized IAE is and it is obtained for The most beneficial strategy is the one in which the sliding line stops during the control process. In order to prove the above theorem we will first consider the strategy in which the switching curve stops during the control process. We have already shown that the minimum of the IAE is obtained on the boundary of the admissible set. Therefore, it is essential to calculate the minimum on the lines and ρ = |β|µ max − √ |χ 1 (0)| . Substituting these two values into equation (42) one can get that the minimum value of IAE is obtained for the maximum admissible values of parameters ρ and τ 0 (on the intersection of two mentioned lines), therefore and the minimum IAE is given by (54). In the second case, when the sliding line moves for the whole regulation process, substituting maximum admissible into equation (52) we get Comparing (54) and (58) it is easy to see that the first one is smaller than the latter one. Hence, the minimum value of IAE is given by (54) and is obtained for (55). Therefore, the most beneficial strategy is the one in which the switching curve stops during the regulation process.

B. IAE MINIMIZATION WITH SYSTEM's VELOCITY LIMITATION
In this subsection IAE will be minimized in the presence of the system's velocity limitation. Our goal is to take into account the fact that the absolute value of the system's velocity must be bounded from above by a positive parameter χ 2 max for the whole regulation process. Theorem 2: If the absolute value of the system's velocity is bounded from above by χ 2 max for any τ ≥ 0, then the minimized IAE is and it is obtained for The most beneficial strategy is the one in which the sliding line moves for the whole control process. Similarly as in the previous subsection we get that in the case when the sliding line stops during the control process, the optimal parameters ρ and τ 0 lie on the intersection of lines, which are the boundaries of the admissible set. In this case, the optimal switching line parameters are Substituting above formulas into equation (42) one can get the minimum value of IAE When the sliding line moves for the whole regulation process, then the maximum value of ρ is the same as in (61) and minimized IAE is given by (59). One can observe that (59) is smaller than (62). It means that the minimum value of IAE is given by (59) and is obtained for (60). The most beneficial strategy is the one in which the switching curve moves for the whole regulation process.

C. IAE MINIMIZATION WITH BOTH CONTROL SIGNAL AND SYSTEM's VELOCITY LIMITATIONS
In this subsection we combine the two previous subsections and take into account both control signal and system's velocity limitations. It means, that our goal is to minimize IAE, when the absolute value of the control signal is bounded from above by µ max and the absolute value of the system's velocity by χ 2 max for any τ ≥ 0. Theorem 3: If the absolute value of the control signal is bounded from above by µ max and the absolute value of the system's velocity is bounded from above by χ 2 max for any τ ≥ 0, then the minimized IAE is equal to one of three values ψ = 91 120 (65) VOLUME 10, 2022 The minimum value depends on the initial condition and constraints values. Each of the above values is obtained for In the case, when the sliding curve stops during the regulation process, the optimal (ρ, τ 0 ), for which IAE is minimal is of the form (66). We will consider three possible combinations: In this case, the minimum IAE value is (63). 2) ρ = In this case the minimum value of IAE is given by (65) When the switching curve moves for the whole regulation process, the optimal ρ is given by (67). Substituting this value into (52) we conclude that the minimum value of IAE is Let us observe that we are not able to compare formulas (65) and (68) without knowing the initial conditions. However, we can state that the minimum value of IAE will be one of the three values (63), (64) or (65), which ends the proof. Remark: The main problem that had to be solved in the above controller design was connected with finding the set of admissible parameter values and selecting the optimal parameters from that set, which proved somewhat difficult analytically. However, once this problem has been solved, the above procedure allows one to easily select the best type of motion and optimal parameter values for any system that can be described by equation (1).

V. SIMULATION EXAMPLE
Let us consider the following plant   The initial value of the system's position is 2rad. Therefore, the maximum absolute value of function γ is 4 rad s 2 due to the fact that χ 1 is strictly decreasing and sine function takes value  from the interval [−1; 1] . The absolute value of external disturbance is bounded by 2 rad s 2 . Hence, parameter has to be equal to 6 rad s 2 . Moreover, β = 1 1 kg·m 2 . In this simulation example the control signal is limited by µ max = 25Nm and the system's velocity by χ 2 max = 4 rad s . Once the control problem is defined as above, all that remains is to select the optimal values of the sliding line parameters ρ, τ 0 . This choice is explained in detail in the previous subsections, below we only present the results of this procedure.
When the control signal is limited, the minimum IAE is and the optimal sliding line parameters are One can observe that the control signal shown in Figure 1 starts from its minimum admissible value. After that its average value rises monotonically to the moment when  the sliding line stops at the time τ 0 . After that, during the movement along the fixed sliding line it switches between two values and after time τ f = 0.6882s it maintains the representative point in the desired state. System's position can be seen from Figure 2. Starting from its initial value the position decreases monotonically to the moment, when the representative point reaches the desired state. After that it remains on it, therefore its value is equal to 0rad. At first, system's velocity visible in Figure 3 decreases and after that it recovers. At the time τ 0 one can observe a change of the derivative, after which the function becomes linear. After time τ f system's velocity is equal to 0 rad s , which means that the representative point remains in the desired state.
When the absolute value of the system's velocity is bounded from above by χ 2 max , then the best strategy occurs, when the switching curve moves for the whole regulation process. In this case, the optimal ρ is ρ = 9.5459 √ rad s 2 (72) VOLUME 10, 2022  and the minimized IAE is given as In this case the average value of the control signal presented in Figure 4 increases monotonically to the moment until the representative point reaches the demand state. Moreover, its maximum value is higher than in the previous section due to the fact that we demand only a limitation of the system's velocity. Again, the system's position visible in Figure 5 decreases monotonically to the time τ f = 0.7698s and after that it remains at the level 0rad. In this case the system's velocity presented in Figure 6 reaches its minimum admissible value in order to satisfy given limitation, after that it recovers and reaches the desired value 0 rad s . In the last case, when we combine both control signal and velocity constraints, the optimal parameters are: One can observe that this value is the highest one of minimized Integral Absolute Errors. This result is logical due to the fact that we demand two constraints instead of one to be satisfied. At first, the average value of the control signal shown in Figure 7 rises and after that it reaches its maximum admissible value. After time τ f = 0.7817s its average value is equal to 0Nm. System's position seen from Figure 8 follows a similar waveform as in the previous cases, however it reaches its desired value at the latest time. System's velocity visible from Figure 9 reaches its minimum admissible value and after that the desired value is obtained. We have also compared our approach to the PID controller, which still remains one of the most commonly used controllers in industry practice. We have tuned the parameters, to obtain the best possible performance under the same operating conditions as one of the cases analyzed above. Namely, we assume the same limit on the control signal µ max = 25Nm, and velocity χ 2 max = 4 rad s . From this, the gains of the controller follow as k p = 12.5, T i = 0.91s, T d = 0.4s. The control signal can be seen from Figure 10. Starting from its minimum admissible value it rises and after that decreases and stabilizes at the neighborhood of 0Nm. We can conclude that in this strategy the representative point is not maintained in the demand state, but only in its vicinity. From Figure 11 one can observe that the system's position stabilizes in a vicinity of the demand state after 4s. It is about 5 times slower than in our strategy. Moreover, the system's position is not monotonically decreasing. From Figure 12 it can be seen that velocity reaches its minimum admissible value. However, the representative point reaches only the vicinity of the demand state. As one can observe, the PID controller utilizes both the maximum input signal range, as well as the maximum admissible speed. Unfortunately, it is not robust with respect to external disturbances and offers significantly lower response time, than the control method proposed in our paper.

VI. CONCLUSION
This paper presents the design of the IAE optimal sliding mode controller for second order, nonlinear systems. The time-varying, parabolic-shaped sliding line was used in order to eliminate the reaching phase and in consequence obtain the robustness to the external disturbances for the whole control process. Moreover, the finite time error convergence to zero is obtained. In order to evaluate the dynamical performance of the system the IAE quality index was minimized. The simulation example confirmed the theoretical considerations. Our further research in this topic will include ITAE quality index minimization. Moreover, the analysis can be extended to many areas, for example, the sliding line equation can be changed in such a manner to substitute the square root with a power greater than 1 2 and smaller than 1 in order to keep the system stable. Tuning this new parameter may lead to the improvement of our strategy by reducing the values of quality indexes even more. However, this approach introduces a new variable to our optimization problem and requires further research.