S2 · Lesson 20 · Designing a two-stage op amp
Gain, bandwidth, phase margin, slew rate and the nulling resistor
The two-stage Miller op amp is the workhorse of CMOS analog design: a differential pair with a mirror load, then a common-source gain stage, with a capacitor across the second stage to split the poles (lesson 13). C6 simulated one at transistor level. This lesson turns it into a design procedure: start from the specifications (gain-bandwidth, phase margin, load capacitance, slew rate), choose the compensation capacitor, size each transistor's transconductance and current by gm/ID, and deal with the right-half-plane zero with a single resistor. Every step is one of the formulas from the last six lessons.
- The open-loop gain of a two-stage op amp ( = 0.2 mS, = 2 mS, = 5 pF, DC gain 5000) on a Bode plot, with compensation capacitor and a nulling resistor in series with it.
- With = 0 the right-half-plane zero at adds phase lag. At = 0.5 kΩ the zero goes to infinity. Larger still, it becomes a left-half-plane zero that adds phase lead.
- Raise : the unity-gain frequency falls and the phase margin improves. The readout estimates the phase margin from the poles and the zero.
Predict
A two-stage op amp's right-half-plane zero costs it phase margin. What value of the resistor in series with removes the zero?
. The zero comes from current flowing forward through , cancelling the second stage's . With in series the zero moves to , which goes to infinity at and into the left half plane for larger . A common choice puts the left-half-plane zero right on top of the second pole, , cancelling it, so the third pole sets the margin.
Name it
The small-signal design equations
With the first stage into resistance , the second stage into and load :
- DC gain with equal λ.
- Unity-gain frequency .
- Second pole (for larger than the internal node's capacitance).
- Zero : right half plane for .
- Phase margin (the zero's term changes sign when it moves to the left half plane).
Slew rate
On a large step the input pair switches fully and its whole tail current charges : . The output stage must also supply : .
A procedure
- From and the phase margin, pick (k ≈ 2 to 3 for 60° to 70°), which sets .
- Pick (often 0.2 to 0.5 times ), then .
- Choose for each transistor (high for the input pair, for gain and low noise; moderate for the output) and get the currents.
- Check slew rate, swing, gain and noise; iterate.
- Choose : at least , or to cancel .
- Size the mirror and output transistors so their current densities match, avoiding systematic offset.
Worked example
Design for GBW = 30 MHz into = 5 pF with = 2.2 GBW. Take = 2 pF, = 15 /V for the input pair and 10 /V for the output, and λ = 0.1 V⁻¹.
Show the solution
- Input transconductance.
- Input current. Each input transistor carries (tail 50 µA).
- Output transconductance.
- Output current.
- Gain. or 71.5 dB.
- Slew rate. The input stage gives
- The output stage's limit. It can supply so the input stage limits the slew rate.
Answer 25 µA in each input transistor (50 µA tail) and 207 µA in the output stage, a gain of 3750 (71.5 dB), and a slew rate of 25 V/µs set by the input stage.
Worked example
For the op amp in the sim with = 1 pF, find the phase margin with = 0, with , and the that cancels the second pole.
Show the solution
- Unity-gain frequency and second pole. = 31.8 MHz and = 63.7 MHz.
- With = 0. The zero is at (318 MHz), so
- With = 500 Ω. The zero is gone and PM ≈ 63°.
- Cancelling . That needs then the margin is set by the next, higher pole and approaches 90° in this two-pole model.
Answer about 58° of phase margin with = 0 and 63° with = 500 Ω; = 3 kΩ cancels the second pole.
Worked example
The two-stage op amp's input stage tail current is 50 µA, and = 1 pF. What is its slew rate, and how long does a 1 V step take to slew?
Show the solution
- Slew rate. The tail current is all that can charge :
- Slewing a 1 V step. This comes before the linear settling even starts:
- What helps. Raising GBW by raising doesn't help slewing; only more current per does.
Answer the slew rate is 50 V/µs, so a 1 V step takes 20 ns to slew.
Check
A two-stage op amp has = 0.5 mS and = 0.5 pF. What's its gain-bandwidth?
Write units the way you normally would: 1.5 MHz, 1500 kHz and 0.0015 GHz are the same answer.
Check
The output stage has = 3 mS and drives 2 pF. Where's the second pole?
Write units the way you normally would: 1.5 MHz, 1500 kHz and 0.0015 GHz are the same answer.
Check
A Miller op amp has = 1 mS, = 0.5 pF and = 0.2 kΩ. Where's the right-half-plane zero?
Write units the way you normally would: 1.5 MHz, 1500 kHz and 0.0015 GHz are the same answer.
Check
What nulling resistor puts the zero on the second pole, for = 1 mS, = 3 pF and = 2 pF?
Write units the way you normally would: 1.5 kΩ, 1500 Ω and 0.0015 MΩ are the same answer.
Check
A two-stage op amp's input pair has a 100 µA tail and = 0.5 pF. What's its slew rate?
Write units the way you normally would: 1.5 V/µs, 1500 mV/µs and 0.0015 kV/µs are the same answer.
Check
The input pair runs at = 10 /V and the output at 6 /V, every transistor with λ = 0.2 V⁻¹. What's the DC gain?
Check
For = 2.2 times the unity-gain frequency, with = 0.2 mS, = 8 pF and = 3 pF, what is needed?
Write units the way you normally would: 1.5 mS, 1500 µS and 0.0015 S are the same answer.
Check
An op amp's unity-gain frequency is 20 MHz, its second pole 60 MHz and its right-half-plane zero 600 MHz. Estimate its phase margin.
Check
A two-stage op amp's tail current is 50 µA, its compensation capacitor 0.5 pF, and its input pair runs at = 20 /V.
(a)
What is its slew rate?
Write units the way you normally would: 1.5 V/µs, 1500 mV/µs and 0.0015 kV/µs are the same answer.
(b)
What is its gain-bandwidth product?
Check
A two-stage op amp has tail current I, compensation capacitor C, and input pair = e.
Step 1
What is its slew rate?
Type it the way you would write it, like 3sin(2πft) or 3*sin(2*pi*f*t). Angles can be in radians or carry a degree sign, like 45°.
Step 2
What is its unity-gain frequency (rad/s)?
Step 3
What ratio of slew rate to unity-gain frequency results (in volts)?
Explain why
Why does a resistor in series with the compensation capacitor remove the right-half-plane zero?
The zero appears at the frequency where current flowing forward through the compensation capacitor, from the second stage's input straight to its output, exactly cancels the current the transistor pulls. Without a resistor, the capacitor's current grows with frequency and catches up with at . A series resistor limits that forward current: the capacitor's branch now has impedance , so at high frequency its current levels off at instead of growing. If equals , the forward current can never quite equal the transistor's, and the zero moves to infinity; a larger flips the zero into the left half plane, where it adds phase lead instead of lag.
Practice
Keep practicing
12 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.