Sliding mode control

On this page 7

Sliding mode control (SMC) is a robust nonlinear control method that drives a system’s state onto a designer-chosen sliding surface in finite time and then keeps it on that surface with a discontinuous, switching control law. Among control systems in robotics, it is valued because the closed-loop behavior on the surface becomes insensitive to matched disturbances and parameter errors, such as unknown payloads, friction and modeling mistakes.

The method belongs to the family of variable structure control: the controller deliberately switches between different control structures depending on which side of the surface the state lies. Its classic drawback, high-frequency switching called chattering, has driven most of the practical refinements used on real robots today.

How sliding mode control forces the state onto a surface

Sliding mode control works in two phases: a reaching phase, in which the state moves toward the sliding surface, and a sliding phase, in which the state stays on the surface and slides toward the target. The designer chooses the surface so that motion on it has the desired dynamics.

For a robot joint with tracking error e, a common choice is the surface s = de/dt + λe, with λ greater than zero. When s equals zero, the error decays exponentially with time constant 1/λ, regardless of the joint’s mass or friction. The control law typically combines an equivalent control term, computed from the nominal model, with a switching term of the form −K·sign(s).

Convergence is guaranteed by the reaching condition s·ds/dt ≤ −η|s|, derived from a Lyapunov function V = s²/2. If the switching gain K exceeds the upper bound of the disturbance plus the margin η, the state reaches the surface in finite time and cannot leave it.

The following table defines the main design quantities.

QuantityMeaningEffect of a larger value
Surface slope λSets error dynamics on the surfaceFaster convergence, more noise sensitivity
Switching gain KMagnitude of the discontinuous termStronger robustness, more chattering
Reaching margin ηGuaranteed approach rate to the surfaceShorter reaching time, higher control effort
Boundary layer width ΦRegion where switching is smoothedLess chattering, larger residual error
Disturbance boundWorst-case uncertainty the design coversRequires a larger switching gain
Design quantities in sliding mode control

Variants that reduce chattering

Chattering is the main practical obstacle to sliding mode control, because real actuators, sampling and unmodeled dynamics cannot switch infinitely fast. The resulting oscillation excites joint flexibility, heats motors and wears gearboxes, so most robotic implementations use a modified form.

VariantKey ideaChatteringTypical robotic use
Classical first-order SMCPure sign function switchingSevereSimulation and teaching
Boundary layer SMCSaturation instead of sign near the surfaceLowIndustrial joint servos
Super-twisting algorithmSecond-order sliding mode with continuous outputVery lowManipulators, drones, exoskeletons
Terminal SMCNonlinear surface for finite-time error convergenceModeratePrecise positioning tasks
Integral SMCStarts on the surface, removes reaching phaseLow to moderateAdding robustness to an existing controller
Discrete-time SMCDesigned for sampled implementationBounded quasi-sliding bandEmbedded motor drives
Common sliding mode control variants

The super-twisting algorithm is widely regarded as the most useful refinement: it hides the discontinuity inside an integral, so the actuator receives a continuous control signal while finite-time convergence is preserved. Many robotic designs also add a disturbance observer, which lets the switching gain shrink because only the estimation error remains to be rejected.

Sliding mode control compared with other robot controllers

Sliding mode control trades smoothness and simplicity for guaranteed robustness against bounded uncertainty. The comparison below positions it among neighboring control methods in the same field.

MethodHandles uncertainty byTuning effortMain limitation
PIDFeedback gains and integral actionLowNo formal robustness guarantee for nonlinear robots
Computed torque controlCanceling dynamics with an exact modelMediumDegrades with model errors
Sliding mode controlSwitching gain above a disturbance boundMediumChattering, needs bound estimate
Adaptive controlOnline parameter estimationHighSlow adaptation to fast disturbances
Robust H-infinity controlWorst-case frequency-domain designHighLinear models, conservative designs
Model predictive controlOptimization with constraintsHighHeavy computation, model dependence
Sliding mode control versus related control approaches

In practice, these methods are often combined. A frequent architecture uses computed torque as the nominal term and a sliding mode term to absorb the remaining model error, which gives smoother behavior than pure SMC with less dependence on an exact model than pure computed torque.

Designing and implementing SMC on a robot

A successful design starts from a realistic estimate of uncertainty and the actuator’s bandwidth, then chooses the surface and gains to stay within both. Overestimating the disturbance bound produces needlessly aggressive switching.

  1. Derive the nominal dynamics, for example the manipulator equation with inertia, Coriolis and gravity terms.
  2. Bound the uncertainty: payload range, friction variation, unmodeled compliance.
  3. Choose the sliding surface and its slope from the required closed-loop bandwidth.
  4. Select the switching gain to exceed the bound with a small margin.
  5. Smooth the switching with a boundary layer or a second-order algorithm.
  6. Verify at the real control loop rate, typically 1 to 10 kHz for joint torque loops.

Sampling matters. A switching law implemented at a low loop rate behaves like a relay with delay, which creates a limit cycle whose amplitude grows with the sample period. Real-time control hardware and fast fieldbuses such as EtherCAT make higher loop rates practical.

Limitations and common design mistakes

Sliding mode control protects only against matched uncertainty, meaning disturbances that enter through the same channel as the control input. Unmatched disturbances, sensor noise and actuator saturation still degrade performance.

  • Excessive switching gain chosen for safety produces chattering that excites structural resonances.
  • Noisy velocity estimates corrupt the surface value, since s depends on the error derivative.
  • Actuator saturation breaks the reaching condition, so large errors may not converge as predicted.
  • Wide boundary layers remove chattering but turn the controller into a high-gain proportional loop with steady-state error.
  • Ignoring actuator dynamics and delay makes a simulation look perfect while the real joint oscillates.

A common misconception holds that SMC requires no model at all. In reality, a reasonable nominal model keeps the switching term small, and the robustness guarantee depends entirely on a correct disturbance bound.

Explained without jargon

Picture keeping a shopping cart on a painted line in a parking lot while the wind keeps pushing it. Every time the cart drifts left, you push it right, and every time it drifts right, you push it left. Pushing firmly enough, you keep the cart on the line no matter how the wind changes.

Sliding mode control does this for robots. It defines an ideal path for the error to follow and pushes hard toward it from either side. The downside is that constant back-and-forth pushing can cause buzzing, so engineers smooth the pushes in real machines.

A typical use case

A rehabilitation clinic uses a powered knee exoskeleton that must track a walking trajectory for patients of very different body mass and leg stiffness. A fixed PID controller tuned on one patient overshoots or lags on another, because the load on the knee motor changes from step to step.

The engineering team implements a super-twisting sliding mode controller on the knee joint at a 2 kHz loop rate, with a nominal model of the leg and a disturbance bound covering patients from 50 to 110 kg. Tracking errors stay within about 2 degrees across patients without retuning, and because the control signal is continuous, patients report no perceptible vibration from the motor.