A QUICK GUIDE FOR PSPICE


PSPICE is a circuit analysis program, developed by MicroSim Corporation, based on the well known SPICE program (Simulation Program for Integrated Circuit Evaluation) developed at the University of California-Berkeley. The PSPICE version available at The University of Mississippi can be used on a personal computer for sophisticated analysis of electric circuits of moderate size. A brief outline of SPICE commands is given below. For more details, read the SPICE or PSPICE manual which accompanies your program or other reference texts.

The use of PSPICE in the analysis of an electric circuit, network, or system requires the following steps:

1.   Select the type of analysis to be performed based on the problem being posed:

  1. DC
  2. AC
  3. TRAN - Transient
  4. TF - Transfer function

2. Draw a circuit in PSPICE format using elements allowed in the desired analysis

  1. Write statements describing the circuit (a Netlist).
  2. Write statements that describe how to analyze the circuit and the type of solution desired.

3. Create a circuit file (XXXX.CIR) using an ASCII editor, which contains statements of 2a and 2b.

4. Execute PSPICE using the circuit file created as the input.

PSpice Netlist (Circuit) File Format:

Although various analytical tools of SPICE have been introduced individually in the PSPICE Users Guide, you should be aware that a DC, AC, TRAN, and TF analysis can all be made in a single run. A separate PRINT (PLOT) statement must be used for each type of analysis requested. For easy reference, a list is presented here of most of the SPICE statements.

* TITLE
*- Comment or ; - comment


*SOURCE, GENERAL
Vxxx N1 N2 DC [VALUE]
Vxxx N1 N2 AC [VALUE]
Vxxx N1 N2 SIN(VO VA [Freq[Td[Df[Phase]]]])
Vxxx N1 N2 EXP (V1 V2 [Td1[Td2[Tau2]]])
Vxxx N1 N2 PWL (T1 V1 {Tu Vu]...)
Vxxx N1 N2 PULSE (V1 V2 [Td[Tr[Tf[PW[Period]]]]])
Ixxx N1 N2 DC [VALUE]
Ixxx N1 N2 AC [VALUE]
Ixxx N1 N2 SIN(VO VA [Freq[Td[Df[Phase]]]])
Ixxx N1 N2 EXP (V1 V2 [Td1[Td2[Tau2]]])
Ixxx N1 N2 PWL (T1 V1 {Tu Vu]...)
Ixxx N1 N2 PULSE (V1 V2 [Td[Tr[Tf[PW[Period]]]]])


*INDEPENDENT SOURCES
Vxxxxxxx N+ N- DC (PULSE,SIN,EXP) AC (voltage source)
Ixxxxxxx N+ N- DC (PULSE,SIN,EXP) AC (current source)

*RLC ELEMENTS
Rxxxxxxx N1 N2 VALUE (Resistor)
Cxxxxxxx N+ N- VALUE IC (Capacitor)
Lxxxxxxx N+ N- VALUE IC (Inductor)
Kzzzzzzz Lxxxxxxx Lyyyyyyy VALUE (Transformer)


*CONTROLLED SOURCES (VCVS, ICIC, VCIS, ICVS)
Exxxxxxx N+ N- NC+ NC- VALUE (voltage controlled voltage source)
Fxxxxxxx N+ N- VNAME VALUE (current controlled current source)
Gxxxxxxx N+ N- NC+ NC- VALUE (voltage controlled current source)
Hxxxxxxx N+ N- VNAME VALUE (current controlled voltage source)


*SEMICONDUCTOR DEVICES
Dxxxxxxx N+ N- DMOD (diode)
.MODEL DMOD D DIODE PARAMETER (diode model)
Qxxxxxxx NC NB NE QMOD (bipolar transistor)
.MODEL QMOD NPN or PNP TRANSISTOR PARAMETERS (transistor model)


*ANALYSIS
.DC SWEEP VARIABLE START STOP INCREMENT (DC)
.TF OUTPUT VARIABLE INPUT SOURCE (transfer function)
.TRAN TSTEP TSTOP UIC (transient)
.AC DEC or OCT or LIN NPOINTS FSTART FSTOP (AC)
.IC X(NODE) = VALUE
.LIB NAME.LIB (library statement)


