Modeling Technology

Creating the SPICE Model and Implementing into SPICE

Relation between circuit simulator and SPICE model

It is important for circuit simulation user to understand “simulator” and “models” sufficiently.

We describes a “model” that is important element in performing circuit simulation. A circuit simulation user need to sufficiently understand how to use simulator. It is also important to fully understand “models” as well as a “simulator”. You can create a fine good circuit if you understand model as well as simulator sufficiently.

What is a SPICE model?

The properties of a device are represented using a mathematical expression.

In SPICE, the properties (characteristics) of a device are represented using multiple mathematical expressions. In this case, as shown in Figure 1, the linear movement of a person is given as an example. The movement distance: d[m] obtained when a person moved for time: t[s] at velocity: v[m/s] can be represented as d = v*t. This indicates that one of the “properties” of a person of “movement distance” was represented using a mathematical expression. In other words, the movement distance of various persons can be represented using a common relational expression. In this way, in SPICE, arithmetical expressions representing characteristics have been beforehand input for each device.

The specific value for each device is prescribed as a “coefficient”.

As described above, in SPICE, the characteristics of a device are represented using multiple mathematical expressions. In the example above, velocity: v is a specific value for each person. Like this, the specific value for each person can be prescribed as the “coefficient” in a mathematical expression. As said before, there are multiple mathematical expressions in SPICE that represent the characteristics of one device. There are also multiple “coefficients” used in the mathematical expressions. The “coefficient” prepared for each device are called a SPICE model (parameter). Table 1 shows the characteristic formulas of representative devices and the list of “coefficients” used in the characteristic formulas.

Type of SPICE models

There are three models (Compact-, Macro-, and Behavior- models).

As described above, the properties of a device in a SPICE model are represented using a mathematical expression. Moreover, there are other methods for representing the properties of a device. Are they what kind of representation methods? The methods for representing a SPICE model are roughly classified into three. One is a compact model, the other is a macro model, and finally a behavior model. The three representation methods are shown in Figure 2.

Fig.1: Linear Movement of Person
Fig.2: Type of SPICE Models
Table 1: Characteristic Formulas of Representative Devices
Compact model

The model based on a format in which device characteristics were represented using the coefficient (parameter) of the characteristic formula described above is called a compact model. This format is mainly used for semiconductor devices (diode, bipolar transistor (BJT) and FET).

Macro model

The model in which a single element was represented using an electronic circuit, that is, an equivalent circuit constituted by multiple elements such as passive elements (resistance, capacitor and inductance), active elements (diode, BJT and FET), and power supply is called a macro model. An easy-to-understand example is given below. BJT is constituted by two PN-junction diodes. Therefore, the equivalent circuit of BJT can be represented using two PN-junction diodes.

Behavior model

The representation model in which device characters were defined using an arbitrary function by a user is called a behavior model. It may be difficult to judge the difference between the behavior model and compact model because a compact model is also represented using a “mathematical expression”. A great difference from the compact model is that a device characteristic expression can be set freely. For the compact model, however, a user cannot change the characteristic expression because a characteristic expression has been beforehand incorporated into SPICE. A user can change only a coefficient (parameter).

Using Compact-, Macro-, and Behavior- models properly

We cannot decide what representation method to select when modeling a discrete device from the beginning. Three model representation methods have both merits and demerits as shown in Figure 2. Therefore, an optimum model can be created by grasping each feature. Concerning the comparison shown in Figure 2, “modeling easiness”, “convergence properties”, and “Simulation time” may vary depending on the circuit to be treated for a model or the model generation (indicating BSIM3 of a MOSFET model).

Compact model with both the easiness of modeling and the reproducibility of device characteristics

For a person who uses SPICE from now or a modeling beginner, it is recommended to create a model using a compact model (in a case of a discrete device). For a compact model, a model can be created by optimizing only a parameter even if you do not understand the equivalent circuit or characteristic expression of a device. This method can reproduce device characteristics more easily and faithfully. For a device model for a fine process including BSIM3 of MOSFET, however, the number of parameters reaches several hundreds. Therefore, notice that it becomes very difficult to create a model.

Use of a macro model to be recommended when reproducing device characteristics more faithfully

