Laboratory #2 PSpice Analyses

advertisement
© EE, NCKU All rights reserved.
Laboratory #2
PSpice Analyses
I. Objectives
1.
2.
3.
4.
Know the development of SPICE.
Learn to install the PSpice software.
Learn to use the Capture CIS to draw circuit.
Learn to use the four analyses provided by PSpice.
(1)
(2)
(3)
(4)
Bias point analysis
DC sweep analysis
AC sweep analysis
Transient analysis
II. Components and Instruments
1. Components
(1) Not required
2. Instruments
(1) Computer with OrCAD PSpice installed
III. Reading
There are lots of resources for PSpice learning either in
library or the internet. For example, a brief primer is provided in
the University of Pennsylvania website, which gives more detail
introduction for PSpice operation.
http://www.seas.upenn.edu/~jan/spice/PSpicePrimer.pdf
IV. Preparation
1.
Brief introduction
To complete an electronic product, it needs the processes of
design (approximate calculation), verification (measurement),
manufacture and quality control.
Before SPICE’s invention, the designed circuit is verified through
breadboard and instruments (power supply, signal generator,
oscilloscope, etc). Such verification is actually not efficient either in
time or cost, since wrong connection or design would most probably
happen. Especially for IC, which is composed of thousands of
transistors or much more components, is absolutely not possible to
verify the function using breadboard. Other than that, high cost of
電子學實驗(一) Electronics Laboratory (1), 2013
p. 2-1
成大電機 EE, NCKU, Tainan City, Taiwan
© EE, NCKU All rights reserved.
manufacturing prerequisites for IC requires that the designed IC is
predicted almost perfect.
In order to solve such problems, SPICE is thus invented.
SPICE is abbreviated from Simulation Program with Integrated
Circuit Emphasis, which is developed at the Electronics Research
Laboratory of the University of California, Berkeley, is a bundle of
programs. To SPICE, we could consider it as software-type
breadboard, but much more powerful than breadboard. SPCIE has
virtual probes, measurement (more accurate calculation), which
speeds up the verification process and makes mass production of IC
to be possible.
Nowadays, there are different commercialized SPICEs in the
market and they are used in different orientations: OrCAD PSpice of
Cadence for regular simulation, ICAP4 IsSpice of IntuSoft for power
application and HSpice of Synopsys for accurate simulation.
2.
Setup guide
The PSpice software could easily be obtained from the back
cover of the text book “Microelectronics Circuits 6th edition,
Sedra/Smith”. Launch the CD-ROM and install the PSpice as the
directions in the setup processes.
Click the “Link to Simulation Software Cadence○
R OrCAD○
R ” to
download the PSpice software. The CD-ROM also contains SPICE
examples and sedra_lib, which you will need in some Pre-Lab
simulations.
電子學實驗(一) Electronics Laboratory (1), 2013
p. 2-2
成大電機 EE, NCKU, Tainan City, Taiwan
© EE, NCKU All rights reserved.
After clicking the “Link to Simulation Software Cadence ○
R
OrCAD○
R ”, you will enter the website shown as below. Click the
“OrCAD PCB Designer Lite DVD (Capture & PSpice only)” and select
the “Download Free” option.
Fill in the required information and your email, and you will
receive a link in your email. Click this link and select the “OrCAD 16.5
Demo Software (Capture and PSPICE only)” under “OrCAD Demo
Software” to download the installer.
電子學實驗(一) Electronics Laboratory (1), 2013
p. 2-3
成大電機 EE, NCKU, Tainan City, Taiwan
© EE, NCKU All rights reserved.
Especially note that, there are three items should be selected, a.
Capture CIS (for circuit drawing); b. PSpice (circuit simulation) and c.
Layout (printed circuit board), which will be used in this lab
experiment. These three items are used separately in normal circuit
design flow.
3.
Use of Capture CIS
(1) Opening a new project
From the design flow above, we know that have to draw a circuit
before all the steps. So, we need “Capture CIS” to help us. To start
the program, we click on “Start (開始)” and follow “All Programs (程式
電子學實驗(一) Electronics Laboratory (1), 2013
p. 2-4
成大電機 EE, NCKU, Tainan City, Taiwan
© EE, NCKU All rights reserved.
集)”, “Orcad Family Release 9.2 Lite Edition”, and “Capture CIS Lite
Edition”. Next, we are going to open a new project, the displayed
window is as below. When opening a new project, it should note
either in the “Name” or “Location” column, only English typing is
allowed.
(2) Placing part (electrical components)
After this setting, a new project and a blank schematic are
thus ready for drawing circuit. To place parts, click the button at
the right toolbar.
When first using the new project, there are no any added
libraries. To add libraries, we can follow the instructions shown
as below. The libraries are in “.olb” for its file extension and they
are under the folder of “C:\Program Files\OrcadLite\Capture
電子學實驗(一) Electronics Laboratory (1), 2013
p. 2-5
成大電機 EE, NCKU, Tainan City, Taiwan
© EE, NCKU All rights reserved.
\Library\PSpice” (XP version). Each library contains different
parts (components), select the specified libraries if you are sure
of it. Figure next to the instructions shows frequently used
components while designing circuit.
(3) Wiring parts together
To wire parts together, click the button as the figure below
and click on two points where need a connection. Especially note
that whether the “junction” exists or not when it needs a
connection there. As the figure below, R1, C1 and L1 are
connected together in the left circuit; while R2, L2 are not
connected in the right circuit.
電子學實驗(一) Electronics Laboratory (1), 2013
p. 2-6
成大電機 EE, NCKU, Tainan City, Taiwan
© EE, NCKU All rights reserved.
(4) Editing parts’ properties
There are mainly two properties we used to edit, “Part
Reference” and “Value”. For instance, double click “R1” can edit
its “Part Reference”. This is needed when the same “Part
Reference” is occurred, and it is not accepted while compiling
(netlist generating). It is similar method for editing “Value”.
4.
Circuit analyses
(1) Setting of Ground part (component)
While drawing circuit in Capture CIS, the ground should first
be set, or else the compilation (netlist generation) will generate
an error message. To set the ground component, double click on
it and the following window would be displayed. Change the
content in the “Name” column into “0”, close that window and
電子學實驗(一) Electronics Laboratory (1), 2013
p. 2-7
成大電機 EE, NCKU, Tainan City, Taiwan
© EE, NCKU All rights reserved.
thus complete the setting of ground component.
(2) There are four analyses illustrated below and related examples
come with them. These are examples are simple, but meaningful
when first using PSpice.
(3) Bias point analysis
The purpose of this analysis is to observe the voltage and
current at steady state. First of all, the designed circuit is drawn
using “Capture CIS”. Here, we are going to observe the simple
Ohm’s law for this circuit. Before the simulation, we have to open
a “New Simulation Profile”. The window in the next figure will be
shown after choosing that option. In “Simulation Setting”, we
have to choose “Bias Point”, and there is no any other
modification.
電子學實驗(一) Electronics Laboratory (1), 2013
p. 2-8
成大電機 EE, NCKU, Tainan City, Taiwan
© EE, NCKU All rights reserved.
To start running the simulation, click on the Run PSpice
button. After simulation, the simulation result as the right side can
be obtained by using the three buttons enable bias voltage,
current and power display.
(4) DC sweep analysis
The purpose of this analysis is to sweep input voltage and
observe output current. Here, we are going to observe the
relationship between voltage and current in Ohm’s law for this
circuit. Note that the current marker should be connected at PIN.
電子學實驗(一) Electronics Laboratory (1), 2013
p. 2-9
成大電機 EE, NCKU, Tainan City, Taiwan
© EE, NCKU All rights reserved.
Similar to the setting in “Bias point analysis”, we have to
open a “New Simulation Profile” before the simulation. Since we
already have a simulation profile, we can choose “Edit Simulation
Profile” instead. In “Simulation Setting”, we have to choose “DC
point”. In the column of “Sweep variable”, it is needed to choose
the sweeping source and type in its name, such as V1 here. In
the column of “Sweep type”, “Linear” means the input voltage is
swept in the form of 1, 3, 5…; while “Logarithmic” means the
input voltage is swept in the form of 1, 10, 100…
To start running the simulation, click on the “Run PSpice”
button. Another window “PSpice A/D Lite” would pop up to show
the simulation result. We can observe that the Y-axis is current
and X-axis is voltage, and they are in linear relationship.
電子學實驗(一) Electronics Laboratory (1), 2013
p. 2-10
成大電機 EE, NCKU, Tainan City, Taiwan
© EE, NCKU All rights reserved.
(5) AC sweep analysis
The purpose of this analysis is to sweep input frequency and
observe output response. Here, we are going to observe the
frequency response of RC network which had been learnt in
“Electronics lesson”. The transfer function for the circuit shown is
as below which has one pole at ω=1/CR.
Vo  s 
1

