Professional Documents
Culture Documents
Slide credits
This presentation is based on the examples given in the following
book
Nilsson,J.W . Introduction to SPICE: Third edition electric circuits.
Addison Wesley Publishing company, 1990.
Dr.Sher
2
Contents
Dr.Sher
3
Dr.Sher
5
What is PSPICE ?
It is a mainframe version of SPICE by microsim.
What is SPICE ?
Simulation Program with Integrated Circuit Emphasis
Based on nodal analysis
HSPICE
RAD-SPICE
IG-SPICE
I-SPICE
PSPICE
Dr.Sher
6
Dr.Sher
7
Input impedance can only be calculated after running the graphic post
processor.
Distortion analysis is not possible.
Dr.Sher
8
How it works ?
We create a source file for the circuit.
Describe the circuit
Type of analysis
Specify the output
Dr.Sher
9
Circuit description
Define
Nodes
Elements with values
Element models
Sources
Type of analysis
Output command
Format of output files
Dr.Sher
10
<R><1><2><100>
R 1 2 100
Initial condition if
L 2 3 5m
any
L 2 3 5M IC=5
Remember MEGA in PSPICE is MEG.
Dr.Sher
13
AC source code
<name><positive node><negative node><type>(value)
Vac 1 0 sin (0 312 50)
Starting value
Frequency
Dr.Sher
14
Dr.Sher
16
DC sweep (.DC)
Bias point (.OP)
DC sensitivity (.OP)
Transfer Function (.TF)
DC small signal sensitivities (.SENS)
Noise Analysis
Transient response
Fourier analysis
Monte carlo
Temperature
DC analysis is automatically performed just by describing the circuit (see
Example 1)
Dr.Sher
17
Example 1
Example 1
F1 0 1 Valpha 0.1
Valpha 0 5 DC 0
R1 1 4 10
R2 4 0 22
V1 2 1 DC 20
R3 2 3 2
R4 3 4 3.6
R5 3 5 68
.end
Dr.Sher
Example 1 (Cont)
Dr.Sher
20
Example 2
Dr.Sher
21
Example 2 (Cont..)
Example 2
I1 0 1 DC 24
Vdelta 1 3 DC 0 Dummy voltage source added to measure the branch current
H1 2 0 Vdelta 20.3846
R1 1 0 5
R2 3 0 20
R3 1 2 1
OUTPUT
Node 1 : 104 V
.end
Node 2 : 106 V
Node 3 : 104 V
Dr.Sher
22
Example 3 . DC analysis
If more in-depth analysis is required four options are available.
.OP
.DC
.TF
.SENS
Dr.Sher
23
Dr.Sher
24
Dr.Sher
25
.DC command can also be used to sweep two variables. (Remember IV curve of diode ?)
.DC<Source A><First Value>< Last value><Increment A> <Source B><First Value>< Last value><Increment B>
Dr.Sher
27
Dr.Sher
29
Dr.Sher
30
Thevenin resistance
32
Dr.Sher
33
Dr.Sher
34
Vth
Dr.Sher
Rth
36
Dr.Sher
Dr.Sher
40