# Design of Combined Sliding Mode Controller Back Stepping Using Genetic Algorithm

Authors: Atefeh Marvi Moghadam; Saeed Balochian
Journal: Journal of Engineering
 (2013)

---

## Abstract

This research has tried to achieve a new robust controller with back stepping control and sliding mode control method. Also as we know, in all analytical controllers there are constant coefficients like the back stepping and sliding mode controllers, redesigning the Lyapunov and the feedback linearization, -H∞ and so forth. There are two major problems in their set: firstly, the adjustment is cumbersome and time-consuming. Secondly, assuming that these parameters can be adjusted to workability, a designer can never tell exactly what are the parameters chosen to be optimal. To resolve this problem, the numerical algorithm which is a genetic algorithm is used here and we have the optimal parameters of the proposed controller. That genetic algorithm (GA) has been used to solve difficult engineering problems that are complex and difficult to solve by conventional optimization methods, and at the end of this section, we apply a new robust controller on ball and beam system. Simulation results are expressed.


---

## Body

## 1. Introduction

The ball and beam system is one of the most popular and important bench systems for studying control systems. Many classical and modern control methods have been used to stabilize the ball and beam system [1, 2]. However, some of the dynamic properties were neglected in most research work regarding the ball and beam mechanism in order to simplify the dynamic equation of the system [1–7]. Yu [1] and Oh et al. [3] modeled the ball and beam system and neglected the coupling effect of the dynamic equations for two DOFs. They controlled the system considering only one DOF to define the motion of the ball on the beam and suggested two separate control algorithms for motor and ball positions. The angular velocity of the beam during the slow motion of the ball has a small value. Therefore, this parameter was neglected in modeling the ball and beam system in [3, 4, 6]. Also, due to the nonlinearity and complexity of the governing dynamics, some researchers used non-model-based control strategies such as neural network [7], fuzzy logic [3], and PID [4] to control the ball position and beam angle. In [8] is designed a tracking control strategy for the ball and beam system using a pair of decoupled fuzzy sliding mode controllers (DFSMCs). Decoupling adaptive fuzzy sliding mode control with rule reduction for nonlinear system is presented in [9]. Also, in [5], modeling and control of ball and beam system using model-based and non-model-based control approaches is presented. Pareto design of  decoupled sliding mode controllers for nonlinear systems (ball and beam) based on a multiobjective genetic algorithm is designed in [10]. Also, motivated by the work done in [11, 12], one of the characteristics of sliding mode control is the consistency of the uncertainty [13, 14].We propose a dynamic sliding mode controllers for the ball on a beam system using the complete model of the system. In this study, combiningback stepping and sliding mode methods is tried; in both methods there are several fixed parameters which are determined by the designer.  Setting  the number of state variables increases, especially when they are too numerous, is difficult. It is also possible if the parameters are properly chosen, but it cannot be said that the optimal parameters are selected. To address these problems, we have used an optimization algorithm called genetic algorithm to optimize the parameters. This paper is organized as follows: in Section2 control issues including back stepping and sliding mode are presented. In Section 3, a proposed controller approach presented. Finally, Section 4 is presents simulation result and performance of the proposed optimal combined sliding mode and back  stepping control of the ball and beam.


## 2. Control Issues

There are many cases, such as the control of helicopters, aircraft performance, and advanced industrial robots, in control that need feedback control. Various issues such as sustainable building, detection, and removal/disturbance attenuation (several combinations of them) can produce different problems in control. In addition, in control issues, other targets for the design considerations are considered that, for example, we can meet the special demands in response to specific constraints on the input supply passing mention.


### 2.1. Back Stepping Method

