PSPICE handout - Department of Electrical Engineering

advertisement
Sharif University of Technology
School of Electrical Engineering
Laboratory of Principles of Electrical Engineering
Fall 2010
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.
Sharif University of Technology © 2010








Non-linear DC analysis
Non-linear transient analysis
Linear AC Analysis
Noise analysis
Sensitivity analysis
Distortion analysis
Fourier analysis
Monte Carlo Analysis
Sharif University of Technology © 2010














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
Sharif University of Technology © 2010

Subcircuit: A subcircuit allows you to define a
collection of elements as a subcircuit (e.g. an
operational amplifier) and to insert this description
into the overall circuit.

EDIF: Electronic Design Interchange Format, a
standard published by EIA. Usually used for
netlists.
Sharif University of Technology © 2010





Input file for PSpice that has the file type “.CIR”
When a circuit is simulated “.OUT” 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
◦ *.SCH (the schematic data, itself)
◦ *.ALS (alias files)
◦ *.NET (network connection files)
Sharif University of Technology © 2010



These are files that contain reusable part data.
They can be custom or default ones
Some of the libraries available in the Evaluation
version of PSPICE are:
 abm.slb for special functions like square root and multipliers
 analog.slb for analog components like resistors and






capacitors
breakout.slb for pots
connect.slb, .plb for connectors
eval.slb, .plb for semiconductor, digital devices, switches
port.slb for grounds, high/low digital ports
special.slb for ammeters, viewpoints
source.slb for various analog and digital sources
Sharif University of Technology © 2010

Part is a basic building block which may
represent
◦
◦
◦
◦
One or more physical element
Function
Simulation model
When a part is placed for first time its entry is done
in “Design Cache”
What is “Design Cache”????... Go and Find Out Yourself 
Sharif University of Technology © 2010

Flat Design
◦ Small designs
◦ All pages in same schematic
◦ Off Page connectors are
used
◦ Figure shows design
hierarchy
Sharif University of Technology © 2010

Hierarchical Design
◦ Much complex designs
◦ Symbols are created called
“Hierarchical Blocks”
Sharif University of Technology © 2010




PSpice is not case sensitive
All element names must be unique
There must be a node designated
"0" (Zero). This is the reference
node against which all voltages
are calculated.
If any change is made in circuit
make sure you create netlist again
before simulating it.
Sharif University of Technology © 2010

File  New  Project  Analog or Mixed A/D
Make sure to choose Analog or Mixed A/D and proper location for project
Sharif University of Technology © 2010

Next comes following window
Make sure you select “Create a blank project”
Sharif University of Technology © 2010

This is how a typical “Schematic” Window will
look like
Sharif University of Technology © 2010
Sharif University of Technology © 2010

Now start placing components and
connecting them:
*Add a library as per the
requirement for eg. here analog
library has been added
**If using SPICE for first time,
click “Add Library” and select
all of the components.
Sharif University of Technology © 2010


After completing the circuit save it and run it.
Plot appropriate waveform by probing on
circuit.
Sharif University of Technology © 2010




Take example of a Resistor simple circuit
First we will follow initial steps of creating a
new project
Now placing the components.
To place a component, either press P button
on the keyboard or click on the part button
on the left-hand side of the SPICE interface.
Sharif University of Technology © 2010
Part Placements


Type in the name of the component.
E.g. type R for a Resistor or C for Capacitor
Sharif University of Technology © 2010


Imagine you want to analyze this circuit and
find the voltage of each point.
Draw the circuit in PSPICE. (Vs1=-10V & Vs2 = 5V)
Sharif University of Technology © 2010
Sharif University of Technology © 2010

Then in Simulation Setting choose “Time Domain”.
Sharif University of Technology © 2010

Then click on Run. The bias points are given.
Sharif University of Technology © 2010
Sharif University of Technology © 2010
For frequency response,
type in Vac in add
component window.
Sharif University of Technology © 2010
Probes
Sharif University of Technology © 2010


Go to PSPICE  New Simulation Profile
Give a name to profile and create
Sharif University of Technology © 2010


We can choose any of the analysis and options
Here AC analysis is done to see operation of filter.
Sharif University of Technology © 2010


Go to PSPICE  Run
Another waveform window will come up
See this window
to keep track of
current simulation
Sharif University of Technology © 2010
Sharif University of Technology © 2010
Sharif University of Technology © 2010
Sharif University of Technology © 2010
Sharif University of Technology © 2010
following and
Sharif University of Technology © 2010
Sharif University of Technology © 2010
Sharif University of Technology © 2010

V
Sharif University of Technology © 2010
Sharif University of Technology © 2010
Find Currents and voltages in the following circuits:
Sharif University of Technology © 2010
Norton Eq. Circuit
Thevenin Eq. Circuit
Sharif University of Technology © 2010

Find Thevenin and Norton Equivalent for the
following circuit using PSPICE, compare the
two equivalents.
Sharif University of Technology © 2010

1.Find out what this circuit does? Find corner
frequencies for case
Rework for these cases:
Sharif University of Technology © 2010

2. Find out what are the voltage and current
waveforms across a capacitor while being
charged and discharged. Rework the
procedure for the resistor. You need the
following setup: 0
C2
V1 =
V2 =
TD =
TR =
TF =
PW =
PER =
1
V3 U1
2
1n
R3V
I
1k
0
0
Sharif University of Technology © 2010







V1: Max. Value of Voltage
V2: Min. Value of Voltage
TD: Duration of Delay after which the signal is initiated
TR: Rise Time (e.g. for a periodic square wave is 1ns)
TF: Fall Time (e.g. for a periodic square wave is 1ns)
PW: Pulse Width
PER: Period
Sharif University of Technology © 2010
Sharif University of Technology © 2010

Use PSPICE to draw Vo-Vi Characteristic of
circuit in Fig. 12
Sharif University of Technology © 2010
Thanks for Your Attention
Good luck with SPICE…
Prepared by
Siavash Kananian
Fall 2010
Sharif University of Technology © 2010
Download