Struct EbersMollTwoPort
pub struct EbersMollTwoPort {
pub is: f64,
pub bf: f64,
pub br: f64,
pub nf_vt: f64,
pub nr_vt: f64,
pub is_pnp: bool,
/* private fields */
}Expand description
Simplified Ebers-Moll BJT model for deterministic-cost NR evaluation.
This model is Gummel-Poon with all advanced effects disabled:
- No Early effect (Qb = 1, no base-width modulation via VAF/VAR)
- No high-injection (no IKF/IKR knee currents)
- No leakage (no ISE/ISC terms)
- No parasitic resistances (RB/RE/RC are zero)
- No junction/diffusion capacitances
The simplified IV equations are:
Ic = IS * (exp(Vbe / NF*VT) - 1) - (IS/BR) * (exp(Vbc / NR*VT) - 1)
Ib = (IS/BF) * (exp(Vbe / NF*VT) - 1) + (IS/BR) * (exp(Vbc / NR*VT) - 1)The Jacobian requires only 2 exp() calls and 4 multiplications
(vs 10+ exp() calls and full Qb chain-rule for Gummel-Poon).
§When to use
Suitable for clean amplifier stages where GP advanced effects are
negligible at the operating point (Vbe near turn-on, Vce >> Vce_sat,
small-signal regime). Enable via --features ebers-moll.
Fields§
§is: f64Saturation current (A). Typically 1e-15 to 1e-12.
bf: f64Forward current gain (beta_F, hFE). Typically 100-500.
br: f64Reverse current gain (beta_R). Typically 1-20.
nf_vt: f64NF * VT — forward thermal voltage denominator.
nr_vt: f64NR * VT — reverse thermal voltage denominator.
is_pnp: boolWhether this is a PNP (vs NPN) transistor.
Implementations§
§impl EbersMollTwoPort
impl EbersMollTwoPort
pub fn from_gp(gp: &GummelPoonModel) -> EbersMollTwoPort
pub fn from_gp(gp: &GummelPoonModel) -> EbersMollTwoPort
Create an EbersMollTwoPort from a GummelPoonModel (NPN polarity).
Only IS, BF, BR, NF, NR, and VT are used; all advanced parameters are discarded.
pub fn from_gp_pnp(gp: &GummelPoonModel) -> EbersMollTwoPort
pub fn from_gp_pnp(gp: &GummelPoonModel) -> EbersMollTwoPort
Create an EbersMollTwoPort from a GummelPoonModel (PNP polarity).
Trait Implementations§
§impl Clone for EbersMollTwoPort
impl Clone for EbersMollTwoPort
§fn clone(&self) -> EbersMollTwoPort
fn clone(&self) -> EbersMollTwoPort
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for EbersMollTwoPort
impl Debug for EbersMollTwoPort
§impl NlDeviceGroupIv for EbersMollTwoPort
impl NlDeviceGroupIv for EbersMollTwoPort
§fn eval(&self, v: &[f64], currents: &mut [f64], jacobian: &mut [f64])
fn eval(&self, v: &[f64], currents: &mut [f64], jacobian: &mut [f64])
Evaluate Ebers-Moll currents and 2×2 Jacobian.
Port ordering matches BjtTwoPort:
- Port 0: Vbe (base-emitter) → Ib
- Port 1: Vce (collector-emitter) → Ic
PNP devices negate all voltages before evaluation and negate currents before writing back.