## Sliding Mode Control

Sliding mode control (SMC) is a control technique where you define a sliding surface that the system state trajectory converges to and remains on. This sliding surface is designed such that it is insensitive to disturbances and uncertainties in the system. Once the system state trajectory is on the sliding surface, the controller uses a feedback control law to drive the system state trajectory to the desired state along the sliding surface [1]. Consider a dynamic system characterized by the following differential equation.

$\dot{x}(t)=f(x,t)+g(x,t)\text{\hspace{0.17em}}u(x,t)+d(t)$

Here:

*f*(*x*,*t*) represents the inherent system dynamics.*g*(*x*,*t*) is an input function that modulates the effect of the control input*u*(*x*,*t*) on the system.*d*(*t*) denotes an external disturbance influencing the system behavior over time.

This formulation captures the interplay between the system natural evolution, control efforts, and unpredictable external factors, and provides a comprehensive model for analysis and design in control engineering. SMC uses discontinuous control to switch between two distinct system structures, which can be mathematically described as:

$\begin{array}{cc}{u}_{k}(t)=\{\begin{array}{ll}{u}_{k}^{+}(t)\hfill & {S}_{k}(x)>0\hfill \\ {u}_{k}^{-}(t)\hfill & {S}_{k}(x)<0\hfill \end{array},& k=1,2,\cdots ,{n}_{u}\end{array}$

Here,
*u ^{+}_{k}*(

*t*) and

*u*(

^{-}_{k}*t*) denote two separate control inputs based on the system position relative to the sliding surface,

*n*is the number of inputs, and

_{u}*S*(

_{k}*x*) is the

*k*th component of the sliding mode function:

$$S\left(x\right)={\left[\begin{array}{cccc}{S}_{1}\left(x\right)& {S}_{2}\left(x\right)& \cdots & {S}_{{n}_{u}}\left(x\right)\end{array}\right]}^{T}$$

To ensure that the state variables converge to the sliding surface, travel along it, and
maintain their trajectory along the surface, it is crucial to design the control input
*u _{k}* properly. Upon reaching the sliding surface,
the sliding surface function should satisfy

*S*(

*x*) = 0, indicating the existence of a sliding mode. A necessary and sufficient criterion for guaranteeing this condition is that the product of the sliding surface and its time derivative should be negative, that is, $$S(x)\dot{S}(x)<0$$. This condition ensures that the system, as described by the initial differential equation, remains in the sliding mode once it has been attained. As a side effect of the discontinuous control in SMC, the control input can exhibit chattering, which creates rapid oscillations in control input from persistent switching at the sliding surface boundary. Chattering can cause actuator damage and unwanted system dynamics. Therefore, mitigating chattering is essential in SMC design. In summary, the SMC design includes the following stages:

Sliding surface function design

Sliding coefficient selection

Control input selection

Chattering reduction

### Sliding Mode Controller Block

To implement SMC in Simulink^{®}, you can use the Sliding Mode Controller
(Reaching Law) block. The block enables you to implement SMC for nonlinear systems
characterized by the equation $$\dot{x}=f(x)+g(x)u$$. To configure the block, specify the following settings:

#### Specify Sliding Surface and Mode of Operation

The block provides the following two modes of operation:

Regulation mode — Use this mode when you want to stabilize the system at a fixed point, that is, bring all the states

*x*to zero.$$\begin{array}{l}u={\left({C}^{T}g(x)\right)}^{-1}\left(-{C}^{T}f(x)+h(s(x))\right)\\ s(x)={C}^{T}x\end{array}$$

Tracking mode — Use this mode when you want the system states to follow a reference trajectory

*x*._{ref}$$\begin{array}{l}u={\left({C}^{T}g(x)\right)}^{-1}\left({C}^{T}{\dot{x}}_{ref}-{C}^{T}f(x)+h(s(x))\right)\\ s(x)={C}^{T}({x}_{ref}-x)\end{array}$$

Here, *C* is the sliding coefficient matrix that determines the
hyperplane to which the sliding mode control drives the system states,
*s*(*x*) is the sliding surface, and
*h*(*s*(*x*)) is the reaching
law.

#### Reaching Law

The reaching law specifies the dynamics of the sliding surface
*S*(*x*). The choice of control input is based on the
reaching law you specify in the block parameters. Then, the block solves for a control
input that satisfies the conditions necessary to maintain the states on the sliding
surface [3]. Using the block, you can specify the following types of reaching laws:

Constant rate — $$h\left(s\left(x\right)\right)=-{\eta}_{i}\theta \left({s}_{i}\right)$$

This law provides a constant rate to reach the sliding surface. Here,

*θ*(*s*) is the boundary layer and_{i}*η*is the reaching rate of the_{i}*i*th control input. Reaching rate determines the rate at which the system trajectory approaches the sliding surface. A larger value of*η*results in a faster convergence to the sliding surface but can also lead to higher control effort, which might not be desirable in all cases due to potential issues like actuator saturation or increased chattering.Exponential — $$h\left(s\left(x\right)\right)=-{\eta}_{i}\theta \left({s}_{i}\right)-{K}_{i}{s}_{i}$$

This law adds a term proportional to the sliding variable and provides a more aggressive convergence when the state deviation is significant. Here,

*K*is the control gain term that scales the control effort associated with the_{i}*i*th sliding variable. This term increases the control effort proportional to the distance from the sliding surface.Power rate — $$h{\left(s\left(x\right)\right)}_{i}=-{\eta}_{i}{\left|{s}_{i}\right|}^{\alpha}\theta \left({s}_{i}\right)$$

This law provides fast reaching speed when the state is far away from the sliding surface, but reduces the speed as the state gets near. This ensures reduced chattering and provides fast convergence. The value of

*α*(where 0 <*α*< 1) influences the smoothness of the approach to the sliding surface, with lower values leading to a softer approach and potentially reducing chattering.

#### Specify Boundary Layer

A common issue in SMC is chattering, which is the high-frequency switching of the control input when the system state is close to the sliding surface. To mitigate chattering, you can apply quasi-sliding mode control. In this approach, the discontinuous sign function in the control law is replaced with a continuous approximation. Doing so allows the system states to remain within a boundary layer around the sliding surface instead of requiring the trajectory to stay precisely on the sliding surface. This approach reduces the high-frequency switching of the control signal, thereby diminishing chattering.

Using the block, you can specify as one of the following boundary layers:

Sign — $$\theta \left(s\right)=sgn\left(s\left(x\right)\right)$$

This option uses the default signum function and switches between –1 and 1 discontinuously.

Relay — $$\theta \left(s\right)=\frac{s}{\left|s\right|+\varphi}$$

This option uses a relay function to define the switching boundary around the sliding surface.

Hyperbolic tangent — $$\theta \left(s\right)=tanh\left(\frac{s}{\varphi}\right)$$

This option uses a hyperbolic tangent function to define the switching boundary around the sliding surface.

Saturation — $$\begin{array}{cc}\theta \left(s\right)=\{\begin{array}{c}\begin{array}{cc}1& s>\varphi \end{array}\\ \begin{array}{cc}ks& s\le \varphi \end{array}\\ \begin{array}{cc}-1& s<-\varphi \end{array}\end{array}& k=\frac{1}{\varphi}\end{array}$$

This option uses a saturation function to smoothly interpolate between –1 and 1 when the sliding variable is within the boundary layer [

*–ϕ*,*ϕ*], which reduces the high-frequency switching.

Here, the choice of *ϕ* is critical as it defines the boundary layer
thickness around the sliding surface. A larger *ϕ* results in less
chattering but can increase the steady-state error. Conversely, a smaller
*ϕ* can reduce steady-state error but increase chattering.

## References

[1] Derbel, Nabil, Jawhar Ghommam,
and Quanmin Zhu, eds. *Applications of Sliding Mode
Control*. Vol. 79. Studies in Systems, Decision and Control. Singapore: Springer
Singapore, 2017. https://doi.org/10.1007/978-981-10-2374-3.

[2] Weibing Gao, and J.C. Hung.
“Variable Structure Control of Nonlinear Systems: A New Approach.” *IEEE Transactions on Industrial Electronics* 40, no. 1 (February 1993): 45–55.
https://doi.org/10.1109/41.184820.

[3] Richter, Hanz. *Advanced Control of Turbofan Engines*. New York, NY: Springer New
York, 2012. https://doi.org/10.1007/978-1-4614-1171-0.

## See Also

Sliding Mode Controller (Reaching Law)