S2 · Lesson 6 · Stage lab
Small-signal stages, cascodes, followers and time constants, in Python
Hand analysis of a single stage is quick but error-prone once body effect, and degeneration all appear at once. Analog designers keep a small toolbox of exact expressions in a script and check their hand estimates against it before going to the simulator. This lab builds that toolbox: the degenerated common-source stage, the cascode's output resistance, the source follower's gain, and the open-circuit time-constant estimate compared with a stage's exact poles.
- The curve is a degenerated common-source stage's gain against its source resistor, from the exact small-signal result with = 2 mS, = 0.3 mS and = 50 kΩ into a 20 kΩ load.
- With no degeneration the gain is , 28.6; degeneration trades gain for linearity and output resistance.
- The dashed line is the simple estimate , which the exact curve approaches only when is large and is far above .
Predict
The common-source stage ( = 2 mS, = 0.3 mS, = 50 kΩ) gets = 1 kΩ and drives 20 kΩ. What gain does it have?
mS, and the output resistance rises to kΩ, so the gain is . The estimate is far off, because isn't large.
Name it
The formulas
- Degenerated CS: , , gain .
- Cascode output resistance: the same with replaced by the resistance below the cascode device.
- Source follower: .
- Open-circuit time constants: for a CS stage with , and , , and the exact denominator has .
Check
Write cs_stage(gm, gmb, ro, RS, RL): return (gain, Gm, Rout) for the degenerated common-source stage.
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Check
Write cascode_rout(gm, gmb, ro, Rbelow) and follower_gain(gm, gmb, ro, RL).
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Check
Write cs_poles(Rs, gm, RL, Cgs, Cgd, Cdb): return (the open-circuit time-constant estimate , and the exact poles of ), all in rad/s.
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Check
Write pair_cmrr(gm, Rtail, mismatch): the CMRR (as a ratio) of a differential pair with per-side , tail resistance and fractional load mismatch, ; and cmrr_db(x).
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Explain why
Why does the simple gain estimate for a degenerated common-source stage often disagree badly with the exact result?
The estimate assumes the transistor's transconductance is so large that all of the input voltage appears across the source resistor, and that the transistor's output resistance is so high it doesn't load the output. In practice is often only 2 to 5, so part of the input still appears across the gate-source junction, and the body effect adds to the feedback through ; both reduce the effective transconductance below . If isn't far above , the output resistance also shares the load. The exact formula keeps all three effects and is worth computing whenever isn't large.