""" Function to calculate the Shockley-Read-Hall contribution to the current density in a pn junction
args:
- Vbias (scalar): the bias voltage of the pn junction
- ND (scalar): the donor doping concentration in the n region
- NA (scalar): the acceptor doping concentraion in the p region
- tau (scalar): the global lifetime associated to the SRH mechanism
- temp (scalar): the temperature
return:
- a scalar with the SRH current density calculated
"""
kB=1.38e-23# J/K
q=1.602e-19# C
ld_n=depletion_length(ND,NA,Vbias)
ld_p=depletion_length(NA,ND,Vbias)
ni=sc.intrinsic_concentration(temp)
x=(ld_p+ld_n)# approximation by considering only the depletion region without diffusion mechanism
x=(ld_p+ld_n)# approximation by considering only the depletion region without diffusion mechanism, gives an upper limit as the effective length is always below
""" Function to calculate the correcting ratio due to temperature variations for the piezoresistive coefficients. The data are taken from Kanda (1982) between 200 K and 400K.
The correction is refered to the 300K coefficients. The new piezoresistive coefficients can be calculated by piezo_coefficient(temp) = ratio * piezo_coefficient(300K)
args:
- temp (scalar or sequence): the temperatures for which the correting ratio has to be calculated
- carrier (string): "n" for electrons, "p" for holes
return:
- a scalar or sequence with the same dimension as temp with the correcting ratio
""" Function to find the threshold voltage of a transistor defined as the voltage where the transconductance gm is maximum, i.e., when the first derivative of the current is maximum or when the second derivative is zero.
The method is based on the second-derivative method from Wong HS, White MH, Krutsick TJ, Booth RV. "Modeling of transconductance degradation and extraction of threshold voltage in thin oxide MOSFET’s." Solid-State Electron (1987).
The transistor should be put in linear region (VDS <= VGS-Vth), i.e., with low VDS bias.
The implementation is based on central finite difference to limit the impact of noise for the determination of the threshold voltage.
The numerical derivative is done on accuracy + 1 points, but accuracy should be even
args:
- ids (scalar): the source to drain current of the transistor (nmos or pmos)
- vgs (scalar): the voltage between the gate and the source of the transistor (nmos or pmos)
- accuracy (integer): related to the number of points taken for the finite difference. For central finite difference, the number of points for a first order derivation is accuracy + 1 but accuracy should be even to guarantee a centered interval.
return:
- a tuple of two scalars with the threshold voltage found and the transconductance value found at this voltage
with k = "mobility" * "oxide capacitance" * "width" / "length" where the oxide capacitance is given by the ratio between the permittivity and the oxide thickness, i.e., Cox = epsilon_r * epsilon_0 / t_ox
The mobility degradation is taken into account by replacing k by k / (1 + theta * (vgs - vth)) in the current equation.
args:
- vg (scalar or sequence): gate voltage of the transistor. Maximum one parameter among vg, vd and vs can be a sequence.
- vd (scala or sequence): drain voltage of the transistor. Maximum one parameter among vg, vd and vs can be a sequence.
- vs (scalar or sequence): source voltage of the transistor. Maximum one parameter among vg, vd and vs can be a sequence.
- vth (scalar): threshold voltage of the transistor
- k (scalar): the gain factor of the transistor
- vea (scalar) : early voltage of the transistor
- theta (scalar) : mobility degradation factor
return:
- a scalar or sequence with the value of current calculated