PSPICE Tutorial 2
PSPICE Tutorial 2
Expected Outcome
At the end of this presentation you should be able to
perform a simple DC and AC circuit analysis using
PSPICE
Introduction
SPICE (Simulation Program for Integrated Circuits
Emphasis) is a general purpose analog circuit simulator that
is used to verify circuit designs and to predict the circuit
behavior.
PSpice is a PC version of SPICE and HSpice is a version that
runs on workstations and larger computers.
PSpice has analog and digital libraries of standard
components (such as NAND, NOR, flip-flops, and other
digital gates, op amps, etc) which makes it a useful tool
for a wide range of analog and digital applications.
LTSPICE
LTSPICE
Non-linear DC analysis
Non-linear transient analysis
Linear AC Analysis
Noise analysis
Sensitivity analysis
Distortion analysis
Fourier analysis
Monte Carlo Analysis
Circuit Components available
Independent and dependent voltage and current sources
Resistors
Capacitors
Inductors
Mutual inductors
Transmission lines
Operational amplifiers
Switches
Diodes
Bipolar transistors
MOS transistors
JFET
MESFET
Digital gates
LTSPICE Buttons
File structure PSPICE
Input file for PSpice that has the file type “.CIR”
When a circuit is simulated “.RAW” is generated
“*.DAT” file is by default a binary file to see the
data
“*.LIB” files where the details of complex parts are
saved
Additional files
“*.ASC” (the schematic data, itself)
“*.ASY” (the symbol data)
Libraries
• ibias 18 4 DC 15m
• V2 3 0 25V ( spice recognizes the common
abbreviations for units, which helps to make source files
more easily understood by humans.)
Voltage-Controlled Dependent Sources
Current-Controlled Dependent
Sources
Powers of Ten
Comment line
V1 1 0 12V
R1 1 2 50
R2 2 0 100
R3 2 0 200
.tran 100u
.PRINT dc i(r1) i(r2) i(r3)
.END
.AC Small-Signal Analysis
.AC Example
RLC circuit
V1 1 0 AC 1V
R1 1 2 50
L1 2 3 20mH
C 3 0 150nF
.Probe
.print v(3)
.AC Lin 99 100Hz 5kHz
* | | stop freq
* | starting freq
* step count
.end
.DC
Sweep
.DC Example
diode i/v characteristics
v1 1 0 5V
R1 1 2 100
d1 2 0 D1N4001
.dc v1 0 5 .01
.probe
.print i(d1) v(2)
.MODEL D1N4001 D
+IS=29.5E-9 RS=73.5E-3
+N=1.96 CJO=34.6P VJ=0.627
+M=0.461 BV=60 IBV=10U
.end
Subcircuit
.subckt my_opamp vp vn vo
E1 Vo 0 Vp Vn 1000
.ends
Subcircuit Example
example: subcircuit
X1 2 0 Vout my_opamp
R1 1 2 100
R2 2 Vout 100
V1 1 0 12
.tran 100m
.end
Thevenin
Thevenin
* THEVENIN EQ. SAMPLE
V 1 0 80
R5 4 2 400
R2 3 2 100
R4 4 3 100
R3 0 3 200
R6 4 0 1E8
R1 2 1 20
.op
.tf V(4) V
.end
Thevenin