Back stepping is a recursive procedure that selection of Lyapunov function and design of feedback control come together. So back stepping method to using the lower-order with higher flexibility, most of the problems of stabilization, tracking, and robust control with constraints are solved with lower limitations. In this method, the system equations can be divided into two or more categories, then those equations that are not included in the control input, the design begins, and the set of these equations become stable. Then, the following equations that include inputs are stable.Consider the following single-input system:(1)η˙=f(η)+g(η)ζ+δη(η,ζ),(2)ζ˙=fa(η,ζ)+ga(η,ζ)u+δζ(η,ζ),
that is defined on the domain of D⊂Rn+1 including the origin of (η=0,ζ=0). Assuming that  ga(η,ζ) is zero,  other functions to return all values (η,ζ)∈D are cleared. Also, you can assume that f,g,fa,  and  ga are obvious, δη and δζ are also uncertainty sentences; and assumeing f and fa to be zero at the origin, the uncertainties for all are stated in the following inequalities:
(3)∥δη(η,ζ)∥2≤α1∥η∥2,(4)∥δη(η,ζ)∥≤α2∥η∥2=α3.
Inequality (3) handles the uncertainty limits because the upper bound δη(η,ζ) should only be dependent on η. Now with the start of the system (1), we followed the stabilizer state feedback control law with the ζ=ϕ(η) form, the condition ϕ(0)=0, and Lyapunov function V(η) (smooth and positive definite);  so we have for all (η,ζ)∈D for every positive c constant
(5)∂V∂η[F(η)+g(η)ϕ(η)+δη(η,ζ)]≤c∥η∥22.
Asymptotically stable means that the equilibrium is stable. The derivative is zero point; so the definite derivative is negative.Inequality (5) shows that η=0 and the system has an asymptotically stable equilibrium point:
(6)η˙=f(η)+g(η)ϕ(η)+δη(η,ζ).
Now suppose ϕ(η) on the D following inequality applies:
(7)|ϕ(η)|≤α4∥η∥2,∥∂ϕ∂η∥≤α5.
We consider the Lyapunov candidate function as follows:
(8)Va(η,ζ)=V(η)+12[ζ-ϕ(η)]2.
In this case, the Va derivative along the trajectory of (1) and (2) is as follows:
(9)V˙=∂V∂η(f+gϕ+δη)+∂V∂ηg(ζ-ϕ)+(ζ-ϕ)[fa+gau+δζ-∂ϕ∂η(f+gζ+δη)].
Select
(10)u=1ga[∂ϕ∂η(f+gζ)-∂V∂ηg-fa-k(ζ-ϕ)2],k>0,
and using (5) is thus
(11)V˙a≤-c∥η∥22+2α6∥η∥2|ζ-ϕ|-(k-α3)(ζ-ϕ)2=[∥η∥2|ζ-ϕ|]T[c-α6-α6(k-α3)][∥η∥2|ζ-ϕ|],
where “α6” is a nonnegative value. Select
(12)k>α3+α62c.
We have
(13)V˙a≤-σ[∥η∥22+|ζ-ϕ|2],
where  σ is positive value; thus the origin is asymptotically stable. For more details, see [15].


### 2.2. Sliding Mode Control

In this controller, there is also a disturbance-rejection controller like back stepping and the noise. According to this method, first, a sliding surface is defined and the sliding surface goes through the origin [16]. The position of a point in space will start to move towards the sliding surface (reaching phase). Then, these modes slide on the port side of the slide (sliding phase). If not, move toward the source that is a good point to move on the sliding surface. Consider the following system:
(14)x˙=f(x)+bu+δ(x),
where  δ(x) is disturbance; and as we can see it is a function of the states of the system:
(15)|δ(x)|≤k,
where k is the maximum disturbance and is a positive number. Suppose that the switch is selected as follows:
(16)s=x;
for the changes in the switching level reaching zero, s˙=0, we must have
(17)s˙=0,x˙=0,f(x)+bu=0,ueq=-f(x)b.
Now for the controller to be robust against disturbances, a batch component is added to it and a new controller can be obtained as follows:
(18)u=uea-dsign(s).
To prove the stability of Lyapunov function, the following is considered:
(19)V(x)=0.5|S|2+ηt,
where η is a positive number and t is time. So the above conditions are a Lyapunov function. For the above system to be stable, related derivates Lyapunov function should be negative. So according to the properties of derivative,  F(x)=|u|→f′(x)=u′/u, and (16),
(20)V˙(x)=SS˙|x|+η≤0,ss˙≤-η|x|,S(f(x)+bu+δ(x))=s(-dbsign(s)+δ(s))≤-db|s|+|sδ(s)|=-db|s|+|s||δ(x)|=|s|(-db+|δ(x)|)≤η|s|-db+k≤-η→d≥η+kb.


