Documentation

Models in (P)SPICE and TARGET 3001!

Back to Model import or creation


Models in (P)SPICE:

SPICE model files/libraries can contain modelcards and subcircuits. In a SPICE simulator some primitives (basic models) are implemented e.g. for a general diode. That means the simulator knows the behavior of a general diode. A diode of the type 1N4000, which is placed in a circuit, needs only some specific parameters. Each primitive has some free parameters, so that the simulator can generate a particular model from the general model.

This parameterizing would have to be repeated e.g. for each diode of the type 1N4000, which is placed several times in a circuit. In order to save this input work, one refers to a modelcard, which contains this parameterizing. Modelcards are differentiated by freely definable names. Thus the modelcard with the name 1N4000 contains all free parameters for a diode of the type 1N4000. Therefore, only the name of the appropriate modelcard must be entered for each individual diode in the circuit.

Individual types of modelcards with appropriate parameters for nearly each primitive do exist. Some primitives (e.g. inductance) do not have a modelcard or not all parameters can be set by the modelcard! I.e. these remaining parameters must be entered for each individual component.

Example diode:

SPICE: Modelcard: .MODEL 1N4000 D(IS=14n BV=150 ...)
INFO: Name=1N4000, Type of modelcard=D, Parameters: IS=14n BV=150 ...
SPICE: Diode in the circuit (SPICE-Circuit): D77 OUT GND 1N4000
INFO: D=Diode, Name=77, Anode=Connected with signal OUT, Cathode=Connected with signal GND, Modelcard=1N4000

Note: It must be distinguished between the modelcard for a certain type of diode and the really placed diode in the circuit (SPICE circuit)! The diode in a (SPICE) circuit only carries information about the pin connection (wiring) and the name of the appropriate modelcard.

A circuit can also become a model (macro) by declaring it as a subcircuit. The subcircuit gets a name and some signals must be defined as interface nodes (also parameters could be defined). Complex components are modeled via subcircuits, since they can not be modeled by using only one primitive.

Example bridge rectifier:

.SUBCKT RECT4000 IN1 IN2 P M
  D1 IN1 X 1N4000
  D2 M IN1 1N4000
  D3 M IN2 1N4000
  D4 IN2 X 1N4000
  RP X P 50
.ENDS

INFO: Name=RECT4000, Nodes: IN1 IN2 P M
SPICE: Rectifier in the circuit (SPICE circuit): XR L N VCC GND RECT4000
INFO: X=Subcircuit, R=Name, IN1=Connected with signal L, IN2=Connected with signal N, P=Connected with signal VCC, M=Connected with signal GND, RECT4000=Subcircuit name


Handling in TARGET 3001!: The (global) modelcards and subcircuits are stored in the project or in the library (not in the component). The individual components only contain the data for the translation into the SPICE circuit:
Type of model: I.e. a certain primitive or a subcircuit
Pin assignment
If necessary the name of the modelcard or the subcircuit
If necessary additional parameters

The pin assignment determines the connection between the "pins" of the model and the pin numbers of the symbol (e.g. anode = pin 1, cathode = pin 2). The circuit in the schematic will be automatically converted into a SPICE circuit.

The file Target.Cir receives all necessary data for the simulator:
SPICE circuit
All in the circuit used global modelcards and subcircuits.
Simulator commands