Create a model using a macro model when device characteristics cannot be sufficiently reproduced using a compact model. Add several elements to a compact model to configure a small-scale circuit. More complicated device characteristics can be represented by doing so. For example, add a capacitor to the terminal of FET when the terminal capacity characteristics of FET do not fit. In other words, a new characteristic expression is created by adding the parameter of a compact model and the characteristics of the added elements.

However, the number of parameters to be optimized increases as the degree of freedom of representation extends. Modeling thus becomes more difficult as compared with a compact model. Moreover, the number of elements per model also increases, so a demerit occurs that simulation time becomes longer.

Use of a behavior model to be validated when shortening Simulation time

Investigate the use of a behavior model when the characteristics of a device cannot be represented as expected using a macro model. A behavior model is a modeling method in which the degree of freedom of representation is highest in three models because it can freely define the characteristic expression of a device. However, you must define everything by yourself because the degree of freedom is high. For example, assume that a diode was represented using a behavior model. As shown in Table 1, the current and voltage characteristics of a diode can be defined using an exponential function. However, this indicates that only the partial characteristics (static characteristics) of a diode were represented. In addition to the static characteristics, frequency characteristics or transient characteristics must also be all represented using a behavior model. Therefore, the behavior model is not suitable for representing all device characteristics faithfully. Conversely, the behavior model is one of the representation methods to be selected when representing a device more simply.

It is important to understand the features of three representation methods

Three models have both merits and demerits. Consequently, it becomes important to understand each feature. For example, use a macro mode when creating a model faithful to a device. Use a compact model or behavior model when reproducing device characteristics faithfully, but shortening Simulation time as far as possible. An optimum model can be created by selecting a model representation method according to the purpose.

It is also possible to model a complicated circuit such as IC!

A previous description was made on the assumption that a discrete device is modeled. However, a circuit, including multiple elements, such as IC can also be modeled. We make a description with the operational amplifier, shown in Figure 3, as an example.
The operational amplifier shown in Figure 3 is mainly constituted by MOSFET. Therefore, an operational amplifier model can be created by creating the compact model of MOSFET and connecting it based on the configuration of a circuit diagram in Figure 3. As described in the section of a macro model, however, Simulation time becomes longer as the number of elements increases. As shown in Figure 3, moreover, there is no problem when the internal circuit configuration of an operational amplifier is definite. However, IC has been almost formed as a black box. In such a case, IC can be modeled by “abstracting” the characteristics of an operational amplifier. We sequentially make a description below. The output voltage (Vout) of an operational amplifier can be represented using DC gain Av and input difference voltage dVin by expression (1).


Fig.3: Operational Amplifier of CMOS

The expression described above can be easily represented using a behavior model. In the concrete, a voltage-controlled voltage source (E power supply) is used in this case. The E power supply is a four-terminal power element that multiplies the differential voltage between control terminals by gain and outputs it to an output terminal.
The operational amplifier in this state is treated as an operational amplifier having infinite (∞) bandwidth. Therefore, we configure an operational amplifier that is finite (162 kHz) in bandwidth. The configured operational amplifier is an operational amplifier model shown in Figure 4

Fig.4: Example of Operational Amplifier Model

The frequency characteristics shown in Figure 5 are obtained when the low-pass filter (LPF) of RC is added to the E power supply.

Fig.5: Open-Loop Gain Characteristics of Operational Amplifier Model

Even if IC has an indefinite internal configuration, it can be modeled by functionalizing the characteristics of a circuit or treating them as an equivalent circuit.

Let’s create a simple model.

We introduce several modeling examples.

Passive element (Multilayer capacitor)

Let’s model the multilayer capacitor shown in Figure 6 first.
An actual capacitor has the frequency characteristics shown in Figure 7. In only an ideal capacitor, however, the frequency characteristics shown in Figure 7 cannot be obtained. The simulated frequency characteristics of an ideal capacitor are shown in Figures 8 and 9.
Next, we bring this capacitor model close to the frequency characteristics of an actual capacitor. A resonance point can be confirmed near 5 to 6 MHz when we confirm Figure 7 again. Consequently, it can be anticipated that inductance is included as a parasitic element. As shown in Figure 10, inductance is added to the capacitor model described above to confirm frequency characteristics again. The result of simulation is shown in Figure 11. In Figure 11, a resonance point appears, and the impedance characteristics of inductance also appeared. The result obtained when the characteristics of the actual capacitor was compared with those of the capacitor model is shown in Figure 12.
As described above, when actually creating a model, a model can be efficiently created by reproducing the ideal characteristics of an element first and adding non-ideal characteristics gradually. This is a modeling method that can be applied to any device. Keep it in mind that the modeling method can also be applied to any of a compact model, macro model, and behavior model.

