C527 of 57
0 XP
  1. Hook
  2. Play
  3. Predict
  4. Name it
  5. Check
  6. Explain

C5 · Lesson 27 · Transistor models lab

MOSFET, BJT and JFET models and their operating points, in Python

Lessons 15 to 24 solved transistor circuits by hand: guess a region, solve, check the guess. A circuit simulator does the same with models that cover every region at once and a solver that never has to guess. In this lab you'll write those models for the MOSFET, the BJT (the Ebers–Moll model, which handles saturation without special cases) and the JFET, a bisection solver that finds a MOSFET's operating point in either region, and a worst-case check of a bias design.

Play

  • The curves are a MOSFET's drain current against drain voltage, at three gate voltages half a volt apart, from one model that covers cutoff, triode and saturation.
  • Raise λ: the saturated parts of the curves tilt upward.
  • Watch the knees: each one sits at vDS=vGS−Vt, which moves with the gate voltage.

Predict

The Ebers–Moll model is asked for a saturated BJT's VCE at a forced β of 10, with β = 100 and a reverse β of 1. What does it give?

Name it

One MOSFET model for every region

iD={0vOV≤0K(vOVvDS−12vDS2)(1+λvDS)0<vDS<vOVK2vOV2(1+λvDS)vDS≥vOV

with vOV=vGS−Vt. Applying (1+λvDS) in both regions keeps the current continuous at the knee, as SPICE's level-1 model does.

Solving a bias circuit without guessing

For a MOSFET with RS and RD, try a current I: it fixes VS=IRS and VD=VDD−IRD, and the model then says what current the transistor would carry at those voltages. The function

f(I)=iD(VG−IRS,VDD−I(RD+RS))−I

falls steadily from positive to negative, so bisection between 0 and VDDRD+RS finds the operating point in whichever region it lies.

Ebers–Moll

The BJT as two coupled diodes:

iC=IS(evBE/VT−evBC/VT)−ISβR(evBC/VT−1),
iB=ISβF(evBE/VT−1)+ISβR(evBC/VT−1).

In the active region vBC is negative and iC=βFiB; in saturation both junctions conduct, and solving the two equations for a forced β gives

VCE,sat=VTln⁡1+(βforced+1)/βR1−βforced/βF.

Worst-case bias

A bias design has to work for every part it might be built with. For divider bias, the current is lowest with the smallest β and the largest VBE, and highest with the largest β and the smallest VBE; checking those two corners bounds every combination in between.

Worked example

Solve lesson 17's first circuit (VDD = 10 V, VG = 5 V, RS = 2 kΩ, RD = 3 kΩ, K = 1 mA/V², Vt = 1 V) and its second (RS = 0, RD = 10 kΩ) with the bisection solver.

Show the solution
  1. First circuit. Bisection on f(I) settles at 1.2192 mA, with VS=2.438VVD=6.342V
  2. Check its region. The drain is above VG−Vt = 4 V, so it's saturated, matching the quadratic formula's 1.22 mA.
  3. Second circuit. The same solver gives 0.9748 mA and VD = 0.2516 V, in triode.
  4. What did the work. No region was guessed in either case; the model's own switch between formulas did the work.

Answer the first circuit settles at 1.2192 mA in saturation (VD = 6.342 V), and the second at 0.9748 mA in triode (VD = 0.2516 V).

Worked example

A BJT model with IS=10−15 A, βF = 100 and βR = 1 has vBE = 0.70 V and vBC = 0.60 V. Find iC, iB and the forced β, and check the saturation formula.

Show the solution
  1. The two exponentials. e0.7/0.02585=5.76×1011e0.6/0.02585=1.20×1010
  2. Currents. Then iC = 0.552 mA and iB = 17.8 µA.
  3. Forced β. 0.552mA17.8μA=31.0 That's well below 100, so it's saturated.
  4. Check the saturation formula. With β_forced = 31.0, VTln⁡1+32.01−0.310=0.1000V exactly vBE−vBC. The formula is the model, solved in reverse.

Answer iC = 0.552 mA and iB = 17.8 µA, a forced β of 31.0, and the saturation formula gives back exactly the 0.1000 V between vBE and vBC.

Worked example

Lesson 30's divider bias (47 kΩ over 10 kΩ on 12 V, RE = 1 kΩ) must work for any β from 50 to 300 and any VBE from 0.6 to 0.8 V. What range of currents can it give?

Show the solution
  1. Low corner. With β = 50 and VBE = 0.8 V, IE=2.105−0.81000+8246/51=1.124mA
  2. High corner. With β = 300 and 0.6 V, IE = 1.465 mA.
  3. Compare with nominal. Nominal (β = 100, 0.7 V) is 1.299 mA, so the spread is −13.5% to +12.8%.
  4. If that's too wide. A design that needs the current within 5% needs a larger emitter voltage, a stiffer divider, or feedback.

Answer it can give anywhere from 1.124 mA to 1.465 mA, −13.5% to +12.8% around the nominal 1.299 mA.

Check

Step 1. Write mos_id(vgs, vds, K, Vt, lam=0.0) returning the drain current of an NMOS in any region, as in the reading.

Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.

Check

Step 2. Write mos_bias(VDD, RD, RS, VG, K, Vt) returning (I, VS, VD) by bisection on f(I) between 0 and VDDRD+RS (take λ = 0). Your mos_id from step 1 is available.

Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.

Check

Step 3. Write ebers_moll(vbe, vbc, IS=1e-15, bf=100, br=1, VT=0.02585) returning (ic, ib), and vce_sat(beta_forced, bf=100, br=1, VT=0.02585) from the saturation formula.

Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.

Check

Step 4. Write jfet_selfbias(Idss, Vp, Rs) returning (ID, VGS) for a self-biased n-channel JFET: the root of Shockley's equation with VGS=−IDRS that keeps VGS between VP and 0.

Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.

Check

Step 5. Write bias_corners(VCC, R1, R2, RE, bmin, bmax, vmin=0.6, vmax=0.8) returning (Imin, Imax), the emitter currents of a divider-biased stage at its two worst-case corners.

Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.

Check

What saturation voltage does the Ebers–Moll model give at a forced β of 10, with βF = 100 and βR = 2?

Write units the way you normally would: 1.5 mV, 1500 µV and 0.0015 V are the same answer.

Check

Divider bias of 39 kΩ over 15 kΩ on 9 V with RE = 2.2 kΩ must work for β from 40 to 400 and VBE from 0.6 to 0.8 V.

(a)

What's the lowest emitter current?

Write units the way you normally would: 1.5 mA, 1500 µA and 0.0015 A are the same answer.

(b)

What's the highest?

Explain why

Why does a circuit simulator use models that cover every region, instead of the hand method of guessing a region and checking it?

Practice

Keep practicing

3 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.