---
title: Saturation, describing functions and limit cycles
heading: Actuator saturation and how it slows large steps, the describing function of a relay and of a saturation, predicting the amplitude and frequency of limit cycles from a Nyquist plot, relay autotuning explained, and Lyapunov's direct method
eyebrow: S9 · Lesson 43 · Saturation, describing functions and limit cycles
xp: 50
---

::: hook
Linear theory assumes the actuator does whatever the controller asks. Real amplifiers clip at their rails, motors have torque limits, valves stop at fully open, and gears have backlash. These nonlinearities slow large responses, wind up integrators, and can sustain steady oscillations, limit cycles, that no linear model predicts. The describing function, an engineer's approximation from the 1940s, treats a nonlinearity as a gain that depends on signal amplitude and finds those oscillations on the Nyquist plot you already know how to draw.
:::

::: play
- The Nyquist plot of $L = K/(s + 1)^3$ and the line $-1/N(a) = -\pi a/(4d)$ for a relay of amplitude d = 1, which runs along the whole negative real axis as the oscillation amplitude a grows.
- The two meet at $-K/8$ (dot), at ω = √3. There $N(a)L(j\omega) = -1$: a sustained oscillation of amplitude $a = dK/2\pi$.
- This is exactly the relay autotuning test of lesson 16: the relay finds the frequency where the plant's phase is −180°, and the amplitude reveals the gain there.
:::

```sim plot
view: complex
range: 1.5
axes: Re, Im
slider: K = 1..10 = 4
curve: K/(1 + j*u)^3 | over: u = 0..40
curve: -u | over: u = 0..1.5 | dashed
dot: -K/8 | label: limit cycle
dot: -1 | label: −1
readout: predicted oscillation amplitude = K/(2*pi) | digits: 3
readout: predicted period, s = 2*pi/sqrt(3) | digits: 4
```

::: predict
## A relay with output ±1 drives $K/(s + 1)^3$ with K = 1 in a feedback loop. What happens?

- [ ] The output settles at zero
- [x] It oscillates steadily with period about 3.6 s and amplitude about 0.16
- [ ] It oscillates with growing amplitude
- [ ] It chatters at an infinite frequency

::: reveal
The relay's describing function is $4/(\pi a)$, a gain that falls as the amplitude grows. The loop settles where that gain times the plant's gain at its phase crossover is one: $\frac{4}{\pi a}\cdot\frac{1}{8} = 1$, so a = 1/(2π) = 0.159, at ω = √3 (period 3.63 s). A simulation of this loop gives an amplitude of 0.163 and a period of 3.68 s, within 3% of the prediction, because the plant filters out the relay's harmonics well.
:::
:::

::: nameit
## Saturation

An actuator limited to $\pm u_\max$ caps how fast large changes can happen: a first-order plant $K_0/(\tau s + 1)$ driven flat out from rest reaches y after $t = -\tau\ln(1 - y/K_0u_\max)$, whatever the controller asks. Small signals still see the linear loop. With integral action, saturation causes windup (lesson 15).

## Describing functions

Feed a nonlinearity $a\sin\omega t$ and keep only the fundamental of its output. The ratio, as a complex gain, is the **describing function** N(a). For a static, odd nonlinearity it's real:

- **Relay** (output ±d): $N(a) = \frac{4d}{\pi a}$.
- **Saturation** (slope 1, limit L) for a > L: $N(a) = \frac{2}{\pi}\left[\sin^{-1}\frac{L}{a} + \frac{L}{a}\sqrt{1 - \frac{L^2}{a^2}}\right]$, falling from 1: 0.609 at a = 2L, 0.315 at a = 4L.
- **Dead zone** (width ±D, slope 1 outside): 1 minus the saturation's N with L = D.

## Limit cycles

A loop of a nonlinearity N and a linear part L(s) can sustain an oscillation where

$$L(j\omega) = -\frac{1}{N(a)}$$

Plot L(jω) and the curve −1/N(a); each intersection predicts a frequency (from L) and an amplitude (from N). The prediction is good when L is low-pass enough to suppress harmonics. A limit cycle is stable if a slightly larger amplitude moves −1/N out of the region the Nyquist plot encircles.

For a relay with $L = K/((s + a)(s + b)(s + c))$, the cycle runs at $\omega = \sqrt{ab + bc + ca}$ with amplitude $\frac{4d}{\pi}|L(j\omega)|$.

## Lyapunov's direct method

If a function V(x), positive except at the equilibrium, never increases along trajectories ($\dot{V} \le 0$), the equilibrium is stable; if $\dot{V} < 0$ away from it, asymptotically stable. Energy is the natural choice: for a damped pendulum, $V = \frac{1}{2}ml^2\dot\theta^2 + mgl(1 - \cos\theta)$ gives $\dot{V} = -b\dot\theta^2 \le 0$. For linear systems, solve $A^TP + PA = -Q$ and use $V = x^TPx$.
:::

::: example
## A relay of ±2 V drives a loop $L = 40/(s(s + 2)(s + 10))$. Predict the limit cycle.

