|This article does not cite any references or sources. (October 2011)|
|Developer(s)||Cadence Design Systems|
|Operating system||Microsoft Windows|
|Type||Electronic circuit simulation|
|Website||Cadence PSpice A/D and Advanced Analysis|
PSpice is a SPICE analog circuit and digital logic simulation program for Microsoft Windows. The name is an acronym for Personal SPICE - SPICE itself being an acronym for Simulation Program with Integrated Circuit Emphasis.
- 1 History
- 2 Features
- 3 Introduction
- 4 Basics
- 5 Types of analyses
- 6 Operating temperature
- 7 Limitations
- 8 PSpice circuit description
- 9 Designation of element values
- 10 Designation of nodes
- 11 Designation of circuit elements
- 12 Circuit files
- 13 Device statements
- 14 Control statements
- 15 PSpice output
- 16 External links
PSpice was the first version of UC Berkeley SPICE available on a PC, having been released in January 1984 to run on the original IBM PC. This initial version ran from two 360 KB floppy disks and later included a waveform viewer and analyser program called Probe. Subsequent versions improved on performance and moved to DEC/VAX minicomputers, Sun workstations, Apple Macintosh, and Microsoft Windows.
Version 3.06 was released in 1988, also came on two 5.25 floppy discs, and had a "Student Version" available which would allow a maximum of up to ten transistors to be inserted.
During its development, PSpice has evolved into an analog mixed signal simulator. The software, now developed towards more complex industry requirements, is integrated in the complete systems design flow in OrCAD and Cadence Allegro. It includes features such as analysis of a circuit with automatic optimization, encryption, a model editor, support for parameterized models, auto-convergence and checkpoint restart, several internal solvers, a magnetic part editor, and support for Tabrizi core model for non-linear cores.
SPICE (Simulated Program with Integrated Circuit Emphasis) is a general purpose software that simulates different circuits and can perform various analysis of electrical and electronic circuits including time domain response, small signal frequency response, total power dissipation, determination of nodal voltages and branch current in a circuit, transient analysis, determination of operating point of transistors, determinations of transfer functions etc. This software is designed in such a way so that it can simulate different circuit operations involving transistors, operational amplifiers (op – amp) etc. and contains models for circuit elements (passive as well as active).
SPICE was first developed in the University of California, Berkeley, USA in the early 1970s. Subsequently an improved version SPICE 2 was available in the mid 1970s especially to support computer aided designs. In due course of time this program (SPICE 2 has become so versatile in the industry that people used to call, this program itself as SPICE. PSpice is also the member of SPICE family and it is a commercial software product based on SPICE algorithm. It is useful for simulating all types of circuits in a variety of applications. In both SPICE and PSpice, the circuit is described by statements those are stored in a file (namely Circuit File). The SPICE simulator is assigned to read this file to run the simulation. In PSpice, the statements are self – contained and independent; obviously they do not interact with each other. The statements are also easy to learn and use. PSpice includes additional features that make the program more flexible and user friendly. Notably among other features is the graphics post processor probe which acts like a software oscilloscope and is capable of exhibiting various waveforms. PSpice has become one of the most popular circuit simulation programs. In order to draw the circuit and create a schematic file, schematic editor can be used in the PSpice simulation.
PSpice is a part of larger software package called the Design Lab, originally developed by MicroSim Corporation as the Design Centre. It is now marketed by OrCAD.
In PSpice, the circuit is first described to a computer by using a file called circuit file. It contains the circuit details, viz., the information about source and commands for what to do and what to display as output. The PSpice accepts circuit file as an input and after executing commands, creates an output file to store results. However, the circuit to be analyzed is specified in terms of element names, element values different sources (voltage or current) and different parameters. PSpice calculates all nodal voltages and branch currents over a range of time interval by giving the output of their instantaneous values. It can also perform other operations as will be evident later. For circuits with variable frequency sources, AC analysis is used. Each circuit element is connected between two nodes. All nodes must be connected to at least two elements and therefore appear twice at least. The node 0 is predefined as ground.
PSpice is a computer program itself so one need not have to do “programming” to use this software. The job is just to prepare the circuit file that instructs SPICE what to do. The circuit file consists of statements describing the circuit, specifying the analysis to be performed and statements to control the output formats and variables. PSpice is to do the simulation called for in the circuit file and stores the result in an output file. The results may be displayed and or printed.
Types of analyses
The type of simulation performed by PSpice depends on the source specifications and control statements. The analyses usually executed in PSpice are listed below.
It is used for circuits with time–invariant sources (e.g. steady-state dc sources). It calculates all nodal voltages and branch currents over a range of values. The types of dc sweep analyses and their corresponding .(dot) commands are described below:
- Linear sweep: .DC [LIN] <sweep variable name> <start value> <end value> <increment value>
- Logarithmic sweep: .DC <DEC|OCT> <sweep variable name> <start value> <end value> <points value>
- Sweep over List of values: .DC <sweep variable name> LIST <value>*
All these sweep types can also be nested by adding another set of parameter name and values at the end.
It is used for circuits with time variant sources (e.g., sinusoidal sources/switched dc sources). It calculates all nodes voltages and branch currents over a time interval and their instantaneous values are the outputs. The corresponding .(dot) command is as follows: .TRAN <print step value> <final time value> [no-print value [step ceiling value]] [SKIPBP]
It is used for small signal analysis of circuits with sources of varying frequencies. It calculates the magnitudes and phase angles of all nodal voltages and branch currents over a range of frequencies. The corresponding .(dot) command is as follows: .AC <LIN|DEC|OCT> <Number of points> <Start frequency value> <End frequency value>
The operating temperature of an analysis can be set to any desired value by the .TEMP command. The nodal parameters are assumed to be measured at a nominal temperature which, by default is 27 °C. This is not very significant in electrical circuit analysis.
SYMBOLS FOR TWO TERMINAL ELEMENTS:-
Table (1) provides the symbols used in PSpice for representing 2 – terminal elements.
The .OP command controls the output of the bias point but the method of bias analysis. If the .OP command is omitted, PSpice prints only a list of node voltages. If the .OP command is presents then PSpice prints all the currents from the voltage source – along with power dissipation. .TF command calculates the parameters of Thevenin’s (or Norton’s) equivalent circuit for the circuit profile. It is used to find out small signal DC gain, the input resistance, the output resistance of a circuit.
|This section does not cite any references or sources. (October 2014)|
PSpice has the following limitations:
- The student (free) version of PSpice is restricted to analyse circuits up to 10 transistors only.
- PSpice does not support an iterative method of solution.
- The circuit cannot be analysed for various component values without editing program statements. Hence, the program is not interactive.
- The input impedance cannot be determined directly without running the graphic post processor, Probe.
- The output impedance of a circuit cannot be printed or plotted directly.
- Distortion analysis is not possible.
PSpice circuit description
A circuit file (*.cir) is the input to PSpice simulator. The results are available in a text output file (*.out), as well as a binary probe data file (*.dat) for viewing waveforms. The circuit file describes the circuit to the program and is usually generated automatically from a schematic editor. It may also be typed manually as a text file. The circuit file contains the component netlist, simulation options, analyses statements, and the output control statements. The component netlist comprises a list of all circuit elements, along with the node names connected to their terminals. The netlist topology is converted into an equivalent matrix which is solved to find the circuit state. it also used to simulation output file.
Designation of element values
Two types of suffixes are generally used in order to write element values viz., scale suffix and unit suffix. Scale suffixes are upper letters and multiplies the number that it follows. Some of the unit suffixes and scale suffixes normally used are as follows:
- MEG = 1E6
- K = 1E3
- M = 1E-3
- U = 1E-6
- N = 1E-9
- P = 1E-12
Each element in a PSpice circuit must contain a device name (such as Vs, Is, R, etc.) with an appropriate key initial letter. Upper or lower case letter can be used because PSpice is insensitive to case in circuit files. However, PSpice does not allow subscripts or superscripts. IS is thus written as IS, VS as VS and so on. PSpice automatically assigns the corresponding SI unit for each element based on the key letter of its name, so units need not be written after element values. The element values are written in standard floating point notation with unit suffixes, NOT separated by space, this is in contrast to what is required by the SI. E.g. the value of an inductor may be expressed in the netlist as 20mH or 20M. Note that M means ‘milli’ and not ‘mega’. Mega is written as MEG. E.g. 10 Mega ohms may be expressed as 10MEGOHM or just 10Meg.
Designation of nodes
The location of an element is identified by the node numbers since each element is connected between two nodes. PSpice works fundamentally with node voltages, and the circuit description requires node numbers. All nodes must be connected to at least two elements and hence appear twice. Node numbers are integers but need not be sequential in PSpice. Node O is the ground node and all nodes must have a dc path to the ground node. Node voltages are identified by node number. The voltage difference between two nodes may be written as v (node 1, node 2), which stands for v(Node 1) – v(Node 2). If two or more connection points are joined by a zero resistance path, then that combination is treated as a single node. Each element in a .PSpice circuit must connect to nodes that specify the element’s location. Consequently, even a series connection point requires identifiers and can be treated as a node. The reference polarity for node voltage is always positive relative to the node O. PSpice employs the passive combination of all elements, with the first named node taken to be at higher potential.
Designation of circuit elements
Circuit elements are designated by names and the name must start by a letter symbol. After the letter symbol it can contain either letter or numbers up to a total of eight characters. A passive element is described as follows:-
(element name) (positive node) (negative node) (value)
PSpice employs passive convention of elements, the first named node is taken as higher potential. The reference direction of current through the element goes from the first named node to the second i.e., the positive current flows from the first named node (N+) to the second (N-). If the nodes are interchanged, the direction of the current through the element will be reversed.
The circuit files contain five types of statements, some of which are optional. The statement types are:
- The title, which must appear in the first line. This line is used by spice as a label within the output file, and is not considered in the analysis. It is compulsory to allocate the first line.
- Device statements specifying circuit elements and having a key letter in the first column.
- Control statement; some control statements pertain to devices, while others specify the type of simulation or output format.
- Comment lines having an asterisk (*) in the first column. Comment may also appear in other line after a semicolon(;).
- The .END statement forming the last line. Additional end statements may also appear within the file to separate multiple simulations each of which must also have a title line.
It may be noted that for the SPICE/Pspice program, the first line being the title line, it may contain any type of text. The last line being the .END statement, the order of lines in between is irrelevant and does not affect the results of simulation. If any Pspice statement is more than one line, the statement can continue to the next line having a +sign in the first column of the next line. A comment line can be included anywhere proceeded by an (*). Upper or lower case letters may be used for Pspice statements (upper case for SPICE 2). Number of blanks between items is insignificant except in the title line.
It includes a user supplied name, the numbers of the nodes to which the element is connected and the element is connected and the element’s value. Independent dc voltage and current sources are described by the following scheme; the required key letter (V or I) are capitalised and is followed by the higher and lower potential node numbers (N+ and N-) respectively. The value is then given and may be +ve or –ve. Except sources, zero values are not allowed. Infinite value of any element is not feasible. Numerical values are expressed in either floating point or fixed point form. The floating point notation for R*10^p is Rep when R is any number and p is a positive or negative number. Alternatively, a number may be followed immediately by any scale factor. Numerical values in device statements may also be specified via expression. The form of statement then includes (expression) where the early brackets enclose a mathematical relation. The mathematical operators are symbolised by:- + (addition) -(subtraction) *(multiplication) /(division).
Here the only essential one required is the last line i.e., the end statement. Pspice produces its default output consisting of:
- Node voltage values
- Current values through each independent voltage source
- Total power dissipation supplied by independent voltage sources but not by current sources.
The optional control statement affects the output format and written in form of
- Option (list)(node) (no page)
When ‘list’ gives a summary of elements, ‘node’ gives a summary of connection while “no page” suppresses paging. It is usual to include .option no page to conserve paper.
If the Pspice default output does not provide enough information, the circuit file should be augmented to give values of other variables desired. If only the branch current is desired, the default output automatically includes the currents through all independent voltage sources. Accordingly, it is required to incorporate a current – scaling zero voltage source in the appropriate branch. This source has O voltage magnitude and acts like a short. It does not alter the circuits’ behaviour but it requires an additional node number. It is basically a dc dummy voltage source (0V) added to the specify branch and used as an ammeter to measure the current of the source.
To get several branch currents and or voltages, it is possible to use a print control statement having the general form
.PRINT DC VAR1 VAR2……
Where VAR1, VAR2……… represent all the variables of interest. The default output is not supplied when the ckt file includes a .PRINT DC statement. The .PRINT DC statement should also be accompanied by a source control statement governing the value of an independent voltage or current source. Pspice has capability for printing and plotting of output voltages or currents. For dc sweep and transient analysis, the output voltages and currents can be obtained by the following statements:-
V(node) :Voltage at node with respect to ground V(N1, N2) :Voltage at node N1 with respect to node N2 V(name) :Voltage across two terminal device VX(name) :Voltage at terminal x of a three terminal device VXY(name) :Voltage across terminals x and y of 3 terminal device VZ :Voltage at port Z I(name) :Through current IX(name) :Current through terminal x IZ(name) :Current at port Z
PSpice usually does not allow measuring voltage across a passive element like V(R1), V(C1), V(L1) except when used only for outputs by .PLOT and .PRINT statement. The commands those are available in PSpice simulation to get the output are as follows:-
(i) .PRINT DC (output variables)
(The maximum number of variables at the output should not be more than eight)
(ii) .PRINT statement
(however, more than one .PRINT statement can be used to print all desired output variables)
(iii) .PLOT DC (output variables).
(The results from DC analysis can also be obtained in the form of line printer plots. Maximum eight variables can be obtained in such a statement and more than one .PLOT statement can be given.)
(Probe is the graphics waveform analyser and is available in the professional version of PSpice. Once the results of the simulations are processed by .PROBE command, the results are available for graphic displays).