pub struct MosfetModel {
pub vth: f64,
pub cox: f64,
pub mobility: f64,
pub width: f64,
pub length: f64,
pub temperature_k: f64,
pub n_sub: f64,
pub lambda: f64,
}Expand description
MOSFET (Metal-Oxide-Semiconductor Field-Effect Transistor) model.
Implements the square-law MOSFET model with subthreshold behavior.
Fields§
§vth: f64Threshold voltage Vth in V.
cox: f64Oxide capacitance per unit area Cox in F/cm^2.
mobility: f64Channel mobility in cm^2/(V·s).
width: f64Channel width in cm.
length: f64Channel length in cm.
temperature_k: f64Temperature in K.
n_sub: f64Subthreshold swing ideality factor (typically 1.0-1.5).
lambda: f64Channel-length modulation parameter lambda in V^-1.
Implementations§
Source§impl MosfetModel
impl MosfetModel
Sourcepub fn new(
vth: f64,
cox: f64,
mobility: f64,
width: f64,
length: f64,
temperature_k: f64,
n_sub: f64,
lambda: f64,
) -> Self
pub fn new( vth: f64, cox: f64, mobility: f64, width: f64, length: f64, temperature_k: f64, n_sub: f64, lambda: f64, ) -> Self
Create a new MOSFET model.
Sourcepub fn typical_nmos() -> Self
pub fn typical_nmos() -> Self
Typical NMOS transistor parameters.
Sourcepub fn transconductance_parameter(&self) -> f64
pub fn transconductance_parameter(&self) -> f64
Transconductance parameter K = mu * Cox * W / L in A/V^2.
Sourcepub fn linear_current(&self, vgs: f64, vds: f64) -> f64
pub fn linear_current(&self, vgs: f64, vds: f64) -> f64
Drain current in the linear (triode) region in A.
Id = K * ((Vgs - Vth) * Vds - Vds^2 / 2) * (1 + lambda * Vds)
Sourcepub fn saturation_current(&self, vgs: f64, vds: f64) -> f64
pub fn saturation_current(&self, vgs: f64, vds: f64) -> f64
Drain current in the saturation region in A.
Id = (K / 2) * (Vgs - Vth)^2 * (1 + lambda * Vds)
Sourcepub fn drain_current(&self, vgs: f64, vds: f64) -> f64
pub fn drain_current(&self, vgs: f64, vds: f64) -> f64
Drain current combining linear and saturation regions.
Sourcepub fn subthreshold_current(&self, vgs: f64, vds: f64) -> f64
pub fn subthreshold_current(&self, vgs: f64, vds: f64) -> f64
Subthreshold current in A.
I_sub = I0 * exp((Vgs - Vth) / (n * V_T)) * (1 - exp(-Vds / V_T))
Sourcepub fn subthreshold_swing(&self) -> f64
pub fn subthreshold_swing(&self) -> f64
Subthreshold swing in mV/decade.
Sourcepub fn transconductance(&self, vgs: f64) -> f64
pub fn transconductance(&self, vgs: f64) -> f64
Transconductance gm = dId/dVgs in the saturation region, in A/V.
Sourcepub fn output_conductance(&self, vgs: f64) -> f64
pub fn output_conductance(&self, vgs: f64) -> f64
Output conductance gds = dId/dVds in saturation, in A/V.
Sourcepub fn intrinsic_gain(&self, vgs: f64) -> f64
pub fn intrinsic_gain(&self, vgs: f64) -> f64
Intrinsic voltage gain Av = gm / gds.
Trait Implementations§
Source§impl Clone for MosfetModel
impl Clone for MosfetModel
Source§fn clone(&self) -> MosfetModel
fn clone(&self) -> MosfetModel
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more