.MODEL Device Models
General form:
.model mname type(pname1=pval1 pname2=pval2 ... )
Examples:
.model MOD1 npn (bf=50 is=1e-13 vbf=50)
Most simple circuit elements typically require only a few parameter values. However, some devices (semiconductor devices in particular) that are included in ngspice require many parameter values. Often, many devices in a circuit are defined by the same set of device model parameters. For these reasons, a set of device model parameters is defined on a separate .model line and assigned a unique model name. The device element lines in ngspice then refer to the model name.
For these more complex device types, each device element line contains the device name, the nodes the device is connected to, and the device model name. In addition, other optional parameters may be specified for some devices: geometric factors and an initial condition (see the following section on Transistors (8 to 11) and Diodes (7) for more details). mname in the above is the model name, and type is one of the following fifteen types:
Code
|
Model Type
|
R
|
Semiconductor resistor model
|
C
|
Semiconductor capacitor model
|
L
|
Inductor model
|
SW
|
Voltage controlled switch
|
CSW
|
Current controlled switch
|
URC
|
Uniform distributed RC model
|
LTRA
|
Lossy transmission line model
|
D
|
Diode model
|
NPN
|
NPN BJT model
|
PNP
|
PNP BJT model
|
NJF
|
N-channel JFET model
|
PJF
|
P-channel JFET model
|
NMOS
|
N-channel MOSFET model
|
PMOS
|
P-channel MOSFET model
|
NMF
|
N-channel MESFET model
|
PMF
|
P-channel MESFET model
|
VDMOS
|
Power MOS model
|
Table 2.3: Ngspice model types
Parameter values are defined by appending the parameter name followed by an equal sign and the parameter value. Model parameters that are not given a value are assigned the default values given below for each model type. Models are listed in the section on each device along with the description of device element lines. Model parameters and their default values are given in Chapt. 31.