Pspice Introduction
Pspice Introduction
2
Significance
3
Limitations
4
Applications of PSPICE
Electrical Networks
Electronic Networks
Power Electronics
Power Systems
5
Circuit Description
Vs 10 DC 20V
Is 04 DC 50mA
R1 1 2 500
R2 2 5 800
R3 2 3 1KOHM
R4 4 0 200
Vx 3 0 DC 0V
Vy 5 4 DC 0V
.op
.END
7
Title: It is the first line of the program it may contain any text,
its nothing but a comment line which has to be started with a
asterisk(*), it can be included any where in the program.
Circuit Description: Which defines the circuit elements and set
of model parameters.
Analysis: Which defines the type of analysis such as DC, AC,
TRASIENT analysis etc.
Out Put: Which defines the way the output is to be presented.
End: Which indicates that the program is terminated. It is
written as .END.
If a PSPICE statement is more than one line, statement can be
continued in the next line. The continuation line is defined by
a(+) sign in the first column of the next line.
The Pspice statements or comments can be either in upper case
or lower case.
8
Representation of of Circuit Elements,
Sources and their Formats
DC Circuit Analysis:
The Simulation of DC circuits with passive elements
requires the modeling of Resistors, Model Parameters,
Operating Temperature, DC sources, DC Output
variables, Type of DC analysis
Resistors: The symbol for resistor is R the name of the
resistor must start with R, and it indicates the general
form of
R(name) N + N R VALUE
Ex. R1 6 5 10K
N+
R
N- 9
RNAME is the model name that defines the parameters
of the resistor. RVALUE is the the nominal value of the
resistance.
Modeling Elements: The models are necessary to take
into account the parameter variations i.e. the value of a
resistor depends on the operating temp. The general form
of model statement is
.MODEL MNAME TYPE
(P1 = A1,P2 = A2, . PN = AN)
MNAME is the name of the model that must start with a
letter P1, P2. are the element parameters and A1,A2 .
are their values. TYPE is the type name of the elements.
For example the resistor must have a type name RES
Ex. .MODEL RMOD RES (R = 1.1, TCE = 0.001)
10
List of Type Names of Elements
Element Type Name
Resistor RES
Capacitor CAP
Inductor IND
Diode D
NPN Transistor NPN
PNP Transistor PNP
Voltage Controlled VSWITCH
Switch
Current Controlled ISWITCH
Switch
11
OPERATING TEMPERATURE: The operating temperature of
an analysis can be set to any desired value by.TEMP
command. The general form of the statement is
.TEMP < (one or more temperature) values>
Ex: .TEMP 0 25 50 100
Independent DC Sources:
Independent DC Voltage source:
The symbol for an independent voltage source is V and the
general form is
12
V <name> N+ N- [DC (value)]
N+
+
V <NAME>
-
Ex: V1 15 0 DC 6V
13
Independent DC current source:
+
I<NAME>
-
N-
14
Dependent sources:
15
N+ and N- are the +ve & -ve output nodes
NC + & NC are the +ve & - ve nodes of the
controlled voltage
Source can have either fixed value or a polynomial
expression.
The non linear or polynomial form of representation
is
E(name) N + N - [POLY (<value>)] << (+
Controlling) node> + <(-controlling node)>>
(pairs) < polynomial coefficients)>]
Ex:- E10 25 40 poly(2) 3 0 5 0 0.0 1.0 1 5
16
Voltage Controlled Current Source:-
The symbol of a voltage controlled current source G its linear
form is G <name> N+ N- NC+ NC-
<(transconductance)value>
The nonlinear form is G<name> N+ N- [POLY (<value>) <<
(+Controlling)node>]
Ex:- G12 25 40 poly(2) 3 0 5 0 0.0 1.0 1.5 1.2 1.7
NC+ N+
I1
V1 + I out = GV
1
-
NC - N-
17
Current Controlled Current Source:-
18
DC Output Variables:
19
V(<node>) Voltage <node> with respect to
ground
V(5) Voltage at node 5 with respect to ground
V(N1,N2) Voltage at node N1 with respect to
node N2.
V(<name>) Voltage across two terminal
device, <name>
V (R1) Voltage across Resistor R1
Vx(<name>) Voltage at terminal x of three
terminal
20
Device, <name>
VC(Q3) Voltage at the collector of transistor
Q3 with respect to ground
Vxy (<name>) Voltage across terminals x & y
of three terminal device,<name>
VDS(M6) Drain-source voltage of MOSFET M6
I(<name>) Current through name
I(VS) Current flowing into DC source VS
Ix(<name>) Current into terminal x of
<name>
I(R5) Current flowing into resistor R5
21
Types of Output:
22
TYPES OF DC ANALYSIS
The commands that are commonly used for
DC analysis are
.OP DC operating point.
By using this we can force Pspice to show the
node voltages, and also prints the currents &
power dissipations of all the voltage sorces.
.TF Small signal transfer function using
this we can compute the small-signal DC gain
the Input resistance, & the Output resistance
of a circuit.
.TF Vout VIN Vout
Av(gain) = Vin
.TF Calculates the parameters of thevenins or
nortons equivalent circuit for the circuit file.
23
.DC Sweep
.DC DC sweep
24
TRANSIENT ANLYSIS
Transient analysis deals with the behavior
of an electric circuit as a function of time.
25
1. Exponential source:
The symbol of exponential sources is EXP, and general
form is
EXP (V1 V2 TRD TRC TFD TFC)
26
V2
TFC
TRC
V1
TRDC TFD
27
PULSE SOURCE:
The symbol of a pulse source is PULSE and
general form is
PULSE (V1 V2 TD TR TF PW PER)
28
V
V2
V1
C
0 TD TR PW TF
PER
29
Name Meaning Units Default
30
SINUSOIDAL SOURCE:
Va
V0
0
Td t
31
The model parameters of the SIN
waveform are given below:
Name Meaning Units Default
32
Vo and VA must be specified by the user and
can be either voltages or currents. TSTOP is
the stop time during transient analysis.
Ex: SIN (1 5V 10KHz 10 US 30 DEG)
Transient Sources:
Transient sources are time variant and can be
either independent or dependent. They can be
voltages or currents. The general form of
independent voltage source is
V<name> N+ N- [DC <value>] [(transient
value) [PULSE] [SIN] + [EXP] [source
arguments]]
33
The general form of independent current
source is N+ is +ve node, N- is ve ; for the
DC and transient values, the default value is
zero.
Ex:- V1 10 0
PULSE (0 1 2NS 2NS 2NS 2NS 50NS 100NS)
V1N 12 3 DC 15v SIN (0 2V 10 KHz)
I<name>N+ N- [DC >value>] [(transient
value) [PULSE] [SIN] + [EXP] [source
arguments)}
34
Transient Output variables:
35
The various nodes can be assigned to initial
voltages during transient analysis. The
general form for assigning initial values is
36
.TRAN (Transient analysis): Transient analysis
can be performed by the .TRAN command, which
has the following general form
37
AC CIRCUIT ANALYSIS:
38
Independent AC Sources
The statement for a voltage and current
source have the following general forms
respectively
V <name> N+ N- [AC<(magnitude)
value>, <(phase) value]
I <name> N+ N- [AC
<(magnitude)value>, <(phase)value]
Magnitude is the peak value of the sinusoidal
voltage. Phase is in degrees
Ex: VA 5 6 AC IV 45DEG
39
Commands for performing frequency
response
40
Switches
41
1. Voltage Controlled Switch
NC- N- 42
The Model parameters for voltage controlled
switch are
Name Meaning Units Defaults
Ex. S1 6 5 4 0 SMOD
.MODEL SMOD VSWITCH (RON = 0.5 ROFF = 10E+6 VON = 0.7 VOFF = 0)
43
Device Modelling
.MODEL
The .MODEL statement defines a set of device
parameters for a specific device, which can be
referenced in the circuit.
.SUBCKT
The .SUBCKT statement begins the definition of a
sub circuit. Suppose example, for simulating a circuit
which contained 3 op-amps, each op-amp containing
15compnents. Instead of listing the 15 components at
each point it was necessary to specify the op-amp,
you can list the op-amp once, in a subcicuit, and call
that subcicuit up 3 times.
.ENDS Marks the END of a subcircuit
44
Suffixes
f femto 10-15
p pico 10-12
n nano 10-9
u micro 10-6
m milli 10-3
k kilo 103
meg mega 106
g giga 109
t tera 1012
45
DIODE Parameters
Parameter Description Default value
VJ Reverse-breakdown voltage 1V
51
2.
*single phase Voltage Controller with RLE
loads
vs 1 0 sin(0 169.760)
VG1 2 4 PULSE(0 10 4166.7U 1N 1N 100U
16.6667M)
VG2 3 1 PULSE(0 10 12500U 1N 1N
100U 16.6667M)
VX 6 0 DC 10
R 4 5 2.5
L 5 6 6.5M
CS 1 7 0.1U
RS 7 4 750
XT1 1 4 2 4 SCR
XT2 4 1 3 1 SCR
**SUB CIRCUIT FOR SCR**
.SUBCKT SCR 1 2 3 2
S1 1 5 6 2 SMOD
RG 3 4 50
VX 4 2 DC 0 52
RT 6 2 1
CT 6 2 10U
F1 2 6 POLY(2) VX VY 0 50 11
.MODEL SMOD VSWITCH(RON=0.01
RIFF=10E+5 VON=0.1 VoFF=0)
.ENDS SCR
.TRAN 10U 33.4MS
.PL0T TRAN V(2,3) I(R)
.PRINT TRAN V(2,3) I(R)
.PROBE
.OPTIONS ABSTOL=1.00N RELTOL=1.0M
VNTOL=1.0M T\ITL5=10000
.END
53
3.
*RESONANT PULSE COMMUTATION
VS 1 0 DC 200V
VG1 7 0 PULSE(0 100 0 1U 1U 0.4M 1M)
VG2 8 0 PULSE(0 100 0.4m 1U 1U 0.6M 1M)
VG3 9 0 PULSE(0 100 0 1U 1U 0.2M 1M)
RG1 7 0 10MEG
RG2 8 0 10MEG
RG3 9 0 10MEG
CS 1 11 0.1UF
RS 11 4 750
C 1 2 31.2UF
L 2 3 6.4UH
D1 4 1 DMOD
DM 0 4 DMOD
.MODEL DMOD D(IS=1E-25 BV =1000V)
RM 4 5 0.5
LM 5 6 5MH
VX 6 0 DC OV
XT1 10 4 7 0 DCSCR
XT2 3 4 8 0 DCSCR
XT3 1 3 9 0 DCSCR 54
** SUBCKT FOR DC SCR
.SUBCKT DCSCR 1 2 3 4
DT 5 2 DMOD
ST 1 5 3 4 SMOD
.MODEL DMOD D(IS=IE-25 BV=1000)
.MODEL SMOD VSWITCH(RON=0.1
ROFF=10E+6 VON=10V VOFF=5V)
.ENDS DCSCR
.TRAN 1M 6MS OM 1M
.PRINT TRAN I(VX) V(1,2) I(C)
.PROBE
.OPTIONS ABSTORL=1.000U RELTOL=0.01
VNTOL=0.1 ITL5=20000
.END
55
4.
VS 1 0 DC 110V
VY 1 2 DC 0V
VX 5 0 DC OV
VG 7 3 PULSE(0 20 0 0.1NS 0.1NS
27.28US 50US)
RB 7 6 250
LE 3 4 681.82UH
CE 4 0 8.33UF
L 4 8 40.91UH
R 8 5 3
DM 0 3 DMOD
56
.MODEL DMOD D(IS=2.2E-15 BV=1800V TT=0)
A1 2 6 3 QMOD
.MODEL QMOD NPN(IS=6.734F BF=416.4
BR=0.7371 CJC=3.638P CJE=4.493P
+TR=239.5N TF=301.2P)
.TRAN 1US 1.6MS 1.5MS
.PROBE
.OPTIONS ABSTOL=1.00N RETOL=0.01
VNTOL=0.1 ITL5=50000
.PRINT TRAN V(4) I(VX)
.END
57
5.
58
.model dmod d(is=2.2e-15 bv=1800
tt=0)
rgl 8 7 100
rg2 10 9 100
rg3 12 11 100
rg4 14 13 100
xpw1 17 15 8 3 pwm
xpw2 17 15 10 0 pwm
xpw3 17 16 12 6 pwm
xpw4 17 16 14 0 pwm
.subckt pwm 1 2 3 4
r1 1 5 1k
r2 2 5 1k
rin 5 0 2meg
rf 5 3 100k
r0 6 3 75
c0 3 4 10pf
e1 6 4 0 5 2e5
59
.ends pwm
q1 2 7 3 qmod
q2 6 9 0 qmod
q3 2 11 6 qmod
q4 3 13 0 qmod
.model qmod npn(is=6.734uf bf=416.4
cjc=3.638p cje=4.493p)
.tran 10us 35ms 0 10us
.probe
.print abstol=1n reltol=0.01 vntol=0.1
itl5=20000
.print tran v(3,6) i(vx)
.end
60
61
62
63