## 2.1. Back Stepping Method

Back stepping is a recursive procedure that selection of Lyapunov function and design of feedback control come together. So back stepping method to using the lower-order with higher flexibility, most of the problems of stabilization, tracking, and robust control with constraints are solved with lower limitations. In this method, the system equations can be divided into two or more categories, then those equations that are not included in the control input, the design begins, and the set of these equations become stable. Then, the following equations that include inputs are stable.Consider the following single-input system:(1)η˙=f(η)+g(η)ζ+δη(η,ζ),(2)ζ˙=fa(η,ζ)+ga(η,ζ)u+δζ(η,ζ),
that is defined on the domain of D⊂Rn+1 including the origin of (η=0,ζ=0). Assuming that  ga(η,ζ) is zero,  other functions to return all values (η,ζ)∈D are cleared. Also, you can assume that f,g,fa,  and  ga are obvious, δη and δζ are also uncertainty sentences; and assumeing f and fa to be zero at the origin, the uncertainties for all are stated in the following inequalities:
(3)∥δη(η,ζ)∥2≤α1∥η∥2,(4)∥δη(η,ζ)∥≤α2∥η∥2=α3.
Inequality (3) handles the uncertainty limits because the upper bound δη(η,ζ) should only be dependent on η. Now with the start of the system (1), we followed the stabilizer state feedback control law with the ζ=ϕ(η) form, the condition ϕ(0)=0, and Lyapunov function V(η) (smooth and positive definite);  so we have for all (η,ζ)∈D for every positive c constant
(5)∂V∂η[F(η)+g(η)ϕ(η)+δη(η,ζ)]≤c∥η∥22.
Asymptotically stable means that the equilibrium is stable. The derivative is zero point; so the definite derivative is negative.Inequality (5) shows that η=0 and the system has an asymptotically stable equilibrium point:
(6)η˙=f(η)+g(η)ϕ(η)+δη(η,ζ).
Now suppose ϕ(η) on the D following inequality applies:
(7)|ϕ(η)|≤α4∥η∥2,∥∂ϕ∂η∥≤α5.
We consider the Lyapunov candidate function as follows:
(8)Va(η,ζ)=V(η)+12[ζ-ϕ(η)]2.
In this case, the Va derivative along the trajectory of (1) and (2) is as follows:
(9)V˙=∂V∂η(f+gϕ+δη)+∂V∂ηg(ζ-ϕ)+(ζ-ϕ)[fa+gau+δζ-∂ϕ∂η(f+gζ+δη)].
Select
(10)u=1ga[∂ϕ∂η(f+gζ)-∂V∂ηg-fa-k(ζ-ϕ)2],k>0,
and using (5) is thus
(11)V˙a≤-c∥η∥22+2α6∥η∥2|ζ-ϕ|-(k-α3)(ζ-ϕ)2=[∥η∥2|ζ-ϕ|]T[c-α6-α6(k-α3)][∥η∥2|ζ-ϕ|],
where “α6” is a nonnegative value. Select
(12)k>α3+α62c.
We have
(13)V˙a≤-σ[∥η∥22+|ζ-ϕ|2],
where  σ is positive value; thus the origin is asymptotically stable. For more details, see [15].


## 2.2. Sliding Mode Control

In this controller, there is also a disturbance-rejection controller like back stepping and the noise. According to this method, first, a sliding surface is defined and the sliding surface goes through the origin [16]. The position of a point in space will start to move towards the sliding surface (reaching phase). Then, these modes slide on the port side of the slide (sliding phase). If not, move toward the source that is a good point to move on the sliding surface. Consider the following system:
(14)x˙=f(x)+bu+δ(x),
where  δ(x) is disturbance; and as we can see it is a function of the states of the system:
(15)|δ(x)|≤k,
where k is the maximum disturbance and is a positive number. Suppose that the switch is selected as follows:
(16)s=x;
for the changes in the switching level reaching zero, s˙=0, we must have
(17)s˙=0,x˙=0,f(x)+bu=0,ueq=-f(x)b.
Now for the controller to be robust against disturbances, a batch component is added to it and a new controller can be obtained as follows:
(18)u=uea-dsign(s).
To prove the stability of Lyapunov function, the following is considered:
(19)V(x)=0.5|S|2+ηt,
where η is a positive number and t is time. So the above conditions are a Lyapunov function. For the above system to be stable, related derivates Lyapunov function should be negative. So according to the properties of derivative,  F(x)=|u|→f′(x)=u′/u, and (16),
(20)V˙(x)=SS˙|x|+η≤0,ss˙≤-η|x|,S(f(x)+bu+δ(x))=s(-dbsign(s)+δ(s))≤-db|s|+|sδ(s)|=-db|s|+|s||δ(x)|=|s|(-db+|δ(x)|)≤η|s|-db+k≤-η→d≥η+kb.


