---
title: Slew rate and settling
heading: How long an amplifier takes to arrive, large-signal and small-signal
eyebrow: S2 · Lesson 16 · Slew rate and settling
xp: 50
---

::: hook
A switched-capacitor stage or an ADC driver gets a fixed slice of each clock period to reach its final value to within half an LSB. Two effects decide whether it makes it. For a big step the amplifier's internal current runs out and the output ramps at a fixed **slew rate**; once the remaining error is small, it settles exponentially with the closed loop's time constant. Designing for settling means budgeting time between the two, and that budget, more than gain or bandwidth alone, sets the current an amplifier needs.
:::

::: play
- The curve is a feedback amplifier's output after a 1 V input step: a straight ramp at the slew rate, then an exponential approach with time constant τ = $1/(\beta\omega_u)$.
- Slewing lasts until the remaining error falls to $SR \cdot \tau$, where the linear response would no longer need more than the available current.
- Raise the slew rate and the ramp steepens; shorten τ and both the handover point and the exponential tail move earlier.
:::

```sim plot
view: graph
x: t = 0..150 ns
y: v = 0..1.1 V
slider: s = 10..200 step 5 = 50 V/µs
slider: c = 2..30 step 0.5 = 10.6 ns
plot: s*t/1000*step((1 - s*c/1000)*1000/s - t) + (1 - s*c/1000*exp(-(t - (1 - s*c/1000)*1000/s)/c))*step(t - (1 - s*c/1000)*1000/s) | label: output
plot: 1 + 0*t | dashed | label: final value
readout: slewing time (ns) = (1 - s*c/1000)*1000/s | digits: 3
```

::: predict
## An amplifier with 50 V/µs of slew rate and a 10.6 ns closed-loop time constant gets a 1 V step. Roughly how long until it is within half an LSB of 12 bits (122 µV)?

- [ ] About 20 ns
- [ ] About 50 ns
- [x] About 100 ns
- [ ] About 1 µs

::: reveal
It slews until the error is $SR\cdot\tau = 0.53$ V, taking $(1 - 0.53)/50\text{ V/µs} = 9.4$ ns, then settles linearly for $\tau\ln(0.53/122\text{ µV}) = 88.9$ ns: about 98 ns in all. Linear settling dominates: each extra bit of accuracy costs another $0.69\tau$.
:::
:::

::: nameit
## Slewing

When a large step drives the input pair fully to one side, the whole tail current I charges the compensation capacitor, and the output ramps at
$$SR = \frac{I}{C_c}$$
For a sine of amplitude $V_p$ the steepest slope is $2\pi fV_p$, so the **full-power bandwidth** is $SR/(2\pi V_p)$.

## Linear settling

With feedback factor β and unity-gain frequency $\omega_u$, a one-pole closed loop settles with $\tau = 1/(\beta\omega_u)$. Reaching a fractional error ε takes $\tau\ln(1/\varepsilon)$; half an LSB of N bits needs $\tau\ln 2^{N+1}$.

## Both together

Slewing lasts while the linear response would demand more than SR, that is until the remaining error is $SR\cdot\tau$. For a step V:
$$t_\text{settle} = \frac{V - SR\cdot\tau}{SR} + \tau\ln\frac{SR\cdot\tau}{\varepsilon V}$$
if $V > SR\cdot\tau$; otherwise the response is linear throughout. Second poles add ringing that must die out too, which is why settling-critical designs aim for 70° or more of phase margin.
:::

::: example
## What is the full-power bandwidth of a 50 V/µs amplifier at 1 V peak, and at 10 V peak?

::: solution
1. **Full-power bandwidth.** The fastest full-size sine has a frequency of $SR/(2\pi V_p)$.
2. **At 1 V peak.**
   $$\frac{50\ \text{V/µs}}{2\pi \times 1\ \text{V}} = 8.0\ \text{MHz}$$
3. **At 10 V peak.**
   $$\frac{50\ \text{V/µs}}{2\pi \times 10\ \text{V}} = 0.80\ \text{MHz}$$
4. **Above it.** A sine faster than that has its peaks turned into slew-limited triangles, whatever the small-signal bandwidth says.

**Answer:** 8.0 MHz at 1 V peak and 0.80 MHz at 10 V peak.
:::
:::

::: example
## A switched-capacitor stage with β = 0.5 uses an op amp with a 30 MHz unity-gain frequency. How long does linear settling to half an LSB of 12 bits take?

::: solution
1. **Time constant.**
   $$\begin{aligned} \tau &= \frac{1}{0.5 \times 2\pi \times 30\ \text{MHz}} \\ &= 10.6\ \text{ns} \end{aligned}$$