::: solution
1. **Phase crossover.**
   $$\begin{aligned} \omega &= \sqrt{2 \times 10} \\ &= 4.47\ \text{rad/s} \end{aligned}$$
2. **Loop gain there.**
   $$\begin{aligned} |L| &= \frac{40}{2 \times 10 \times 12} \\ &= 0.167 \end{aligned}$$
3. **Amplitude.** The cycle's amplitude makes $N(a)|L| = 1$:
   $$\begin{aligned} a &= \frac{4 \times 2}{\pi} \times 0.167 \\ &= 0.42 \end{aligned}$$
4. **Period.**
   $$\begin{aligned} T &= 2\pi/4.47 \\ &= 1.40\ \text{s} \end{aligned}$$
5. **Relay autotuning.** From this it would estimate
   $$\begin{aligned} K_u &= \frac{4d}{\pi a} \\ &= 6.0 \end{aligned}$$
   which matches the exact ultimate gain 1/0.167.

**Answer:** a limit cycle of amplitude 0.42 at 4.47 rad/s, a period of 1.40 s.
:::
:::

::: example
## The motor of lesson 2 has a speed loop whose amplifier saturates at 24 V. What happens on a step command to 2000 rad/s, and how fast can it reach 400 rad/s?

::: solution
1. **Top speed.** With $K_0$ = 19.84 rad/s per volt and τ = 15.9 ms (lesson 2), full voltage heads for
   $$24 \times 19.84 = 476\ \text{rad/s}$$
2. **The step to 2000 rad/s.** It's out of reach: the loop saturates for good, and the output settles at 476 rad/s with a permanent error.
3. **Time to 400 rad/s.** Flat-out drive gets there in
   $$\begin{aligned} t &= -0.0159\ln(1 - 400/476)\ \text{s} \\ &= 29\ \text{ms} \end{aligned}$$
   no matter how high the controller's gain.

**Answer:** the loop saturates and settles at 476 rad/s with a permanent error; 400 rad/s takes at least 29 ms.
:::
:::

::: example
## The loop $L = 10/(s(s + 1)(s + 2))$ is unstable when linear (the limit is K = 6), but its actuator saturates at ±1. What happens?

::: solution
1. **Loop gain at the phase crossover.** At $\omega_{180} = \sqrt2$ rad/s,
   $$|L| = 10/6$$
2. **Where the cycle sits.** Where the saturation's describing function falls to
   $$\begin{aligned} N(a) &= 6/10 \\ &= 0.6 \end{aligned}$$
3. **Solve for the amplitude.**
   $$\begin{aligned} &\frac{2}{\pi}\left[\sin^{-1}\frac1r + \frac1r\sqrt{1 - \frac{1}{r^2}}\right] \\ &= 0.6 \end{aligned}$$
   gives r = 2.03.
4. **The motion.** The actuator's input swings about ±2.03 at 1.41 rad/s (period 4.4 s).
5. **What saturation does.** It keeps the oscillation bounded, but the loop still oscillates.

**Answer:** it settles into a limit cycle, with the actuator's input swinging about ±2.03 at 1.41 rad/s (period 4.4 s).
:::
:::

::: check
given: d = 1 | 5 | 12; a = 0.2 | 1 | 4
answer: 4*d/(pi*a)
tolerance: 0.5%

## What's the describing function of a ±{d} relay at input amplitude {a}?

::: right
Right. $4d/(\pi a)$ = {answer}: the fundamental of a square wave of height d, divided by a.
:::

::: misses
- [d/a] A square wave's fundamental is $4/\pi$ times its height.
- [any] Not yet. Fourier-analyze the relay's square-wave output.
:::
:::

::: check
given: d = 1 | 3; K = 10 | 60; a = 1 | 2; b = 4 | 6; c = 10 | 15
answer: 4*d/pi*K/((a + b + c)*(a*b + b*c + c*a) - a*b*c)
tolerance: 0.5%

## A ±{d} relay drives $L = \given{K}/((s + \given{a})(s + \given{b})(s + \given{c}))$. What amplitude of oscillation does the describing function predict?

::: right
Right. At the phase crossover $|L| = K/((a + b + c)(ab + bc + ca) - abc)$, and the amplitude is $\frac{4d}{\pi}|L|$ = {answer}.
:::

::: misses
- [d*K/((a + b + c)*(a*b + b*c + c*a) - a*b*c)] The relay's effective gain carries $4/\pi$.
- [any] Not yet. Solve $N(a)|L(j\omega_{180})| = 1$.
:::
:::

::: check
given: r = 1.5 | 2 | 3 | 5
answer: 2/pi*(asin(1/r) + 1/r*sqrt(1 - 1/r^2))
tolerance: 0.5%

## A unit-slope saturation is driven at {r} times its limit. What's its describing function?

::: right
Right. $\frac{2}{\pi}[\sin^{-1}(1/r) + (1/r)\sqrt{1 - 1/r^2}]$ = {answer}.
:::

