Tutorial How To Use The SPICE Module
Tutorial How To Use The SPICE Module
June 2016
Powersim Inc.
www.powersimtech.com
Tutorial – How to Use the SPICE Module
1. Overview
The SPICE Module is an add-on option in PSIM. Powered by CoolSPICE from CoolCAD
Electronics LLC., the SPICE Module provides a SPICE simulation engine in the PSIM
environment, and gives PSIM the capability to simulate SPICE circuits and models.
This tutorial provides a quick guide to use the SPICE Module. Further detailed information will
be provided in a separate user manual.
Note that not all PSIM elements are supported for SPICE simulation. To see which elements are
supported, make sure that under Options >> Settings >> Advanced, the box “Show image next
to elements that can be used for SPICE” is checked. With this box is checked, the elements
supported by SPICE will be marked with the image (for SPICE) next to the element in the
Element menu.
If the box “Show image next to elements that can be used for code generation” under Options >>
Settings >> Advanced is also checked, the elements that are supported by SPICE and SimCoder
for code generation will be marked with the image (for SimCoder and SPICE).
Most of the elements with marks mentioned above work in either PSIM simulation or SPICE
simulation. The following elements, however, support SPICE device models and will work in
SPICE only when the model level is defined as SPICE:
Diode
npn Transistor (model)
pnp Transistor (model)
MOSFET (model)
P-MOSFET (model)
To use a SPICE model for the diode D1, follow the same steps as for the MOSFET: Double click
on the diode D1, and set the Model Level to SPICE Model. Fill the spaces for “SPICE Model
Name” and “SPICE Instance Parameters”. In this example, a SPICE model of 1N4004 is used.
To define the SPICE model statement, use the SPICE Directive block. This block can be found
in Element >> SPICE >> SPICE Directive Block.
In this block, one can enter any SPICE directives which are not found in the PSIM menu. All the
content in this block will be inserted in SPICE netlist for simulation and for netlist generation.
In the example circuit, the model definitions in the SPICE Directive Block for the diode and the
MOSFET are shown. The model name in the directive block must be the same as in the
corresponding element parameter dialog box. The MOSFET model name is “MOS_IRF450_N”
and the diode model name is “D_1N4004”. Their SPICE models are defined with “.model” in the
directive block.
The definition of the SPICE Directive Block is shown below.
Once the SPICE model search path is saved, load the models in the libraries by clicking on the
browser button on the right of the SPICE Model Name input field. Devices in the search path
libraries will be listed as shown below.
In this case, there is no need to provide the model definition in a SPICE Directive Block. PSIM
will find the model from the library automatically.
There are three types of SPICE analysis: transient analysis, ac analysis, and dc analysis. Select
“Transient” analysis for this example. The parameters for transient analysis “Time Step”, “Max
Step”, “Start Time”, and “End Time” should be specified accordingly.
If SPICE netlist is already created either manually or from another SPICE software, one can load
the netlist by selecting File >> Open SPICE Netlist File. Then simulate the SPICE netlist file
by running the SPICE simulation in the same way as before.
To create a new SPICE netlist manually, select File >> New SPICE Netlist File.