Altium Support for PSpice® in the Mixed-Signal Circuit Simulator

Zachariah Peterson
|  Created: August 2, 2022  |  Updated: July 1, 2024
altium pspice

SPICE simulations are an important part of component qualification and system evaluation, but not all components have SPICE models in the same format. To help ensure designers can use any of their SPICE models as they work through system evaluation, Altium Designer supports LTSpice models and PSpice models in the Mixed-Signal Circuit Simulator. To help make your design experience as productive as possible, the documentation below outlines how Altium Designer supports PSpice model formats in the Schematic Editor.

Support for PSpice Models in Altium Designer

The PSpice® simulation model format is the format of choice for many device manufacturers. Altium Designer's Mixed-Signal Circuit Simulator has strong support for PSpice models. The following sections provide summary information on:

  • The SPICE syntax that facilitates expressions and global parameters to represent values in a PSpice model.
  • Current state of the Spice3f5 devices in order to make them PSpice compatible.

The following SPICE syntax is used to facilitate compatibility with PSpice. This syntax includes support for additional PSpice-based functions and operators, as well as the addition of global parameters. The following additional functions are supported:

ARCTAN(x)

Returns the inverse tangent of x

ATAN2(y, x)

Returns the inverse tangent of y/x

IF(t, x, y)

If t is TRUE then x, ELSE y

LIMIT(x, min, max)

While min < x < max, x is returned

  • If x < min, min is returned
  • If x > max, max is returned

LOG10(x)

Returns the decimal logarithm of x

MAX(x, y)

Returns the maximum of x and y

MIN(x, y)

Returns the minimum of x and y

PWR(x, y)

Returns x to the power of y

PWRS(x, y)

Returns signed x to the power of y:

  • If x > 0, the result is positive
  • If x < 0, the result is negative.

SCHEDULE(x1, y1,...xn, yn)

Allows you to control the value of y based on time x. An entry for time = 0s must be entered.

  • From time = x1 to x2, returns y1
  • From time = x2 to x3, returns y2, and so on.

SGN(x)

Returns the sign of x (a.k.a. the signum function).

  • If x < 0, returns -1
  • If x = 0, returns 0
  • If x > 0, returns 1

STP(x)

Unit step function:

  • If x > 0, returns 1
  • If x < 0, returns 0

TABLE(x, x1, y1,...xn, yn)

  • Allows you to construct a look-up table, returning the y value corresponding to x when all xn, yn points are plotted and connected by straight lines.
  • If x > than the largest x value in the table, then the y value associated to that x value will be returned.
  • If x < than the smallest x value in the table, then the y value associated to that x value will be returned.

 

Additional Operator Support

The following additional operators are supported:

  • *** (exponentiation)
  • == (equality test)
  • != (non-equality test)
  • & (Boolean AND)
  • | (Boolean OR)

In-Line Comment Support

The PSpice in-line comment character is supported. This character (a semicolon ; ) is treated as the end of a line in the circuit description. Any text after this character (on the same line) is treated purely as a comment and therefore ignored by the Simulator, which moves on to the next line in the circuit description.

The following example shows a single in-line comment, where comment text is added to one line in the circuit description:

R2 2 4 6 ; R2 is a feedback resistor

If you want to add comment text over multiple lines (creating trailing in-line comments), simply use the semicolon inline comment character to mark the beginning of each subsequent comment line:

R2 2 4 6 ; R2 is a
;feedback resistor

An in-line comment can be used to replace a standard comment line, which must start with the * character in the first column of the line. This can improve the readability of your circuit description.

.PARAM Support

The PSpice .PARAM statement is supported. This statement defines the value of a parameter, allowing you to use a parameter name in place of numeric values for a circuit description. Parameters can be constants, expressions or a combination of the two. A single parameter statement can include reference to one or more additional parameter statements.

In addition, the following three internal variables (predefined parameters) are available for use in expressions:

GMIN

Shunt conductance for semiconductor p-n junctions.

TEMP

Temperature

VT

Thermal voltage

 

Global Parameters

Altium Designer's Mixed-Signal Circuit Simulator supports the use of global parameters and equations. You can use a global parameter in an equation and then use that equation as a component value on your schematic. Alternatively, you can define an equation as a global parameter and then reference the global parameter as a component value.

Simply include the expression or parameter name within curly braces {} - when the Simulator detects this it will attempt to evaluate it, checking the Global Parameters tab in the Advanced Analysis Settings dialog. This dialog can be accessed from the Simulation Dashboard inside the Schematic Editor.