## 3. Suggested Controller

In this study, combiningback stepping and sliding mode methods is tried. As the reader has seen, in both methods there are several fixed parameters which are determined by the designer. Setting the number of state variables increases, especially when they are too numerous, is difficult. It is also possible if the parameters are properly chosen, but it cannot be said that the optimal parameters are selected. To address these problems, we have used an optimization algorithm called genetic algorithm to optimize the parameters. The cost function used in a genetic algorithm is as follows:(21)minJ=∫0t(xTx+uTu)dτ.
The equations that include inputs are stable. The switching levels are defined as follows:
(22)η˙=f(η)+g(η)ζ+δη(η,ζ),(23)ζ˙=fa(η,ζ)+ga(η,ζ)u+δζ(η,ζ),
that are defined on the territory of D⊂Rn+1 including the origin of (η=0,ζ=0). Assuming that  ga(η,ζ) is zero, other functions to return all values (η,ζ)∈D are cleared. Also, you can assume f,g,fa, that ga are obvious and δη and δζ are also uncertainty sentences; and assuming f and fa to be zero at the origin, statements of uncertainty for all (η,ζ)∈D values ​​ also apply to the following inequalities:
(24)∥δζ(η,ζ)∥2≤dζ,|δη(η,ζ)|≤dη.
Now with the start of the system (22), we followed the stabilizer state feedback control law with the ζ=ϕ(η) form, the condition ϕ(0)=0, and Lyapunov function V(η), So we have for all (η,ζ)∈D for every positive c constant
(25)V˙≤-c∥η∥22.
Inequality (5) shows that η=0 and the system has an  asymptotically stable equilibrium point:
(26)η˙=f(η)+g(η)ϕ(η)+δη(η,ζ).
Now suppose ϕ(η) on the relation (7). The switching levels are defined as follows:
(27)s=ζ-ϕ(η).
To prove the stability of Lyapunov function, the following is considered:
(28)Va(η,ζ)=V(η)+12[ζ-ϕ(η)]2.
In this case, the Va derivative along the trajectory of (22) and (23) is as follows [15]; select
(29)u=1ga[∂ϕ∂η(f+gζ)-∂V∂ηg-fa-ksgn(ζ-ϕ)],k>0,
and using (25) is, thus,
(30)V˙a=V˙+ss˙≤-c∥η∥22+s(ζ˙-η˙∂ϕ∂η)≤-c∥η∥22+s(fa+gau+δζ-(f+gζ+δη)∂ϕ(η)∂η)≤-c∥η∥22+s(δζ-δη∂ϕ(η)∂η-ksgn(s))≤-c∥η∥22+(|δζs|+|δη∂ϕ(η)∂ηs|-k|s|)≤-c∥η∥22+(|δζ|+|δη∂ϕ(η)∂η|-k)|s|≤-c∥η∥22+(dζ+dη-k)|s|.
Select
(31)k≥dζ+dη.
We have
(32)V˙a≤-σ[∥η∥22+|s|],
where  σ is positive value. So the system is always stable. For proving that switching reaches to zero level, it is sufficient just to consider the Lyapunov function as follows:
(33)Vs=12s2,
with the assumption, and following the previous process, we arrive at the conclusion that the derivative of this function will always be negative. This ensures that the switch goes to zero.


## 4. Simulation and Results

