Temperature, in NGSPICE, is a property associated to the entire circuit,
rather an analysis option. Circuit temperature has a default (nominal)
value of 27^oC (300.15 K) that can be changed using the TNOM
option in an .OPTION
control line. All analyses are, thus,
performed at circuit temperature, and if you want to simulate circuit
behaviour at different temperatures you should prepare a netlist
for each temperature.
All input data for NGSPICE is assumed to have been measured at the
circuit nominal temperature. This value can further be overridden for
any device which models temperature effects by specifying the TNOM
parameter on the .model
itself.
Individual instances may further override the circuit temperature through the specification of TEMP and DTEMP parameters on the instance. The two options are not independent even if you can specify both on the instance line, the TEMP option overrides DTEMP. The algorithm to compute instance temperature is described below:
IF TEMP is specified THEN instance_temperature = TEMP ELSE IF instance_temperature = circuit_temperature + DTEMP END IF
Temperature dependent support is provided for all devices except voltage and current sources (either independent and controlled) and BSIM models. BSIM MOSFETs have an alternate temperature dependency scheme which adjusts all of the model parameters before input to NGSPICE. For details of the BSIM temperature adjustment, see [6] and [7].
Temperature appears explicitly in the exponential terms of the BJT and diode model equations. In addition, saturation currents have a built-in temperature dependence. The temperature dependence of the saturation current in the BJT models is determined by:
XTI |T | | E q(T T )| 1 g 1 0 I (T ) = I (T ) |--| exp|-----------| S 1 S 0 |T | |k (T - T )| 0 1 0
where `k' is Boltzmann's constant, `q' is the electronic charge, `E' is the energy gap which is a model parameter, `G' and `XTI' is the saturation current temperature exponent (also a model parameter, and usually equal to 3).
The temperature dependence of forward and reverse beta is according to the formula:
XTB |T | 1 B(T ) = B(T ) |--| 1 0 |T | 0
where `T_0' and `T_1' are in degrees Kelvin, and `XTB' is a user-supplied model parameter. Temperature effects on beta are carried out by appropriate adjustment to the values of `B_F', `I_SE', `B_R', and `I_SC' (spice model parameters BF, ISE, BR, and ISC, respectively).
Temperature dependence of the saturation current in the junction diode model is determined by:
XTI --- N |T | | E q(T T ) | 1 g 1 0 I (T ) = I (T ) |--| exp|-------------| S 1 S 0 |T | |N k (T - T )| 0 1 0
where `N' is the emission coefficient, which is a model parameter, and the other symbols have the same meaning as above. Note that for Schottky barrier diodes, the value of the saturation current temperature exponent, `XTI', is usually 2.
Temperature appears explicitly in the value of junction potential, `U' (in NGSPICE PHI), for all the device models. The temperature dependence is determined by:
| N N | a d kT |------ | U(T) = -- log 2 q e |N (T) | i
where `k' is Boltzmann's constant, `q' is the electronic charge, `N_a' is the acceptor impurity density, `N_d' is the donor impurity density, `N_i' is the intrinsic carrier concentration, and `E_g' is the energy gap.
Temperature appears explicitly in the value of surface mobility, `M_0' (or U_0), for the MOSFET model. The temperature dependence is determined by:
M (T ) 0 0 M (T) = ------- 0 1.5 | T| |--| |T | 0
The effects of temperature on resistors, capacitor and inductors is modeled by the formula:
2 R(T) = R(T ) [1 + TC (T - T ) + TC (T - T ) ] 0 1 0 2 0
where `T' is the circuit temperature, `T_0' is the nominal temperature, and `TC_1' and `TC_2' are the first and second order temperature coefficients.