Analog IC · Lesson 7

Two-stage op-amp and compensation

Tune C_c and R_z: Bode plot, phase margin and step response.

📘 Chapter introduction(click to show)

In this chapter you will learn to

  • ✓Explain why two gain stages can make a feedback amplifier ring or oscillate.
  • ✓Explain Miller compensation and pole splitting.
  • ✓Use phase margin to judge stability, and remove the right-half-plane zero with R_z.

1. Why this circuit matters

One stage gives about 40 dB of gain, but precision circuits need 80 dB or more. A second gain stage multiplies the gain, but each stage also adds delay. Inside a feedback loop, too much delay makes the amplifier ring, or even oscillate. This chapter is about getting high gain and keeping it stable.

💡 Think of it like this

Imagine steering a car when there is a delay between turning the wheel and the tyres responding. If you react to where the car is right now, you over-correct and swerve from side to side. Compensation is like deliberately steering more gently, so you never react faster than the car can follow. You give up a little speed to stop the swerving.

2. Definition

A two-stage op-amp cascades a differential input stage and a common-source gain stage. A Miller compensation capacitor C_c across the second stage pushes the two poles apart (pole splitting) so the amplifier is stable in feedback.

3. Meet the components

Stage 1: five-transistor OTA

Input stage: high input resistance, differential to single-ended conversion, first gain A₁.

M6, second-stage PMOS

Common-source amplifier: second gain A₂, and drives the output.

M7, current sink

Sets M6's bias current. Its r_o is part of the output resistance.

C_c, Miller capacitor

The key part for stability. Splits the poles and sets GBW ≈ g_m1/(2π·C_c).

R_z, nulling resistor

In series with C_c. Cancels, or moves, the right-half-plane zero that C_c creates.

C_L, load capacitance

Sets the second pole. Heavier loads need more compensation.

4. How it works, step by step

  1. 1

    Stage 1 amplifies the difference. The OTA turns the input difference into a voltage at node X, with gain A₁.

  2. 2

    Stage 2 amplifies again. M6 amplifies node X by A₂. The total DC gain is A₀ = A₁·A₂.

  3. 3

    Each stage adds a pole. Each node's resistance and capacitance cause the gain to roll off and the phase to lag. With two poles close together, the phase reaches about −180° before the gain falls to 1. Negative feedback then turns into positive feedback, and the circuit rings.

  4. 4

    C_c splits the poles. Connected from X to the output, C_c is multiplied by the second-stage gain (the Miller effect). That moves the first pole far down and the second pole far up.

  5. 5

    Now it behaves like one pole. The gain falls at a steady −20 dB per decade and crosses 1 near GBW ≈ g_m1/(2π·C_c). If the second pole is well above GBW, the phase margin is large and the step response is clean (about 60° is the usual target).

  6. 6

    Fix the side effect. C_c also creates a right-half-plane zero that steals phase. A resistor R_z = 1/g_m6 in series with C_c removes it.

🔑 The one thing to remember

Two stages for gain, one capacitor for stability: C_c trades speed for phase margin.

Compensation

Bias and sizing

Key formulas

  • A_0 = g_m1·(r_o2 ‖ r_o4) · g_m6·(r_o6 ‖ r_o7)

  • p_1 ≈ 1 / (R_1·g_m6·R_2·C_c)

    Miller-multiplied C_c pushes the first pole down

  • p_2 ≈ g_m6·C_c / (C_1·C_L + C_c·(C_1 + C_L)) ≈ g_m6 / C_L

  • z = 1 / (C_c·(1/g_m6 − R_z))

    RHP when R_z < 1/g_m6

  • GBW ≈ g_m1 / (2π·C_c), PM = 180° + ∠A(f_u)

Two-stage op-amp

VDD+−Stage 15T OTAV+V−A_1 = 200XSDGM6W/L=40saturationDSGM7saturationV_BI_6 100 µAVoutC_LR_zC_cMiller compensation(from X to Vout)

Green = second-stage bias current (→ direction). Pink = compensation network, which carries signal current only.

Stability summary

DC gain A_084.1 dB (16 kV/V)
A_1 · A_2200 · 80
p_1 (dominant)995 Hz
p_2 (non-dominant)24.6 MHz
Zero63.7 MHz (RHP)
GBW ≈ g_m1/(2π·C_c)15.9 MHz
Unity-gain f_u14.1 MHz
p_2 / f_u1.74×
Phase margin47.6°
Step overshoot19.9 %
VerdictAcceptable

Bode magnitude

1 Hz100 Hz10 kHz1 MHz100 MHz10 GHz050100p₁p₂f_uFrequency|A| (dB)

Bode phase

1 Hz100 Hz10 kHz1 MHz100 MHz10 GHz-250-200-150-100-500PM 48°−180°FrequencyPhase (deg)

Unity-gain step response

0 s50 ns100 ns0.00.51.01.5final valueTimeV_OUT / V_step

Small-signal response with the output tied to V−. A dip at the start shows the right-half-plane zero.

Things to try

  • The starting point has about 43° PM and visible ringing. Raise C_c until PM passes 60°. Note how GBW falls.
  • Press 'Set R_z = 1/g_m6': the zero disappears and PM rises without losing GBW.
  • Push R_z above 1/g_m6: the zero moves into the left half plane and adds phase lead.
  • Shrink C_c to 0.3 pF and watch the step response ring hard or go unstable.
  • Increase I_6: g_m6 rises, p_2 moves up, and the same C_c gives more phase margin.
  • Double C_L: p_2 moves down, so you need a larger C_c (and give up speed) to stay stable.