Pspice Tutorial
Pspice Tutorial
Tutorial
Simulation program
1est and Refine your design before ever
touching a piece of hardware.
Pspice A/D, Pspice A/D, Pspice Pspice Windows Windows , ,
Pspice Pspice SP!CE SP!CE 1" 1", ,
SP!CE SP!CE 1"1\*~+ 1"1\*~+
1" 1", , PSP!CE PSP!CE DOS DOS 1" 1", ,
SP!CE 2 SP!CE 2 "(: "(:. .
SPICE SPICE2
PSPICE
IS-SPICE
HSPICE
Pspice A/D
SP!CE SP!CE
Simulation Program with !ntegrated Circuit Emphasis, Simulation Program with !ntegrated Circuit Emphasis,
`\{|"~ `\{|"~
+1 +1, , |"~ |"~
, , `"' `"', , "`"" "`""
1"~ 1"~, , `1 `1
"" "", , )' )'. .
"|7| "|7|,,
`3|7 `3|7(. (.slb) slb)1+( 1+((. (.lib), lib),
1(.~ 1(.~,,
Schematics Schematics !~| !~|,,
|71( |71(
1 1( (Model), Model), `.~ `.~(. (.sch). sch).
~> ~>Extract Netlist, Extract Netlist,
3 3Pspice Pspice " "
(. (.cir, .net cir, .net 11..als), als),
!` !`Pspice Pspice ~+ ~+,,
+~ +~,,
31 31
-: -:
-: -:(. (.out) out)
1"( 1"((. (.dat), dat),
"( "((. (.dat) dat)
`" `"Probe Probe !3" !3",,!" !"..
!
.slb |7(symbol) (
.lib (Model) (
.sch "~|3~
.cir 'netlist, alias 1model ~, `r
+`Pspice , Pspice 1"
.net "1"<"+'`(netlist)
.als ~, 11V
.out -:
.dat "(, ``Probe , "
Draw the schematic of the
circuit.
Change the values of the
components and sources.
Add any probe or marker.
8etup analysis
Run simulation.
Add the traces in the probe.
!rocedure For simulation in schematics
Schematic Circuit
A part is a basic circuit element, such as a resistor
or power source. Each part is associated with a part
name and is stored in a library.
Part
Connection
ReIerence
Value
V110V
R11K
GNDEARTH
Analysis/Setup/Bias Point Detail
Analysis/Display Result on Schematic/Enable
Connections are made primarily by wire segments
and bus strips.
Part
Connection
ReIerence
Value
V110V
R11K
GNDEARTH
Analysis/Setup/Bias Point Detail
Analysis/Display Result on Schematic/Enable
ReIerences are unique names Ior parts. Unlike the
generic part names (such as VDC and R),
reIerences are diIIerent Ior each instance oI the
same part.
Part
Connection
ReIerence
Value
V110V
R11K
GNDEARTH
Analysis/Setup/Bias Point Detail
Analysis/Display Result on Schematic/Enable
Values give the magnitude oI each part instance.
As an option, a name can be associated with each
value.
Part
Connection
ReIerence
Value
V110V
R11K
GNDEARTH
Analysis/Setup/Bias Point Detail
Analysis/Display Result on Schematic/Enable
Run simulation
Part
Connection
ReIerence
Value
V110V
R11K
GNDEARTH
Analysis/Setup/Bias Point Detail
Analysis/Display Result on Schematic/Enable
utput Iile
Each time Pspice perIorms an analysis it automatically generates an output Iile.
etlist field.
* Schematics Netlist *
VV1 $N0001 0 10V
RR1 0 $N0001 1K
Alias Field.
* Schematics Aliases *
.ALIASES
VV1 V1($N0001 -0 )
RR1 R1(10 2$N0001 )
.ENDALIASES
Small signal bias solution.
**** SMALL SIGNAL BIAS SLUTIN TEMPERATURE 27.000 DEG C
NDE VLTAGE NDE VLTAGE NDE VLTAGE NDE VLTAGE
($N0001) 10.0000
VLTAGE SURCE CURRENTS
NAME CURRENT
VV1 -1.000E-02
TTAL PER DISSIPATIN 1.00E-01 ATTS
08ign Entry
. To open a Design Manager :
To open the Evaluation Version
Double-Click on the Pspice-Evaluate Version icon
To open the Full Version
Double-Click on the [Pspice8] Design Manager icon
8chematics
P8pice A/D
Parts
Probe
8timulus Editor
TextEdit
8chematics is a design entry program you need to
prepare your circuit for simulation. This means:
Placing and connecting part symbols,
Defining component values and other attributes,
Defining input waveforms,
Enabling one or more analyses, and
Marking the points in the circuit where you want to see
results.
8chematics is also the control point for running other
programs used in the simulation design flow.
""`!, `.1"
~, !Pspice A/D 1"
, ~Pspice A/D , "
Probe /+".
P8pice A/D
`!Pspice A/D 1"!, `!
1!:', "Schematics !
3~, -1", +.
The Parts utiIity is a modeI extractor that
generates modeI definitions for PSpice to
use during simuIation.
Pspice A/D 1"!|7(, 1
"^.+, `!+
~", "``"!.+.
1`~!", "`J`".
Probe is a graphicaI resuIts anaIyzer.
When PSpice compIetes the simuIation,
Probe pIots the waveform resuIts so you
can visuaIize the circuit's behavior and
determine the vaIidity of your design.
`
The StimuIus Editor is a graphicaI input
waveform editor that Iets you define the
shape of time-based signaIs used to
test your circuit's response during
simuIation.
`3~7, !~", 1`
!717".
2. To create/open a schematics fiIe :
Click on the Schematics icon on Design Manager
to open MicroSim Schematics.
Select FiIe/New or click on the new file icon to
create new file.
Select FiIe/Open
or click on the
open file icon to
open existing file.
Select 7,w/Get new p,7t [Ct7I+G] or click on the
et new part icon to get new part.
Part Browers Advanced windows is shown below.
n the !,7t N,2e
text box, type name
of the component
e.g. VDC.
Click !lace & Close
icon.
Move the
component to the
correct position on
the schematic.
Right-click to cancel
placement.
Part Name Description
B GaAsFET
C Capacitor
D Diode
E Voltage-controlled voltage source
F Current-controlled current source
G Voltage-controlled current source
H Current-controlled voltage source
Simple AC current source; DC
J JFET
K Non-linear, magnetic core
L nductor
M MOSFET
Q BJT bipolar transistor
R Resistor
S Voltage-controlled switch breakout device
T Transmission Line
V Voltage source
W Current-controlled switch breakout device
3. Changing the vaIue of a component:
Double-click on the
attribute value to change
the values of a component
e.g. 0V.
n the Set Attribute Value
dialog box, type the correct
value. Then Click OK.
Or Double-click on the
component to change the
other values of a
component.
3. Changing the vaIue of a component:
!7 !V
F 1e-15=10
-15
P 1e-12=10
-12
N 1e-9=10
-9
U 1e-6=10
-6
ML 25.4e-6=25.4x10
-6
M 1e-3=10
-3
K 1e3=10
3
MEG 1e6=10
6
G 1e9=10
9
T 1e12=10
12
4. Changing the reference number of a
component:
Double-click on the current
reference number e.g. V1 to
change the reference number of a
component.
5. Edit the component :
O Moving a component:
Click on the component once to select it. Drag the component to a
new location.
O #otating a component:
Click on the component once to select it. Select /it/RoI,te
[Ct7I+R] to rotate the component in 45 degree.
O ipping a component:
Click on the component once to select it. Select /it/FIip [Ct7I+F]
to flip the component.
O Deeting a component:
Click on the component once to select it. Select Edit/Delete
DELETE] to delete the component.
6. Wiring :
Select 7,w/Wi7e [Ct7I+W] or click on
the /raw wire icon to wire the
components together.
Press Right-Click mouse or [$C] to
finish wiring.
O Labeing a wire
Double-click on the wire to select it. n the $et
Att7ibute V,Iue window type the label of the wire.
7. Adding a Current Source :
AC - Simple AC current source
DC - Simple DC current source
PULSE - Pulse current source
PWL - Piecewise linear current source
8. Adding a VoItage Source :
VAC - AC Voltage Source
VDC - DC Voltage Source
VPULSE - Voltage Pulse
Source
VSRC - AC or DC Voltage
Source
VSTM - Voltage source for
StmEd
ACMAG?
ACPHASE?
DC?
V1?, V2?, TD?, TR?, TF?, P?, PER?
"!VEXP (Exponential delay voltage source)
V1?, V2?, TD1?, TC1?, TD2?, TC2?
1!VPL (Piecewise linear voltage source)
T1?, V1? ...
!VSFEM (Single-Frequency FM voltage source)
VFF?, VAMPL?, FC?, MD?, FM?
!VSIN (Transient sine voltage source)
VFF?, VAMPL?, FREQ?, TD?, DF?, PHASE?
|1!E (Voltage-controlled voltage source) EGAIN?
|1!G (Voltage-controlled current source) GGAIN?
|1!H (Current-controlled voltage source) HGAIN?
|1!F (Current-controlled current source) FGAIN?
9. Changing the settings for current /
voItage sources :
TD - Time delay ""
TR - Rise Time ""
TF - Fall Time ""
PER Period
P - Pulse width ]
VFF - IIset voltage
|
FREQ Frequency
VAMP- Amplitude
V
10. Adding Connection bubbIes :
Select 7,w/Get new p,7t [Ct7I+G] or
click on the et new part icon to get new
part.
n the !,7t N,2e text box, type bubble.
Place the connection bubble in the circuit.
O Adding connection bubbes
Bubbles are components used to connect one part
to another without using wire connection.
11. Adding Probes :
O Adding a marker to a node
Voltage and current markers are used to
probe the voltage or current.
After simulation, PSPCE automatically plot
the results.
Voltage marker Select Markers/Mark Voltage/Level [Ctrl+M] or
click voltage marker icon to place the voltage
marker.
Current marker Select Markers/Mark Current into Pin or click
current marker to place the current marker.
Voltage
Differential
marker
Select Markers/Mark Differential Voltage.
Place the two marker + and - between the
circuit.
Advanced
marker
Select Markers/Advanced. Place the marker
on the circuit.
12. EnabIe Bias voItage dispIay and Bias current dispIay Icon
After simulation, the
DC values of voltage
and current can be
displayed using these
functions.
Analy8i8 S0tup
Select An,Iysis/$etup or click on the setup
analysis icon to setup analysis.
Analysis setup window will display.
DC currents and voltages are automatically
calculated. t is default.
DC Analysis
(Bias Point Detail)
Under Pspice, the steady state (DC) component is
known as the bias point solution and is always
calculated Iirst. Since bias-point values do not
change with the passage oI time, they can be
displayed as simple numeric constants.
TransIer
Function
The transIer Iunction is the
ratio oI output over input.
Change one or
more DC voltage
source at the
same time.
The output is with
respect to the
source being
swept.
DC Sweep
-11+u, `'+,
~r.
DC Sweep
Nested Sweep.. ++
Sensitivity
]~1~1",
*-:-:'`.
`-:-:. (.out Iile)
Sensitivity is a tolerance
problem. For example, we
might use DC sensitivity
analysis to tell us how each
resistor in the circuit aIIects
the Q point voltage. II we
Iind that the Q point is very
sensitive to a particular
resistor, we might want to
reduce that resistor`s
tolerance Irom 10 to 1.
AC Sweep
Analysis
determines the
output with
respect to the
frequency.
AC Sweep Analysis
"7!'1, ~1
'`.
Noise Analysis
Noise Iunction generates
a noise density spectrum
Ior each device over a
range oI Irequencies and
perIorms an RMS sum at
the speciIied output
node. (.out Iile)
Transient Analysis
(Transient)
Transient analysis
determines the output
with respect to time.
Fourier Analysis
Fourier analysis is the
mathematical technique Ior
switching between the time and
Irequency domains. (.out Iile)
Temperature Analysis
Determines the
output affected from
the tolerances of
the components.
Monte Caro/Worst
Case Anasis
Monte Carlo Analysis
During a Monte Carlo analysis, Pspice perIorms
several runs oI a DC, AC, or transient analysis,
each time varying component values randomly
within the tolerance range.
orst Case Analysis
orst Case Analysis does not use random
variations in several runs oI a DC, AC, or
transient analysis, each time varying component
values within the tolerance range.
Parametric Analysis
RUNNING SIMULATION
Select An,Iysis/$i2uI,te [F11] or click on the simulate
icon to run simulation.
After simulation, the DC values of voltage and current can be
displayed when using DC bias point analysis. And the !7obe
will automatically open and all of the value of marker will
appear on the plot.
Mess,e window will automatically open during simulation.
'i0ing R08ult8
MicroSim Probe is the waveform
analyzer for Pspice simulations. n
Probe, you can visually analyze and
interactively manipulate the waveform
data produced by circuit simulation.
O %races to the pot from
marker
When voltage or current
markers were marked in the
schematic, the plot will
automatically display.
O Add Additiona %races to the pot
Select %7,.e/A// [Inse7t] to add new traces.
Then choose from the left column
or in the %7,.e xp7ession, type name of the
expression.
O Add an Additiona Pot
Select !Iot/A// !Iot to add a new plot.
O Add a %ite to the Pot
Select /it/Mo/ify %itIe to modify the title.
O Change Axis Settings
Select !Iot/Y-Axis settins or double-click on
the y-axis to change the Y-Axis settings.
Select !Iot/X-Axis settins or double-click on
the x-axis to change the X-Axis settings.
O Add a %ext Labes
Select %ooIs/L,beI/%ext to add text label.
O Add probe cursors
Select %ooIs/Cu7so7/ispI,y to add cursors on
the plot.
A probe cursor box will appear. Coordinates of
cursor will display.
O Spit two probe cursor (A1, A2)
One cursor is selected by left mouse button and the other
cursor is selected by right mouse button.
O Labe a probe cursor coordinates
Using left mouse button or right mouse button to select the
cursor,
Select %ooIs/I,beI/M,7 to label the cursor coordinates
directly.
Example 1
Click on the Schematics icon on Design Manager to open
MicroSim Schematics.
Select ile/New or Click on the new file icon to create new Iile.
Select Draw/Get New Part and select uA741, C, R, VDC, VSRC,
GNDANALG.
Double-click on the attribute value to change the values oI a
component.
Select Draw/Wire and to connect the component.
Select ile/Save to save your Iile.
Double-click VSRC (V3) to change AC to 1.
Select Analysis/Setup to setup analysis. And select
Bias Point Detail.
AIter simulation, the DC values oI voltage and current
can be displayed using these Iunctions.
S00p
Select Analysis/Setup to setup
analysis. And select DC Sweep.
Change Name to V3,
Change Start, End and Increment
Value to 10, 10 and 0.1.
In order to simulate the circuit with
the DC input voltage Irom -10 Volts
to 10 Volts with a voltage increment
oI 0.1 Volts.
Select Analysis/Simulate ] to run simulation.
MicroSim Probe indow will automatically display.
Select Trace/Add in MicroSim Probe.
Select V(U1UT) to add the output voltage oI the perational
AmpliIier.
Select V(3) to
add the positive terminal
oI the input source.
A S00p
Select Analysis/Setup to setup
analysis. And select AC Sweep.
nly V3 is AC source. AC sweep is
analysis Irom V3.
Change type to Decade
Change Pts/Decade, Start Freq and End
Freq to 10, 10 and 100K.
The simulation will decade Iorm with
10 points per decade with the
Irequency oI the AC source swept Irom
10 Hz to 100 kHz.
Select Analysis/Simulate ] to run simulation.
MicroSim Probe indow will automatically display.
Select Trace/Add in MicroSim Probe.
Select DB( ) Irom Iunction or macro window and then select
V(U1UT).
Tran8i0nt
For a transient type analysis, one oI possible input
source is VPL (Piecewise Linear Voltage Source).
Select Draw/Get New Part and select VPL.
Double-click VPL(V3).
Change DC to 0, change AC to 0, and then change
T1 0m V1 0v
T2 0.1m V2 1v
T3 5.0m V3 1v
T4 5.1m V4 0v
T5 7.0m V5 0v
T6 7.1m V6 -2v
T7 9.0m V7 -2v
T8 9.1m V8 0v
Select Analysis/Setup to setup analysis. And select Transient.
Change Print Step and Final Time to 10ns and 10ms.
Select Analysis/Simulate ] to run simulation.
MicroSim Probe indow will automatically display.
Select Trace/Add in MicroSim Probe.
Select V(U1UT) and V(V3).
Exercise 1 Exercise 1
2.sch
Exercise 2 Exercise 2
3.sch
Exercise 3 Exercise 3
4.sch
Exercise 4 Exercise 4
5.sch
Exercise S Exercise S
6.sch
Loading
effects
Exercise 6 Exercise 6
7.sch
Exercise 7 Exercise 7
Zener Diode
8.sch
Example2 Example2
Generator
Halfwave rectifier
9.sch
Peak Rectifier
Add a filter capacitor to smooth out
the waveform.
10.sch
Low-Pass Filter
Add low-pass filter shorts the AC ripple to
ground
11.sch
Voltage Regulator
Zener regulator
12.sch
Voltage Regulation test
To test the voltage regulation
characteristics by adding a nested
sweep of the R4.
13.sch
Transformer
14.sch
Exampl0 3:
Bia8 Point Analy8i8
Sweep Analysis
1ransient Analysis
Place a VSTIM symbol.
Double-click the VSTIM symbol.
In the Set Attribute
Value dialog box,
type SINE, then click
K.
The New Stimulus
dialog box
and the Stimulus Editor
appear.
A Sweep Analysis
VAC
From the Markers menu, select Mark Advanced.
Double-click Vdb.
Place one Vdb marker on the output net,
and place another on the Mid net.
Place a Vphase marker on the output next to the Vdb
marker.
!arametric Analysis
From the Trace menu, select Add.
In the Trace Expression text box, type the
Iollowing
Vdb(ut)1 Vdb(ut)21
Click K.
onte Carlo Analysis onte Carlo Analysis
Click on R1 and Select Edit/Model
R1 LT10 DEV10
C1 LT10 DEV10
In Analysis/setup
AC Sweep Type Decade,
Pts/Decade 5,
Start Ireq.1,
End Ireq.100k
Worst Case Worst Case
Analysis Analysis
ourier Analysis ourier Analysis
Exercise 8 Exercise 8
Multiplier
15.sch
Exercise 3 Exercise 3
NPN bipolar transistor
16.sch
Differential Amplifier
Exercise10 Exercise10
17.sch
Inverting Summing
Amplifier
Exercise11 Exercise11
18.sch
Unity Gain Amplifier
Exercise12 Exercise12
19.sch
Integrator
1Meg resister is used in
simulation.
Exercise13 Exercise13
20.sch
Differentiator
Exercise14 Exercise14
21.sch
Non-inverting Amplifier
Exercise1S Exercise1S
22.sch
Inverting Amplifier
Exercise16 Exercise16
23.sch
Exercise17 Exercise17
24.sch
Gain vs Frequency
With different R2
Lowpass filter
Exercise18 Exercise18
25.sch
Highpass filter
Exercise13 Exercise13
26.sch
Bandpass filter
Exercise20 Exercise20
27.sch
Inverter
Example4 Example4
28.sch
VPULSE
Propagation Delay
Exercise21 Exercise21
29.sch
Clock
ExampleS ExampleS
30.sch
DigClock
STIM4 system bus
Exercise22 Exercise22
31.sch
MJD-10
Exercise23 Exercise23
32.sch
Shift Register
Exercise24 Exercise24
33.sch
DIGITAL ANALYSIS
Select DIGSTIM, GLBAL in Part Browser
Example6 Example6
34.sch
Digstim
Using Editor to create .stl Iile
Select Analysis/Library and Include File.
Browse the .stl Iile
Add stimulus Iile
Select Analysis/Setup
Click Transient Analysis
Print step 0.1us
Final Time 20us
orst Case Analysis
Click Digital Setup in Analysis/Setup
Timing Mode orst-Case |Min/Max|
DeIault A/D InterIace Level 1
Flip-Ilip Initialization All X
35.sch
Exercise2S Exercise2S
Double Click DSTIM3
UClock to open Stimulus
Editor to edit UClock
Using Editor to add UClear and UInput signal in .stl Iile
Select Analysis/Library and Include File.
Browse the .stl Iile
Add stimulus Iile
Select Analysis/Setup
Click Transient Analysis
Print step 0.1us
Final Time 20us
Example oI schematic oI LM380
380 380
No library, ERRR occurs.
Import library oI LM380
Select Analysis/Library and Include Files.
Click Browse icon and select the lm380.lib Iile.
Click Add library icon to add lm380.lib.
http//www.cadencepcb.com/products/downloads/PSpicestudent/deIault.asp
Pspice.com Pspice.com
http//www.aboutspice.com/
Author Goody, Roy W.
Title
OrCAD PSpice for Windows / Roy W. Goody.
Publisher Upper Saddle River, N.J. Prentice Hall, c2001.
/ition 3rd ed.
LOCATION CALL NO. STATUS
UL TK454 .G66 2001 v.1 DUE 21-05-02
UL TK454 .G66 2001 v.2 DUE 21-05-02
UL TK454 .G66 2001 v.3 DUE 23-05-02
$ubfect
PSpice Ior indows.
Electric circuits -- Computer simulation.
Electronic circuits -- Computer simulation.
ote
2nd ed. under title MicroSim PSpice Ior indows. c1998.
Includes index.
ontents
v. 1. DC and AC circuits -- v. 2. Devices, circuits, and operational
ampliIiers -- v. 3. Digital and data communications.
Author Lu, Qinyong.
7.
Title
Dian zi dian lu mo ni : shi yong PSpice A/D / Lu Qinyong bian zhu.
~+: "PSpice A/D / 7
.
Publisher Taibei Shi Quan hua ke ji tu shu gu Ien you xian gong si, |min guo| 89
|2000|
9 ^*!(1, |!|89|2000|
/ition Xiu ding ban, 2 ban.
, 2.
LOCATION CALL NO. STATUS
UL TK454 .L796 2000 DUE 14-05-02
UL
TK454 .L796
2000 CDRM
NT CHCKD
UT
$ubfect
PSpice.
Electric circuit analysis -- Data processing.
Electronic Workbench
%opSpice
WinSpice
acroSim Digital
Simulator