VT = 25.8649606e-3 # measured VT
ISAT = 10e-15 # model IS
def A(b): return 1/(1+1/b) # alpha factor
def Exp(v,vt): return exp(v/vt) # ~ exponential factor
def IC(vbe,vce,vt,isat,bf,br): return isat*Expisat*exp(vbe,/vt)*(1-Expexp(-vce,/vt)/A(br))
def IE(vbe,vce,vt,isat,bf,br): return isat*Expisat*exp(vbe,/vt)*(Expexp(-vce,/vt)-1/A(bf))
def IB(vbe,vce,vt,isat,bf,br): return isat*Expisat*exp(vbe,/vt)*(1/bf+Expbf+exp(-vce,/vt)/br)
sci( IC(.65,.1,VT,ISAT,200,20), 4 )
'802.4051E-06'
sci( IC(.65,0,VT,ISAT,200,20), 4 )
'-41.0221E-06'
sci( IC(.65,0.00126195567390989,VT,ISAT,200,20), 4 )
'-182.1746E-21'
There's another parlor trick, of sorts. Saturation can only be handled by the full 4-quadrant model, unlike active mode which only requires half of it.
Suppose \$V_{_\text{CC}}=3.3\:\text{V}\$ for an MCU and you need to ensure at or below \$V_{_\text{CE}}=100\:\text{mV}\$ with a collector load of \$160\:\text{mA}\$ that will be activated by an I/O pin and an NPN transistor. You can solve for the required \$V_{_\text{BE}}\$:
def VBE(ic,vce,vt,isat,br): return vt*ln(ic/isat/(1-exp(-vce/vt)/A(br)))
float( sci( VBE(0.16,0.1,VT,ISAT,20), 4 ) )
0.7869631 # required VBE
# note: bipolars are voltage-driven, not current driven
float( sci( IB(0.7869631,0.1,VT,ISAT,200,20), 4 ) )
0.0009892429 # required base current
(This would be \$\beta\approx 162\$.)
Remember, the expectation is no more than \$V_{_\text{CE}}=100\:\text{mV}\$, or \$\ge 3.2\:\text{V}\$ across the load at \$160\:\text{mA}\$. So the collector load can be treated as a \$\frac{3.2\:\text{V}}{160\:\text{mA}}=20\:\Omega\$ resistance.
Assume that the I/O pin will yield exactly \$3.3\:\text{V}\$ at \$0\:\text{mA}\$ and has a FET output resistance, when HI, of \$\approx 40\:\Omega\$.
Then it follows that the base resistor should be \$\frac{3.3\:\text{V}-786.9631\:\text{mV}}{989.2429\:\mu\text{A}}-40\:\Omega\approx 2500.364\:\Omega\$. Round that to \$2.5\:\text{k}\Omega\$ and the result should be very close.
I'll run both the exact and approximate values:
Again, quantitatively predictable.
Take note here. Normally, using a bipolar transistor as a switch (in deep saturation) isn't treated as predictable. Base current is usually just taken to be about \$\frac1{10}\$th of the collector current with a \$\beta\approx 10\$ assumption and the analysis stops there. It's easy.
But I want to point out that the full Ebers-Moll model is a powerful model and it just works right, even in saturation. It is only the full Ebers-Moll model that can handle saturation and active mode behavior (and reverse-active and cutoff modes, too), quantitatively. (It also, of course, clearly and precisely demonstrates that the bipolar transistor is a voltage-driven device. Not current-driven.)
It was and still remains a remarkable achievement.
