This is a brief overview of the Spice Simulation functionality within Pulsonix. From within the Pulsonix Schematic design editor environment you can generate Spice netlists for some common Spice formats. To change the format, you must use the Set Netlist Spice Type option from the Simulation menu.
Supported Spice Simulators
Various Spice simulators are supported in Pulsonix. Some will be integrated and run from within the Pulsonix environment and some are supported through a netlist export.
The supported simulators are shown below:
- LTSpice
- Basic Spice
- PSpice
- Pulsonix Spice
- SiMetrix Spice
Each of these simulators is setup in Pulsonix from the Set Netlist Spice Type dialog.
Pulsonix Simulation Functionality
The Simulation Menu
Most of the functions to use for Simulation analysis can be found on the Simulation Menu and its many sub menus, with some of the more commonly used functions have been added to a Simulation Toolbar:
Editing Spice Values, Parameters and Model Names
Pressing the F7 key with a selected component will enable yo to edit its Spice Values, Parameters or Model Name.
Running Simulation
Press F9 to Simulate the Schematic Design
Using External Spice Models
Spice models that are available on various sites on the internet can be used with Pulsonix and can be associated with Pulsonix Parts in the library.
Preparing the Schematic for Simulation
In short, the method for using a Spice output from Pulsonix is to use information on Parts to indicate what Spice device they represent, the Spice model to use during the simulation, and how to output them to a Spice netlist (NB Some exports will run the Simulator directly without you ever viewing the netlist).
Spice Parts
These Parts can represent circuit stimuli (like voltage and current sources), basic Spice devices (analog and digital), sub-circuits, special Spice functional models and Simulator commands (like Probes and Initial Conditions).
You can set up a Part Spice Type by editing it using the Library Manager and using the Edit Spice button from the Details page. This presents the Define Spice Type dialog to specify the type of device the Part represents.
Example Spice libraries are provided for use within Pulsonix containing Parts that have Spice parameters already set up to help you quickly generate circuits to simulate. These libraries can be used as a guideline to be referenced when creating your own libraries. They can be found in the supplied LTSpice and Spice Parts library, and their corresponding symbol libraries. They contains special Parts for functional modelling, circuit stimuli, probes etc., along with Parts that reference Spice simulator models and subcircuits.
Add the required Parts from these libraries to your schematic using one of the following methods:
- Add your circuit stimuli components using the Insert Source sub menu on the Simulation menu. The menu will contain a list of commonly used source devices.
- Add your circuit probe components using the Insert Fixed Probe sub menu on the Simulation menu. The menu will contain a list of probe Parts representing commonly used simulation plots. The menu also contains a set of simulator control Parts.
- For the more commonly used Spice Parts, use the Insert Component option to select Spice Parts from the Spice libraries.
- For a structured tree based access to all of the Parts from the Spice library, use the Spice Category within the Part Browser bar.
- If you know the name of the Spice model, use the Insert Part Using Model option from the Simulation menu.
Editing Spice Parameters
Once added, you can alter the Spice information on the components in your circuit by selecting them and pressing F7, or using the Edit Spice Model/Value command from the Simulation menu. For most devices this will bring up the Select Model dialog to change the model or subcircuit the component refers to and its model parameters, or the Define Passive Device dialog to change the value of resistors, capacitors, inductors etc. There are many more special dialogs that respond to the F7 key for different Spice device types, these are listed below.
Adding Stimuli
Add Connections to the components to create the circuit to be simulated. Insert circuit stimuli by adding voltage and/or current source parts to the circuit. Add fixed voltage and current probe components to the nets and pins that you wish to plot a simulation curve.
Design Rules for Spice
The following design rules must be observed for the simulation to run correctly. Note that most circuits obey them anyway and they do not impose serious limitations on the capability of the simulator.
- There must always be at least one ground symbol on every circuit.
- Every node on the circuit must have a dc path to ground. If you do have a floating node, connect a high value resistor (e.g. 1G ) between it and ground.
- There must not be any zero resistance loops constructed from voltage sources and or inductors. If you do have such loops. insert a low value resistor. It is best to make the resistance as low as is needed to have a negligible effect on your circuit but no lower.
- There should be at least two connections at every node.
Failure to observe the above usually leads to a “Singular Matrix” error.
Analysis Modes for Spice
When the circuit is ready, use the Simulation Parameters option from the Simulation menu to choose the analysis mode.
Starting the Simulation
When all set up, run the Simulate Design option from the Simulation menu or press F9. All pages of the schematic will be collated and the entire schematic simulated. To simulate only parts of a schematic design, use the Simulate Current Page and Simulate Selected Items options available from the Simulation Toolbar.
A Spice netlist will be generated and sent to the Pulsonix-Spice simulator for analysis. If the simulator is not already running it will be launched at this point which may take a few seconds. The “Pulsonix-Spice Command Shell” window will appear which will report any errors found interpreting the Spice netlist.
If the design contains fixed probe components, their curves will be plotted in a simulator graph window. Alternatively you can use the interactive Random Probe facility from the schematic editor Simulation menu, or you can use the Add Curve option in the simulator itself to plot results.
Netlist Contents
The netlist contains the following:
-
A Spice description of the circuit
This is a netlist extracted from the schematic design.
-
Analysis Mode and Simulation control commands
These are instructions to the simulator to tell it how to perform the simulation of the circuit. They are set up using the Simulation Parameters dialog, described in more detail below. The parameters are held in the schematic design.
-
Extra Spice data
This is any other information that you wish to include in the netlist. The text is set up using the Extra Simulation Data dialog, and is also held in the design.
It is usually used to contain more advanced simulation commands that cannot be set up using the dialogs provided in the Pulsonix program, or to include descriptions of models used in the circuit that either do not exist in the model libraries or have been changed.
Once the netlist has been successfully read the simulation of the circuit will be performed.
Links to Simulation Topics
Creating Spice Devices
Adding Spice Devices
Functional Model Devices (F7)
See Functional Modelling for more details.
Arbitrary Non-Linear Capacitor
Saturable Magnetic Devices
See Saturable Magnetic Components for more details.
Editing Spice Devices (F7)
Prepare For Simulation
Random Probing
Bias Annotation
See Bias Annotation for more details.
Monte Carlo Simulation
See Monte Carlo Simulation for more details.
Other Spice Formats
See Set Netlist Spice Type for more details.