Skip to main content

EbersMollTwoPort

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: f64

Saturation current (A). Typically 1e-15 to 1e-12.

§bf: f64

Forward current gain (beta_F, hFE). Typically 100-500.

§br: f64

Reverse current gain (beta_R). Typically 1-20.

§nf_vt: f64

NF * VT — forward thermal voltage denominator.

§nr_vt: f64

NR * VT — reverse thermal voltage denominator.

§is_pnp: bool

Whether this is a PNP (vs NPN) transistor.

Implementations§

§

impl 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

Create an EbersMollTwoPort from a GummelPoonModel (PNP polarity).

pub fn set_v_max(&mut self, v_max: f64)

Set the maximum Vce (supply voltage).

pub fn is_pnp(&self) -> bool

true if this is a PNP device.

Trait Implementations§

§

impl Clone for EbersMollTwoPort

§

fn clone(&self) -> EbersMollTwoPort

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for EbersMollTwoPort

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl NlDeviceGroupIv for EbersMollTwoPort

§

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.

§

fn n_ports(&self) -> usize

Number of ports in this device group.
§

fn v_clamp_port(&self, port: usize) -> (f64, f64)

Voltage clamp bounds for a specific port.
§

fn limit_port_voltage(&self, port: usize, v_new: f64, v_old: f64) -> f64

SPICE-style junction voltage limiting (pnjlim) hook. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more