PSPICE
Introduction •
What’s Spice?
–
SPICE Simulation Program with Integrated Circuit Emphasis
–
SPICE contains models for common circuit elements, active as well as passive.
•
Why Spice?
–
SPICE can provide information about circuit performance that is almost impossible to obtain with laboratory prototype measurements.
ORCAD PSPICE Using PSPICE the user can do three types of processes Capture Layout PSPICE A/D
Types of files in PSPICE A/D File Type
Description
.cir
The basic input file for PSPICE
.out
The output file generated. Contains Output data and errors
.dat
If too much data is produced (e.g. transient analysis) then this can be made as the output file and handled by the “probe”
.inc
include files, to store frequently used subcircuits not added to the library
.lib
library files
Specifying a Circuit File
It has three main parts Element Statements : Describe the elements in the circuit ▫ Control Statements : Describe the types of analyses to be performed ▫ Output Statements : Specifies the output to be printed or plotted ▫
The circuit is described as elements connected between nodes.
General Structure of a Circuit File ;Title Statement Signal Source(s) Element Statements Control Statements Output Statements .end
Circuit File
Comments must begin with * or ; First line is always a comment . The statements can be arranged in any order. The last line is always .end To continue a statement on a new line use the ‘+’ sign Each node must be uniquely labeled.
Elements
PSPICE allows modeling of circuits with both active and passive elements like o o o o o
Resistor Inductor Capacitor Diode Transistor
PSPICE Elements
Prefix for units Code
Metric Prefix
Decimal Representation
T
Tera
1012
G
Giga
109
Meg
Mega
106
K
Kilo
103
M
milli
10-3
U
micro
10-6
N
nano
10-9
P
pico
1012
F
femto
10-15
Data Statements - Sources Independent DC Sources Voltage Source : Vname n+ n- Type Value Current Source : Iname n+ n- Type Value Type: AC or DC E.g. Vin 1 0 dc 12 Is 3 4 dc 1.5
Example
V1 V2
1 4
0 0
DC DC
10V 34V
Passive Elements
SPICE considers the current always flows from the positive node through the element to the negative node. ELEMENT
PSPICE DESCRIPTION
Rname n+ nvalue Lname n+ n value Cname n+ nvalue
Example
Dependent Sources - VCVS Voltage Controlled Voltage source Statement: Ename n+ n- nc+ nc- α
Example *Name
n+ n- nc+ nc- gain Ebar 17 8 42 18 24.0;
First letter always ‘E’
Dependent Sources - VCCS Voltage Controlled Current Source Statement: Gname n+ n- nc+ nc- γ
Example:
*Name n+ Glab 23
n17
NC+ 8
First letter always ‘G’
NC 3
γ 2.5
Dependent Sources - CCCS
Current Controlled Current Source Statement: Fname Vmonitor
nn1
n+ n2
First letter always ‘F’
VMonitor DC 0V
β n1
n2
Dependent Sources - CCCS Example: *Name
Ftrn Vclt
n81 23
n+ 19 12
Vmonitor Vctl DC
Gain 50.0 0V ;controls Ftrn n1
n2
Dependent Sources - CCVS
Current Controlled Voltage Source Statement: Hname n+ n- VMonitor gain Vmonitor n1 n2 DC 0V
First letter always ‘H’
Note
PSPICE does not support open circuits . Every node must be uniquely labeled and must have at least two connections . Node 0 is always reserved for ground . In case analysis must be done on an open circuit, a very high resistance value must be used in place of an infinite resistance. PSPICE is not case sensitive.
Basic Analysis Types
DC Analysis
Transient Analysis
.DC .OP .TRAN
AC Analysis
.AC
Standard Analyses Commands
.OP .DC .AC .TRAN .FOUR .NOISE .SENS
DC Analysis
.OP Statement Causes detailed information about the bias point to be printed
Voltage at the nodes Current in each voltage source Total power dissipation Operating point for each element
If not specified, it automatically performs a DC analysis before doing a transient or ac analysis
Example
ex 1.1.cir
V1 1 V2 4 R1 1 R2 2 R3 3 .OP .END
0 0 2 3 4
DC 10V DC 34V 6ohm 4ohm 2ohm
DC Analysis .DC Statement Performs a linear, logarithmic, or nested DC sweep analysis Calculates the circuit’s bias point over a range of values for <sweep variable name>
.DC Statement – Linear Sweep
General Form
.DC [LIN] <sweep variable name> +<start value> <end value>
+[nested sweep specification]
.DC Statement - LIST General Form .DC <sweep variable name> [LIST] * +[nested sweep specification] Example
.DC V1 LIST 2 4 8 9 13
Output Control Commands
.PRINT .PLOT .PROBE .WATCH .VECTOR (for digital simulation)
.PRINT
Allows results from DC, AC, noise, and transient analyses to be an output to the output file. (print tables) General Form
.PRINT