Control Systems
Sliding Mode Control
Variable-structure control — force the state onto a surface, then slide to zero
Sliding mode control (SMC) is a robust nonlinear control law that steers a system's state onto a designer-chosen sliding surface s(x)=0 using a discontinuous switching term, then keeps it there while the state slides to the origin. Motion splits into a reaching phase (drive to the surface in finite time) and a sliding phase (glide along it). While sliding, the closed-loop dynamics reduce to the surface equation and become invariant to matched uncertainty and bounded disturbance — a robustness no linear controller matches. The cost is chattering, high-frequency switching that a boundary layer of thickness φ or a super-twisting law suppresses. SMC drives DC-DC converters, field-oriented motor control, robotic manipulators, and spacecraft attitude actuators, typically switching at 10–100 kHz in power electronics.
- Surfaces = ė + λe, λ > 0
- Control lawu = u_eq − K·sign(s)
- Sliding conditions·ṡ < 0 (or ½ d(s²)/dt < 0)
- RobustnessInvariant to matched uncertainty
- Reaching timet_r ≤ |s(0)|/η (finite)
- Chattering fixBoundary layer sat(s/φ), super-twisting
Interactive visualization
Press play, or step through manually. The visualization is yours to drive — try it before reading on.
Watch the 60-second explainer
A condensed visual walkthrough — narrated, captioned, under a minute.
Why sliding mode control matters
Most controllers are designed around a nominal model and then hope the real plant is close enough. Sliding mode control inverts that logic: it deliberately builds a control that does not care about the plant. Once the state is trapped on the sliding surface, the closed-loop response is dictated entirely by the surface equation you drew, not by the mass, inertia, friction, or parasitic parameters of the hardware. That is the property engineers reach for when a system is nonlinear, poorly known, or changing under load.
- Power electronics. DC-DC buck, boost, and inverter loops slide naturally — the switch is already a two-state device, matching SMC's discontinuous law; loops run at 10–100 kHz.
- Electric drives. Field-oriented and direct-torque control of induction and PMSM motors, where rotor resistance and load torque drift with temperature and duty.
- Robotics. Manipulator joint control under large payload and configuration-dependent inertia, where the coupling matrix changes every instant.
- Aerospace. Missile autopilots, reentry attitude, and reaction-wheel or thruster control where aerodynamic coefficients are uncertain by tens of percent.
- Automotive. ABS wheel-slip regulation, active suspension, and traction control on surfaces with unknown, changing friction.
- Guaranteed rejection. Any disturbance entering the input channel, up to a known bound, is cancelled exactly — not merely attenuated.
How it works, step by step
Take a second-order system with tracking error e = x − xd. The design proceeds in three moves.
- Draw the surface. Define s = ė + λe, with the constant λ > 0 carrying units of s−1 (rad/s). The equation s = 0 is a line through the origin of the phase plane (e, ė). On that line the error obeys ė = −λe, so it decays exponentially like e(t) = e(0)·e−λt with time constant 1/λ.
- Reach the surface. Off the line, pick a control that guarantees the state moves toward it. The requirement is the sliding condition s·ṡ < 0, equivalently ½ d(s²)/dt < 0 — a Lyapunov statement that the "distance" s² always shrinks. The discontinuous term −K·sign(s) supplies exactly this: it always pushes s back toward zero, whatever side you are on.
- Slide to the origin. Once s = 0, the equivalent control ueq — found by solving ṡ = 0 for the nominal model — holds the state on the surface, and the surface dynamics carry it to e = 0. The switching term only fights whatever tries to knock the state off, which is why disturbance no longer matters.
The composite control is the sum of a model-based part and a robustifying part:
u = ueq − K·sign(s), s = ė + λe
where u is the control input (e.g. voltage in V, torque in N·m), ueq is the equivalent (continuous) control that keeps ṡ = 0 for the known model, K > 0 is the switching gain in the same units as u, sign(s) is +1 for s > 0 and −1 for s < 0, e is the tracking error, ė its time derivative (s−1·e-units), and λ is the surface slope in s−1. The switching gain must satisfy K ≥ D + η, where D bounds the lumped matched uncertainty and disturbance and η > 0 sets the minimum reaching rate.
Design values and reaching time
The reaching time is bounded and computable. With the constant-rate reaching law ṡ = −η·sign(s), integrating from the initial offset gives:
tr ≤ |s(0)| / η
where tr is the reaching time in seconds, |s(0)| is the initial distance from the surface, and η is the reaching rate in units of s per second. The table below shows representative design choices across domains.
| Parameter | Symbol | Typical range | Sets / effect |
|---|---|---|---|
| Surface slope | λ | 1–100 s−1 | Slide-phase bandwidth; error decays as e−λt |
| Reaching rate | η | 0.1–10 (s-units/s) | Reaching time tr ≤ |s(0)|/η |
| Switching gain | K | > D + η | Must dominate disturbance bound D |
| Boundary layer | φ | 0.01–0.2 (of s scale) | Removes chattering; error ≈ φ/λ |
| Sample rate (power) | fs | 10–100 kHz | Higher fs → thinner practical layer |
| Super-twisting gains | α, β | α > 1.5√L, β > 1.1L | Finite-time, continuous control (L = disturbance slope bound) |
The chattering problem and the boundary-layer fix
Ideal SMC assumes the control can switch at infinite frequency, snapping the state to the surface and holding it exactly. Real actuators cannot. Finite bandwidth, sample time, sensor lag, and unmodeled fast dynamics turn the crisp switching into chattering: a high-frequency, finite-amplitude buzz of the control and state around s = 0. Chattering burns energy, overheats power switches, wears mechanical actuators, and can excite structural resonances the model ignored.
The workhorse remedy is a boundary layer of thickness φ around the surface. Replace the hard sign(s) with the saturation function sat(s/φ), which is linear inside the layer (|s| < φ) and equal to ±1 outside it. Inside the layer the control is continuous, so the buzz disappears — at the price of a small steady-state error whose bound is approximately φ/λ. This is the fundamental trade: shrink φ for accuracy and chattering returns; grow φ for smoothness and precision degrades. Higher-order sliding modes such as the super-twisting algorithm escape the trade by making the applied control continuous while keeping finite-time exactness.
Common misconceptions and failure modes
- "SMC rejects any disturbance." Only matched disturbance — that entering through the control channel — is cancelled. Unmatched uncertainty is not, and can destabilize a badly designed surface.
- "Bigger K is always safer." A large switching gain worsens chattering, saturates the actuator, and amplifies the very high-frequency dynamics that break ideal sliding. K should just exceed the uncertainty bound D plus η.
- "The surface is arbitrary." λ must sit well below unmodeled actuator and structural modes (often λ ≤ 0.2–0.5× the lowest resonance); pick it too fast and the slide excites what the model omitted.
- "Chattering is just noise." It is deterministic limit-cycling from the sign discontinuity meeting finite dynamics — a boundary layer or super-twisting removes it, filtering does not.
- "Robust means insensitive to everything." Invariance holds only during ideal sliding. In the reaching phase the system is fully exposed to disturbance; shortening tr limits that window.
- "You can ignore the equivalent control." Dropping ueq forces the switching term to do all the work, demanding a huge K and violent chattering; a good ueq makes K small.
Frequently asked questions
What is sliding mode control?
Sliding mode control (SMC) is a robust nonlinear control technique from the family of variable-structure control. You first design a sliding surface s(x)=0 in state space — typically s = de/dt + λe for a second-order system — whose zero dynamics have the response you want. A discontinuous control law then drives the state onto that surface (the reaching phase) and holds it there (the sliding phase). Once sliding, the closed-loop behavior is fixed entirely by the surface, not by the plant, so it rejects matched uncertainty and disturbances.
What is the sliding surface and how do you choose λ?
The sliding surface is a manifold s(x)=0 in state space that you design so that motion constrained to it is stable and reaches the origin. For a second-order tracking error e, a common choice is s = ė + λe with λ > 0, which makes the error decay like e^(−λt) once on the surface. λ sets the closed-loop bandwidth: larger λ gives a faster slide to zero but demands larger control effort and reduces robustness margin against neglected fast dynamics. It is chosen well below the frequency of unmodeled actuator or structural modes, often λ ≈ 0.2–0.5 times the lowest unmodeled resonance.
Why is sliding mode control robust to disturbances?
During ideal sliding the state is confined to s=0 and evolves purely according to the surface equation, which contains no plant parameters. This is the invariance property. As long as the disturbance and parameter uncertainty enter through the same input channel as the control (the matching condition) and their magnitude is bounded by a known value, choosing the switching gain K larger than that bound guarantees s·ṡ < 0 — the sliding condition — so the surface is reached and maintained. Unmatched uncertainty is not rejected this way and remains a limitation.
What is chattering and how is it fixed?
Chattering is high-frequency, finite-amplitude oscillation of the control and state around the sliding surface, caused by the sign() switching interacting with unmodeled fast dynamics, finite sample time, and sensor delay. Ideal SMC assumes infinite switching frequency, which real actuators cannot deliver. It wastes energy, heats actuators, and can excite structural modes. The classic fix is a boundary layer: replace sign(s) with sat(s/φ), a saturation function of thickness φ, giving a continuous control inside the layer at the cost of a small steady-state error bounded by φ/λ. Higher-order sliding modes like super-twisting also suppress it while keeping finite-time convergence.
What is the difference between the reaching phase and the sliding phase?
The reaching phase is the transient during which the state, starting away from the surface (s ≠ 0), is driven toward s = 0 by the discontinuous control; it is sensitive to disturbances because the system is not yet on the manifold. The sliding phase begins once s = 0 is reached; the state then moves along the surface toward the origin with dynamics set only by the surface design and full robustness. Reaching laws such as constant-rate (ṡ = −η·sign(s)) or constant-plus-proportional-rate (ṡ = −η·sign(s) − k·s) shape the reaching time; a well-designed law reaches the surface in finite time t_r ≤ |s(0)|/η.
What is the difference between sliding mode control and PID?
PID is a linear, single-structure controller that sums proportional, integral, and derivative terms and is tuned for a nominal linear plant; robustness comes only from gain and phase margin. SMC is a nonlinear variable-structure controller that switches its own structure to force the state onto a surface, giving guaranteed finite-time convergence and exact rejection of matched uncertainty regardless of plant parameter drift. The price is chattering and the need for a bound on the uncertainty. PID excels on well-behaved linear loops; SMC shines on nonlinear, uncertain, or fast systems like power converters, motor drives, and aerospace actuators.
What is super-twisting and higher-order sliding mode control?
Higher-order sliding mode control forces not only s but also its derivatives to zero, moving the discontinuous switching to a higher derivative of the control so the applied control itself is continuous. The super-twisting algorithm is the most-used second-order case: u = −α·|s|^(1/2)·sign(s) + w, with ẇ = −β·sign(s). It drives both s and ṡ to zero in finite time using only the measurement of s, eliminating the need for ṡ, and produces a continuous control that largely removes chattering while keeping the exact-disturbance-rejection property of standard SMC.