Algorithm Search⌘K

Conceptcore

Chattering in sliding mode control

Also called sliding mode chattering.

High frequency oscillation of a switching control caused by sampling, delays and unmodeled dynamics, reduced by boundary layers or higher order sliding modes.

Chattering is the fast oscillation of the sliding variable and the fast switching of the control that appear when a sliding mode controller runs on a real system. Theory assumes that the control can switch infinitely fast, so that the state stays exactly on the sliding surface s=0s = 0. A real controller samples at a finite rate, and real actuators and sensors have small delays and fast dynamics that the model leaves out. The switch then comes a little late every time, the state crosses the surface, and the control jumps between its two values at a high frequency. This page is about that phenomenon, its size and its remedies; it is not the Zeno behavior of hybrid systems, where infinitely many switches happen in finite time in the model itself.

In plain words

Think of a thermostat with no dead band that switches a heater fully on or fully off. In theory it holds the temperature exactly. In practice the sensor reacts a little late, so the heater stays on a moment too long, then off a moment too long, and it clicks on and off many times per minute. The temperature shakes a little around the target, and the switch wears out. A sliding mode controller behaves the same way, only much faster: it pushes hard in one direction or the other, and every small delay in the loop turns into a fast back and forth motion. This motion can wear out motors and valves, waste energy and excite vibrations that the model does not know about. The usual cures are to soften the switch near the target, or to use a smarter law whose output is continuous.

The idea

Ideal sliding. Take a sliding variable ss with s˙=−ksgn⁡(s)+d(t)\dot s = -k \operatorname{sgn}(s) + d(t), ∣d∣≤D<k|d| \le D < k. Then ss˙≤−(k−D)∣s∣s \dot s \le -(k - D)|s|, so ss reaches 00 in finite time and stays there. In the ideal model, on s=0s = 0 the control switches with infinite frequency, and its average is the equivalent control that cancels dd (Filippov solutions make this precise; see sliding mode control).

Sources of chattering. Three effects break the ideal picture.

  • Sampling. If the control is computed every hh seconds and held, ss moves by up to (k+D)h(k + D) h between samples. It overshoots the surface and the sign changes at almost every sample. The result is an oscillation with amplitude of order hh and a period of a few samples.
  • Delays. A pure delay τ\tau in the loop has the same effect, with amplitude of order (k+D)τ(k + D) \tau.
  • Fast unmodeled dynamics. If the actuator or the sensor has a small time constant μ\mu, the loop with the relay −ksgn⁡(s)-k \operatorname{sgn}(s) settles into a limit cycle whose amplitude shrinks with μ\mu but does not vanish. Levant (2010) analyzes how this amplitude scales with μ\mu for sliding modes of each order. The describing function method predicts the frequency and the amplitude approximately (example 4).

Size, as a theorem. For the sampled first order sliding mode above, once ∣s∣|s| has entered the band ∣s∣≤(k+D)h|s| \le (k + D) h, it stays there, because ∣s˙∣≤k+D|\dot s| \le k + D and the sign of the correction always points back to 00. So the steady accuracy is of order hh. For sliding modes of order two, such as the super-twisting algorithm, the accuracy with sampling is of order h2h^2 in ss and hh in s˙\dot s (Levant 1993). Chattering does not go away with higher order sliding modes, but it gets smaller, and the control itself becomes continuous.

Remedies.

  • Boundary layer. Replace sgn⁡(s)\operatorname{sgn}(s) by sat⁡(s/ϕ)\operatorname{sat}(s / \phi) with a layer width ϕ>0\phi > 0 (Slotine 1984). Outside the layer the control is the same, so the reaching phase does not change. Inside the layer the control is a high gain linear feedback, so it does not switch. The price is exactness: ss goes into the layer and then stays within ∣s∣≤ϕD/k|s| \le \phi D / k instead of reaching 00. This is a trade, not a free gain: a narrow layer gives precision and a high loop gain, which brings back the fast unmodeled dynamics.
  • Higher order sliding modes. Move the discontinuity to a derivative of the control. The super-twisting law has a continuous control and keeps finite-time convergence and exact rejection of disturbances with a bounded derivative.
  • Smaller switching gain. Most of the chattering amplitude is proportional to kk. A model based term (the estimated equivalent control) or an adaptive gain lets kk be just above the remaining uncertainty.
  • Observer in the loop. If the switching acts on an observer state instead of a measured state, the fast loop closes through the observer, which has no unmodeled dynamics, and the actuator sees a filtered control (Young, Utkin and Özgüner 1999).

Examples

1. Sampling, by hand. Let s˙=−ksgn⁡(s)\dot s = -k \operatorname{sgn}(s) with k=1k = 1, sampled with h=0.1h = 0.1 and the control held. Then sj+1=sj−khsgn⁡(sj)s_{j+1} = s_j - k h \operatorname{sgn}(s_j). From s0=0.25s_0 = 0.25 the sequence is

0.25, 0.15, 0.05, −0.05, 0.05, −0.05, 0.05, …0.25,\ 0.15,\ 0.05,\ -0.05,\ 0.05,\ -0.05,\ 0.05,\ \dots