Fig.6: Multilayer Capacitor
Fig.7: Frequency Characteristics of Multilayer Capacitor (Measured Value)
Fig.8: Simulation Circuit of Capacitor Model
Fig.9: Frequency Characteristic of Multilayer Capacitor Model of Only Ideal Capacitor
Fig.10: Capacitor Model in which Inductance Was Added to an Ideal Capacitor
Fig.11: Frequency Characteristics of a Capacitor Model in which Inductance Was Added to an Ideal Capacitor
Fig.12: Comparison of Frequency Characteristics in Multilayer Capacitor


Next, we model a diode. IF-VF characters are adjusted in this case. Main SPICE parameters that exert influence on the IF-VF characteristics are shown in Table 2.
The characteristics of a diode are not determined by only IF-VF characteristics. However, these parameters are related to only one characteristic. We cannot decide what parameter to adjust first. One technique for determining a parameter efficiently is to sequentially determine parameters which exert a remarkable influence on characteristics, that is, change the general form of a characteristic curve significantly.

The appropriate parameters in Table 2 are EG and IS. EG is a band gap voltage. It is determined by a semiconductor that forms a diode. Representative values are Si: 1.11 [eV], GaAs: 1.42 [eV], and Ge: 0.67 [eV]. This time, a Si diode is modeled, so EG is set to 1.11 [eV].

Table 2: Main Diode SPICE Parameters that Exert Influence on IF-VF Characteristics

Next, IS is set. Let’s confirm the theoretical formula of a diode’s forward current once again. The forward current (VF) of a diode is represented using the theoretical formula below.


In the theoretical formula, “q” and “k” are physical constants and fixed values. “T” is temperature (in units of kelvin [K]). The forward current at a normal temperature (of 25℃) is thus almost determined by Is. IS in the theoretical formula corresponds to parameter IS shown in Table 2. Therefore, this sufficiently shows that IS determines the general form of IF-VF characteristics.
Compare the relation between the theoretical formula representing device characteristics and the SPICE parameters and ascertain the type of a parameter, in advance, which significantly influences device characteristics so that a parameter can be set efficiently. Each device characteristic expression defined in SPICE slightly differs from the theoretical formula described in a reference book.

In SPICE, an expression or parameter for correcting the deviation from a theoretical formula is defined by addition to reproduce actual device characteristics more faithfully. Each device characteristic expression is described in the manual supplied for SPICE.
The diode parameter determined in the procedure above and the IF-VF characteristics calculated from simulation are shown in Figures 13 and 14.

Fig.13: Diode IF-VF Characteristic Measuring Circuit and Diode Parameter
Fig.14: Diode IF-VF Characteristics

DC motor with brush

As a modeling example except an electronic device, we also introduce the example of a DC motor with brush shown in Figure 15.
The DC motor with brush is constituted by a stator, armature, rectifier, and brush. Simple operating principles are as described below. An armature begins to rotate according to the Fleming's left-hand rule when a DC voltage is applied between the electrodes of a motor. The direction of a current flowing through the coil of the armature is sequentially switched by the operation of a rectifier and brush. As a result, the armature can continue rotating the same direction.

The equivalent circuit of the DC motor with brush is next shown in Figure 16. Expression (3) is obtained when writing a circuit equation according to Figure 16.


Each constant in Figure 16 is E: supply voltage [V], Ra: Armature resistance [Ω], La: armature inductance, la: motor coil current [A], and Ec: motor’s induced voltage [V]. In expression (3), “E(s)”, “la(s)”, and “Ec(s)” are the Laplace functions of “E”, “la”, and “Ec”.

The DC motor with brush converts electric energy into mechanical energy in a rotating system. Let’s confirm the rotational expression of the electric energy and mechanical energy. The induced voltage Ec of a motor is in proportion to the angular velocity ω[rad/sec] of the motor, so it can be represented using expression (4) when a proportional constant is set to Ke. In expression 4, Ke [Vsec/rad] is an induced voltage constant. Ω(s) is the Laplace function of angular velocity ω.