2. **Time constants needed.** Half an LSB of 12 bits is one part in $2^{13}$, so it takes $\ln 2^{13}$ time constants:
   $$\ln 2^{13} = 9.01$$
3. **Settling time.**
   $$\tau\ln 2^{13} = 95.6\ \text{ns}$$
4. **At a 5 MHz clock.** Each half period is 100 ns, which leaves almost nothing for slewing; doubling the bandwidth halves the settling time.

**Answer:** linear settling takes 95.6 ns.
:::
:::

::: example
## The same stage must settle a 1 V step with 50 V/µs of slew rate. Where does the time go?

::: solution
1. **Where slewing ends.**
   $$SR\cdot\tau = 0.53\ \text{V}$$
2. **Slewing time.**
   $$\begin{aligned} t_\text{slew} &= \frac{1\ \text{V} - 0.53\ \text{V}}{50\ \text{V/µs}} \\ &= 9.4\ \text{ns} \end{aligned}$$
3. **Linear settling.** From 0.53 V down to 122 µV takes
   $$\tau\ln\frac{SR\cdot\tau}{122\ \text{µV}} = 88.9\ \text{ns}$$
4. **Total.**
   $$9.4 + 88.9 = 98.3\ \text{ns}$$
5. **Doubling the tail current.** It would save under 3 ns: at 100 V/µs the step no longer slews at all, but linear settling from the full volt takes 95.6 ns.
6. **Doubling the bandwidth.** That would save 43 ns.

**Answer:** 9.4 ns of slewing and 88.9 ns of linear settling, 98.3 ns in all.
:::
:::

::: check
kind: parts
given: I = 10 | 50 | 200; C = 0.5 | 1 | 5; V = 0.5 | 1 | 5

## An amplifier's tail current is {I} µA and its compensation capacitor {C} pF; its output must swing {V} V peak.

::: part
answer: I/C
unit: V/µs
tolerance: 0.5%

### What is its slew rate?

::: misses
- [any] $I/C_c$.
:::
:::

::: part
answer: I/C/(2*pi*V)
unit: MHz
tolerance: 0.5%

### What is its full-power bandwidth?

::: misses
- [any] $SR/(2\pi V_p)$.
:::
:::
:::

::: check
kind: parts
given: b = 0.25 | 0.5 | 1; f = 10 | 30 | 100; N = 8 | 12 | 16

## A loop with feedback factor {b} uses an op amp of {f} MHz unity-gain frequency and must settle to half an LSB of {N} bits.

::: part
answer: 1/(b*2*pi*f*1e6)*1e9
unit: ns
tolerance: 0.5%

### What is the closed-loop time constant?

::: misses
- [any] $1/(\beta\omega_u)$.
:::
:::

::: part
answer: 1/(b*2*pi*f*1e6)*1e9*ln(2^(N + 1))
unit: ns
tolerance: 0.5%

### How long does linear settling take?

::: misses
- [1/(b*2*pi*f*1e6)*1e9*ln(2^N)] Half an LSB is $2^{-(N+1)}$.
- [any] $\tau\ln 2^{N+1}$.
:::
:::
:::

::: check
kind: parts
given: s = 20 | 50 | 100; c = 5 | 10 | 20; V = 1 | 2

## A loop with time constant {c} ns and slew rate {s} V/µs gets a {V} V step.

::: part
answer: (V - s*c/1000)/s*1000
unit: ns
tolerance: 0.5%

### How long does it slew?

::: misses
- [V/s*1000] Slewing stops once the error is down to $SR\cdot\tau$.
- [any] $(V - SR\tau)/SR$.
:::
:::

::: part
answer: c*ln(s*c/1000/(V/8192))
unit: ns
tolerance: 0.5%

### How long does the linear part take to reach 12-bit accuracy (half an LSB of V)?

::: misses
- [any] $\tau\ln(SR\tau/\varepsilon V)$ with $\varepsilon = 2^{-13}$.
:::
:::
:::

::: check
kind: parts
given: N = 10 | 12 | 14 | 16

## A stage must settle to half an LSB of {N} bits.

::: part
answer: ln(2^(N + 1))
tolerance: 0.5%

### How many time constants is that?

::: misses
- [any] $\ln 2^{N+1}$.
:::
:::

::: part
answer: ln(2)
tolerance: 0.5%

### How many more time constants does each extra bit cost?

::: misses
- [any] ln 2.
:::
:::
:::

::: check
kind: parts
given: T = 50 | 100 | 200; N = 10 | 12; b = 0.5 | 1

## A switched-capacitor stage has {T} ns for linear settling to half an LSB of {N} bits, with feedback factor {b}.