The ball and beam system is one of the most enduringly popular and important laboratory models for teaching control system engineering. The ball and beam system is widely used because it is very simple to be understood as a system, and yet the control techniques that can be studied cover many important classical and modern design methods. The ball and beam system is shown in Figure2. The state equations are as follows [9]:
(34)x˙1=x2,x˙2=u+d,x˙3=x4,x˙4=B(x3x22-Gsin(x1)),
where x1=θ is the angle of the shaft axis, x2=θ˙ angular velocity about the axis of the rod, x3=r position the ball toward the center, x3=r˙ ball speed, and B=0.7143,g=9.8 are as well.


### 4.1. Genetic Algorithm

Genetic algorithms are algorithms that have great power in finding the optimal answer. In this algorithm, first of all, we create some random populations. Every individual (gene) in GA is considered in the form of binary strings; then, fitness for every individual is chosen with regard to its fitness. For creating the next generation, three stages is the selection phase, which consists of different phases, including ranking, proportional and…  The second phase is the combination phase. In this phase, the two parents are combined with pc possibility and the next generation comes into being. By considering that during the past phases of gene, noise may be, in fact, this phase is a random noise which causes a small pc possibility for every bit. Genetic algorithms can be obtained through a series of solutions to the problem. Better answers do imply the law of conservation of the best situations. Figure1 shows flowchart of GA.Figure 1
Chart of genetic algorithm.Figure 2
The ball and beam system.The cost function used in a genetic algorithm is as follows:(35)minJ=∫0t(xTx+uTu)dτ.
Selected parameters for genetic algorithms, the coefficients in the switching, and some other factors are as follows.Sliding surface for ball and beam system is like the below form:(36)S=c1x1+c2x2+c3x3+c4x4.
The coefficients of sliding surface and controller parameter k in (29) are optimized using genetic algorithm. Genetic parameters to get the best selected are as follows:
(37)[c1,c2,c3,c4,k]=[-2-2222].
Simulation results of the control input and S and state variables are shown in Figures 3, 4, and 5.Figure 3
Simulation results of the controller. Control input.Figure 4
Simulation results ofS, s→0.Cases, where the state variables of the ball are relative to the origin.
(a)
(b)
(c)
(d)


## 4.1. Genetic Algorithm

Genetic algorithms are algorithms that have great power in finding the optimal answer. In this algorithm, first of all, we create some random populations. Every individual (gene) in GA is considered in the form of binary strings; then, fitness for every individual is chosen with regard to its fitness. For creating the next generation, three stages is the selection phase, which consists of different phases, including ranking, proportional and…  The second phase is the combination phase. In this phase, the two parents are combined with pc possibility and the next generation comes into being. By considering that during the past phases of gene, noise may be, in fact, this phase is a random noise which causes a small pc possibility for every bit. Genetic algorithms can be obtained through a series of solutions to the problem. Better answers do imply the law of conservation of the best situations. Figure1 shows flowchart of GA.Figure 1
Chart of genetic algorithm.Figure 2
The ball and beam system.The cost function used in a genetic algorithm is as follows:(35)minJ=∫0t(xTx+uTu)dτ.
Selected parameters for genetic algorithms, the coefficients in the switching, and some other factors are as follows.Sliding surface for ball and beam system is like the below form:(36)S=c1x1+c2x2+c3x3+c4x4.
The coefficients of sliding surface and controller parameter k in (29) are optimized using genetic algorithm. Genetic parameters to get the best selected are as follows:
(37)[c1,c2,c3,c4,k]=[-2-2222].
Simulation results of the control input and S and state variables are shown in Figures 3, 4, and 5.Figure 3
Simulation results of the controller. Control input.Figure 4
Simulation results ofS, s→0.Cases, where the state variables of the ball are relative to the origin.
(a)
(b)
(c)
(d)


## 5. Conclusion

This research has tried to achieve a new robust controller with back stepping control and sliding mode control method. In this study, combiningback stepping and sliding mode methods is tried. As you have seen, in both methods there are several fixed parameters which are determined by the designer. Settting the number of state variables increases, especially when they are too numerous, is difficult. It is also possible if the parameters are properly chosen, but it cannot be said that the optimal parameters are selected. To address these problems, we have used an optimization algorithm called genetic algorithm to optimize the parameters.



---

*Source: 614803-2013-03-24.xml*