Moreover, the torque T [Nm] generated in an armature is in proportion to la. Consequently, expression (5) is obtained when the proportional constant is set to Kt. In expression (5), Kt [Nm/A] is a torque constant, and T (s) is the Laplace function of torque T.


Expression (6) is obtained when a motion equation on a rotating motion system is set up. In expression (6), Jm [Nms2/rad] is inertia (inertial moment), and Dm [Nms/rad] is a viscosity coefficient.


Expression (7) is obtained when Ω(s) is solved using expressions (3) to (6).


Expression (8) is obtained when expression (7) is substituted for expression (4).


Expression (9) is obtained when expression (8) is substituted for expression (3).


In expression (9), C1 and R1 were defined as expressions (10) and (11).



Expression (9) shows that all mechanical systems including their relational expressions could be replaced by an electric system. This is treated as the model of a DC motor with brush. Expression (11) represented using a circuit diagram is Figure 17. In Figure 17, the number of rotations N [rpm] and torque T [Nm] can also be observed using a behavior model.
After all, energy is only converted even if electric and mechanical systems exist together as in a DC motor. Therefore, all can be represented using a SPICE model if converted into an electric system.
Finally, the result obtained when motor starting characteristics were confirmed using a model shown in Figure 17 is shown in Figure 18.
Figure 18 shows the modeled specifications of a DC motor with brush in Table 3.
In Table 3, mechanical time constant τm can be defined using expression (12).


As shown in Figure 18, it can be confirmed that the starting characteristics of a DC motor with brush can be reproduced.

Table 3: Specifications of DC Motor with Brush
Fig.15: DC Motor with Brush
Fig.16: Equivalent Circuit of DC Motor with Brush
Fig.17: DC Motor Model with Brush
Fig.18: Starting Characteristics of DC Motor Model with Brush

DC/DC converter

We lastly introduce the modeling example of a DC/DC converter. The circuit diagram of a step-down DC/DC converter is shown in Figure 19. In Figure 19, the switching element (MOSFET) formed as IC together with a control circuit is treated for modeling.

The switching control circuit of a DC/DC converter is configured as shown in Figure 20.
The control circuit is mainly constituted by an error amplifier block and PWM signal generation block. The error amplifier block detects the error of an output voltage and reference voltage. The PWM signal generation block compares a chopping wave and error amplifier output signal using a comparator and generates a PWM signal. A MOSFET element is switched using the PWM signal generated in this block.

Fig.19: Step-down DC/DC Converter
Fig.20: Control Circuit of Step-down DC/DC Converter

There are various methods for modeling a composite circuit such as IC. The simplest method is to model the configuration element of a circuit sequentially using an equivalent circuit. Figure 21 shows the DC/DC converter model created with the block diagram in Figure 20 as reference. The contents of the model are briefly described below. The amplifier and comparator used in the model use the module (element beginning with A in a netlist) supplied for LTspice. A logic element such as “AND” and “OR” or a module such as an “operational amplifier” and “comparator” can be easily used in LTspice. A switching element is substituted by an ideal switch, free wheel diode, and capacitor element. A chopping wave oscillator is realized using a pulse element. In an actual circuit, it is not easy to manufacture an oscillator. In a model, however, it is possible to manufacture an oscillator easily. The DC/DC converter has a soft start function, not shown in Figure 20, which increases the reference voltage in a lamp state so that no load current rapidly flows during start. In Figure 21, this function is realized using a current source and capacitor. The function of the DC/DC converter can be reproduced using only these parts. The result obtained when the load transient response of the DC/DC converter was confirmed using this model is shown in Figure 22. The result shown in Figure 22 is obtained when the response of an output voltage was confirmed during rapid change in a load current. This shows that the general form of a waveform could be almost reproduced.

Fig.21: Step-down DC/DC Converter Model
Fig.22: Load Transient Response Characteristics of Step-down DC/DC Converter Model


In SPICE, very many parts and circuit models can be created as introduced above. Mechanical parts as well as electronic parts can be modeled. A compact model, macro model (equivalent circuit model), and behavior model are used for a modeling method. Efficient simulation is obtained by using the modeling method properly according to the purpose of simulation.