Vi  s  1  sCR
In the column of “AC Sweep Type”, it is just similar to the
setting in “DC sweep analysis”. But here, it is normally going to
sweep in logarithmic way. Especially note that, in AC sweep
電子學實驗(一) Electronics Laboratory (1), 2013
p. 2-11
成大電機 EE, NCKU, Tainan City, Taiwan
© EE, NCKU All rights reserved.
analysis, the source is component, VAC.
To start running the simulation, click on the Run PSpice
button. In the simulation result, we can observe the pole’s
frequency is around 320 kHz, which matches with the transfer
function provided (ω=1/CR).
In previous part, the trace is shown based on the voltage or
current marker added. Now, in this part, we need to add traces
“Gain” and “Phase”. Choose the option of “Add Trace” in window
of “PSpice A/D Lite”. Then, in the window of “Add trace”, there
are two columns, “variables” and “functions”. For instance, in
order to add the trace of gain plot, choose the dB function at the
right column, then choose the related variable in the left column.
電子學實驗(一) Electronics Laboratory (1), 2013
p. 2-12
成大電機 EE, NCKU, Tainan City, Taiwan
© EE, NCKU All rights reserved.
Other than that, we may need to add parallel simulation
result in one window to compare the waveforms, such as gain
and phase. To do this, click on “Add Plot to Window” and a new
plot would be generated.
(6) Transient analysis
The purpose of this analysis is to sweep time variable and
observe the time-variant voltage or current. Here, we are going
to compare the input voltage and output voltage, where they are
different in amplitude and phase. We can explain this
phenomenon based on the simulation result in AC sweep
analysis. Similar to the previous setting, here, we have to choose
電子學實驗(一) Electronics Laboratory (1), 2013
p. 2-13
成大電機 EE, NCKU, Tainan City, Taiwan
© EE, NCKU All rights reserved.
“Time Domain (Transient)”. “Run to time” means what time do
you want to stop the time sweeping. “Maximum step size” means
the time sweeping accuracy, the smaller the step size, the
simulation result is more accurate.
Having insight into the RC network, various input
frequencies (50 kHz, 300 kHz and 1000 kHz) are applied. These
frequencies are set around the 3-dB pole frequency to observe
the pole’s effect.
電子學實驗(一) Electronics Laboratory (1), 2013
p. 2-14
成大電機 EE, NCKU, Tainan City, Taiwan
© EE, NCKU All rights reserved.
The derivation provided here is based on the Bode plot
shown in AC sweep analysis. As the input frequency is 50 kHz,
the gain is around 0 dB and phase delay is not obvious. As the
input frequency is 300 kHz, which is around 3-dB pole and the
phase delay is around 45o. As the input frequency is 1000 kHz,
the attenuation is much more obvious and the phase delay is
around 90o.
Through these analyses, we could have a quick
understanding on specified circuit without implementing on the
PCB and real measuring.
5.
Editing parts (components)
If we would like to simulate MOSFET other than the parts
provided in OrCAD PSpice, we need to open a new library and modify
its parameters. Since we are going to modify a MOSFET, we could
open a new part based on the PSpice provided MOSFET. So, follow
the instructions shown below, we could copy the parts (IRF150) and
paste it in the new library.
電子學實驗(一) Electronics Laboratory (1), 2013
p. 2-15
成大電機 EE, NCKU, Tainan City, Taiwan
© EE, NCKU All rights reserved.
After copying the parts under the new library, we can modify
both its name and displayed picture. There are tools at the right
side to draw a line, an arrow or other shapes. To edit the
parameters, follows the next instruction figures. The electrical
parameters could be found in the related companies.
電子學實驗(一) Electronics Laboratory (1), 2013
p. 2-16
成大電機 EE, NCKU, Tainan City, Taiwan
© EE, NCKU All rights reserved.
V. Exploration
1.
Re-do the four examples as shown in this report, which come with the
introduction of four analyses. Show the simulation results as what we
have done.
(1) Bias point analysis and (2) DC sweep analysis (Ohm’s law)
(3) AC sweep analysis (transfer function)
(4) Transient analysis
電子學實驗(一) Electronics Laboratory (1), 2013
p. 2-17
成大電機 EE, NCKU, Tainan City, Taiwan
© EE, NCKU All rights reserved.
Laboratory #2 Pre-lab
Class:
Name:
1.
Student ID:
Obtains the PSpice CD-ROM from the text book, “Microelectronics
Circuits 5th/6th edition, Sedra/Smith” and install it in your own
computer. Familiarize with this software. (This does not need any
answer)
2.
What is the newest version of OrCAD demo at Cadence official
website? And, what is the version do you get from Smith’s text book?
3.
Do you know that nodal analysis is chosen instead of mesh analysis
when developing SPICE? What conditions support nodal analysis?
4.
What benefits will you expect that SPICE would bring to you while
you are designing an electronic circuit? List down as much as you
can think.
電子學實驗(一) Electronics Laboratory (1), 2013
p. 2-18
成大電機 EE, NCKU, Tainan City, Taiwan
© EE, NCKU All rights reserved.
Laboratory #2 Report
Class:
Name:
Student ID:
 Exploration 1