Damping resistor SPICE simulation
Set global parameter values in the Advanced Analysis Settings dialog. The example above uses R_DAMP as a global parameter. This value can then be placed into any component. The value could also be defined as an equation.

One use case is to set the value of a global parameter to be a function of some other parameters in the system. As an example, we can set the value of R_DAMP to be some function of other parameters as shown below. In the example below, we are using CUTOFF_FREQ, DAMP_CONST, R_EQ, and PI as four other parameters. Together, these can be used to build an expression for R_DAMP inside the Advanced Analysis Settings dialog:

Damping resistor SPICE simulation

 

Spice3f5 Model Compatibility

Additional parameter support is used in a linked model file to make the existing Spice3f5 device models compatible with PSpice. Some important points to note:

  • For additional detailed information on simulation models as well as simulation analyses, refer to the Mixed Simulation References. These references should be used in conjunction with this article in order to gather a complete listing of the supported parameters for each device model.
  • For more detailed information concerning PSpice, consult the PSpice User's Guide and PSpice Reference respectively.

When browsing the subsequent sections, the following parameters - common to most devices in PSpice - are not supported:

  • T_ABS
  • T_MEASURED
  • T_REL_GLOBAL
  • T_REL_LOCAL

 

Capacitor

The SPICE netlist for this device has the following format:

  • @DESIGNATOR %1 %2 &VALUE &MODEL ?LENGTH|L=@LENGTH| ?WIDTH|W=@WIDTH| ?"INITIAL VOLTAGE"|IC=@"INITIAL VOLTAGE"|

The following additional model parameters are supported and can be entered into a linked model file (*.mdl) for the device:

 

C

Capacitance multiplier (Default = 1)

TC1

Linear temperature coefficient (in ˚C-1) (Default = 0)

TC2

Quadratic temperature coefficient (in ˚C-2) (Default = 0)

VC1

Linear voltage coefficient (in V-1) (Default = 0)

VC2

Quadratic voltage coefficient (in V-2) (Default = 0)

 

Where a parameter has an indicated default, that default will be used if no value is specifically entered.

The format for the PSpice model file is:

  • .MODEL ModelName CAP(Model Parameters)

where:

  • ModelName is the name of the model, the link to which is specified on the left side of the Sim Model dialog. This name is used in the netlist (&MODEL) to reference the required model in the linked model file.
  • Model Parameters are a list of supported parameters for the model, entered with values as required.

Diode

The SPICE netlist for this device has the following format:

  • @DESIGNATOR %1 %2 @MODEL &"AREA FACTOR" &"STARTING CONDITION" ?"INITIAL VOLTAGE"|IC=@"INITIAL VOLTAGE"| ?TEMPERATURE|TEMP=@TEMPERATURE|

The following additional model parameters are supported and can be entered into a linked model file (*.mdl) for the device:

IBVL

Low-level reverse breakdown knee current (in Amps) (Default = 0)

IKF

High-injection knee current (in Amps) (Default = infinite)

ISR

Recombination current parameter (in Amps) (Default = 0)

NBV

Reverse breakdown ideality factor (Default = 1)

NBVL

Low-level reverse breakdown ideality factor (Default = 1)

NR

Emission coefficient for Isr (Default = 2)

TBV1

Bv temperature coefficient - linear (in ˚C-1) (Default = 0)

TBV2

Bv temperature coefficient - quadratic (in ˚C-2) (Default = 0)

TIKF

Ikf temperature coefficient - linear (in ˚C-1) (Default = 0)

TRS1

Rs temperature coefficient - linear (in ˚C-1) (Default = 0)

TRS2

Rs temperature coefficient - quadratic (in ˚C-2) (Default = 0)

 

Where a parameter has an indicated default, that default will be used if no value is specifically entered.

The format for the PSpice model file is:

  • .MODEL ModelName D(Model Parameters)

where:

  • ModelName is the name of the model, the link to which is specified on the left side of the Sim Model dialog. This name is used in the netlist (&MODEL) to reference the required model in the linked model file.
  • Model Parameters are a list of supported parameters for the model, entered with values as required.