::: part
answer: ln(2^(N + 1))/(T*1e-9)/b/(2*pi)/1e6
unit: MHz
tolerance: 0.5%

### What unity-gain frequency must its op amp have?

::: misses
- [any] $f_u = \ln 2^{N+1}/(2\pi\beta T)$.
:::
:::

::: part
answer: ln(2^(N + 1))/(T*1e-9)/b/(2*pi)/1e6*2
unit: MHz
tolerance: 0.5%

### And if the time were halved?

::: misses
- [any] Twice.
:::
:::
:::

::: check
kind: choice

## A pipeline ADC's stage settles too slowly. Its step is mostly settled linearly, with slewing brief. Which fix helps most?

- [ ] Doubling the slew rate with more tail current while keeping $g_m$
- [x] Raising the op amp's unity-gain frequency (more $g_m$ per load capacitance)
- [ ] Raising the op amp's DC gain
- [ ] Lowering the phase margin to 45°

::: misses
- [1] Slewing is a small share of the time here.
- [3] DC gain sets the final error, not the speed.
- [4] Less phase margin adds ringing, which slows precise settling.
:::
:::

::: check
kind: derivation
vars: V = 0.1..5, s = 1e6..1e9, c = 1e-9..1e-7, e = 1e-6..1e-2

## A loop with slew rate s (V/s) and time constant c gets a step V larger than s·c, and must reach a fractional error e.

::: step
answer: (V - s*c)/s

### How long does it slew?
:::

::: step
answer: c*ln(s*c/(e*V))

### How long is the linear part?
:::

::: step
answer: (V - s*c)/s + c*ln(s*c/(e*V))

### What is the total settling time?
:::

::: right
Right. Slewing removes all but $SR\cdot\tau$ of the step; the exponential takes care of the rest.
:::
:::

::: check
kind: python

## Write `settle_time(V, SR, tau, eps)`: the time to reach within eps (fractional) of a step V, slewing at SR if $V > SR\cdot\tau$ and then settling exponentially; linear throughout otherwise.

```python starter
import math

def settle_time(V, SR, tau, eps):
    return tau * math.log(1 / eps)
```

```python solution
import math

def settle_time(V, SR, tau, eps):
    if V <= SR * tau:
        return tau * math.log(1 / eps)
    return (V - SR * tau) / SR + tau * math.log(SR * tau / (eps * V))
```

```python tests
t = settle_time(1.0, 50e6, 10.61e-9, 2 ** -13)
assert abs(t * 1e9 - 98.27) < 0.05, "The worked example: 98.3 ns."
assert abs(settle_time(0.1, 50e6, 10.61e-9, 2 ** -13) - 10.61e-9 * math.log(2 ** 13)) < 1e-15, "A small step never slews."
assert settle_time(1.0, 100e6, 10.61e-9, 2 ** -13) < t, "More slew rate helps a little."
a, b = settle_time(1.0, 50e6, 10.61e-9, 2 ** -13), settle_time(1.0, 50e6, 10.61e-9, 2 ** -14)
assert abs((b - a) - 10.61e-9 * math.log(2)) < 1e-15, "One more bit costs τ ln 2."
```

::: right
Right. The two pieces join smoothly at the handover point, where the linear response's slope equals the slew rate.
:::
:::

::: explain
## Why does an amplifier's settling time often depend more on its unity-gain frequency than on its slew rate?

::: model
Slewing only lasts while the remaining error is larger than the slew rate times the closed-loop time constant, which for a well-designed amplifier is a sizable fraction of the step, so it covers the coarse part of the move quickly. Reaching high accuracy then takes a fixed number of time constants per decade of error, about 0.69 per bit, and those time constants are set by the feedback factor and the unity-gain frequency. For precise settling, such as half an LSB at 12 bits or more, the exponential tail is most of the time, so raising the bandwidth helps far more than adding slew current.
:::
:::

::: practice
::: check
given: I = 20 | 100; C = 1 | 2
answer: I/C
unit: V/µs
tolerance: 0.5%

## Slew rate with {I} µA into {C} pF?

::: misses
- [any] $I/C_c$.
:::
:::

::: check
given: s = 30 | 300; V = 1 | 10
answer: s/(2*pi*V)
unit: MHz
tolerance: 0.5%

## Full-power bandwidth at {s} V/µs and {V} V peak?

::: misses
- [any] $SR/(2\pi V_p)$.
:::
:::

::: check
given: c = 5 | 20; N = 10 | 14
answer: c*ln(2^(N + 1))
unit: ns
tolerance: 0.5%

## Linear settling to half an LSB of {N} bits with τ = {c} ns?

::: misses
- [any] $\tau\ln 2^{N+1}$.
:::
:::
:::
