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.
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 defines how the system naturally behaves, how control actions affect it, and how unexpected external influences play a role. It offers a complete framework for studying and designing control systems. SMC uses discontinuous control to switch between two distinct system structures, which can be mathematically described as:
Here, u+k(t) and u-k(t) denote two separate control inputs based on the system position relative to the sliding surface, nu is the number of inputs, and sk(x) is the kth component of the switching function:
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 uk 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 switching function and its time derivative should be negative, that is, . This condition ensures that the system, as described by the initial differential equation, remains in the sliding mode once it is 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
Control input selection
Chattering reduction
Design Sliding Surface
To implement SMC in Simulink®, you can use the Sliding Mode Controller (Reaching Law) and Linear Sliding Mode Controller (State Feedback) blocks.
Sliding Mode Controller (Reaching Law) block — This block allows you to implement SMC for a general class of nonlinear systems characterized by the equation , though you need to design the sliding surface C yourself.
Linear Sliding Mode Controller (State Feedback) — This block allows you to implement SMC based on a class of uncertain linear systems using a state feedback approach. This block offers the major benefit of providing two methods to automatically design the sliding surface for such systems. (since R2025a)
Both blocks provide different modes of operation for regulation or tracking. The design of switching function and the control law depends on the selected mode. These blocks simplify computation of the control law and require you to tune only a few parameters, such as approximate model dynamics and sliding matrix. These blocks also allow you to configure parameters for reaching law and boundary layer.
Sliding Mode Controller (Reaching Law) Block
The Sliding Mode Controller (Reaching Law) block is useful when you want to implement SMC for general nonlinear systems of the form . You can configure the block to operate in the following modes:
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.
Tracking mode — Use this mode when you want the system states to follow a reference trajectory xref.
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 switching function, and h(s(x)) is the reaching law.
Linear Sliding Mode Controller (State Feedback) Block
Since R2025a
This block is useful when you have simplified dynamics based a nominal linear plant model and want to automatically design the sliding surface using the provided methods. You can configure the Linear Sliding Mode Controller (State Feedback) to operate in the following modes:
Regulation mode — Use this mode when you want to drive the system states x(t) to zero.
Reference tracking mode — Use this mode when you want the system output y(t) to follow a specified reference signal r(t).
Model reference tracking mode — Use this mode when you want to the system states x(t) to track predefined reference model states xm(t).
For each mode, you can either specify the sliding matrix S explicitly or design the matrix using one of following two methods:
Pole Placement — This method designs the matrix S by assigning the desired eigenvalues of the closed-loop system during the sliding mode to achieve the desired dynamic characteristics.
Quadratic Minimization — This method designs the matrix S such that the system minimizes a quadratic performance index, expressed as:
The matrix Q is the weighting matrix and penalizes state deviations based on the assigned weight. This is the same notion as Q matrix in LQR design.
Define Reaching Law
The reaching law specifies the dynamics of the switching 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]. You can specify the following types of reaching laws:
Constant rate —
This law provides a constant rate to reach the sliding surface. Here, θ(si) is the boundary layer and ηi is the reaching rate of the ith 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 —
This law adds a term proportional to the sliding variable and provides a more aggressive convergence when the state deviation is significant. Here, Ki is the control gain term that scales the control effort associated with the ith sliding variable. This term increases the control effort proportional to the distance from the sliding surface.
Power rate —
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.
Unit Vector
—Here, P2 is the solution of the Lyapunov equation .
This reaching law is available only for the Linear Sliding Mode Controller (State Feedback) block.
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.
You can specify one of the following boundary layers:
Sign —
This option uses the default signum function and switches between –1 and 1 discontinuously.
Relay —
This option uses a relay function to define the switching boundary around the sliding surface.
Hyperbolic tangent —
This option uses a hyperbolic tangent function to define the switching boundary around the sliding surface.
Saturation —
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.
More About Sliding Mode Control
For more information on sliding mode control, play the video. This video is part of the Robust Control video series.

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.
[4] Edwards, Christopher, and Sarah K. Spurgeon. Sliding Mode Control: Theory and Applications. Systems and Control Book Series ; Vol. 7. London: Taylor & Francis, 1998.
See Also
Sliding Mode Controller (Reaching Law) | Linear Sliding Mode Controller (State Feedback)