To simulate a project, a simulation model must be defined for all components of the circuit. Although it is possible to add the simulation parameters directly in the components of the schematic, it is convenient to create libraries of components ready for simulation.
Simulation models
The simulation models accurately describe the operation of the components. The simulator includes models for different categories of analog and digital components. For components in these categories, it is sufficient to specify a value for the parameters of the respective model. Components for which no model is supplied can be described via a subcircuit.
Component described by | Description |
---|---|
Value |
These are the components that can be described with a small number of parameters, typically the value, such as resistors, capacitors and inductors. |
Model SPICE |
These are the components for which the program provides models internally. The component is described by assigning values to the model parameters. This category includes semiconductor devices such as Diodes, Transistors, etc. |
Subcircuit |
These are components whose characteristics are described by a subcircuit consisting of other components, models and subcircuits. Sub-circuits are used to describe complex components such as operational amplifiers and integrated circuits in general. |
Code models |
C++ behavioural models are used to describe the functioning of particularly complex components for which it is not convenient to use a subcircuit both for the complexity of the device and for the long simulation times. |
Linking a simulation model to a schematic component
To be used in simulations, the electrical symbols must contain some information indicating to the simulation engine such as the component must be modelled in the various analyses. The information for the simulator must be entered as attributes of the SPICE category in the components or symbols. This information tells the simulator the type of component, where to find the model, and how to map pins to a multi-part component, as well as all component specific SPICE information.
Since a symbol can be shared by more than one component, in the symbol must be specified only the information of simulation relative to a generic component of the type represented by the symbol while in the components must be inserted the information of simulation specific for each component. For example, in a library in which is present the symbol of a transistor NPN and some components that use such symbol; in the attributes of the symbol must be specified the information of simulation (those of default) relative to a generic transistor NPN, while in each component, must be inserted the information of simulation specific for that particular transistor.
Note: |
---|
The attributes specified in the component are added to those specified in the symbol and replace the value of attributes that have the same name. |
To insert simulation information into library symbols
-
In the graphic document, select the Frame object that contains the symbol.
Open the properties window of the frame object by pressing the key combination ALT+Enter.
Select the Attributes tab.
If present, select the SPICE category.
Add the information for the simulator in the SPICE category.
To insert simulation information into library components
-
In the library document, display the component tab.
Select the Attributes tab.
If present, select the SPICE category.
Add the information for the simulator in the SPICE category.
To change the simulation information in the schematic symbols
-
Select the symbol and perform one of the following operations:
Open the symbol properties window by pressing the key combination ALT+Enter and select the Attributes tab.
Open the model parameters window by pressing the key combination ALT+M .
If present, select the SPICE category.
Add the information for the simulator in the SPICE category.
SPICE attributes
The simulator reads the attributes of the SPICE category from each symbol in the schema and creates the netlist for simulation. The SPICE declaration for the component is generated based on the value of the CARD attribute and that of the other attributes listed in the following table, as well as any attributes specific to each component:
Attribute | Description |
---|---|
Specifies the SPICE declaration relating to the elements of a circuit. In particular, it allows you to specify which category (capacitor, resistor, diode, etc.) the component belongs to, its value and its connection points with the other components of the circuit. Other cards from CARD1 to CARD15 can be defined. |
|
Allows you to specify the model or subcircuit to be associated with the component. |
|
Specifies the order in which the names of the nodes to which the component is connected are to be entered in the component's SPICE declaration. |
|
Specify the name of a file outside the library to search for the definition of a model, subcircuit, or block of data. |
|
Specifies the tolerance value of the component. |
Not all parameters are always required. For example, the MODEL parameter is not required for a resistor or capacitor but must always be specified for a diode or transistor.
Warning: |
---|
The CARD attribute must always be specified. A component of the scheme is included in the simulation only if it specifies a value for the CARD parameter among the attributes of the SPICE category. |
The following attributes have no effect on the SPICE declaration but allow you to specify a procedure and a documentation page to guide the user in setting the parameters specific to the component.
Attribute | Description | ||
---|---|---|---|
In this attribute it is possible to insert a reference to a page of information on the model used for the simulation of the component. You can specify an Internet address or the name of a file.
|
|||
This attribute can be used to specify the name of a procedure that displays a dialog box in which you can set the parameters of the model.
|