After two steps the state is in the band ∣s∣≤kh=0.1|s| \le k h = 0.1, and then it oscillates with period 2h2h and amplitude 0.050.05 forever. The control switches at every sample. A smaller hh makes the band smaller, but the switching never stops.

2. A sampled sliding mode controller. On the sliding mode control page, the double integrator with s=x1+x2s = x_1 + x_2, k=1.5k = 1.5 and the disturbance 0.5sin⁡2t0.5 \sin 2t is simulated with RK4 and the control held over each step hh. With h=0.002h = 0.002 the sliding variable stays within ∣s∣≤0.00399|s| \le 0.00399 after the reaching time, and the switching term changes sign 365 times in the 500 steps between t=2t = 2 and t=3t = 3. With h=0.001h = 0.001 the band is 0.002000.00200. The band is (k+D)h=2h(k + D) h = 2h, as the theorem above says, and the chattering is an artifact of the step size that the simulation must not hide.

3. Boundary layer. Take s˙=−ksat⁡(s/ϕ)+d\dot s = -k \operatorname{sat}(s / \phi) + d with a constant d=0.5d = 0.5, k=1k = 1 and ϕ=0.1\phi = 0.1. Inside the layer the equation is s˙=−(k/ϕ)s+d\dot s = -(k / \phi) s + d, so ss goes to ϕd/k=0.05\phi d / k = 0.05 without any switching. The ideal sliding mode would give s=0s = 0. In example 2 with ϕ=0.05\phi = 0.05, the simulation shows ∣s∣≤0.0166|s| \le 0.0166 after the transient, below the bound ϕD/k=0.0167\phi D / k = 0.0167, and no switching at all.

4. An actuator with fast dynamics. Let the relay output −ksgn⁡(s)-k \operatorname{sgn}(s) pass through two first order lags 1/(τp+1)1 / (\tau p + 1) before it drives s˙\dot s, so the linear part from relay output to ss is G(p)=1/(p(τp+1)2)G(p) = 1 / (p (\tau p + 1)^2), with pp the Laplace variable. The describing function of the relay is N(A)=4k/(πA)N(A) = 4k / (\pi A). The phase of G(jω)G(j\omega) is −180-180 degrees at ω=1/τ\omega = 1/\tau, where ∣G∣=τ/2|G| = \tau / 2, so the predicted oscillation has frequency ω=1/τ\omega = 1/\tau and amplitude A=2kτ/πA = 2 k \tau / \pi. For k=1k = 1 and τ=0.05\tau = 0.05 s this is ω=20\omega = 20 rad/s and A=0.0318A = 0.0318. An RK4 simulation with step 10−410^{-4} s gives a measured period of 0.32160.3216 s (ω=19.54\omega = 19.54 rad/s) and an amplitude of 0.03300.0330. The prediction is close but not exact, because the describing function method is approximate. The amplitude is proportional to kτk \tau: a faster actuator gives smaller chattering, but no actuator removes it.

Where it is used

  • Every practical sliding mode design. The choice between the ideal switching law, a boundary layer and a higher order algorithm is a choice about chattering. Sliding mode control, sliding mode observers and the super-twisting algorithm all discuss it.
  • Power electronics and electric drives. Here the actuator is a switch, so switching is natural, and a sliding mode can be implemented directly by the switching of the converter. Chattering then shows up as a switching frequency that must stay within the limits of the devices.
  • Mechanical systems. Valves, hydraulic drives and robot joints suffer from fast switching, because it causes wear and excites resonances. Boundary layers and continuous higher order laws are the usual choice.
  • Simulation. A simulation of a discontinuous control with a fixed step shows chattering of the size of the step, as in examples 1 and 2. An adaptive step size solver can take very small steps near the surface and become slow, much like a stiff problem. The step must be stated with the results.
  • Analysis of relay loops. The relay feedback experiment of relay autotuning uses the same oscillation on purpose: there the limit cycle measures the critical point of the plant.

References

  1. J.-J. E. Slotine, Sliding controller design for non-linear systems, International Journal of Control 40(2), 421-434, 1984, the boundary layer around the sliding surface and the trade between tracking precision and control bandwidth
  2. K. David Young, Vadim I. Utkin and Ümit Özgüner, A control engineer's guide to sliding mode control, IEEE Transactions on Control Systems Technology 7(3), 328-342, 1999, the analysis of chattering and the catalog of practical remedies
  3. Chattering analysis, the size of the oscillations of first order and higher order sliding modes in the presence of fast unmodeled dynamics and sampling
  4. Sliding order and sliding accuracy in sliding mode control, the accuracy of sliding modes of order one and two with discrete sampling
  5. Jean-Jacques E. Slotine and Weiping Li, Applied Nonlinear Control, Prentice Hall, 1991, Chapter 7 (Sliding Control), the boundary layer and the trade between precision and robustness

Where this leads

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW4 complete
  • a review of the text: no review record reviews/B606X1/text.yaml