1.
Bias point analysis (Ohm’s law)
(1) Simulation result
2.
DC sweep analysis (Ohm’s law)
(1) Simulation result
3.
AC sweep analysis (RC network)
(1) Simulation result
4.
Transient analysis (RC network)
(1) Simulation result 1
(2) Simulation result 2
(3) Simulation result 3
電子學實驗(一) Electronics Laboratory (1), 2013
p. 2-19
成大電機 EE, NCKU, Tainan City, Taiwan
© EE, NCKU All rights reserved.
 Problem 1
There are four other circuits shown below and you are required to
complete them with the related instructions.
1.
Use OrCAD Capture CIS to draw the circuit as below and try to
analyze it with the “Bias point analysis” in PSpice.
(1) Observe the bias points in the circuit.
(2) Verify the simulation result with your hand calculation, Ohm’s law.
Is that matched?
2.
Use OrCAD Capture CIS to draw the circuit as below and try to
analyze it with the “DC sweep analysis” in PSpice.
(1) Observe the relationship of Id to Vds.
(2) Show the ohmic and saturation region on the simulation result.
3.
Use OrCAD Capture CIS to draw the circuit as below and try to
analyze it with the “AC sweep analysis” in PSpice.
(1) Observe the frequency response of signal Vo.
(2) Verify the simulation result with your hand calculation, transfer
function. Is that matched?
電子學實驗(一) Electronics Laboratory (1), 2013
p. 2-20
成大電機 EE, NCKU, Tainan City, Taiwan
© EE, NCKU All rights reserved.
4.
Use OrCAD Capture CIS to draw the circuit as below and try to
analysis it with the “Transient analysis” in PSpice.
(1) Observe the relationship between signals Vi and Vo.
(2) What are the differences between waveforms Vi and Vo? What
phenomena do you observe at the instance when the input rising
or falling?
 Conclusion
(Remark: this report is provided you a format, more meaningful comment or
understanding on your simulation result is welcome)
電子學實驗(一) Electronics Laboratory (1), 2013
p. 2-21
成大電機 EE, NCKU, Tainan City, Taiwan
Download