*OUTPUT
.PRINT (PLOT) DC OUTVAR1...OUTVAR8
.PRINT (PLOT) TRAN OUTVAR1...OUTVAR8
.PRINT (PLOT) AC VM VDB VP VR VI
.PROBE


.END



Hint:

The .OPTIONS control statement can be used to set all options, limits, and control parameters. The flag option

.OPTIONS NOPAGE

can be used to suppress paging and banners for each section in the output file. It can thus be used to minimize printer paper output in the XXX.OUT file. Please use this option after you have learned to recognize the output file format. In addition, by using any text editor (e.g. PED, EDIT), can be used to delete unwanted lines in the output file (XXX.OUT) before printing the CRTL D (EOF) command. Also unwanted data can be "blocked" using PED, or other editors, and deleted to minimize the printout requirements for presentation of results.

Transient Circuit Analysis (.TRAN)

Transient analysis of a circuit using PSPICE is almost the same as DC analysis except a TRAN analysis statement is used. As an example, consider the circuit in Figure 2. Write a netlist describing the circuit using appropriate branch element definitions. A representative netlist follows:

Note that the "use initial condition" command is used in the TRAN statement and that the initial condition for the capacitor is specified. In this case, the applied voltage was assumed to be a step function, i.e. V1=10V t>0; thus a simple DC source was used to represent the input voltage. In other cases, a time dependent source such as a sinewave, pulse, etc., may be required. If you want output from Hewlett Packard Plotter, then PSKETCH.BAT must be executed at startup to initialize the COM port.

The PROBE statement included in the PSPICE Netlist generates a file, PROBE.DAT, for viewing the analysis on the computer monitor. If the PROBE program is executed, an output can be obtained as shown in the figure.

As in the transient example, the PROBE statement is included in the netlist so that PSPICE will generate the file PROBE.DAT for viewing the AC analysis as a function of frequency on this computer monitor. A PROBE plot output for VM(2), voltage magnitude, is shown in the figure.

PSPICE Power-of-Ten Suffix Representation:

F fento- 10-15
P pico- 10-12
N nano- 10-9
U micro- 10-6
M milli- 10-3
K kilo- 10+3
MEG mega- 10+6
G giga- 10+9
T tera- 10+12
MIL (0.001") 25.410-6

PROBE Math Capabilities

PROBE has the capability for the use of mathematical functions for data processing and display of the data as a function of an independent variable. The following list presents the functions available for use in generating new and different data representations in PROBE.

Arithmetic expressions of output variables are allowed. The available operators are: " + ",

" - ", " * ", " / ", along with parenthesis. The available functions are:
ABS(x) |x|
SGN(x) +1 (if x > 0), 0 (if x = 0), -1 (if x < 0)
SQRT(x) x
EXP(x) ex
LOG(x)
ln(x) (log base e)
LOG10(x) log(x) (log base 10)
M(x) magnitude of x
P(x)phase of x (result of degrees)
R(x) real part of x
IMG(x) imaginary part of x
G(x) group delay of x (result in seconds)
PWR(x,y) xy
SIN(x) sin(x) (x in radians)
COS(x) cos(x) (x in radians)
TAN(x) tan(x) (x in radians)
ATAN(x) tan-1(x) (result in radians)
ARCTAN(x) tan-1(x) (result in radians)
d(x) derivative of x with respect to the X axis variable.
s(x) integral of x over the range of the X axis variable.
AVG(x) running average of x over the range of the X axis variable.
AVGX(x,d) running average of X (from x-d to x) over the range of the X axis variable.
RMS(x) running RMS average of x over the range of the X axis variable.
DB(x) magnitude in decibels of x.
MIN(x) minimum of the real part of x.
MAX(x) maximum of the real part of x.


Remember:
VM(n) - magnitude of nth node voltage
VP(n) - phase of nth node voltage in degrees
radians = degrees / 57.3



Get Microsoft Internet Explorer
The next pages are correctly viewed with Microsoft Internet Explorer 4.0 or higher, and using any other browser may yield invalid results, although Netscape 3.04 (and above) is usable.