Inductor

    The SPICE model syntax for this component required to support a general PSpice model has the following form:

    • L<name> < node> < node> [model name] <value> [IC = <initial value>]

    The SPICE netlist for this device has the following format:

    • @DESIGNATOR %1 %2 @VALUE @MODEL ?"INITIAL CURRENT"|IC=@"INITIAL CURRENT"|

    For the circuit to be parsed correctly, ensure that the Spice Prefix is set to L.

    The netlist format for a PSpice Inductor model is specified using the SPICE Model option in the Sim Model dialog due to the fact that the existing Spice3f5 Inductor model does not support use of a linked model file.

    A PSpice model of this type should be linked to a schematic component using a model file. Simply browse for the model file (*.mdl) for the component in the Sim Model dialog, and select the Model File tab and set the Format Type option to PSpice. 

    The value for the INITIAL CURRENT parameter is entered on the Parameters tab of the Sim Model dialog.

    PSpice inductor model

    When loading from a model file, the Model Name field will be populated with the relevant parameter found in the PSpice MDL file. The following model parameters are supported and can be entered into a linked model file (*.mdl) for the device:

    L

    Inductance multiplier (Default = 1)

    IL1

    Linear current coefficient (in V-1) (Default = 0)

    IL2

    Quadratic current coefficient (in V-2) (Default = 0)

    TC1

    Linear temperature coefficient (in ˚C-1) (Default = 0)

    TC2

    Quadratic temperature coefficient (in ˚C-2) (Default = 0)

     

    Where a parameter has an indicated default, that default will be used if no value is specifically entered.

    The format for the PSpice model file is:

    • .MODEL ModelName IND(Model Parameters)

    where

    • ModelName is the name of the model, the link to which is specified on the left side of the Sim Model dialog. This name is used in the netlist (@MODEL) to reference the required model in the linked model file.
    • Model Parameters are a list of supported parameters for the model, entered with values as required.

    Current-Controlled Switch

    The SPICE netlist for this device has the following format:

    • V@DESIGNATOR %1 %2 0V
    • @DESIGNATOR %3 %4 V@DESIGNATOR @MODEL &"INITIAL CONDITION"

    The following additional model parameters are supported and can be entered into a linked model file (*.mdl) for the device:

    IOFF

    Control current for OFF state (in Amps) (Default = 0)

    ION

    Control current for ON state (in Amps) (Default = 1E-3)

     

    Where a parameter has an indicated default, that default will be used if no value is specifically entered.

    The format for the PSpice model file is:

    • .MODEL ModelName ISWITCH(Model Parameters)

    where:

    • ModelName is the name of the model, the link to which is specified on the left side of the Sim Model dialog. This name is used in the netlist (@MODEL) to reference the required model in the linked model file.
    • Model Parameters are a list of supported parameters for the model, entered with values as required.

    Voltage-Controlled Switch

    The SPICE netlist for this device has the following format:

    • @DESIGNATOR %3 %4 %1 %2 @MODEL &"INITIAL CONDITION"

    The following additional model parameters are supported and can be entered into a linked model file (*.mdl) for the device:

    VOFF

    Control voltage for OFF state (in Amps) (Default = 0)

    VON

    Control voltage for ON state (in Amps) (Default = 1)

    Where a parameter has an indicated default, that default will be used if no value is specifically entered.

    The format for the PSpice model file is:

    • .MODEL ModelName VSWITCH(Model Parameters)

    where:

    • ModelName is the name of the model, the link to which is specified on the left side of the Sim Model dialog. This name is used in the netlist (@MODEL) to reference the required model in the linked model file.
    • Model Parameters are a list of supported parameters for the model, entered with values as required.

    JFET

    The SPICE netlist for this device has the following format:

    • @DESIGNATOR %1 %2 %3 @MODEL &"AREA FACTOR" &"STARTING CONDITION" ?"INITIAL D-S VOLTAGE"|IC=@"INITIAL D-S VOLTAGE", @"INITIAL G-S VOLTAGE"| ?TEMPERATURE|TEMP=@TEMPERATURE|

    The following additional model parameters are supported and can be entered into a linked model file (*.mdl) for the device:

    ALPHA

    Ionization coefficient (in Volt-1) (Default = 0)

    BETATCE

    BETA exponential temperature coefficient (in Amp/Volt2) (Default = 1E-4)

    ISR

    Gate p-n recombination current parameter (in Amps) (Default = 0)

    M

    Gate p-n grading coefficient (Default = 0.5)

    N

    Gate p-n emission coefficient (Default = 1)

    NR

    Emission coefficient for Isr (Default = 2)

    VK

    Ionization knee voltage (in Volts) (Default = 0)

    VTOTC

    VTO temperature coefficient (in Volt/˚C) (Default = 0)

    XTI

    IS temperature coefficient (Default = 3)

     

    Where a parameter has an indicated default, that default will be used if no value is specifically entered.

    The format for the PSpice model file is:

    • .MODEL ModelName NJF(Model Parameters) - N-channel JFET
    • .MODEL ModelName PJF(Model Parameters) - P-channel JFET

    where

    • ModelName is the name of the model, the link to which is specified on the left side of the Sim Model dialog. This name is used in the netlist (@MODEL) to reference the required model in the linked model file.
    • Model Parameters are a list of supported parameters for the model, entered with values as required.

    Resistor

    A PSpice model of this type should be linked to a schematic component using a model file. Simply browse for the model file (*.mdl) for the component in the Sim Model dialog, and select the Model File tab and set the Format Type option to PSpice. 

    The model syntax for this component required to support a general PSpice model has the following form:

    • R<name> < node> < node> [model name] <value> [TC = <TC1> [,<TC2>]]

    The SPICE netlist for this device has the following format:

    • @DESIGNATOR %1 %2 &MODEL &VALUE ?TC1/TC=@TC1?TC2|, @TC2| /

    For the circuit to be parsed correctly, ensure that the Spice Prefix is set to R.

    Although you could use the existing Spice3f5 Resistor model - as this model type allows use of a linked model file - specification of the netlist format for a PSpice Resistor model using the SPICE Model option in the Sim Model dialog as this allows you to make use of the additional PSpice parameters ([TC = <TC1> [,<TC2>]]).

    A PSpice model of this type should be linked to a schematic component using a model file. Simply browse for the model file (*.mdl) for the component in the Sim Model dialog, and select the Model File tab and set the Format Type option to PSpice. 

    SPICE resistor model

    When loading from a model file, the Model Name field will be populated with the relevant parameter found in the PSpice MDL file. The following model parameters are supported and can be entered into a linked model file (*.mdl) for the device:

    R

    Resistance multiplier (Default = 1)

    TC1

    Linear temperature coefficient (in ˚C-1) (Default = 0)

    TC2

    Quadratic temperature coefficient (in ˚C-2) (Default = 0)

    TCE

    Exponential temperature coefficient (in %/˚C) (Default = 0)

     

    Values for TC1 and TC2 can be entered on the Parameters tab of the dialog. Where a parameter has an indicated default, that default will be used if no value is specifically entered - either on the Parameters tab or in the linked model file.

    The format for the PSpice model file is:

    • .MODEL ModelName RES(Model Parameters),

    where:

    ModelName is the name of the model, the link to which is specified on the left side of the Sim Model dialog. This name is used in the netlist (@MODEL) to reference the required model in the linked model file.
    Model Parameters are a list of supported parameters for the model, entered with values as required.

    Voltage-Controlled Voltage Source

    The general PSpice model form for a Voltage-Controlled Voltage Source is shown below:

    • E<name> < node> < node> VALUE = { <expression> }
    • E<name> < node> < node> TABLE { <expression> } = < <input value>,<output value> >
    • E<name> < node> < node> POLY(<value>) < < controlling node> < controlling node> > < <polynomial coefficient value> >

    Note: For linear Voltage-Controlled Current Sources, the formats are the same as those above, but substituting G for E as the Spice Prefix. These devices do not support linked model files.

    The following are examples of generic netlist template formats that would be implemented with these model types.

    VALUE Model

    The model implemented in Altium Designer matches the following generic netlist format:

    • @DESIGNATOR %1 %2 VALUE = {@EXPR}

    The value for the EXPR parameter is entered in the Properties panel (see below).

    SPICE VALUE model

    TABLE Model

    The model implemented in Altium Designer matches the following generic netlist format:

    • @DESIGNATOR %1 %2 TABLE {@EXPR} = @ROW1 ?ROW2|@ROW2| ?ROW3|@ROW3|

    Values for the EXPR and ROW parameters are entered on the Parameters tab of the Sim Model dialog. Any number of ROW parameters can be defined, in the format (<input value>, <output value>).

    The model implemented in Altium Designer matches the following alternative generic netlist format:

    • @DESIGNATOR %3 %4 TABLE { @EXPR } ( @TABLE )

    Values for the EXPR and TABLE parameters are again entered in the Properties panel. The value for the TABLE parameter is specified in the form:

    • (<input1>, <output1>)(<input2>, <output2>)...(<inputn>, <outputn>)
    SPICE TABLE model

    POLY model

    The model implemented in Altium Designer matches the following PSpice netlist format:

    • @DESIGNATOR %3 %4 POLY (@dimension) (%1, %2) @coeffs

    The values of the Order (@dimension), Node Names, and Coefficients List (@coeffs) parameters are entered in the Properties panel (see below).

    SPICE POLY model

    Current-Controlled Voltage/Current Source

    The general PSpice model form for a Current-Controlled Voltage Source is shown below:

    • H<name> < node> < node> POLY(<value>) <controlling V device name> < <polynomial coefficient value> >

    Note: For a linear Current-Controlled Current Source, the format is the same as that above, but substituting F for H. These devices do not support linked model files.

    The model implemented in Altium Designer matches the following generic netlist format:

    • @DESIGNATOR %1 %2 POLY (@dimension) @ControlSource @coeffs

    In the POLY model for the CCCS/CCVS, the values of the Order (@dimension), Node Names, and Coefficients List (@coeffs) parameters are entered in the Properties panel (see below).

    Bipolar Junction Transistor (BJT)

    Many of the parameters that can be included in a linked model file for this type of device are common to both Spice3f5 and PSpice. Those that are supported can be found in the SPICE3f5 models Bipolar Junction Transistor (BJT) Model page.

    CN

    Quasi-saturation temperature coefficient for hole mobility

    D

    Quasi-saturation temperature coefficient for

    scattering-limited hole carrier velocity

    GAMMA

    Epitaxial region doping factor

    ISS

    Substrate p-n saturation current

    NK

    High-current roll-off coefficient

    NS

    Substrate p-n emission coefficient

    QCO

    Epitaxial region charge factor

    QUASIMOD

    Quasi-saturation model flag for temperature dependence

    RCO

    Epitaxial region resistance

    TRB1

    RB temperature coefficient (linear)

    TRB2

    RB temperature coefficient (quadratic)

    TRC1

    RC temperature coefficient (linear)

    TRC2

    RC temperature coefficient (quadratic)

    TRE1

    RE temperature coefficient (linear)

    TRE2

    RE temperature coefficient (quadratic)

    TRM1

    RBM temperature coefficient (linear)

    TRM2

    RBM temperature coefficient (quadratic)

    VG

    Quasi-saturation extrapolated bandgap voltage at 0° K

    VO

    Carrier mobility knee voltage

    XCJC2

    Fraction of CJC connected internally to Rb

    XCJS

    Fraction of CJS connected internally to Rc

     

    Metal Oxide Semiconductor Field-Effect Transistor (MOSFET)

    Of the existing MOSFET device models, the following is not supported with respect to PSpice compatibility:

    • BSIM3 model version 2.0

    For the other supported MOSFET device models, many of the parameters that can be included in a linked model file are common to both Spice3f5 and PSpice. Those that are supported can be found in the SPICE3f5 models, Metal Oxide Semiconductor Field-Effect Transistor (MOSFET) Model page.

    GDSNOI

    Channel shot noise coefficient (use with NLEV=3)

    JSSW

    Bulk p-n saturation sidewall current/length

    L

    Channel length

    N

    Bulk p-n emission coefficient

    NLEV

    Noise equation selector

    PBSW

    Bulk p-n sidewall potential

    RB

    Bulk ohmic resistance

    RDS

    Drain-source shunt resistance

    RG

    Gate ohmic resistance

    TT

    Bulk p-n transit time

    W

    Channel width

     

    Once you want to fully evaluate your design, use the complete set of MixedSim, LTSpice, and PSpice simulation features in Altium Designer®. You can store and recall your SPICE model files and quickly build new components using the storage, sharing, and collaboration features in the Altium 365™ platform. Additional support for Altium Designer users can be found in the Documentation:

    We have only scratched the surface of what’s possible with Altium Designer on Altium 365. Start your free trial of Altium Designer + Altium 365 today.

    About Author

    About Author

    Zachariah Peterson has an extensive technical background in academia and industry. He currently provides research, design, and marketing services to companies in the electronics industry. Prior to working in the PCB industry, he taught at Portland State University and conducted research on random laser theory, materials, and stability. His background in scientific research spans topics in nanoparticle lasers, electronic and optoelectronic semiconductor devices, environmental sensors, and stochastics. His work has been published in over a dozen peer-reviewed journals and conference proceedings, and he has written 2500+ technical articles on PCB design for a number of companies. He is a member of IEEE Photonics Society, IEEE Electronics Packaging Society, American Physical Society, and the Printed Circuit Engineering Association (PCEA). He previously served as a voting member on the INCITS Quantum Computing Technical Advisory Committee working on technical standards for quantum electronics, and he currently serves on the IEEE P3186 Working Group focused on Port Interface Representing Photonic Signals Using SPICE-class Circuit Simulators.

    Related Resources

    Related Technical Documentation

    Back to Home
    Thank you, you are now subscribed to updates.