Equations¶
Level-1 MOSFET equations (Shichman-Hodges) and op-amp performance formulas.
All functions operate on SI units unless the name suffix states otherwise. Consistent units: currents in A, voltages in V, transconductances in A/V (S), dimensions (W, L) in µm (dimensionless ratio W/L is used where needed), frequencies in Hz, power in W.
- circuitgenome.sizer.shared.equations.gm(mu_cox, w_um, l_um, ids_a)[source]¶
Transconductance gm in A/V.
gm = √(2·µCox·(W/L)·|IDS|)
- circuitgenome.sizer.shared.equations.gm_ceiling(ids_a)[source]¶
Physical upper bound on gm in A/V (weak-inversion limit).
- circuitgenome.sizer.shared.equations.gd(lam, ids_a)[source]¶
Output conductance gd in A/V.
gd = λ·|IDS|
- circuitgenome.sizer.shared.equations.rout(gd_top, gd_bot)[source]¶
Stage output resistance in Ω.
Rout = 1 / (gd_top + gd_bot)
- circuitgenome.sizer.shared.equations.vgs_from_ids(mu_cox, w_um, l_um, ids_a, vth)[source]¶
Gate-source voltage in V (saturation, λ=0 approximation).
Solves IDS = (µCox/2)·(W/L)·(VGS−Vth)² for VGS. Returns a signed value: positive for NMOS, negative for PMOS.
- circuitgenome.sizer.shared.equations.vds_sat(mu_cox, w_um, l_um, ids_a)[source]¶
Minimum |VDS| for saturation in V.
VDS_sat = VGS − Vth = √(2·|IDS|·L / (µCox·W))
- circuitgenome.sizer.shared.equations.open_loop_gain_db(stage_gains)[source]¶
Total open-loop DC gain in dB.
A0 = Π(gm_j · Rout_j), converted to dB.
- circuitgenome.sizer.shared.equations.unity_gain_bw(gm1_a_v, cc_f)[source]¶
Unity-gain bandwidth (GBW) in Hz.
GBW = gm1 / (2π·Cc)
- circuitgenome.sizer.shared.equations.phase_margin_two_stage_deg(gm1, gm2, cc_f, cl_f)[source]¶
Phase margin in degrees (dominant-pole approximation).
PM ≈ 90° − arctan(gm1·CL / (gm2·Cc))
Valid when the dominant pole is at 1/(Rout1·Cc) and the non-dominant pole is at gm2/CL (internal mirror pole neglected).
- circuitgenome.sizer.shared.equations.phase_margin_three_stage_deg(gm1, gm2, gm3, cc1_f, cc2_f, cl_f)[source]¶
Phase margin in degrees for three-stage NMC/RNMC (two non-dominant poles).
PM ≈ 90° − arctan(ωt·Cc2/gm2) − arctan(ωt·CL/gm3) where ωt = gm1/Cc1.
- Parameters:
gm1 (float) – Input-pair transconductance in A/V.
gm2 (float) – Second-stage signal transistor gm in A/V.
gm3 (float) – Third-stage signal transistor gm in A/V.
cc1_f (float) – Outer (primary) compensation capacitor in F.
cc2_f (float) – Inner compensation capacitor in F (Cc2 = Cc1/4 by default).
cl_f (float) – Output load capacitance in F.
- Return type:
- circuitgenome.sizer.shared.equations.slew_rate_vps(ibias_a, cc_f)[source]¶
Slew rate in V/s.
SR = IBias / Cc (limited by tail-current charging/discharging Cc)
- circuitgenome.sizer.shared.equations.quiescent_power(vdd, vss, supply_currents_a)[source]¶
Total quiescent power in W.
P = (VDD − VSS) · Σ|IDS_supply|
- circuitgenome.sizer.shared.equations.cmrr_db(gm1, gd_tail)[source]¶
Common-mode rejection ratio in dB (first-order approximation).
CMRR ≈ gm1 / (2·gd_tail)