pspice final
DESCRIPTION
psice software details-developed by electrical and electronics department of university of berkeleyTRANSCRIPT
![Page 1: Pspice Final](https://reader033.vdocuments.us/reader033/viewer/2022061117/54683327af795969338b5c47/html5/thumbnails/1.jpg)
PSPICE
![Page 2: Pspice Final](https://reader033.vdocuments.us/reader033/viewer/2022061117/54683327af795969338b5c47/html5/thumbnails/2.jpg)
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.
![Page 3: Pspice Final](https://reader033.vdocuments.us/reader033/viewer/2022061117/54683327af795969338b5c47/html5/thumbnails/3.jpg)
![Page 4: Pspice Final](https://reader033.vdocuments.us/reader033/viewer/2022061117/54683327af795969338b5c47/html5/thumbnails/4.jpg)
ORCAD PSPICE
Using PSPICE the user can do three types of processesCaptureLayoutPSPICE A/D
![Page 5: Pspice Final](https://reader033.vdocuments.us/reader033/viewer/2022061117/54683327af795969338b5c47/html5/thumbnails/5.jpg)
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
![Page 6: Pspice Final](https://reader033.vdocuments.us/reader033/viewer/2022061117/54683327af795969338b5c47/html5/thumbnails/6.jpg)
Specifying a Circuit File
It has three main parts1. Element Statements : Describe the elements in the circuit
2. Control Statements : Describe the types of analyses to be performed
3. Output Statements : Specifies the output to be printed or plotted
The circuit is described as elements connected between nodes.
![Page 7: Pspice Final](https://reader033.vdocuments.us/reader033/viewer/2022061117/54683327af795969338b5c47/html5/thumbnails/7.jpg)
General Structure of a Circuit File
;Title Statement
Signal Source(s)
Element Statements
Control Statements
Output Statements
.end
![Page 8: Pspice Final](https://reader033.vdocuments.us/reader033/viewer/2022061117/54683327af795969338b5c47/html5/thumbnails/8.jpg)
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.
![Page 9: Pspice Final](https://reader033.vdocuments.us/reader033/viewer/2022061117/54683327af795969338b5c47/html5/thumbnails/9.jpg)
Elements
PSPICE allows modeling of circuits with both active and passive elements like o Resistor o Inductor o Capacitor o Diodeo Transistor
![Page 10: Pspice Final](https://reader033.vdocuments.us/reader033/viewer/2022061117/54683327af795969338b5c47/html5/thumbnails/10.jpg)
PSPICE Elements
![Page 11: Pspice Final](https://reader033.vdocuments.us/reader033/viewer/2022061117/54683327af795969338b5c47/html5/thumbnails/11.jpg)
Prefix for unitsCode Metric
PrefixDecimal
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
![Page 12: Pspice Final](https://reader033.vdocuments.us/reader033/viewer/2022061117/54683327af795969338b5c47/html5/thumbnails/12.jpg)
Data Statements - Sources
Independent DC Sources
Voltage Source : Vname n+ n- Type ValueCurrent Source : Iname n+ n- Type Value
Type: AC or DC E.g. Vin 1 0 dc 12 Is 3 4 dc 1.5
![Page 13: Pspice Final](https://reader033.vdocuments.us/reader033/viewer/2022061117/54683327af795969338b5c47/html5/thumbnails/13.jpg)
Example
V1 1 0 DC 10VV2 4 0 DC 34V
![Page 14: Pspice Final](https://reader033.vdocuments.us/reader033/viewer/2022061117/54683327af795969338b5c47/html5/thumbnails/14.jpg)
Passive Elements
SPICE considers the current always flows from the positive node through the element to the negative node.
ELEMENT PSPICE DESCRIPTION
Rname n+ n- value
Lname n+ n value
Cname n+ n- value
![Page 15: Pspice Final](https://reader033.vdocuments.us/reader033/viewer/2022061117/54683327af795969338b5c47/html5/thumbnails/15.jpg)
Example
![Page 16: Pspice Final](https://reader033.vdocuments.us/reader033/viewer/2022061117/54683327af795969338b5c47/html5/thumbnails/16.jpg)
Dependent Sources - VCVS
Voltage Controlled Voltage source Statement:Ename n+ n- nc+ nc- α
Example *Name n+ n- nc+ nc- gainEbar 17 8 42 18 24.0;
First letter always ‘E’
![Page 17: Pspice Final](https://reader033.vdocuments.us/reader033/viewer/2022061117/54683327af795969338b5c47/html5/thumbnails/17.jpg)
Voltage Controlled Current Source Statement:Gname n+ n- nc+ nc- γ
Example: *Name n+ n- NC+ NC γGlab 23 17 8 3 2.5
First letter always ‘G’
Dependent Sources - VCCS
![Page 18: Pspice Final](https://reader033.vdocuments.us/reader033/viewer/2022061117/54683327af795969338b5c47/html5/thumbnails/18.jpg)
Current Controlled Current Source Statement:Fname n- n+ VMonitor β Vmonitor n1 n2 DC 0V
First letter always ‘F’n1
n2
Dependent Sources - CCCS
![Page 19: Pspice Final](https://reader033.vdocuments.us/reader033/viewer/2022061117/54683327af795969338b5c47/html5/thumbnails/19.jpg)
Example:*Name n- n+ Vmonitor GainFtrn 81 19 Vctl 50.0Vclt 23 12 DC 0V ;controls Ftrn
n1
n2
Dependent Sources - CCCS
![Page 20: Pspice Final](https://reader033.vdocuments.us/reader033/viewer/2022061117/54683327af795969338b5c47/html5/thumbnails/20.jpg)
Current Controlled Voltage Source Statement:Hname n+ n- VMonitor gain Vmonitor n1 n2 DC 0V
First letter always ‘H’
Dependent Sources - CCVS
![Page 21: Pspice Final](https://reader033.vdocuments.us/reader033/viewer/2022061117/54683327af795969338b5c47/html5/thumbnails/21.jpg)
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.
![Page 22: Pspice Final](https://reader033.vdocuments.us/reader033/viewer/2022061117/54683327af795969338b5c47/html5/thumbnails/22.jpg)
Basic Analysis Types
DC Analysis .DC .OP
Transient Analysis .TRAN
AC Analysis .AC
![Page 23: Pspice Final](https://reader033.vdocuments.us/reader033/viewer/2022061117/54683327af795969338b5c47/html5/thumbnails/23.jpg)
Standard Analyses Commands .OP .DC .AC .TRAN .FOUR .NOISE .SENS
![Page 24: Pspice Final](https://reader033.vdocuments.us/reader033/viewer/2022061117/54683327af795969338b5c47/html5/thumbnails/24.jpg)
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
![Page 25: Pspice Final](https://reader033.vdocuments.us/reader033/viewer/2022061117/54683327af795969338b5c47/html5/thumbnails/25.jpg)
Example
V1 1 0 DC 10VV2 4 0 DC 34VR1 1 2 6ohmR2 2 3 4ohmR3 3 4 2ohm.OP.ENDex 1.1.cir
![Page 26: Pspice Final](https://reader033.vdocuments.us/reader033/viewer/2022061117/54683327af795969338b5c47/html5/thumbnails/26.jpg)
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>
![Page 27: Pspice Final](https://reader033.vdocuments.us/reader033/viewer/2022061117/54683327af795969338b5c47/html5/thumbnails/27.jpg)
.DC Statement – Linear Sweep
General Form.DC [LIN] <sweep variable name>+<start value> <end value> <increment value>
+[nested sweep specification]
![Page 28: Pspice Final](https://reader033.vdocuments.us/reader033/viewer/2022061117/54683327af795969338b5c47/html5/thumbnails/28.jpg)
.DC Statement - LIST
General Form
.DC <sweep variable name> [LIST] <value>*
+[nested sweep specification] Example
.DC V1 LIST 2 4 8 9 13
![Page 29: Pspice Final](https://reader033.vdocuments.us/reader033/viewer/2022061117/54683327af795969338b5c47/html5/thumbnails/29.jpg)
Output Control Commands
.PRINT .PLOT .PROBE .WATCH .VECTOR (for digital simulation)
![Page 30: Pspice Final](https://reader033.vdocuments.us/reader033/viewer/2022061117/54683327af795969338b5c47/html5/thumbnails/30.jpg)
Allows results from DC, AC, noise, and transient analyses to be an output to the output file. (print tables)
General Form.PRINT <analysis type> <output variable>* Example
.PRINT DC V(1,2) I(R4)
![Page 31: Pspice Final](https://reader033.vdocuments.us/reader033/viewer/2022061117/54683327af795969338b5c47/html5/thumbnails/31.jpg)
ExampleV1 1 0 DC 10VV2 4 0 DC 34VR1 1 2 6ohmR2 2 3 4ohmR3 3 4 2ohm.DC V1 LIST -34V +0V 34V.PRINT DC V(1,4) +I(R1).OP.END
ex 1.2.cir
![Page 32: Pspice Final](https://reader033.vdocuments.us/reader033/viewer/2022061117/54683327af795969338b5c47/html5/thumbnails/32.jpg)
.PLOT
Causes results from DC, AC, noise, and transient analyses to be line printer plots in the output file.
General Form.PLOT <analysis type> [output variable]*
+ ([<lower limit value>,<upper limit value>])*
Example:
.PLOT TRAN V(2)
![Page 33: Pspice Final](https://reader033.vdocuments.us/reader033/viewer/2022061117/54683327af795969338b5c47/html5/thumbnails/33.jpg)
Example
V1 1 0 DC 10VV2 4 0 DC 34VR1 1 2 6ohmR2 2 3 4ohmR3 3 4 2ohm.DC LIN V1 0V 34V 1V.PLOT DC V(1,4).OP.ENDex 1.3.cir
![Page 34: Pspice Final](https://reader033.vdocuments.us/reader033/viewer/2022061117/54683327af795969338b5c47/html5/thumbnails/34.jpg)
.PROBE
Writes the results from DC, AC, and transient analyses to a data file used by Probe
General Form
.PROBE [output variable]* Example
.PROBE V(2)I(R5)
![Page 35: Pspice Final](https://reader033.vdocuments.us/reader033/viewer/2022061117/54683327af795969338b5c47/html5/thumbnails/35.jpg)
Example
V1 1 0 DC 10VV2 4 0 DC 34VR1 1 2 6ohmR2 2 3 4ohmR3 3 4 2ohm.DC LIN V1 0V 34V 1V.PROBE.OP.END
ex 1.4.cir
![Page 36: Pspice Final](https://reader033.vdocuments.us/reader033/viewer/2022061117/54683327af795969338b5c47/html5/thumbnails/36.jpg)
Circuit File Processing Commands .END
Marks the end of the circuit.
Can there be more than one .END commands
in a .cir file?
![Page 37: Pspice Final](https://reader033.vdocuments.us/reader033/viewer/2022061117/54683327af795969338b5c47/html5/thumbnails/37.jpg)
Find the currents in each branch using PSPICE
01
2 3
i2
i6
i4i3
i1>
>
|v |
i5 >
_
_
_>
-
R66 ohm
R53 ohmR4
3 ohm
R31 ohm
R22 ohm
R12 ohm
Is112A
Is1 1 2 12AR1 2 3 2R2 2 3 2R3 1 0 1R4 1 0 3R5 3 0 3R6 0 3 6.DC Is1 LIST 12A.PRINT DC I(R1) +I(R2) I(R3)I(R4) +I(R5) I(R6).OP.END
kcl.cir
![Page 38: Pspice Final](https://reader033.vdocuments.us/reader033/viewer/2022061117/54683327af795969338b5c47/html5/thumbnails/38.jpg)
Find the voltages at nodes 1,2 ,3
0
2 31
R48 ohm1/4 v2
R31 ohm
R26 ohm
R12 ohm
+
-
Vs13V
Vs1 1 0 3VR1 1 2 2ohmR2 2 0 6ohmR3 2 3 1ohmG1 3 0 2 0 0.25R4 3 0 8ohm.DC Vs1 LIST 3V.PRINT DC V(1) +V(2) V(3).OP.END
nodal.cir
![Page 39: Pspice Final](https://reader033.vdocuments.us/reader033/viewer/2022061117/54683327af795969338b5c47/html5/thumbnails/39.jpg)
Find Thevenin Equivalent of the circuit to the left of points a and b
0
1 2 3
Is215A
R36 ohm
R23 ohm
R12 ohm
Is115A
+
-
Vs220V
R51 ohm
Is215A
R36 ohm
R23 ohm
R12 ohm
Is115A
+
-
Vs220V
R51 ohm a
b
![Page 40: Pspice Final](https://reader033.vdocuments.us/reader033/viewer/2022061117/54683327af795969338b5c47/html5/thumbnails/40.jpg)
Determination of Open Circuit Voltage
321
0
Is215A
Is115A
+
-
Vs220V
R36 ohm
R12 ohm
R51 ohm
Vs2 1 0 20VR5 1 2 1R1 2 3 2R3 1 3 6Is1 2 0 15AIs2 2 3 15A.DC Vs2 LIST 20V.PRINT DC V(3).OP.END
thevenin.cir
![Page 41: Pspice Final](https://reader033.vdocuments.us/reader033/viewer/2022061117/54683327af795969338b5c47/html5/thumbnails/41.jpg)
Determination of output Resistance
321
0
+
-
Vs15V
R36 ohm
R12 ohm
R51 ohm
Vs2 1 0 0VR5 1 2 1R1 2 3 2R3 1 3 6VS1 3 0 5V.DC Vs1 LIST 5V.PRINT DC V(3) +I(VS1).OP.END
thevenin.cir
![Page 42: Pspice Final](https://reader033.vdocuments.us/reader033/viewer/2022061117/54683327af795969338b5c47/html5/thumbnails/42.jpg)
Find the Norton Equivalent of the circuit to the left of the points a and b
0
1 2 3+
-
v
+
-
v1 1/4 V1R4
8 ohmR36 ohm
R21 ohm
R12 ohm
+
-
Vs13V
0
1+
-
vR6
8 ohmR5
1.82 ohm
Is10.675A
a
b
a
b
![Page 43: Pspice Final](https://reader033.vdocuments.us/reader033/viewer/2022061117/54683327af795969338b5c47/html5/thumbnails/43.jpg)
Determination of short circuit current
v1
-
+
321
0
isc|v
1/4 V1+
-
Vs13V
R36 ohm
R21 ohm
R12 ohm
v1
-
+
321
0
isc|v
+
-
Vs20V
1/4 V1+
-
Vs13V
R36 ohm
R21 ohm
R12 ohm
Vs1 1 0 3VR1 1 2 2R2 2 3 1R3 2 0 6Vs2 3 0 0VG1 3 0 2 0 0.25.DC Vs1 LIST 3V.PRINT DC I(Vs2).OP.END
norton.cir
![Page 44: Pspice Final](https://reader033.vdocuments.us/reader033/viewer/2022061117/54683327af795969338b5c47/html5/thumbnails/44.jpg)
Determination of output Resistance
v1
-
+
32
0
+
-
Vs25V1/4 V1
R36 ohm
R21 ohm
R12 ohm
Vs1 1 0 0VR1 1 2 2R2 2 3 1R3 2 0 6Vs2 3 0 5VG1 3 0 2 0 0.25.DC Vs2 LIST 5V.PRINT DC I(Vs2) +V(3).OP.END
norton.cir
![Page 45: Pspice Final](https://reader033.vdocuments.us/reader033/viewer/2022061117/54683327af795969338b5c47/html5/thumbnails/45.jpg)
.PARAM
Defines the value of a parameter. A parameter name can be used in place of most
numeric values in the circuit description. Parameters can be constants, or expressions
involving constants, or a combination of these, and they can include other parameters.
Examples .PARAM VSUPPLY = 5V
.PARAM VCC = 12V, VEE = -12V.PARAM BANDWIDTH = 100kHz/3
![Page 46: Pspice Final](https://reader033.vdocuments.us/reader033/viewer/2022061117/54683327af795969338b5c47/html5/thumbnails/46.jpg)
.STEP
The .STEP command performs a parametric sweep for all of the analyses of the circuit.
General form .STEP LIN <sweep variable name> <start value>
+<end value> <increment value>
Examples
.STEP VCE 0V 10V .5V
.STEP LIN I2 5mA -2mA 0.1mA
.STEP LIN PARAM Res .5k 10k .5k
![Page 47: Pspice Final](https://reader033.vdocuments.us/reader033/viewer/2022061117/54683327af795969338b5c47/html5/thumbnails/47.jpg)
Example – Plot the variation in power absorbed by load R2 as it varies between 500Ω and 10kΩ. When is it the maximum ?
VS1 1 0 DC 5VR1 1 2 5kR2 2 0 Res.PARAM Res 4K.STEP LIN PARAM Res .5k 10k .5k .DC VS1 LIST 5V.PROBE.OP.END
param.cir
![Page 48: Pspice Final](https://reader033.vdocuments.us/reader033/viewer/2022061117/54683327af795969338b5c47/html5/thumbnails/48.jpg)
Source: http://www.tdpcb.com/images/pcb6.JPG