::: misses
- [1/r] The fundamental of a clipped sine is bigger than the clip level alone suggests.
- [any] Not yet. Use the saturation formula.
:::
:::

::: check
given: a = 0.5 | 2; b = 5 | 20
answer: 2*pi/sqrt(a*b)
unit: s
tolerance: 0.5%

## A relay drives $L = K/(s(s + \given{a})(s + \given{b}))$. What's the period of the predicted limit cycle?

::: right
Right. The phase crossover is at $\sqrt{ab}$, so the period is $2\pi/\sqrt{ab}$ = {answer} s.
:::

::: misses
- [1/sqrt(a*b)] Convert from rad/s to a period.
- [any] Not yet. The cycle runs where the phase is −180°.
:::
:::

::: check
given: t = 5 | 20; K = 10 | 50; u = 12 | 24; f = 0.3 | 0.8
answer: -t*ln(1 - f)
unit: ms
tolerance: 0.5%

## A plant $\given{K}/(\tau s + 1)$ with τ = {t} ms is driven flat out at {u} V from rest. How long until it reaches {f} of its full-drive output?

::: right
Right. $-\tau\ln(1 - y/K_0u_\max)$ = {answer} ms, a limit set by the actuator, not the controller.
:::

::: misses
- [t*f] The rise is exponential, not linear.
- [any] Not yet. Solve $1 - e^{-t/\tau}$ = the fraction.
:::
:::

::: check
given: a = 0.5 | 2 | 10; q = 1 | 4
answer: q/(2*a)
tolerance: 0.5%

## For $\dot{x} = -\given{a}x$, solve the Lyapunov equation $2(-a)P = -q$ with q = {q}. What's P?

::: right
Right. $P = q/2a$ = {answer}, positive, which confirms stability; $V = Px^2$.
:::

::: misses
- [q/a] The equation has $A^TP + PA = 2aP$.
- [any] Not yet. Solve the scalar Lyapunov equation.
:::
:::

::: check
kind: parts
given: D = 0.2 | 0.5 | 1; r = 2 | 4 | 8; let a = r*D

## A dead zone of half-width {D} (slope 1 outside it) is driven by a sine of amplitude {a}.

::: part
answer: 2/pi*(asin(1/r) + 1/r*sqrt(1 - 1/r^2))
tolerance: 0.5%

### What is the describing function of a unit-slope saturation with limit D at this amplitude?

::: misses
- [any] $\frac{2}{\pi}\left[\sin^{-1}\frac{D}{a} + \frac{D}{a}\sqrt{1 - \frac{D^2}{a^2}}\right]$.
:::
:::

::: part
answer: 1 - 2/pi*(asin(1/r) + 1/r*sqrt(1 - 1/r^2))
tolerance: 0.5%

### What is the dead zone's describing function?

::: misses
- [any] One minus the saturation's.
:::
:::
:::

::: check
kind: derivation
vars: d = 0.1..10, K = 1..1000, a = 0.5..5, b = 0.5..5

## A relay of ±d drives $L = K/(s(s + a)(s + b))$.

::: step
answer: sqrt(a*b)

### At what frequency is the limit cycle predicted?
:::

::: step
answer: K/(a*b*(a + b))

### What is |L| there?
:::

::: step
answer: 4*d/pi*K/(a*b*(a + b))

### What amplitude does the cycle have?
:::

::: right
Right. The cycle sits where $N(a) = 4d/(\pi a)$ equals $1/|L(j\omega_{180})|$.
:::
:::

::: explain
## Why does a relay in a loop settle into an oscillation of a definite amplitude instead of growing or dying out?

::: model
A relay's effective gain for a sine wave is $4d/\pi a$: large for small signals and small for large ones. If the oscillation is smaller than the predicted amplitude, the relay's gain is higher than the value that puts the loop exactly at −1 at the phase crossover, so the loop is effectively unstable and the oscillation grows. If it's larger, the relay's gain is lower, the loop is effectively stable, and the oscillation shrinks. Both pull toward the one amplitude where the loop sits exactly on the edge of stability, which is why the limit cycle is self-sustaining and repeatable enough to be used for autotuning.
:::
:::

::: practice

::: check
given: d = 2 | 10; a = 0.5 | 3
answer: 4*d/(pi*a)
tolerance: 0.5%

## Relay describing function: ±{d}, amplitude {a}?

::: misses
- [any] $4d/(\pi a)$.
:::
:::

::: check
given: r = 1.2 | 2.5 | 8
answer: 2/pi*(asin(1/r) + 1/r*sqrt(1 - 1/r^2))
tolerance: 0.5%

## Saturation describing function at {r} times the limit?

::: misses
- [any] The saturation formula.
:::
:::

::: check
given: a = 1 | 4; b = 8 | 30
answer: 2*pi/sqrt(a*b)
unit: s
tolerance: 0.5%

## Relay limit-cycle period for $K/(s(s + \given{a})(s + \given{b}))$?

::: misses
- [any] $2\pi/\sqrt{ab}$.
:::
:::
:::
