Professional Documents
Culture Documents
Circuit Simulation and Analysis PDF
Circuit Simulation and Analysis PDF
lu v (- r; q i i l :>M"ll::".~ """'"
j", ~ t:\ ..".t '
Contributing Editor
Edith Lennon, N2ZRW
Production
Shelly Bloom, WB 1ENT
Jodi Morin, KA1JPA
Maty Weinberg, KB1EIB
David Ping ree, N1NAS
Cover Design
Sue Fagan, KB10KW
Copyright © 2013 by
The American Radio Relay League, Inc.
ISBN: 978-1-62595-005-5
First Edition
First Printing
1 Introduction
2 The DreAD User Interface
3 Netlist Element Lines
4 Basic Simulation Types
5 Netlist Control Lines
6 The PSpice Probe Tool
7 Semiconductors
8 Miscellaneous Components
9 Transmission Lines
10 Subcircuits
11 Sample Circuits
12 Advanced Analysis
Appendix: Low-Pass Filter, Operational Amplifier,
Phase-Shift Oscillator, Astable Multivibrator, Hartley Oscillator
Foreword
The circuit design proce ss is usually interactive, with testing along
the way to ensure that a circuit performs as expected, followed by design
changes and more testing. The time-honored way to do this was to build a
physical prototype, test it over a range of range of operating voltages, sig-
nal levels, temperatures and other factors, tweak it and test some more.
In the 1970s, scientists at the Universit y of California, Berkeley, de-
veloped Simulated Program 'with Integrated Circuit Emphasis (SPICE), a
program for simulating circuits on a mainframe computer. Now engineers
could create, analyze and modify circuits using software, coming much
closer to the final design before soldering a single component.
Fast-forward to today, and SPICE, along with its derivatives, is
hugely popular for predicting the behavior of electronic circuits. PSpice
from Cadence Design Systems is a version of SPICE that runs on per-
sonal computers and offers many features, component libraries and
tools for circuit designers. Anyone performing circuit analysis or design
should have a working knowledge of PSpice in order to save time and
gain insight into circuit behavior by answering "what if' questions with
a computer simulation. Students, profe ssional s and hobbyi sts already fa-
miliar with traditional methods of circuit analysis will find PSpice to be
an important tool for learning circuit analysis and design and for testing
electronic circuits in ways they could not easily do in many laboratories.
In the book , Dr Saeid Mo slehpour introduces readers to the basic
functions and tools needed to create simple circuits and analyze their be-
havior using PSpice. To get the most from this book, readers are expected
to obtain a version of this software (see Chapter I), and follow along with
the examples.
Introduction
Introduction 1-1
analyze circuits in order to successfully solve circuit problems with PSpice,
any more than one needs a working knowledge of internal combustion
engines to drive a car. However, it is vitally important for anyone using
SPICE (or any other computer analysis /design program) to be a competent
practitioner in the field of electrical and computer engineering. Only in that
way can one check the correctness and reasonableness of the computer's
answers by estimation using sound engineering judgment and/or by working
a sample problem through by conventional means.
PSpice Overview
PSpice is a PC version of SPICE that runs on personal computers
and offers many improvements over other releases. SPICE, along with
its derivatives, is the most popular computer program in the world today
for predicting the behavior of electronic circuits. It was developed by the
Integrated Circuits Group of the Electronics Research Laboratory and
the Department of Electrical Engineering and Computer Sciences at the
University of California, Berkeley, California. The person credited with
originally developing SPICE is Dr. Lawrence Nagel, whose PhD thesis
describes the algorithms and numerical methods used in SPICE. The
software has undergone many changes since it was first developed, and it
continues to evolve .
SPICE is a large (over 17,000 lines of Fortran source code), powerful,
and extremely versatile industry-standard program for circu it analysis and
IC design . A significant number of companies have customized Berkeley's
SPICE for in-house circuit development work. Many software packages
based on SPICE have been developed which use the SPICE2 program, also
from Berkeley, as the core for performing circuit analysis. Most of these
have added useful programs to make the complete package easier to use.
For example, SPICE2 is not interactive, it does not have the capability to
reference a library of semiconductor components, and its graphs are made
on a line printer using American Standard Code for Information Interchange
(ASCII) symbols. Although it did not feature interactive libraries, it enabled
the user to create models for metal -oxide-semiconductor field-effect
transistors (MOSFETs), bipolar junction transistors (BJTs), field-effect
transistors (FETs), and diodes. Some of the commercially available packages
are interactive, include extensive libraries of parts, and have graphics post-
processors that make professional-looking graphs.
SPICE3 was developed in the late 1980s, modified, and rewritten using
the general purpose programming language C. The first stable release of
SPICE3, in 1993, featured advanced component models for MOSFETs.
Initially, SPICE relied on a mainframe-based operation and has since been
1·2 Chapter 1
modified to function on some of the more common operating systems and
personal computers. With this innovation, the acro nym has been amended
from SPICE to PSpice, the P, of course, standing for personal.
At the time, OrCAD, short for Oregon Compu ter A ided Design, was
becoming increasingly popular in the design industry for its ability to create
schematic representations of designs and printed circuit board layouts.
Founded in Hillsboro, Oregon, in 1985 by John Durbetaki and Ken and
Keith Seymour as OrCAD Systems Corporation, the company was acqui red
in the late 1990s by Cade nce Design Systems to be used in conjunction with
the advanced PSpice simulators to funct ion as a schematic capture software
program to interpret a schematic design input by a user for simulation
purposes. Thi s is vastly different from some of the prim itive versio ns of
SPICE that required the user to enter a schematic design into the software by
means of a netlist , a text representation of a schematic derived by the user.
As of this wr iting , the most recent release of the OrCAD /PSpice
software is version 16.6.1 PSpi ce, and other packages based on it, will be
around and widely used for many years to come. As you read this book,
you will see that PSpice, though developed for the design of integrated
circ uits, can be used to sol ve a great variety of non-IC circuit problems
involving power supplies, three -phase power systems, tran smission lines ,
and nonlinear components, to name a few applications. Anyone performing
circuit analysis or design should have a working knowledge of PSpice in
order to save time and money and to gain insight into circuit behav ior
by answering "what if' questions with a computer simulation. "What if'
questions are freq uently not answered if the tedium involved in doing so
outweighs the curiosity of the person asking the question.
Students, profes sionals and hobbyists will find PSpice to be an important
tool for learning circuit analysi s and design and for testing electronic circuits
in ways they could not easily do in many laboratorie s. By learning a version
of SPICE, users will be preparing for the kind of circuit simulation they will
encounter in indu stry. They should, however, be competent in traditional
methods of circuit analysis before embarking on computer methods.
A Word on Nomenclature
Severa l different packages of the Cadence design and analysis software
are available and were used in preparation of this book . At the time the
book was written , Version 16.5 was most current, but version 16.6 is now
available. Regardless of where it was obtained, the software packages are
ident ical and feature s differ only in name. In later chapters of this book you
will see examples created with the various packages.
Introduction 1-3
EMA Design Automation
If the software is obtained from EMA Design Automation (www.ema-
eda.com), the software will be called:
Schematic capture - DrCAD Capture or DrCAD Capture CIS
Circuit simulation - PSpice ND or PSpice Adv anced Analysis
Demo Version
Demo versions are available for download from the Cadence website
at www.cadence.com/pl·oducts/orcad/pages/downloads.aspx. The demo
package includes DrCAD Cap ture CIS Lite and PSpice AID Lite, which are
fully functional versions that can be used to explore the examples in this
book. There are some limitations on circuit and analysis complexity, but
these are very useful and powerful tools.
Support Files
Modeling files for some of the examples described in this book are
available from the ARRL website at www.ar rl .or glcircuit-simulation.
Notes
'Source for company history and development, www.fundinguniverse.com/company-
histories/cadence-design-systems-inc-history/.
1·4 Chapter 1
Chapter 2
In the last chapter, the main topics of disc ussion were an overview
of the Cadence software. You were also provided with a brief history, an
outline of the different incarnations of the Cadence/PSpice software, and a
few general statements giving an overview of its capabilities.
2-2 Chapter 2
placement, part placement, net alias naming, and ground placement and
will be covered in this chapter (see Figure 2.3).
The buttons across the top are shortcut buttons for file management
options, such as saving, opening, and creating new files, in addition to a
ZO OM function. The ZO OM function can change the user's perspective of
the schematic design: zooming in or out allows for a close-up view of a
particular portion of the schematic or a wide view of the schematic as a whole.
Other buttons along the top of the screen can be used to place measurement
probes and create a simulation profile that defines the parameters of the
simulation to be conducted on a given circuit (we will discuss all of these
cadence in the following examples).
The remaining central portion of the screen is the workspace, which
is where the user can develop or draw a schematic design, placing and
connecting components from the PSpice libraries within the software. Also,
take notice of the text box in the lower right corner of the workspace. In this
text box, you can provide a title and description for the schematic design .
This can be especially helpful when performing analysis on complex projects.
When working on a project with multiple pages and schematic designs, titles
and descriptions can help you differentiate one design from another.
Before developing and testing a schematic design, you must ensure
you have the desired components and libraries available in the Design Entry
software. To do so, click the PLAC E PART button on the toolbar at the right
of the screen (shown highlighted in Figure 2.4). After clicking the PLACE
PART button on the toolbar, the right side of the
• • • • •~ (a!l!!ld~
e n~(e~-~.~.i screen will open as shown in Figure 2.5 .
."• The only default library available to a user
~------- is the DESIGN CACHE . The DESIGN CACHE will
catalog and keep track of all of the existing
Figure 2.3- y components of a particular project, allowing for
DRAW ING toolbar. - -- - - ,
easy access to a component frequently used in a
design. For example, if you are drawing multiple
band-pass filters using inductors, capacitors and
resistors in the Design Entry software, after you
place one of each into the schematic, you will
be able to quickly find these components in
the Design Cache library for future use, rather
than having to search through the libraries they
originally came from. Since your new project
has just been created, no components have
Figure 2.4 - PLA CE been placed as yet, so your DESIGN CACHE will
PART button. Figure 2.5 - ADD LIBRARY
button. be empty. To proceed to the schematic design
Look,, : pspce
Figure 2.6 - BROWSE FILE folder contains all available PSpice libraries.
---:; ".
, ! ~ : ; P.,t ~ ..X
/I
!~ -R - - - -- - -
2-4 Chapter 2
cataloged in the PSpi ce library using this abbreviation. The resistor component
is immediately highlighted on the PART LIST . At this point, the user can either
press ENT ER or double-click the highlighted component to attac h it to the
mouse cur sor for placement. Notice the highlighted icon in Figure 2.7; this
is the AMS Simulator icon . The presence of this icon while a component is
highli ghted in the PART LIST tells you that this component can be used for
simulations and circuit analysis. If this icon is not present, it may indicate
that a library has been added that has parts that are not compatible with the
AMS Simulator. While it may be used to create a schematic drawing, the part
cannot be used for analysis.
OK \ 1 Cancel I I Help
There's another method that can be used to
display and alter all component parameters. Use
Figure 2.11 - DISPLAY PROPERTIES window for dc the SELECT tool to highlight a component and then
voltage source V1.
double -click on it, which will open the PROPERTY
cade ri'i
.
2-6 Chapter 2
EDITOR tab, as shown in Figure 2.12. With the PROPERT Y EDITOR tab open,
you can change more than one parameter at a time . After the parameters
have bee n altered, click the APPLY button to save changes to the component.
With the correct components, values, and wiring, the schematic begins to
take shape (see Figure 2.13).
Before moving on to the simulation, you mus t make two more
alterations to the schematic. To run any type of simu lation using the AMS
Simulator, the circu it needs a reference grou nd. Look ing back to the original
schematic, note that the circuit ground is attached to the negative terminal
of the voltage source. To replicate this in the Design Entry software, look
to the toolbar to the right of the screen and click the button with the ground
schematic symbol (see high lighted portion of Figure 2.14). You will be
presented with anot her part directory in a window titled PLACE GROU ND
(see Figure 2.15).
The ground symbol is cataloged using the
R1 number O. Place and connect this schemat ic
symbol to the rest of the schematic design
V1
as seen in Figure 2.8. The schematic design
6V ~ R2 R3 is almost complete, but you can make one
10 40
last alteration to your circuit by adding Net
Aliases. Net Aliases are names chosen by the
user to reference any node in a given circuit.
The example schematic shown in Figure 2.8
Figure 2.13 - Schematic design from Figure 2.10 has been names the node at the positive term inal of
modified to declare new component values. the voltage source 17, and the node between
Ptece Ground
caden ce 1- B x:
Symbol:
OK
~ el
--=ffi=-- I AddLb",y...
l.ibreries:
o I Remove Lib<ory I
Q i!CJ
Neme:
In Summation
R1 This chapter has outlined some
17
4
of the fundamental concepts of
schematic design using Cadence
VI
6V ~ R2 R3 Allegro Design En try or DrCAD
10 40 Capture. It is crucial that the user have
a strong understanding and a good
famil iarization with the schematic
workspace to take full advantage of the
Cadence software package. The next
chapter provides a further explanation
Figu re 2.18 - Completed schematic design. of the interconnections between the
components of the schemat ic drawing
seen in this chapter and describes these components and interconnections
in the form of the circuit's netlist.
2-8 Chapter 2
Chapter 3
Netlist Element
Lines
4 .,
Figure 3.2 - DrCAD Capture/Allegro Design Entry window, SCHEMATIC project tab active .
caden" .• •'
~£RRClR(ORCAP-XDleJ ~~ ~_(om:d1tleillltll:M'~-.dretry
" Netlist" (see Figure 3.2). After sav ing the circuit, click the proj ect tab
(labeled NETLlST) to display the project files (see Figure 3.3).
The design shown in Figures 3.1 and 3.2 is located on Page I of the
project's schematic. Click the PAGE 1 icon to highlight this page, as shown
in Figure 3.3. From within the toolbar that spans the top of the user interface,
click the CREATE NETLIST button (available in the TOOL S menu)) to open
the CREATE NETLIST window (see Figure 3.4).
3-2 Chapter 3
~
~ OM. ~ I'omIIt _
~ OM. &bQrwI1'omIIt_
T 0:
Otoc<nd
00 lIoIllooO!n:t ..---.------------.-_.--...-.-.
T~ •
............................. ,
C;I£)RC.\IroRCAluu j i mlOOLS'OJ'TURE\Hotht\Notnot
cadence _ .. xi
. • .""rct II£nlSf
V VI 110 t
. •-.1
~. "-a2
IT . <I <I 'Ie- o, o
0 I i 10 TC- O. O
; .:U 0'" iO TC- O. O
Select the PSPICE tab in the CREATE NETLIST window. Under this tab,
use the NETLIST FILE: textbox to enter a filename and destination to save the
netlist file. For the purposes of this example, the netlist file has simply been
titled Net.net. After clicking OK, the netlist file is created and will open as
a new tab in the Cadence softwa re (see Figure 3.5) .
-. V Vi
-
17 0 6
~
-
.
R R1 17 8 4 4 TC= O, O
~ : R R2 0 8 4 10 TC= O, O
- . R- R3 0 84 40 TC= O, O
-:::
3-4 Chapter 3
°
element line, which reads 17 6. The first number, 17, is represen tative of the
nodal connection of the positive terminal of the voltage source. The second
number, 0, is representative of the nodal connection of the negative termina l
of the voltage source . Even though the user did not actively create a net alias
of "0" at the negative terminal, this is the default net name at the point of the
circuit that has been designated as circuit ground. The third numerical value is
the magnitude of voltage . In the case of this design, the de source is set to 6 V.
The next three element lines reference the three resisto rs and delineate
their interconnections in the schematic design. The third line in the netlist
reads A_A1 17844 TC=O,O. As was seen with the voltage source, the first
letter of this element line designates the type of component that is being
referenced. In this case, A mean s that this component is a resistor. This is
followed by an underscore and then the name of the resistive component,
A1, as listed in the schematic design . The three numerical values that follow
the component name, 17 84 4, are net alias names and component values.
The first number, 17, is net alias" 17" and signifies the connection of the
first terminal of resistor A1. Looking back to the voltage source element
line, note that the positive terminal of the voltage source connects to net
"17" as well ; therefore, we see that the positive terminal of voltage source
V1 connects to the first terminal of A1. The next number in the element line,
84, indicates the connection of the second terminal of A1 in the schematic
design to net alias "84 ." The third value, 4, tells the user that component A1
is a 4 n resistor. The last portion of the element line reads TC=O,O. TC stands
for temperature coefficient and will delegate certain physical changes in
resis tance with respect to change in temperature in increments of 1 kelvin .
The default values for both temperature coefficient values are zero, so any
simulation results yielded from this netlist would mimic ideal conditions.
The next two element lines map out the connections of the last two
resistors in the circuit, A2 and A3. Looking at these two element lines, it is
evident that these resistors are in parallel. The first terminal of A2 and A3
connects to circuit ground, and the second terminal of each resistor connects
to net alias "84", which also happens to be the second terminal of A1. These
element lines also describe the values of resistance for A2 as IOn, and for A3
as 40 n. As was seen in the A1 element line, the TCs have not been changed
from their defa ult values of 0,0 for either A2 or A3.
R1
N00125 N00132
4
R2 R3
V1 10 40
6V .:...~
T
---.L
70
3-6 Chapter3
RLe Netlist
To take this process one step furth er, a basic series RLC (consisting of
a resistor, an inductor and a capac itor) schematic design has been created
and net aliases provided (see Figure 3.10).
The first two exampl es
gave the read er insight into L
the layout of the element R
2 3
lines used for both a voltage 1k 10uH
source and a resistor. With
"1__
wc C
the int roduc tion of a ca -
pacitor and inductor into the J1n
schemat ic design, the same
general layout will be seen
with the new element line s,
but there will be a slight dif- Figure 3.10 - Series RLC circu it.
ferenc e in the nomenclature
used to describe these com-
ponents. The netlist has been
gener ated and can be seen in
Figure 3.11. :
The induct or element •
line reads L_L 2 3 10uh and
follows the same format as
the voltage source element
PAGEl
line. The L indi cates th at
this element line is that of .. source NETLIST
R R _ 2 lk TC=O, O
an inductor. Th is is followe d
by an underscore , then the L r. 2 3 l OuR
C C o 3 I n TC=O, O
component name used in
V VDC 1 0 14V
the schematic. The first two
num erical values are the Figure 3.11 - Netli st for the RLC circ uit from
nodal connectio ns of the two Figure 3.10.
terminal s of the inductor, and
the third numb er rep resents the compo nent's value, in this case , 10 !-tH.
The capacitor element line reads C_C 0 3 1 n TC =O,O and closely follows
the format of the voltage resistor element line. The letter C indicates that
this element line is that of a capacitor. Thi s is follow ed by an under score,
then the component name used in the sche matic. The first two numerical
value s are the nodal connections of the two terminals of the capacitor, and
the third number represents the componen t's value, in this case, ] nF (1n in
the netli st). Just like with the resistor, the temperature coefficient (TC) of
In Summation
At first glance, it may not seem important to dissect the netlist as we did
in this chapter. After all, it is easy enough to use the design entry features
of the DreAD software to draw a circuit to be simulated, but a thorough
understanding of the netlist will certainly help you with other aspects of
design and troubleshooting. A netlist provides an excellent representation
of all the interconnections within a design as well as the fundamental
parameters of these components. The netlist concepts discussed in this
chapter will be referenced later in this text.
3-8 Chapter 3
Chapter 4
Basic Simulation
Types
Bias Point
Th e first simulation to be conducted on the three-resistor circuit is
that of a Small Signal Bias Solution or Bias Point Calculation. This type of
simulation will perform voltage calculations from each node of the circuit
with res pect to ground, curre nt calculations within the circuit, and the
4-2 Chapter4
know that the simulation is complete
when the progress bar displayed on
the screen reaches 100%. Referring
to Figure 4.4 , note the three shortcut
Figure 4.4 - RUN PSPICE button . buttons to the right of the SIMULAT ION
button, labeled v, I and W. These buttons
toggle the labels for the calculated values
~ of voltage (V), current (I) and power (W)
R1 ..·
17 gathered from the simulation results.
j I DIm These values are displayed as labels on
the initial schematic design. All three
6V
'. V1
.:..c__
r 'CO
- [ J-
IIiI!El!i.'! S R2 J R3
mea surements have been toggled on
and are visible in the simulation output
shown in Figure 4.5.
In Figure 4.6 only the voltage
Figure 4.5 - Bias Point results displaying voltage, current measurement button has been enabled;
and power. therefore only values of voltage are visible
on the schematic drawing. These voltage
values are the amount of potential present
from the labeled point with respect to
ground. In Figure 4.7 only the current
measurement button has been enabled;
therefore onl y values of current are
visible on the schematic drawing . These
current measurements are the amount of
current present in the labeled path . In
Figure 4.8 only the power measurement
button has been enabled; therefore
Figure 4.6 - Bias Point results displaying only voltages .
only values of power are visible on the
schematic drawing. These values label
the individual components of the circuit
with the power dissipated within them .
IiI!IiI!m R1
When you compare the simulation results
17 64
4 seen in Figures 4.6 , 4.7 , and 4.8 to the
mI!I!1rlm... ..1Iil'iJ!m results seen in Figure 4.5, you will notice
V1
R2 R3 that the user can either display or hide
10 40
6V .:..c__ whatever value s are desired at a given
TIiE!I!m time. Similar to moving a component or
component label during the schematic
design process, measurement labels
can be moved to any destination on the
Figure 4.7 - Bias Point resu lts displaying only currents.
schematic page just by clicking and dragging. After the simulation has been
completed, if you wish to modify your design to obtain a different wattage,
voltage or current, you must edit the desired component values using the
method discussed in Chapter 2; you then simply run the simulation again .
DC Sweep
The next type of simulation covered in this chapter is the DC Sweep.
Using the methods discussed in earlier chapters, create either a new project
or simply add a new schem atic page using the option in the file menu , and
then draw the circuit shown in Figure 4.9 .
This is a three-resistor circuit with two de voltage sources. As we saw
in the previous simulation, the user is able to perform a Small Signal Bias
Solution to determine the voltage, current , and power in various points of the
circuit. The DC Swee p simulatio n allows you to vary a specific component
value and displa y an output plot of current, voltage or power based on the
specified or incremental changes in component value . After creating the
circuit shown in Figure 4.9, you must create a new simulation profile. This
can be done in the same manner as it was in the previous simulation. For
this example, the simulation has been titled "DC SWEEP 2V 3R". After
naming the simu lation , you are presented with the SIMULATION SETT INGS
window (see Figure 4.10),
In the SIMULATION SETTING S window, change the analysis type to DC
Sweep using the drop-down menu to display the simulation parameters shown
in Figure 4.10. For this simulation we will be sweeping the voltage value
for the dc voltage source labeled VRIGHT. To sweep this component value,
select VOLTAGE SOURCE in the SWEEP VARIABLE portion of the window, In
the NAM E text box to the right enter the component name that you wish to
sweep exactly as it appears in the schematic design . For this simula tion, we
will sweep VRIGHT from a v to 10 V in 0,5 V incremental steps . To define
4-4 Chapter 4
RLEFT RRIGHT
25
21< 1k
RMIDDLE
3l<
8Y
{) ,CuHent source
Qpl:ions:
........._.. -_... o parameter
!ilob~
Hodel ~:':jJe I -I
r
0
EJP""""'"" S.......,
E]T- . . . lSweep) Sweep type _
....._......._._..__.. ....•
D Save Bias ?on S tart value: rN
(t ) !:ioecu --
EJIDa<! Bas P.... Endv.§Ue: lrN
~ Log,uitbmic ~~_::~. _.... J
increment .'N
, _ _ _ _ _ o _ _ _ _ _ _~ .
O Valueli:;t !
OQ ~ ~~ ~
Figure 4.10 - SIMULATION SETIINGS window, DC Sweep.
these parameters within the simulation profile, enter a start value of "OV",
an end value of " lOV", and an increment of ".5V" into their respective text
boxes. Since the sweep is across only a small range of voltage , select a
LIN EAR sweep type. A LOGA RITHMIC sweep can be selected to accommodate
a wide range between start or end values whether you are sweeping across
voltage, current or resistance.
Notice the text box at the bottom of the window labeled VALUE LIST;
if that is selected, it enables you to enter user-defined component values,
and the simulation will sweep across these values only while generating an
output. After entering the desired DC Sweep parameters , apply the changes
to the simulation profile and run the simulation. After the simulation is
complete, the Allegro AMS Simulator will open , display ing a blank page
where the output plot will be displayed (see Figure 4.11).
The simulation has performed a noda l analysis on the circuit as the
value of VRIGHT changes from 0 V to 10 V. Using the AMS Simu lator we
will note the impact of the change in voltage across the resistor RMIDDLE
- YI I.
.~
.t .
V-,.'R1tiHT.1D
i
~~ J\w_X[ )
4-6 Chapter 4
RRIGHT has been given a net alias of "25". In order to display a plot of the
voltage across RMIDDLE , either find V(25) on the TRACE EXPRESSION list or
enter it into the text box as shown. Press ENTER to plot the trace. The ADD
TRACES window will close and the plot will appear in the AMS Simulator
window (see Figure 4.13).
The X axis labeled V_VRIGHT displays the swept voltage range defined
in the SIMULATION SETTING window as "OV" to " IOV". The Y axis displays
the range of calc ulated voltage across RMIDDLE . At any point , the user
can double-click any open space surrounding the X or Y axis to the AXIS
SETTI NGS menu (see Figure 4.14).
The AXIS SETTINGS menu allows the user to customi ze the AMS
Simulator workspace by selecting grid line types using the options under
the X GRID and Y GRID tabs or axis labels under the X AXIS and Y AXIS tabs.
cadence - " .
SD-IEMATICl.QCSWH P
1U 2U 3U su 6U 8U 9U , 1\1
.~- - - -- ._ . . . _ - - - - - - - -- - - - - - -- - - - - - - --- - - - -
~-----
'~C4ItDr; T,... ~
xv. ..
-
SI"t .O V} / RIGHT - 10 End. 10
~~J..~---
Figure 4.13 - Plot of voltage measured from node 25 with respect to ground.
cadence - " x
SQiEMA.T ICHlc
• iU
II. _ ..... _
-
:::r:::r:::th
. . T1~J: :: :I::: ;: ::i:::t : t:
1 .. .. ··+-(~oooil.1i4's:
~
.... .. '.'.. . ... ... .
:~r:f::~:::~:: : :::~:::~ -+-+-----1---1 --~ ,
" :.'" :,:.:.l.:.:,~.
"
l. :.:,: ;.: , :, :,:,.:, :, :, L,:,:,l.:
.:..:1.:. '~
. :~. ,~-:::;
'--~"'F:-~~ .j.;...
. :,.,~;:,:,~,' ~i.:·, .: :.:.:. :.:.:.:~ :.:.: .t:.:.:, , ~~.-.+ ..+.+:: ++.+.+.. ...,,,'...:..,;.::
r, ••
..,;".,..",
···f .+--~- .. ~ ... ..-j---j-_.~----: ..-
I -I.IV
- 2 . 01.1
-
IU 1U 2U au w
U( 25 )
4-8 Chapter 4
.........{..+.+..
· rl$E ::tftt: :rrTT:..+.+.+..
• +..+.. ..+..+... ... ... ..+.+.+.+.. "'i"+-+-+"
3.OU
..,1...!."1'" ~ ...
: :FFFF ::FFFF _ ::rfrr:
~ ~ ..-{-.+ .. ~ ~
1
··•
t
........±S
2." ... ...............
:
k --i--'i---i-": FFFr _
...................
~+rr~c : rrrr::rfT:;:: ..................... ........... ....... .._ .. ............ ................... ...................
~
:::r :r :r :r::
...•...•...•....... ...~ ...~ ..-l... i ·· · --., ::t::t:::t:::t::: ... ....;... ·.. t· · .. ;.. ·i··· ··· i ·· · ; · · · .;.. · ..· · ·
• ,
. ~-
• ..... . . y • • • ,. • • • • •••
.•. ~ ••. :.• .. ; •.. j ... ... j . . _ ~ - - - i···i··· ... i·· ·i· · ·~·· · ~... ...{ ...{ ...{ ....;... ..·{···i····;····;··· ···i·---;-···}···}··· •••j.•••;.•••••• •}••• ···;···j···i···i··· ·..j···i- ··.j···i ···
,
c
... ..+.+.+..
.~ . ~ ... ~ ... ~ ... ... ... ... ...+
!... ...... ...+....... ..+... !..+.. +.+..
"' hr6nib"~<51 · ·d··· ~··· ~· ··~·u ~ ~ ~ ~ ~ ... ... ···t... ... ...~ ...!...
~ ~ ~ ...!...!..
· 1
:::;::~
... ................ .. ... ...•...•........... .......•........... ...................
~: ~~lfF ::i::+::r::t::: : :
s ................... ...................
__ .. .. ........... ....... ........... ................... ...................
~ITrr~
S ................... .......... .........
................... ................... .......•...•....... ... ... ........... ................... ...................
~
H
~ ~ ...:- ...:- ... ... ... ... ... ...:... :... ...!... :... }... ...
~ ~ ~
:tN::t
-I .IU
:[v...........
rr:
.......•...........
••
l
...................
.......•...........
:~rrff: :::j:~fT~F :~TJrF ....... ...
~ ..
.. . ....... .........
...................
............... ....
E ................... ~
...................
-1 . 11I
...~ ...; •••••• •; ••• j •. . j ••. ···j···i·· ·i···i··· ··· i···i···~· · ·~· · . ...~ ...~... ~...~... ...~... ~....:....:... ...;....:....; ...; ...
~
··+·+··1···j··· ..+.+.+.. !... ···!··+··i··+·· ... ~..+..{..+.. ··· ~· ··i···+· ·+ ·· ..+..+... ~ .. +......~ ...~.
.. . j .. .; ... j •.• j ••• · · · i··· i ···~· ··i· · ·
··+···~· · · ~· ··t··· :... ...
:::~:::~:::f:::f::: :::~:::F::t:::~::: :::f:::f:::i:::f::: :::F::i:::i:::i::: :::i:::r-::r:r:: :::r::r::t::r: ::r:t::r::r:: :::~::t:::~:::r:" ~Li::: :++::1:: r
~
... ... ... ............ ..... ................ ... ... .........._.. ......._... ... ...
- 2 . 1U
...................
................... .................... ... .... ... ........... .._......... .. .... ... ...•.......•....... ):::i:::i:::~
~
"'~"'p . " ."" ' "
~ ~
· · ·p · · · p · · · . - · ·r·· ·
....-..............
........:.... ...; ... ...; ... ...: ...: ...
" - ~ "'p" " '. "' "
~ :::l:::EI::E:
... ...•... ........ ... ... ... ... ... . •• .:. •• ••• .;.• • y •• • • y •• ? . . :... . •• . ............. ;....•... ···;···;··· :···1···
... ~. " ~ " 'f ...~ ... ··+·+·+··1 ··· ···i· · ·t··+ ··~· ·· ...~...~ ..+.+.. ..+..{...~..+..··+··i···+··+·· ..+...~...+-..~ ... ...~ ..+.+..~ ... ···!···!···i···!···
~ ~ ~ ~ ~ ~ ~ ~ ~
-3 .1IlJ
.. U( 25 )
10 2. 3U . •-
Su
ORICHT
•• zu
" •• l OU
sma ll spreadsheet window. Thi s spreadsheet window will ident ify the X and
Y values based on individual cursor positions, allowing you to view exact
values according to simulation results without having to mark a multitude of
data point s. However, for the purpose of this example, two data points have
been marked based on cursor pos ition. At the instance when component
VRIGHT is equal to 4.1 770 V, the voltage across resistor RMIDDLE is 448.914
mV, and when VRIGHT is equal to 5.1770 V, the voltage acro ss resistor
RMIDDLE is 96 .514 mY.
Based on the screenshot of Figure 4.15 , you may find it hard to decipher
marked data values or read a plot with multiple traces. To mak e this process
eas ier you may refer to the AXIS SETTINGS window mentioned earlier and
impl ement changes to the gridlines to make the plot more legibl e. If you
wish to cop y the output plot of the AMS Simulator to another document,
simply use the WINDOW menu and select COp y TO CLIPBOARD ; this will
open an active window that lets you select the color scheme for the copied
plot image. To demonstrate the se changes and how they can be applied, the
gen erated plot using these features (a black and whi te image with minor
grid lines removed from the X and Y axis) is shown in F igu r e 4.16. Not e
that the layout of the trace , axis, and labels is identical, but the plot is much
easier to read . No te also that the X and Y values of the two marked data
points remain intact as well.
R1
1
W'v
1k
IV1
L1
1mH
1
I
i'
VOFF=1V C1
VAMPL= 1 "v .2533uF
FREQ= 10kHz
AC=1V
R2
3
4-10 Chapter 4
Simulation Settings - AC Sweep Tank Circ uit (gJ
I IDecade "I 1I
~onle
GeneralSettings Points/Qecade: 500
CarlolWorst Case L 1
-.J
D Parametric Sweep r Noise Analysis - - - - - - -
D Temperature (Sweep)
D Save Bias Point i D Enabled 0ld'putVo!tage
D LoadBias Point
L
I/y.Source.
-:=J
[ntervel
_______ J
~ ; / \
.i"- / \
l'jo
I
.au"""
e
u_
.:
I -. <,
..- - ~ I-""
.--/ '-----.......
-
...., I-
5lUIz ,,(.z 1KHz ..., 'KNz ' • •.1 1tKHz 121 MI' 13ICK: 1W.% 15KHz
'''liz
'.
• IIJU)
._ . -- ... -- . .- _.- - --- rr e qv.nc, _ .- .-_ . --- - - - --- - - _. - -
• ""'-J
*HIfI\..... n
Figure 4.19 - Voltage measured from node 2 with respect to ground (across the LC tank branches).
X40..ou ".un Fng. UJO(o4] .- '-
4-12 Chapter 4
U"IIIU
~m)7
0
1\
1
··
t (,OlJ56K,567
9 SlIaU
·" ....
H
•1
/ \
·•
i
$,.""" I
1/
\
...... / ~ <,
...... /
V '----- h..
r======
...
'" , II \1( 2 )
~
51Hz
-----
611Hz 7KHz 111Hz 911Mz 1• • z
f r.qufnc y
1111Hz 12KHZ 1U Hz 11HtHz 1SkM:r. 16Klfz
Transient Analysis
In the final example of this chapter, an RC circuit will be connected to
a pulse voltage source, and an analysis of circuit voltage versus time, called
a Transient Analy sis, will be performed. The pulse voltage source has not
been seen in prior examples. The component is listed in the PSpice library
as VPULSE . The result of the Transient Analysis will appear in the output file
in tabular form and as a graph of voltage versus time . The circuit is shown
in Figure 4.21 .
The single pulse input source goes from 0 V to I V after 10 us of
RA
~1
1
V1 -ov V1
V2=1V CA
TO= 10u
TR=1n
JL T 20n
TF= 1n
PW =80u
- - -- -- - ,,'< ~
~ -~
Figure 4.22-
SIMULATION
SETIINGS window,
Transient Analysis.
160u second: (TSTOP)
ITrnelloman (T. - r t l · 1 RlXlto lime:
Qooons;
SllJfl savi-,odo!ta "' Iel: -0 - - second:
Tra-u:ient optiom
1':I _ . CaIoIW"",c... Maxirntrn:lt? size: 50 second:
I':IP- 5we<l> EJ Skip the i'IiI:~ trMsient bias point caeutation (SKIPB?)
!':I T.......-e (Sweep)
I':lSave _ Pcri
I
E1Load& , Fcri
EISave 01ec:k Peri,
[ ] Run in resumemode
IO...... F.. O~· 1
[J Re" "' SinUalion
/ 1 \~ l.,.!If1tJWoot
1 .'1
....
i/ \ I
'.M
1
/ 1\ I
I .:'
/ ~I
~
.. Illl( ~)
/ .... .... .... ....
u•
.
,. , U'IlI "
,-------
... 16 ""
.~
1 •• \ "..,.,."Jl.w.- xc;:..]
I :::::=:.....
1, 1 .,.......)I~ ~-
,'=- ~
..
4-14 Chapter 4
U 1. DU
~ r---
-: \~
D
1 !mu,961 .63<l m)
t
•9
e ' .8U
O.6 u
/ \
l .ltU
1
/ \
/ ~
<.
---
1 .2U
011
Is
• U( 2)
/ 2llus "'Ous 6 Gus 8 Gus
li,..
1 0 005 12Cl.ls 1JtDus 160Us
In Summation
These four basic simulati on types are the crux of this text, and it is of
the utmost importance that you develop a level of comfort with these before
reviewing the examples in later chapters. Being able to carry out each of these
simulation types can tell you a lot about the behavior of a particular circuit.
Netlist Control
Lines
.,
~; TOTIt.l POVER DI5SI P.\TIC* 3.0;:£+ 00 VUTS
chapter, but take note of the blank AMS Simulator window that opened
after the simulation was completed. Bring the AMS Simulator window to
the front and click the button highlighted in Figure 5.2 on the toolbar to the
left side of the screen. This button is labeled VIEW SIMULATION OUTPUT FILE
and displays a text representation of the simulation result. After clicking
this button, the blank AMS Simulator window will change and you will be
presented with a window that closely resembles that shown in Figure 5.2.
The top portion of the screen should look familiar. It is the same netlist
that was tested in the netlist chapter. This netlist is followed by a simple
command, .END. This signifies the end of the netlist and will be seen at the
end of every circuit netlist that is simulated in the software. This particular
simulation type has no control line. With no control line present, PSpice
will carry out a Small Signal Bias Solution by default and will consider
the presence of a de voltage source and perform the associated dc bias
calculations at each node of the circuit. In the instance of a circuit that is
purely ac, you will see a Small Signal Bias Solution in this window, except
that all of the de values will be listed with a magnitude of O.
Just to clarify and help you clean up the layout of this netlist, note
that any lines of the netlist that begin with * or a series of multiple *
chara cters (such as *****) are insignificant to actions of the netlist. The *
symbol denotes a comment line and can provide the user with helpful notes
regarding the construction of the circuit or parameters of the simulation.
The comment lines displayed above them in this figure are a direct result of
simulating the circuit using the Design Entry schematic capture software and
5-2 Chapter 5
are generated at the same time that the PSp ice software creates the netlist.
In these comment lines, we have the date of the simulation, the destination
of the source file, a title heading for the Small Signal Bias Solution results,
and the default environment temperature of the simulatio n.
At the bottom of the screen , each node voltage is listed, followed by the
total circuit current and the total power dissipated in the circuit. These are
the same values that were seen in the previou s chapter when the simulation
results were viewed in the Design Entry window.
RLEFT RRIGHT
20 25 30
2k lk
Loca l Llhrarlf!'S
Fro. [PSPlCE KETI.IST ) s ection of C '-OrCl~AD_ 1 f> 5_Litc'tools'PSPlce' E'Splc c . i n l t i Ie :
I . h b "no.d . h b "
J0 8 CONC1.00ED
........ 0<4/01/ 12 22 · 4 9 2<4 E'Sp lce La t e ( l p r l l 20 11) IDI 10813 • • • •
. .. Profi le : "SCHElfl T I C1- OC SIlEEP" [H : ' Chapter"J F l g ur e :s' OC Svee p 2Y 3R-E'Sp lceF i le:s 'SCIl EKATI Cl 'OC SVEEP . Sla 1
. 11
".''':S\''EI' ~
for Hllp, P"!" Fl V'IF1GHT=1 0 10')<'
values are the parameters that were entered into the SIMULATION SETTINGS
window, and they state that the voltage will be swept from a starting value
of 0 V de to an ending value of 10 V in 0.5 V increments.
The next line , .PROBE, writes the simulation analysis result s to an
output data file. The line following this, .INC, declares the source schematic
file. At the very bottom of the window we see the .END comm and signifying
the end of the netlist.
5-4 Chapter 5
R1
1
'1M
1k
L1
I 1mH I
V1
1
VOFF = 1V
VAMPL =1 'V
FREQ= 10kHz
AC =1V /' R2
T
C1
2 533uF
cidenc e - ~ )(
. 00 1 0 ( MI U h ) . DO-sa
previously stated, the PSpice software will always perform a Small Signal
Bias Solution. The presence of this offset voltage will contribute de nodal
voltage s that will be seen in the Small Sign al Bias Solution.
The construction of the netlist is relatively straightforward, and we now
understand that the node voltages seen at the bottom of the window are a
direct result of the de offset. This brings us to a discussion of the AC Sweep
control line. The AC Sweep control line reads as follow s:
.AC DEC 500 5K 15K
~
chapter, which simulated a simple pulse voltage across
an RC circuit. The circuit shown in Figure 5.7 was drawn
V1=OV into the Design Entry software, saved as "RC Transient"
V2 =1V CA
ID=10u 1n and simulated using a Transient Analysis simulation
TR=ln
TF = 1n profile titled "PULSE TRANSIENT".
PW=80u
Upon opening the simulation output file shown in
Figure 5.8, you will observe a layout similar to what was
-=- 0
seen with the previous simulations. The control line is
Figure 5.7 - RC circuit with pulse voltage
source . near the top of the window, the netlist is near the middle,
cadence - il X
Pre hl e l lbrarl e :
Local I. l b r .-.:ru.s
Fro. [pe..PICE MrrlI ST ] section o f C "'OrCAO'OrCAD_ll> . S_litet"t ool: '-PSP l c.e" PSpice il'lo1 ti le :
. li b " noad. .lih "
Analvs 1s d Irec tives "
TP.AM 0 rs ac c Su
PIlOEE Vea lills e* » 1(.11•• C"» VC",1i4SC * l ) DC.lusC .» KOI SE( 6lia s ( * »)
I KC ' .. '5CHEl!Io.TICl .DOt"
..
.,,
• · 04/ 01/ 12 23 15 -2 6 PSpiee LIte ( Ap r i l 2011 ) ••••••• IDI 1 0 Bl :1 It
...
•• Pr ofile : "SCHEIU.TIC I -RC Tr an sient ' [ H, '-Cha p t e r J Fi9ure .. "Tran~ i ent "J\'C PULSE TRANS IENT- PSp l eeFil e s " SCHElfATI C1'RC Tr "'n::nent . si a 1
..'".
r
5-6 Chapter5
OCSWEEP2V)R.bt - No< Figure 5.9 - Complete
NAt £de" FOfmIt V.ew Http netl ist file for DC Sweep of
OCSWEE.P2V3 R. CIR two -voltage -source circ uit,
V_Vl EFT 20 0 10
FLRlEFT 20 25 2k: TC-Q . O
created in Notepad.
FLR.'4I DDLE 2 5 0 3k TC-o,O
FLRRIGHT 25 30 lk TC-O ,O
V_VR I GHT 0 30 8
• DC V_VRIGHT 0 10 • 5
• P ROBE
. [ Nq
l n g, Col S
and the Small Signal Bias Solution is at the bottom. We saw the impact that
an offset voltage could have on the results of a Small Signal Bias Solution
in the previous example. In this example, there is no de potential; regardless,
the software carries out the Small Signal Bias Solution and labels the value
of voltage at each node as 0 V.
Looking to the top of the window, we see the control line for the
Transient Analysis simulation profile , which reads as follows:
.TRAN 0 160u 0 5u
The command .TRAN mean s that the simulation will be a Transient
Analysis . The next two numerical values define the range of time for the
simulation. In accordance with the example, the simulation will run from 0 to
160 us. The next number, 0, means that simulation data will be saved starting
at the time of 0 s. The last number, 5u, is the step size, which as discussed in
the previous chapter, helps define the resolution of the output plot.
IJf Open .
Desktop
Libraries
Co mputer
Networlc
Rename:
Open5!s:
Figure 5.10 - Netlist fil e from Figure 5.9 as seen in OPEN window.
5-8 Chapter 5
DCSWEEP2V3 R• PSpi« AIDl it• • IDCSWEEP2V3R (active») OPEN window. Note that since
i ~ f ile Edit ~ew ,Sim ulation j rece Elot T,Qols ~indow Help
the file extension has changed,
the icon now resembles that of
a schematic design file; note
also that under the file type
CSVEEP 2V3R . CIR
V_VLEFT 20 0 10
R_ RLEFT ~ O 25 2k TC= O. O
column , this document is listed
R_ RMID DLE 25 0 3k TC- O. 0
R_ RRIG HT ~S 30 1< TC= O. 0 as a "CIR File" . Open this file
V_ VRIGHT 0 30 8
.DC V_V RI GHT 0 10 . S to create an active window that
. P ROBE
. EllD resemble s Figure 5.11.
The netlist that was ju st
created using the text editor
is now vis ible in the AMS
Sim ula tor window. At the
top of the window, pres s the
Figure 5.11 - Netlist active in the AMSSimulator window.
green button labeled RUN.
This will simulate the circuit
file outlined in the netlist as
Add traces
S ~ O ul pul V_ FlI'lCtion: MacfO:
01
"DCSWEEP2V3R".
IAnalog0""0"'"arcl FUldions ~ I After the simulation is
IIR_RLEFTI
0 " noloo
. complete, you will be present-
. II
IIR_RMIOOLEI []
IIR_RRIGHT)
:~_VLEFT )
O f!iootol ed with a blank output plot as
I VRIGHT 0 y oltaoc:
I
V(25)
I
@
in the previou s chapter. Now it
til u.,renl:
V(30)
V VRIGHT
ABSIJ
ARCTANI)
is easy enough to resume using
~ .Eowef
WiR_RLEFTI ATANI )
W{R_RMIDDLEI D II ,;,c (V'/ H, J AVGI) the software as if you had ju st
WJR_RRIGHTI AVGX( . J
W(V_VLEFT) D ,6Ji~$ tl".lme* COSI) simulated a schematic using
W(V_VRIGHT) 01)
O ~ubm:ut Nodes OBI)
ENYMAX(. 1
the Design Entry software.
ENYMINI. I
EXPIJ Open the ADD TRACES menu
GI )
IMGIJ (see Figure 5.12 ). Since our
LOGI)
14 varlOO!e:~:ted
LOG10{) text netlist kept the same
FullLi:1
Mi l
MAXI ) - component names and node
names, we see all of the
j rece EXple: :ionL ______
-- - .. -_.. i []D 1 ~c1 l lliJ
available trace s that we saw
"0
~
~ -~ YI
= ! ,!;2.. ~ !
-
~:i. eu
: ···•
~
I
e
2."
r-.;
--..........
. .. r---
= --------
-------
-1 .1lllJ
------- <..,
-- .
- 1 . etl
~
-Z .CII
-- ~
- ~ . CU
..a V( U } " 2. 3V
" 5.
U WAlGIJI
6.
" •• , , ..
!;)tcmc.El'_ . OCS\~1:.
H.\(~";'~ 3 F""' fllJ~J)Cs:....1E'~ I'dNd
_
. . __..... ._- ... . . ..
X=«J)Y,,>4MJ V ~'~ = 10
.
"
Figure 5.13 - Probe graph developed using the netlist file.
In Summation
This concludes the overview of the netlist. Between the material
represented in this section and Chapter 3, a user can begin to understand
how the layout of a schematic design and corresponding simulation profile
can be written in text form. An understanding of these concepts can only
better help you carry out routine simulation procedures using the OreAD
software and the PSpi ce user interface.
5·10 Chapter 5
Chapter 6
The PSpice
Probe Tool
The two main goals of the previous chapter were to familiarize the
user with the Cadence user interface and present four basic exampl es
incorporating different circuits and simulation types. In this chapter, we
will explore some of the capabilities of the Cadence Allegro AMS Simulator
or PSpi ce ND utilizing the PROBE tool in the Cadence Allegro Design Entry
or OrCAD Capture software.
L1
C1
V1
VOFF =OV
VAMPL = 5V "-'
FREQ = 10kHz > R1
AC= 1V 30
6-2 Chapter 6
of probes . Hovering the cursor over this PROBE icon will display its name ,
VOLTAGE/LEVEL MARKER. This voltage probe is placed on the node in the
circuit labeled as net alias" 1" (see Figure 6.4). When a single voltage probe
is placed into a schematic design in this manner, a voltage measurement
will be taken from this point with respect to ground. The placement of this
voltage probe will plot the source voltage.
Once the voltage probe has been placed, the trace will appear in the
AMS Simulator window. Bring the AMS Simulator window to the front and
observe the presence of the new source voltage trace, which will be named
"V(l)". In Figure 6.5, a IV pk waveform is now visible.
L1
C1
1 • ~r-,,-3_---,
~~~ ~L==o~v
=
FREQ 10kHz
A C = 1V
P
<:
~
V1
1mH .2533ti'
R1
30
cadence - II x
~ • .eli ~ a ll • .1"'''''.....11'' ';••....;;;/11 - :"0
f C 0. A ~ .. .... YI ... Iii .!!. ~ rn~ ~ 1iI.J1. ~. ... ~. --.. .) _
...
... _.
, 'M 1DGus 12 0tls 1ltOus l U LlS 1tDIIs 2Gc.Js 21 D.I5" 2' '''s: :llflUS
Figure 6.5 - PSpice PROBE window displaying transient plot of trace V(1).
L1
C1
-+----1 1---,,-
3 -----,
" - v: 2533lF
VOF F = OV R1
VAM PL = 5V 30
F REQ = 10kHz
AC = 1V
-=- 0
[.1'10
~ lJ .
.
~ncr·li
,
!) ~
lQ q _~Eil.
y-
--
~.~ .W(b.
" S ,l
If .. e !I« r...
VI
!"
...
"'..- tlo'P .1il.
13
I
. i ·Wfit4UiJ~J'"
x ~8"bii ll' :; .. .... "
7ft
,- ~
I
T .r, ,c
cadence -" x
-
II >...
' . ,
~:t~:t~~~~: ::~::~::~:::
j::±:i : ..-:- ::i::t::i::::+::~::{::: ::~::t::f:: :::f.::~::~::: ::~::t::~:: :::F:l::r: ::;::r:~:: -::t J:t. ::L±:i: ::i:t :t:: ::!::±::~::
- -":-- - l-- ~- - -
::Ff:[:: ::r:r:r: ::l::r:~:: : f:l::r: :Ht li:T : :F:r:~: : ::r:~::r: :T:r:~:: ::':l?t ::+:.: :.~: : :
--!-..:--:-- " -':-- !"i'" ..!.. -:- --!..
ttr T:~:
.-.--
.:!::~::: ::~::~. ':: :
- - ~ -- ---:-- -: - -~. _ -
~
=
1.'"
~ i;;i::;::: *rr
::i::Ns ~
:itt:
...,. ..•.. ... ··i ·· ·:.· ·~· . ••. Im~ \i::f::f::
::1::iis 't.h ::j:::
*;1::(: :::::( 1- ::r:F:r:
-i --~ -'-
m
m: ::H:F ':l:::ft.: f.
__ l . _:_._ ~ __
m
..-t'·i'·j-! . , .
-I .au
- 1 . DU
..~ ..;\<...
Il...}..!..L!:...: ..J::±::t::
· · -:- · ·t · ·~· · ·
..+.+.
.:- ~-
..,..~
" +"i "'~'" ··i··i·+· "+"" ,,1 ,,, ··f··i··!·· +. + .~ "!"+'+' "?" 1" ~' " ~
·2.'" ·+·i·+·
~
..l..~...~ .. ..':'..~ .. ...~ •.:••.i••• ..:..':'..:.....:...l.. ~ ... ..:...:. .. .. ...:. ..:..... ..l..i...;.. ...:. ..:..~... ••1•• ':". · : •• ...:...:.. ... .. : ...,:. ..: ..
..· . .~
::i::t::t::::t::i::~::: ::i::t::t:: ::t::r::~::: :: i::t::~ :: ::t::l::~:: : ::l::t: :~ :: ::~::i): :: .+.+,+. ::t:: i::~::: : :i::t::~:: :::~::r: :~::: ::i::t::~::
· · v · . :· . ~ ~ ~ ~
) ::t::t:: ::t:l::j:::
· :C. IU
... .. .... ...,
..f'.-:-.. ..
11(1)
~
,
1I{ 1. 2)
..:..-:-": .. "-: " !" i' " ..;..-: .. .. · , t · ' j " ~" · " j" f " f " , · t · ': · ,~· " " !".;-" :" ·'t " !" i"· ::F:r :f:: " f " :" i'" "!"-:- '.=.. "-:": "i'" " i'''r'':''
lIu~
~
lO OU s u ....s 1.11" s
TIM
1611
US , I lv s; 210Us 220.s: 211"'s 26tu 2U"s ~n"s
...... _ j
6·4 Chapter 6
With both the voltage and differential probes in place, two traces are
now visible in the AMS Simulator window. The original I V pk waveform
remains, and the new trace that has been added to the plot is that of the
voltage across the inductor. Refer to the bottom left corner of the screen
and note the name of the trace as V(1,2) (see Figure 6.7) .
One last set of differential markers has been placed into the schematic
design to add one last trace to the plot. This set of markers will lie on nodes
2 and 3, respectively, and provide a trace that plots the voltage acro ss the
capacitor (see Figure 6.8) .
The two previous traces remain and this third and final trace has been
VOFF = ov R1
VAMPL = 5\1 30
FRE Q = 10kHz
AC = 1V
- 12 11
Is 211I5
U( 1) . u (1 .Z )
lIIus
1.1( 2 . 3:)
Uus ."',
1""'_ _ ___. _ __. _
C:\OtOOot.CAO,w;JJ![\lOOlS\C »ttMtr\£l\ OuIllK ' .PStOt... ~1JC1v.nt &.Ime!tVirst~(Kti\S
Figure 6.9 - Trace V(2,3) has been added to the transient plot.
Adding Labels
The AMS Simulator is user-friendly in the sense that it lets you
manipulate the plot in certain ways that allow the information and data to
be presented more neatly. The plot shown in Figure 6.9 could be considered
cluttered and illegible . At first glance, it may be difficult to decipher which
plot is which . We will begin by providing labels to each of the traces on the
plot. In the, PLOT drop-down menu, find the TEXT option under LABEL. The
user will be presented with the window shown in Figure 6.10.
Enter an alphanumeric combination into the text box to generate a label
that can be placed onto the plot. After
Add/Modify Label Text clicking OK or pressing enter, the
designated label will be attached to the
Enter Text mouse cursor and can be placed anywhere
the user desires . In Figure 6.11, three
( Change Font I(
OK ....."J ,. _ Cancel
--...J labels have been added to the plot. Each
trace has been labeled with a description
Figure 6.10 - ADDIMODIFY LABEL TEXT window. in addition to the trace name.
GiIIl1ii":lliiiia
cadence - ~ x
-iVI ! -_.~---
I I
-12UL~---._.L.--~,-.
!
- - -I- l - - -+--- - ! -- -J
I
I -
II:> 2 r.us 1I1l\!S 61ltlS 12UO!>
. U( 1 ) olJ (1 ,2 ) . U( 2 . :l )
Tin\'
6-6 Chapter 6
The three labels read as follows:
"Source Voltage, Trace V(l )"
"Inductor Voltage, Trace V(l ,2)"
"Capacitor Voltage, Trace V(2,3)"
Notic e that arrows have been inserted to designate which trace
corresponds to which label. To insert an arrow, open the PLOT drop-down
menu and find ARROW under LABEL (see Figure 6.12). Using the mouse
-'·' \'- '-;+ '; -';-' - ~'"'-- ;- _·;I-;-\-H · ·:· ,r, ' +-' · ·i · --;··Ir \ ; - · ;- --f- - i - · " · · i\ j· · - ' · · i f - ;- \I · · '· --I-;< - · ·I
- 12 U o~. 2 11u'S ~~lJ5 6 Uus 8 t us 11lUU!> 120u s 1-'10U5: 16t1u!> 180Us :ZOOU5 220\1 s 2Jlll u 'i 2 U lIS llllltl s aDDu..
U(1) U(1 , 2) UO' . 3)
•
Figure 6.12 - Insert Arrow option.
U '2'
0
1
l~ / 1'\ V\ I
··,•
t Ind C'lOfVoltllg• • UI:;. V(I.2)
il \ ., \ I
IU
Y \ --J
S4uru Vol: \I' , Trice ¥( )
k
,-
\ .--...... ~ \
J~ >( 1\ \ )1 / V 1\ \/ V V 1\ 'v
k
-""
\ \ A / 11\ \ j\ / 1\ \ !' /
"'-- ~ / \ V \ I \ II \
/ "--
-IU
<:> -,!/ I
C" p.tCr!Of VO. J~.T'lc ,V1 .3)
\..J ~
- 12U
"
• U( 1)
21."
• U(1 .2 ) • U(2,:1)
...., ...., ...., 1""'5 12Dus 1' 11I5 ueus 11lu s 21lus 2Z1us. ZUus 2""'5 ZU IIS lIlus
Ti_
~
: SED>
es ',,", IIll us 6 0U5 BDus 100uo; 1 20 U5 1 i10u s 160tJ s 1 80U 5 2 0 CUs 22 0Us 2IJOUs: 2Uu s 2 11lus 3 Dllu s
Tine
.fnI~
f«Helc.>.Ilf~F1 Tomr- JOO,OE..(l6 100%
Figure 6.14- A second plot has beenaddedto the AMS Simulator window.
6-8 Chapter 6
Simulator window. This can be done in one of two ways. One method is to
click the individual trace name s at the bottom left of the screen and press the
DELETE key; the other method is to select the option DELETE ALL TRACES
under the TRACE drop-down menu. After doing so, the user will see a blank
plot with an undefined Y axis and an X axis ranging from 0 s to 300 us.
By selecting the option ADD PLOT TO WINDOW under the PLOT drop-down
menu , a second plot will appear in the workspace, as shown in Figure 6.14,
with each plot taking up approximately half the active window.
The axis labels and grid lines can be adjusted accordingly for each
independent plot. This means that the plot in the top half of Figure 6.14 can
have a unique gridline arrangement and Y axis title while the bottom plot can
have its own configuration. The method in which these parameters can be
altered remains the same. Again, to change an axis title or modify the gridlines,
simply double-click on either Y axis to open the AXIS SETIINGS menu.
Now with two plots to work with, the traces can be reinserted. First
we will input the capacitor and inductor trace s into the bottom plot. In Fig-
ure 6.14, take note of the SEL» indicator, next to the Y axis of the top plot.
Any trace s added in the AMS Simulator will be to the plot associated with
the SEL» indicator. In the case of Figure 6.14, traces would be added to
the top plot. Select the bottom plot by click ing the blank region to the left
of the lower Y axis, then add traces V(1,2) and V(2,3), as in Figure 6.15 . In
this figure , gridlines and label s have been put in place. After moving the
.. -_ .. .. . ... . ._- - - -
I-
I:
I~
SED)
u
,OU
e
I
.,t
•
~ v....
r", y ~. V r~ /
~
~ -: ~
r~ /
·, '" ---' ----.. . . .- V" -: r-.;V
::..~ ~ <. I--------'
k
,
<, -----..-V i~
"-"'a
..
k
.,
-
· , ou
2D,,, ,,, , ..s ...s 118u s 12 lu s l /1UUs 16 tl1J'i lIDus 210Us 2211I5 z"UUs 26Dus 21llus 31lkl5
a U( 1 . 2 ) . U( 2. 3 )
...
F« . . .. JJtet fl
U"'"
~ SCHlMAt1CI -'_~'~.AIO.~.,a~~~
;. £_ t lW Y..... ~ 1(1(<< floc J~ »:"~ t::tttP cadence - if x
·
u
,.OU
<, -. ~
:·
1
I 1\'-' V
"V('r
I ~
I~
t C«• • Tr.M:1f
ou
~ 1\
•• \ \ '\
••
SED)
- S:. IU
,OU • V( 1 )
1"-, V I"'-. V r. V
·
U
•
ou -- <,
- r---....
I'---V'.. . .....~.- . - //
.>: ~ ....
-.
,/
I'-------
V '
-,
/
-, .............. /
.. ~
r------- '"
V '" " ' "",-
p (;,apldOfV lagt:, f ran 12.3r
•
-' Ill
.. "..
• U{1 ,1) • lJ( 2 .3 )
0"', ... , ...., 1'lus i l lus 10\" 5
Ti M
""" 1t tus 2flu s 22tv 5 2...lu s 2'''5 2I lu s tllu s
'. ""e-
Figure 6.16 - Top and bottom plots have been compl eted adding all trace s and axis labels.
.:I fN
-. \ S.
lu Vo11 olga , f;, t~
/ -.
\ !/ ~
\
\ \
\
V 1/
p
/
k
p
• SEl»
.s.OV
, au
• VII)
-. -. -.
·
u
-.[7
1
·• y -. V- ~ / ~
I~
t IndulOfVOll1lge, r" e Vll .2)
~
e <, ~ /
au
•
k
-
<,
r-------- l/ " t'>-- L/ ""-" ~
i/' <; r~ -- -'~/
/
r--..---- ~
•• ap:acltor Vo: ge. T'<I' 9 V .3)
-, au
" II U{ 1 . 2 }
21'. "11(' 2 . 3 ) 0"', ... , I"" ileu s i 2 0u s 1o\lu5 16 8us 18 01.15 2Ulu s 2Uus ZIJtu:;; 260115 21tu s 3tOUs
TIM
6-10 Chapter 6
stated , the RLC circuit is running at its approximate resonant frequency of
10kHz. At resonance, the reactances for both the capacitor and inductor
are identical, so the voltage acro ss each component will be of the same
magnitude. It is important to remember that although the magnitudes of
the V(1 ,2) (inductor) trace and the V(2 ,3) (capacitor) trace are similar, these
waveforms are 180 0 out of phase with each other.
This will lead to a cancellation between the capacitor and inductor
waveform s, leaving a purel y resistive circuit. This phase shift can easily be
seen in the bottom plot of Figure 6.17 . With this modified layout , one could
argue that it is much easier to interpret output data when looking at Figure
6.17 rather than Figure 6.13, where all three traces were on top of each other.
R1
1 2
1k
>
J
L1
> 1mH
V1
.>
AC = 1V ""'- C1
.2533uF
3
RL
• 3
-l-
-=-0
GenenlIl
~Iype;
l;c ~~ _
hIaly$is I.~ Res 1.()ptionsJ ~lI Co1edion
·1
ACSweep Type
~
I Probe Wndow l
Perlmetric Sweep
Noise~
lj T~1.te (Sweep)
IrJ SlIve Bias Pan EJ Enabled OJJlpul VohlllW [ I
E]Load Bias Pan I/y SOU/ce
I I
!nlelvlll
I I
OutputFile0 pljons
l!JIfll<lde delMed !liM point ilIOIrMlion fot nonIinellr
controled$OUIces <lnd seri:onduclOls I.OP)
II
I OK
6-12 Chapter 6
im-pact the impedance of the circuit and will be reflected in the output
plot. The resonant frequency of this non-ideal tank circuit is approximately
10kHz. At resonance, the inductive and capacitive branches will be seen as
having an impedance of (Z) = 00 , with an equivalent parallel resistance of
1.318 kG . This is shown in the top plot of Figure 6.20.
Next, the bottom plot will be added to the AMS Simulator window.
.
I~
r
"
k
1• •
I1
\
' .SIC
......* oITri l ~.~$ _F~y
/ \
-~ ~
l1j.
U l»
• • U( Z)/ 1 ( ',11)
5•• • 2 1."::
I
UkNzl
r--=--r., . . - - f r-~q ut n c: y
ModifyT,.,.
SiDoJaIion O ~ '1_. IAnoIog OPO!..... aM FtolCliont · 1
Figure 6.21 - Addi ng a
trace using the phase
operator.
IICl )
UI
IICl:l ) I
1(1.1 ) @
1(1.1 :1) ASSI)
l(Al) ARCTANI)
~~IJl
1(A1:1)
1(Al) [J
I{RL:l) AVGX(. )
IiVll COSO
IN!:>] DO
VlO) OBI)
VII ) EN\iMAX( . J
V(2) ElNMltl(.)
V(3) EXPO
V(Cl :1J GO
V(C1:2) IMGI J
V(L1:1) LOGO
V(l1:2) LOGI c.: )
VlRl:11 1010
VlRl:2) WX(J
VlRL:1) MINO
VlRL:2) PI)
V(Vb ) f'WR(.)
F.. LisI
Iraoo E"Illeosion: ioWO Mr >iii. . . .
'~ ·
T
"III: 1 . M I \ 1I-'U'19Q
~
' .51C
. . . . . . clTMk ~ . yt;.F~
/ \ <.;
= .---/
, ,,.• • U(2) /1(1I1)
•
·
s
e
SOd
~
\ 11-... ..."
·
n
9
,.
F'tNtH oI T" ~l'I .~
/
·
1
-s" 1\
-,,.
U L»
"'--
-:::-I'
5 .IUz
• r {U( 2 » - p ( l( a l »
... 'n.u~.
l lkM ~
-
=:J
Figure 6.22 - Trace of phase angle added to bott om plot.
6-14 Chapter 6
Z t SK
·
T
~ 1 ()(
/ 1\(9999K.'.3175K)
O.5K
Mawnilu a of Tank Impld ..nCl VI F ~qu . nc )'
/ \
~ ~
r
... 0
o Y(2';'lV'lJ
·· ,..
h
s
~
\
C3999K••2 5541)
· ..
n
9
Pha" of T~nk Imped~llce YS f ~ que ncJ
/
·-,..
1
\
-...
SEl »
S • • Hz
a P(U( 2 » -P(1( 11»
1 .Mz
"'--- 15 KHz
Fr .qurn cy
that the phase angle begins to climb in the positive direction. Likewise, at
frequencies above resonance, the trace in the lower plot begins to climb
increasingly in the negative direction when the circuit is inductive.
l
---m~--l software as shown in Figure 6.24. After drawing the
schematic design, double-cl ick on the capacitor to open
10V ._ V1 ,...
C
the parameters for the component. Find the parameter
r-'
1uF Ie (Initial Charge) and input a value of "0" . This assures
that the simulation will begin with an uncharged
capacito r.
Next a simulation profile is created entering the
simulation settings shown in Figure 6.25. The profile
is set to run a Transient Analysis with a runtime of 50
ms beginning at time, t = Os.
Figure 6.24 - RC circuit schematic. After running the simulation, the AMS Simulator
Qptions:
.stallSllVing dala after. 0 seconds
;J - . Iransient opliom
ICl Marte CarloIWOfSt Case Maximum step size: SOu seconds
IEIplIrMlelric Sweep
E1 T~ (Sweep) ILJ ~kip the iriiaIlIansienl bias poi1lcaIcWlion (SKJPB PJ
IC.I Save Bas Pon
[Jl.oad IliasPon
EJ Save Check Pons
IE]Bun inr=me mode I O~ Eie o~·· 1
lEI Restart SinUation
[ OK II Cancel II twY II ~ I
Figure 6.25- SIMUL ATION SETTINGS window,Transient Analysis.
6-16 Chapter 6
The bottom plot is rather self-explanatory. It contains two trace s, one
of circuit current and one of power delivered to the capacitor with respect to
time. The top plot allows the user to see the relation ship betwe en capacitor
voltage and resistor voltage. As the capacitor continues to charge and store
potential, the voltage drop across the resistor will continue to decrease.
ciden ce - " x
• t::l Go ~ "Sol ~ .. ,. .1""'" \1(""",,"';,, ·.0 ... I
q ~ 6l. /1;' ."~-
VI'" EO !
-
~ EO = h ii , I"" .::l~ .!"'
-- --_. _ ~ _ ..- --
-= liil ~..Ii;i'
- --,--
... J
• U( 1 .2) • V(2 )
" •·..,.-----__r----r---___,----.----r------r---~--__r---._--___, I I
···••
~ 2·1IIl,+---,L- t- --+--"".......::-1--- -+-- - - t - - - - + - - -+-- - - t ---+------i 11
·'·" -----rL-
IT
. ........·1
•
Is
• wet) • He )
. .. .... 2_
"
u ..
.. .... .- .... .-
Figure 6.26 - AMSSimulatorwindow with graphs of voltage,current and power.
."l'~
: ~J--
: ~ ......... capaeitorvoI:,.
Voftage vs , irne
~~
~
1/
'Sol V
J-----~ ,.
eN
• V(1;) o V(l)
··•
" 2 . ....
-.....
I
t 2 ....
.: --../"'"
<,
D-INtu d To Capac Of
/
--.-
"d
· 1."
f ap.c itOl'Cu ani ~~
1;--..~ -----
.- .. .-
t--
sn,»
• Is .
• w<e) • I( C)
1_ .... 2_ 2'"
11..
.... ..
Figure 6.28-
Schematic of pulse
voltage source across
single-load resistor.
V 1 = QV V1
V2 1V= R1
10 =05 1k
TR = 1ns
IF = 1ns
PW = .5m s
PER =1ms
-=-0
l OK II C510el II JW:t II ~ I
6-18 Chapter 6
Figure 6.29 shows the SIMULATION SETTINGS window. The simulation
profile is set to perform a Transient Analysis with a runtime of 25 ms starting
at time, t = Os. The output plot will display 25 cycles.
Because of the simplicity of this output waveform, the next screenshot
is the generated grayscale plot (see Figure 6.30). The plot consists of the
plotted load voltage with respect to time.
The fact that this last example utilizes a square waveform allows us to
explore one of the other features of the AMS Simulator, the Fourier Analysis
Function. A Fourier Analysis determines the harmonic content of a complex
waveform. In the SIMULATOR window, the plot of a 1 kHz square waveform
is visible. A square wave is composed of a sine wave accompanied with
multiple odd harmonics of that fundamental frequency. By carrying out
a Fourier Analysis of the plotted square wave, one would expect to see a
I kHz fundamental followed by the presence of a 3 kHz harmonic waveform,
a 5 kHz harmonic waveform, 7 kHz harmonic waveform, etc . To carry out
a Fourier Analysis, click the button highlighted in Figure 6.31 in the active
window with the plotted square wave .
1.51,1
··•
l
·
v
1
·•• 1."
t
I.SU
- 1. 5 1,1
'"
• 1,1(1)
... ... ... e.. " .. 12M
liM
10 "" 16 ""
" .. .- .. "" ,."" . ""
r
"""'."'" _. ._ .. -
L"'"
··• (1.000CK.636.775m)
·
u
1 61 ..,
··•
t
""""
t;:::::;;;J- liiI
,!",... .., .01........ - - - - - --- - - --- - -_. 100%- -&= _
rOt ......prmn
l lliIMII
··•
L
IllllXJl<,636n5m )
·
u
1
··•
t
U """
' .1oU
(3lllXJ1< ~1 2 mm)
.....
..• z
\I U( 1 )
11Hz ZIeHz 31Hz OK"
~
U Hz 61 1z
~
71Hz IIlfz ' K.z
A
1_ . z
FrlfquMCJJ
6-20 Chapter 6
After clicking the FOURIER ANALYSIS button, you will be presented
with the plot shown in Figure 6.32. The fundamental frequency and all of
the associated harmonic frequencies, as well as their associated amplitudes,
are plotted within the user-defined range of the X axis (Frequency Range).
The output is displayed just as was predicted. Finally, the output plot
has been generated in a more legible grayscale plot in Figure 6.33.
In Summation
With the information from this chapter and the overview of the four
basic simulation types from Chapter 4, you will be able to create basic
designs using the Cadence software and present the data in the Allegro
AMS Simulator window. In the next chapter, you will be introduced to
semiconductor models that can be incorporated into more complex designs
than those discussed thus far.
Semiconductors
Semiconductors 7-1
in the circuit will provide a characteristic curve for this diode.
First, we need to decla re the simulation parameters. Figure 7.2 shows
the SIMULATION SETIINGS window and defines the range of the DC Sweep
starting at a value of - 103 V and ending at +2 V with data points being
plotted at 0.25 V interval s. After running the DC Sweep, you will generate
a plot similar to the one shown in Figure 7.3.
Using this declared range for the DC Sweep provides a visual repre-
sentatio n of the three modes of operation of this particu lar diode . Starting at
the right of the plot, it is apparent that
Simulation Settings - Chot
- --- ..... , the diode is forward biased with a for-
ward voltage of approxim ately 0.4 V.
Continuing along the X axis, the trace
Sweep valiable
Ii; Volt ~ eocece v
of the characteri stic curve extends past
locs-> Name:
o C...rent source
L ~I
o V in the negative direction . This in-
e Globalparameter dicates that the diode is operating in
~ Model parameter
E1SecoodafySweep
o MorieCario,wool Case tV Temperature reverse bias. As we cont inue farther
E1plII1IITIdric Sweep
E1 T~ (Sweep) Sweep type
in the negative direction of the X axis,
IElSave Bas Poirt
~) Linear
Start value: ·103V the de voltage source value eventually
E1 lDac1 aasPoirt
e LogarU'IInic r;::;::::.:-:l
~
Endvalue: sweeps beyond the peak inverse volt-
Increment .2'3'1
age (PIV), and an increa se of current
e:>Valuelid '--- ----'
flow in the negative direction can be
noted as the diode is now operating in
a state of breakdown. This seems to
OK Ii ~ Ii "cl"Jy II ~
occ ur when the value of the voltage
Figure 7.2 - Simulation settings for single DC Sweep. source V exceeds -100 V.
1._
)<:11 700.-92957U)
.
-1."
-z...
-I . .....
7-2 Chapter 7
Another simulation technique allows the user to provide a more
accurate characteristic curve of a particular diode model by changing the
axis variable of the X axis to the diode voltage. This will generate an output
plot that more closely represents the characteristic curve of a diode as it may
be seen on a spec sheet.
To accomplish this, open the AXI S SETTINGS menu from the Cadence
Allegro AMS Simulator or PSpice AID window that has the IN4002
characteristic curve and select the X AX IS tab (see Figure 7.4 ). In thi s
window, click the AXIS VARIABLE button to open the X AXIS VARIABLE menu.
The X axis variab le has been chosen as V(D:1), the voltage at the ano de of
the diode (see Figure 7.5).
Apply these changes and it will produce a plot representative of diode
voltage versus diode current, as opposed to source voltage versus diode
current. This is shown in Figure 7.6.
To further illustrate the difference between the two characteristic curves ,
the range of the DC Sweep has been extended in the positive direction to 10 V,
and the X axis range of the diode voltage versus diode curren t plot has been
defined from a minimum of - 0.5 V to a maximum of I V. This will present
the forward bias characteristics of the IN4002 diode (see Figure 7.7).
~- -~
-- ----
o Foufler
EIPerformance Analysis
Axis TKle
IAm Variable... I IUse1 Defuled TlUe -r
OK II II
Cancel ] [Save As Default ReselDefd , l[ Help
Semiconductors 7-3
X Axis Van ble
~ - ----~- - - - - - - - - - - - - - -- -- - - - - - -
Simulation Oulpul Variables Functions or Macros -
IAnalogOpecalOlSand Functions y I
•
1(0:1)
I(RJ
()
n
1(R:1 ]
I[V) ~ Vollages
I[V:+) I
VIOl @
~ Currenls
V(0:1) A8S( )
, V(0:2) ARCTAN( )
~ Power
V(NOOO81) ATAN()
V(N00087) D Noi:e [V'/Hz) AVG( )
V{R:1) AVGX( ,)
V(R:2) ~ Alias Names COS( )
V[V:+) O( )
V[V:-) D Subcircu' Nodes OB( )
V1(0) ENVMAX( , )
V1(R) ENVMIN( ,)
V1[V) EXP( )
V2(0) G()
V2(R) IMG( )
V2[V) LOG( )
V V 25 variableslisled LOG1 0( )
WiD) M( ]
W(R) MAX()
Full List
• z._
··
i
d
C J
u
r
•
··
r
· z.... . . . . . r . . . .
--.. -1 11U
_ I { D)
-s.. ...
- -, .. -d" -s ..
U{O : 1 )
...
- ...
- -2" .
-, .. ..
,
7-4 Chapter 7
,'-
··
1
•
·,,
"
C
t
s..
· ..
-s..
+ + + + + + + + +
..'. +
+
+
- ' . 5U
.. I(El)
-I.'" -t .3 U - 1.2 U -' . 1U -t.'" D. 1U t .2 U ' . 3U I.IIU 1 .5 U '.6\1 O.7 U 1 . 1'" O.9U 1."
U(D :1)
r-t-r- -,2
01 C
VCC
B 15V :-L
-
Q2N3904
E
100uA
Figure 7.8 - NPN BJT test circuit schematic using the model Q2N3904.
Semiconductors 7-5
the collector current due to the gain constant (~) of the transistor. Sweeping
the voltage source will vary the voltage drop across the transistor. To plot the
characteris tic curves of this transistor, a current marker is placed on node C,
the collector of the transistor.
Again, we must define the parameters of our simulation profile . For
this type of simulation it is necessary to sweep two parameters of the circuit
instead of one , as we are accustomed to from prior examples. Select the DC
SWEEP analysis type, and inside the option section of the window ensure
that the boxes are checked for both PRI MARY SWEEP and SECON DARY
SWE EP. By default, PRIMARY SWEE P should already be checked. Using the
mouse cursor, click/highlight PRIMARY SWEEP to display the primary sweep
parameters. The primary sweep parameters will define the X axis of the
output plot. In the case of the transistor characteristic curve, it is desirable
to plot transistor current with respect to the change in VCE (voltage across
the transistor). Therefore, our de voltage source, VCC, will be the source for
the primary sweep. These parameters have been defined in Figure 7.9 . The
primary sweep parameters will remain the same for the rest of the examples
in this chapter. The de supply voltage connected across each transistor
circuit will sweep from 0 V to 15 V, plotting data in 0.015 V increments.
7-6 Chapter 7
Now select SECONDARY SWEEP to declare the simulation parameters
for our de current source. For this simulation, the de current source IBASE
will vary from 0 A to 100!-tAin incremental step s of20 !-tAoTherefore, there
will be separate traces on the generated output plot for each incremental step
of IBASE (see Figure 7.10).
After press ing OK and running the simulation, a plot will be displayed
similar to the one shown in F i gu r e 7.11 . The Y axis has been titled "Collector
'w
·
c
'8 s.Curr.nt~ oo.A
1
·
1
c IS.CUff.rot 00uA
·
t
ne Curr. nl
r
C
'W ""'"
u U e Cllltent <lOuA .
r
·
r
~u t .curren( :>JuA
"t
.
Bu e Cvfr. rt 0uA
•
.a IC( Q1)
, 2. •• .. su 6U 7•
U_UCC
I. ,. ,. 11. tau tau ,.. ".
Figure 7.11 - Characteristic curves for Q2N3904.
Se miconductors 7-7
Current" and each current trace has been labeled with its associated base
current. This is a typical output plot for an NPN BJT. The a ftA trace at the
bottom of the plot indicates that the transistor is in cutoff. With IBASE =
a ftA, there is no base current to forward bias the base-to-emitter junction,
therefore there is no collector current since the collector-emitter junction has
an enormous internal resistance at this time. As the base current increases,
an increase in collec tor current can be observed. This relationship will
be maintained until the maximum base current and supply voltage have
been reached, at which time the transistor is in
2
saturation.
Next, the same simulation will be performed
on the PNP BJT. This transistor relies on the
same principles of operation as the NPN , the
Q2N 3906 vee
15V -=- only difference being the physical makeup. The
IBASE
01 e
configuration of the N-type and P-type materials
100 uA ~ are inverted in the two transistor models, hence
the names NPN and PNP. To compensate for this
difference in their composition, our schematic
design will vary slightly from the last exercise.
-0- 0
Note that in comparison to the previous design,
the transistor used in the design of the circuit in
Figure 7.12- PNPBJT test circuit schematic using
the model Q2N3906. Figure 7.12, a 2N3906 (PNP) has been inverted
D ParameiricSweep
!'JTel11Perah...., (Sweep) Sweep t~ p e
[ ]Save Bias Point Start value: [].I
(~; Linear
[J wad Bias Point ( ~--- --~ End value: 15\1
o Logarithmic '-- ,
Increment: _015\1
G Value list
OK II Cancel II fwly II ~
7-8 Chapter7
with respect to vee to ensure that the emitter now has a greater positive
potential than the collector. Also, our current source, IBASE, has been
reversed in order to forward bias the base-to-emitter junction. The BJT
in this design shows a small gap in the path at the emitter terminal. There
is a compl ete path at each at this node, but it doesn't happen to be shown
with this particul ar OreAD schematic symbol. Rarel y, you will notice
discrepancies like this with certain component s in the PSpice library.
As can be seen in both Figure 7.13 and Figure 7.14, the same
simulation parameters have been used in this example that were used with
the NPN model. Note that you could have kept the same schematic layout
from the previous example and used it in this example with the 2N3906
and achieved the desired result. You would, however, need to modify the
simulation paramete rs by defining them with negative magnitudes in the
SIMULATION SETIINGS window, so instead of sweeping from 0 V to 15 V
you would be sweeping from 0 V to - 15 V.
Thi s simulation produ ces almost an ident ical output plot (see Fig-
ure 7.15) to the one shown in Figure 7.11. The plot of the emitter current
curves seen in Figure 7 .15 are typical of a BIT. As the magnitude of the base
current increases, the collector/emitter current will increase.
Options:
Current source
e Global parameter Model lype: I ,.1
IWl Primary Sweep o Model parameler Model name: I I
-.
lEi Monte CarlolWorst Case o Temperalure F'ar.9meter name:
~~
LJ Parametric Sweep --
Ll T~ (Sweep) Sweep lype
EJ Save Bias Pori @ Linear
Slarl value: IlI\
EJ load Bias Point
e Logarilhmic IDecade . ] End value: 100uA
Increment 20uo:\, I
Semiconductors 7-9
,-
·
E
·, .-
t
t
~ S. Curt.nt ,ro..o.
H. Currerl'l llOuA
C
"r-
, r-:- .., Corr,nt 600A '
·
"t
,-
,n e Culrent 2!l<>'
. .
ai. cun-,nt OUA'
.
OIl
JE(Q 1}
1U
'" ' U 50 ' U 'U
u_uee
' U 9U 'OIl 11U 1fU 13U t .. 15U
2
Figure 7.16 - N-Channel
JFETtest circuit
schematic using the
model 2N54861PLP.
VDD
J1
.:.L
2N5486IPLP~
15V _
1- 7' 0
7-10 Chapter 7
that exists between the source and drain terminals. The gate voltage will be
adjus ted in incremental steps similar to the way that the base current was
modified in the case of the BJT. The voltage across the transistor will sweep
at the same time to produce the set of characteristic curves for the JFET.
As previously stated, the supply voltage will be our primary sweep, and
will range from 0 V to 15 V, with data points plotted in 0.015 V incremental
steps (see Figure 7.17).
The secondary sweep of this simulation profile will be that of the gate
voltage (see Figure 7.18) . The voltage at the gate of the transistor will vary
from -4 V to 0 V in 1 V increments. This is an N-Channel JFET, meaning
that the voltage source VGG is connected to a P-type material. Applying a
negative potential to the gate will widen the depletion region between this
P-type gate, and the N-type channel, thus restricting current flow across the
channe l of the transistor.
After running the simulation, a plot will be generated similar to the one
shown in Figure 7.19. Each of the drain current traces have been labeled
with their associated value of gate voltage. As projected, when the gate
voltage is 0 V, current through the channel is unre stricted. As the gate
voltage increa ses in the negative direction, the channel current decrea ses.
Jlnalysis type :
locsweep Name: VDD
Current source
Wions: Model type:
~ Global parameter
~ .. ~ Model parameter
Model name: II
~ Secondary Sweep ~=::=::::;
lEI Monte CariolWorst Case t) Temperature Parameter name: L -_ _- '
I' ,
D P~ Sweep
D TefIll8l'lltre (Sweep) Sweep type
[J Save Elas Port @ Linear
Start value:
[J load Bias Point 15V
~ Logarithmic IDecade ...1 End value:
0,015V
Increment:
t) Value list
OK ) I Cancel II PWt II ~
Semiconductors 7-11
The current decreases as a direct result of the enlarging depletion region
until it completely closes off the channe l. The voltage across the gate that
will yield no current flow across the channel is referred to as the pinch-off
voltage . Looking at the plot below, the trace for VGG = -4 V either is or
exceeds the pinch-off voltage . It is apparent with this trace that the channel
has been closed completely since the drain current is constant at 0 amperes .
Next we will plot the characteristic curve for a Jl75 P-Channel JFET.
Figure 7.20 is very similar to the layout of Figure 7. 16 but varies slightly in
OK ) I Cancel I[ ~ II ~
I
"
··• ,... _. G.tI! Volt.~ eN.
c ,- .
7 .
··· ... /
" . . .
. .
G~le Voll ",g. = ~1V
n ~.
t /"
.. I~
. .
V K;aleVattag• •2\1.
a,t,Yo!t:ll9 t -~ .
.. ID( J1 )
,- 2_ >U
.- su
.- 1_
.. _
eu ,- ,. 11_ '2_ ,,- , .. 15_
7-12 Chapter 7
2
0
VDD
1 Jd ~[ 15V ..:..--.!::-
4V L J175JPlP -T
Is
-T VGG
I
1-=- 0
model J175/PLP.
[J Parametric Sweep
D Temperature (Sweep) Sweep type
rJ Save Bias Poirt @) Linear
Start value:
Increment: O.015V
a Value list
OK II CiY1cel II PcPiY I[ ~
Semiconductors 7-13
the same manner that the circuit was modified from the example of the NPN
BJT to the PNP BJT. The modifications to the circuit shown in Figure 7.20
are to compensate for the physical construction of this particular transistor
model. This is a P-Channel JFET. That means that the voltage source VGG
is connected to an N-type material. Applying a positive potential to the gate
will widen the depletion region between this N-type gate and the P-type
channel, thus restricting current flow across the channel of the transistor.
The orientation of voltage source VDD has been changed from the
N-Channel design to accommodate the P-Channel transistor model, so
again, we will be sweeping from 0 V to + 15 V, with data points marked in
0.015 V intervals (see Figure 7.21).
Figure 7.22 illustrates the simulation parameters of VGG, the voltage
source applied to the gate. VGG will sweep from 0 V to 4 V in 1 V incremental
steps. This will provide an output plot consisting of five channel currents,
one for each gate voltage.
With a current marker placed at the source terminal it is evident that
this P-Channel JFET exhibits similar behavior to the N-Channel JFET.
According to the output plot generated in Figure 7.23, with a potential of
o V applied to the gate the channel current is unrestricted. As the potential
at the gate increases, the channel is eventually pinched off.
Options:
o Current source Model type:
C) Global parameter
~ Pnmary Sweep o Model parameter Mod~1 name:
~ Secondary Sweep
() Temperature Parameter name
D Monte Cano/Wors! Case
EJ Parametric Sweep
[J Temperature (Sweepl Sweep type
[J Save Bias Point Start value: rN
o Load Bias Point @ Linear
0-- - '--- - -, End value: 4V
() Logarithmic '--~•., J Increment: -, V - - -
7-14 Chapter 7
s . ...
·
"
r
·, PM'VoIt.
e fN
....----
~
,
·,...
"t
JlIlIIII
/
v Gat. VoltIV' - IV
~
V
,... /
j
ltI. VOll:ag. 1'1
. 011
,_ ZU ,. . M•
SO
.
a"Vclagt lV
Figure 7.24
-N-Channel
r- ---, 2 enhancement
MOSFET
test circuit
schematic
using the model
2N7000.
1
lV
LVGS 15V~~
VD D
J
Semiconductors 7-15
material. The gate connects to the Si0 2 layer instead of either of the doped
semiconductor mater ials. With an N-Channel MOSFET, as positive potential
builds at the gate, it repel s the net positive charge of the P-type material,
creating a channe l between the two previously isolated N-type materials and
allowi ng for current flow between the drain and the source.
As with all the previous examples, the supply voltage VDD will be
the primary sweep and will range from 0 V to 15 V, marking data points in
0.015 V interval s (see Figure 7.25).
The parameters of the secondary sweep define the behavior and the
range of voltage source VGS, the voltage applied to the gate. This voltage
source will start at 0 V and adjust toward +5 V in 1 V increments. These
parameters are shown in Figure 7.26 .
The characteristic curves for this MOSFET are shown in Figure 7.27 .
Referri ng to the bottom traces in the plot for VGS = 2 V, 1 V, & 0 V, the potential
at the gate was not sufficient enough to create a depletion region in the P-type
material and allow current to flow between the N-type terminals. When VGS
was increased to 3 V,the potential was significant enough to create a channel
for current flow, and that channel only grew as VGS increased, as evident in
traces VGS = 4V and VGS = 5V.
Sweep variable
(~, Voltage source Name: VDD
Options:
o Current source
C) Global parameter
D Secondary Sweep
o Model parameter
o Monte CarlolWorst Case () Temperature
o Parametric Sweep
o Temperature (Sweep) Sweep t~p e
o Save Bias Point @ Linear
Start value: IJI/
LJ Load Bias Point r~ · ·· · _· ··_~ End value: 15\1
() Logarithmic L.... _ _ ••. .J
Increment .015\1
o Value list
OK ) I Cancel Help
7·16 Chapter 7
Analysis type: Sweep variable
loc Sweep ~I I~J Voltage source Name: VGS
~) Current source
Options: Mc,dl;'l type:
<:) Global parameter
[l] Primal)' Sweep Model name:
<:) Model parameter
o
El
Secondary Sweep
Monte CarlolWorst Case
o Temperature Parameter nome:
ElParametric Sweep
[J Temperature (Sweep) Sweep type
[J Save Bias Point @ Linear
Start value:
EJ Load Bias Point
Cl Logarithmic [ Decade
~ I End value:
Increment: 1V
V Value list
...-
0
r
i
~S~ 5V
"
~ ..
-, .>
.
r- V
V
r
V
. Ii
III
II 1( " 1: d )
lV 2V 3V .V 5V
f1;s~;'
k;S a 2V,1
6V
.a ov
1V
U_UDD
.v ,V 1 11I " V , 2V 1 3V
". 15.
Semiconductors 7-17
Design Problem
For the last example in this chapter, the transistor can be demonstrated
in a practical circuit while we build further upon the concept of the DC
Sweep simulation profile in a design application. Assume that we are trying
to design an audio amplifier represented in the schematic design of Fig-
ure 7.28. This circuit utilizes the 2N3904 NPN BJT seen in the second
example in this chapter in a common emitter configuration. The potential
established between the voltage divider of R1 and R2 will be used to bias
this basic transistor amplifier circuit. Without the capabilities of this kind
of software, you would have to sit down with spec sheets and scratch paper
and carry out numerous calculations to determine how to properly bias this
amplifier or one like it.
The Cadence software allows a user to sweep not only the values of
a voltage or current source, but individual component values as well. This
can be especially helpful in the instance of trying to bias an amplifier such
as the one in Figure 7.28.
One can begin by constructing the schematic design shown using the
DreAD software. Instead of entering a value for R2, the bottom resistor of
our voltage divider, enter "{RVAL}". Next, search the Component library
for the component PARAM and place it anywhere on the schematic page .
.:.LVCC
20V~
R1 RC
40k
~ .7k
C2
l VOUT
,~
C1 01
i
1 1fO
-U-----''+--- -10
-B
' -l E0 2N:;04 PARAME T ERS:
RVAL = 2k
V IN
<:
VOFF =O R2 < 47k
VAMPL = 250mV RE RLOAD
FREO = 1k {RVAL} 470
AC = 1V
7·18 Chapter 7
cadence .. " .1
I - ....tl!i
' I fill
- ro Maw J
-
"..
..... _
....... fL1
.
-. - ......
. ....
~
I,•
;~
...
:~ - -
.... ,_ --
...............
"""'.......
~C; .
-r'
$CC.IMTlCt; "'C;U
'" Nl)O[S(fl/SPfOl.l
II , I ..
1otOC£S(1:1$,,£Qfrr4
I ~~
_. -
a
.
Figure 7.29 - PROPERTY EDITOR for PARAMETERS component, RVAL column has been selected to be modified.
I
Model t!ipe I "I i
Qplions :
~. , ... @ Jalobal parameler
l!5 Model parameter Mo d~1 name: I I :i;
IE! Secoodery Sweep ~ Iempera lure Earameler name: RVAL
ElMonte CarlolWor.;t Case
IE] Parametric Sweep - -- - - - - ---I
--- --- .-_.. - -
I OK J[ Cancel 1[ !lPr*f I[ ~ I
Figure 7.30 - Sweep characteristics for the RVAL parameter.
Semiconductors 7-19
j:~ ~:~ :1$ty~E!IiTiIilEEr r:if :l::i1r rEi f
.. ~ f~~T r E ··. jTfEl E!EjlEF Ei Ei.·••••••iFrr
,
[]] .. U(C.E) [l]
SIC
. I C( Q1 )
1. 1511: 2 011: 2SK 3. 35K
RUAl
Figure 7.31 - PSpice output display ing effects of the sweep on the BJT amplifier.
the purpose of the DC Sweep this value will not be considered. For now a
value of 2 kQ has been entered.
For the purpose of this example, a value of R2 needs to be established to
properly bias the amplifier. This can be determined by measuring the collector
current and collector-emitter voltage while sweeping the value of R2. To
accomplish this, create a DC Sweep simulation profile (see Figure 7.30) . In
the SWEEP VARIABL E portion of this windo w, select GLOBAL PARAMETER,
and for a parameter name enter "RVAL", the same value that you declared
for the component R2. This GLOBA L PARAM ETER sweep function refers to the
PARAMETE RS: component placed on the schematic page . Remember that the
PARAM component is associated with component R2 using the declared value
"RVAL" and will sweep the value of this resistor based on the limits declared
in the bottom portion of this window. According to these constraints, R2 will
sweep from I kQ to 33 kQ in 100 Q increments.
After running the simulation, plots resembling Figure 7.31 are generated
as a result of the voltage and current markers in the schematic design. They
have, of course, been manipulated slightly in the PSp ice PROBE window to
make them more legible. A BJT can be thought of conceptually as a voltage-
controlled resistor. The top plot illustrates this point as a trace expression
and has been entered as "V(C,E)/Ic(Q l )" to plot the internal resistance of
the transistor. As the value of R2 increases, the base voltage increases and the
resistance of the transistor drops. As this change occurs, observe the bottom
plot. The bottom plot consists of trace s plotting both collector current and
collector emitter voltage with respect to the value of R2. As the resistance of
7-20 Chapter 7
3 4
l vcc
'JfN ~
Rl RC
40k
4.71<
C C2
YOUr
VlN
Cl
2
Q1
BY'
lOU
I' .v
<~~
10U PARAMET ERS :
"' Q2N3904
E RVAl - 3.5k
VOFF =O R2 471<
VAMPL = 250mV RE RlOAD
FREQ = 1k (RVAL) 470
AC = 1V
-l- ~O
·, ,...
U
' .IU
1 ~ ~ ~ ~
··
t
II I .
IU
I/ \ . .
I \ I \ / \
- 2 . 1U
1\ · .
\ ......... 1 :\ j
. .
........
1\ ......... /
1/ :\ j .
. .
I'-'
. .
-3. au
Is
o U( UI " }
O. oUJs
• U( 1I0UT)
' .IM 1.2,.5 1.6n5 ,.-
" ..
2 .lins 2.IM 3 .2M 3 . 611III5
..-
Figure 7.33 - Transient Analysis with R2 set at 3.5 kO.
Semiconductors 7-21
demonstrates the proper bias of this transistor circuit using a value of 3.5 kQ
for R2. This choice for a resistor value yields a clean output with the proper
headroom. This was done without any additional freehand computation and
further showcases the comprehensiveness of the OrCAD/PSpice software.
In Summation
Now that you have an introduction to semiconductor components, you
can start to take better advantage of what the OrCAD/PSpice software has
to offer by designing and simulating circuits with practical applications.
These types of circuits are discussed further in Chapter 11.
7-22 Chapter 7
Chapter 8
Miscellaneous
Components
Up to this point, we've touched upon the most basic passive components
and some of the semicond uctor models available in the PSp ice software.
Before moving into sample circui ts and other advanced operations of
the software, let's discuss some of the other component models that are
available . The components to be discussed in this chapter will be switches,
op-amps, and transformers. We'll begin with switc hes.
Switches
There are two types of switches are available in the PSpice library -
Sw_tClose and Sw_tOpen. The letters "Sw " denote that the component
being used is a switch. These switch components can be used only with
the Transient Analysis simulation type. Their operation depends on a value of
time that is declared by the user for when they will either open or close. The
component Sw_tClose is a switch that
is initially open, but will close at a
TCLOSE= 1m
time that is declared by the user. This
type of switch is utilized in the sche-
~2
2
matic design shown in Figure 8.1.
Figure 8.1 is a simple series
lV1 circuit with a 10 V source connected
10V - ~ RLOAD
> 1k to a 1 kn load resistor. A Sw_tClose
switch component has been placed
in the series path between nodes 1
and 2. As stated, this switch is open
and will close depending on the user-
defined parameter of time. Referring
again to the schematic of Figure 8.1,
Figure 8.1 - Schematic design wit h closin g switch.
this parameter is titled TCLOSE and
~stype :
OK II CwlceI II f:9i*t I[ ~
11. 1U
·• ....
l
. . . . · · · ·
·,
u
1
··• .... . . . . · · · r-
. · · · ·
IS 1.2M , • .lIlK 1 . 6M I . IM 1._ 1 .211$ 1._ 1. 6as 1 . 11IlS 2.-
o U( 2 }
n ..
Figure 8.3- AMS Simulator window measuringload voltageas the switch closes.
8-2 Chapter 8
and from I ms to 2 ms the 10 V dc source voltage drops across the load
resistor.
Conversely, the component Sw_tOpen is a switch that is initially closed.
It will open at a time that is declared by the user. This timing parameter
is called TOPE N. To illustrate how these switches can modify the behavior
of the most basic circuits, both Sw_tOpen and Sw_tClose will be used in the
~v
~VDC
12V -=-
1 ~.r C
S: R
1k
-T 47u
I
o
Figure 8.4 - Schematic design using both opening and closing switches.
SimulationSettings - SWBOTH
- ..
Option.:
'-; Trensient options
EJ Monte CarioIWorslCase Maximum step size: 150us seconds
LlParametric Sweep
EJ T~Lre (Sweep) D Skip the initial transientbias point calculation (SKIPBPJ
o Save Bias Poin!
EJ LDad Ilia. Port EJ Run in resume mode IOutputFileOptions.., )
[] Save 01eck Points
o Restart Simulation
OK II Cancel II ~ )I ~
·· . "' / .
~
I
.. .. .. . .
.. . . · . . . ... . . .
.. ..
/
,
l ' .15V + +
~c h :OO 0P:tns a1:1£ln'\$ :
• + ;-
· . . 4-
.. + . +
... +
- : · . . . . . . .
Svdchoc Cion! ac 2OIns . · . . ... . . . .
SEl» · . . ... .. . .
10.00"1
• Val
·
u
1
··• ::] . .
"I.- ....
t
+ . .. .. .. .. .. ..
.
Is
U(3)
,
."" ..,. ,... .... ,_, "0$ "0$
TI..
,... .
" ...
. .,"" ...I. :
21 ...
.-1
Figure 8.6 - AMS Simulator window measuring node voltages as the switches open and close .
simple parallel RC circuit shown in Figure 8.4. The switch that is initially
closed lies between nodes 1 and 2 and will open at 10 ms, while the switch
that is initially open lies between nodes 2 and 3 and will close at 20 ms.
A Transient Analy sis will be carried out on this schematic input file. It
will start at 0 s and run for a duration of 30 ms with a defined step size of
150 us. These simulation parameters have been defined in the SIMULATIO N
SETT INGS window shown in Figure 8.5.
The top plot of Figure 8.6 is a measure of the voltage from node 2 with
respect to ground. The bottom plot depicts the change in voltage measured
from node 3 with respect to ground as this Transient Analysis takes place.
Let' s refer to the schematic design shown in Figure 8.4. The switch
UC, Sw_tClose is initially open for the first 20 ms of the simulation, and the
switch UO, Sw_tOpen is closed for the first 10 ms of the simulation. For the
first 10 ms of the simulation, the 12 V de source is connected only across
the 47 ~F capacitor. The capacitor charge s almo st instantaneously, and after
10 ms, the switch UO opens. At this time, the source VDC is no longer
connected and the switch UC has not yet closed, so the capacitor remains
charged until 20 ms. At 20 ms, the switch UC closes, and the capacitor begins
a steady discharge acros s the I kQ resistor that will last a period of 5 r
(235 ms) that exceeds the range of the Transient Analysi s.
Operational Amplifiers
As you can see, switches can provide great versatility to the operation
and functionality of a circuit. They can aid its operation by either turning
a circuit on and off, or they can add additional branches that will modify a
circuit's behavior during a Transient Analy sis.
Figure 8.7 features a model of the common uA741 operational
amplifier. Even in the OrCAD/PSpice software environment, the schematic
8-4 Chapter 8
3
>
RI 1t>---=--- - - 1>--- - - -----,..V,OUT
2 v
VIN
uA741
1k
VSIN RLOAD
1k
"-' RF
VOFF =O
=
VAMPL 250mV
FREQ= 1kHz VDC+ VDC-
AC =OV 3k <;> <;>
I v+ v-
~1 5V 1-
_ 15V
-=-0
1 I
Figure 8.7 - Op-amp schematic using an inverting configuration.
• • • • • • • • • • • •• • • c~a~d2e~n~ct;!e~f;~~. i;!lx
1fl~1 symbol maintains the typical pinout for a
uA741 package. Pins 1 and 5 are the offset
null pins, pins 2 and 3 are the inverting
and non -inverting inputs, respectively,
pins 4 and 7 are used for power, and
pin 6 is the output. For the purpose of
this example, the usage of the uA 741
will be demonstrated with an inverting
configuration. The circuit has an input of
250 mV at 1 kHz .
This schematic design uses power
terminals to connect de voltages to
pins 4 and 7. These terminals come in
especially handy when working with
O ll etG(04) POM:f
tJ ShowUcNom<d N"G,,,,,,
complex designs or circuits that use
multiple voltages. Placing a voltage
Figure 8.8 - PLACE POWER butto n high lig hted and PLACE POWER
source schematic symbol numerous times
window active displaying vcc terminal component. in a schematic design or placing a voltage
source schematic in a confined space can
make your design appear messy. In the toolbar to the right side of the DreAD
interface, click on the highlighted icon to display the PLACE POWE R window.
This is shown alongside an active PLACE POWER window in Figure 8.8 .
ffialy$. type:
ITille Oomail (fr.wieft) ... 1 Run to time: 2ms ' seconds IT STO PI
OK II Ca1cel II ;wy II ~
8-6 Chapter 8
......
......
...
-.._+---~-=--~---~---,----~--~-=--~---~---,-----H
's ' . 2J1lS as •.,,,s 1. _
a U( UOUT) • U(U IH )
I .•
Ti ne
1 . 2 J1lS
Figure 8.10 - AMSSimulator window measuring both output and input voltage of op-amp circu it.
1.6M
.. -
the input resistor, RI, is 1 kQ . Therefore, a calculated gain is expected to
be -3. With the 250 mV input ac voltage, this will yield an output waveform
with an amplitude of750 mV that is 1800 out of phase with the input signal.
Looking back at the input schematic file (Figure 8.7), voltage markers have
been placed near the ac source at net alias VIN and across the load resistor at
the net alias VOUT . The plot in Figure 8.10 shows a measurement of voltage
at net aliases VIN and VOUT. The relationship between the input and output
voltage is exactly as expected in terms of phase relationship and amplitude.
Transformers
The last topic of discussion in this chapter is the transformer. PSpice
features many different transformer models, both linear and nonlinear, with
multiple primaries, multiple secondaries, center taps, and with different
core materials. For the purpose of this example, we will use a basic linear
transformer with a single primary and single secondary (see Figure 8.11) .
.001
RLOAD
100k
~o
Figure 8.13 -
SIMUL ATION
SETTINGS window,
Transient Analysis.
OK II CmceI II fwIy II ~
8-8 Chapter 8
transformer, a transformer is tightly coupled if the primary and secondary
coils are in close proximity to each other and a majority of the flux from
the primary reaches the secondary. Transformers have loose coupling if the
coils are distant and little of the flux from the primary reaches through the
secondary. Tightly coupled transformers have a coupling coefficient that is
close to 1. In this example, we are dealing with an ideal transformer, so the
coupling coefficient has been declared as 1.
L1_VALUE and L2_VALUE are the inductive properties of what are
the primary and secondary windings in this circuit. For this example, the
inductance of both the primary winding and secondary winding have been
set at 10 !tH.
A Transient Analysis will be carried out on this circuit that will start at
a s and end at 32 ms with a step size of 32 us as shown in the SIMULATION
SETTING S window in Figure 8.13. This run time has been selected to
display an output plot that executes just under two complete cycles of the
output waveform.
With the voltage marker placed at node 3, the output plot (see Fig-
ure 8.14) displays the output voltage that is measured across the 100 kO
resistor connected to the secondary winding of the transformer. Since this
transformer is an ideal linear transformer with a coupling coefficient of 1,
the amplitude of the voltage across the secondary is equal to the primary/
source voltage .
Lastly, we can use an AC Sweep simulation profile to measure the
frequency response of the transformer. Since we are working with a linear
transformer, it can be expected that a rather consistent output will be
measured throughout the frequency spectrum. Figure 8.15 displays the
simulation parameters for the AC Sweep. The logarithmic sweep will begin
at 10Hz and end at 1 MHz with 100 data points per decade.
·· vn 11\'
·•
1
t
s
1."
D.SU
,
:1 xn ~
. Y' ~ '\:
N:\( vi f\: ,:
:J/f'
:
- • •su : ,
~:
Yf
~ l .CIU
.
Is
U( 3)
2..
- 0.. ... 1_ 12 .. 1""5 16 .. 5
U ..
Figure 8.14 - AMS Simulator window plotting load voltage with respect to time.
" .. 2_ 22. . ,. .. 20"" " .. 3_ 32..
( OK II Cancel I[ IwI:'I I[ ~
·•
1 .1U
··•
t
1."
1.9 U
1. 111
1.1U
1 .6U
1.5 U
"'" • U( 3)
3M' "": 2 01Hz 1. OKHz 2 . 1KHz 1 0KHz 3 1KHz 11.Hz 31t1CH z 1 . DHHz
Fn quf'fl c,
Figure 8.16 - AMS Simulator window plotting load voltage wit h respect to frequency.
8-10 Chapter 8
In Summation
The se components can only further enhance the capabilities of the basic
design s discussed thus far. Chapter 11 will provide an in-depth examination
of circuit s with practical appl ication s and will showcase many different
types of sample circuits using them .
Transmission
Lines
If you are using PSpice, the basic transmission line element is actually
considered to be lossless. This is quite reasonable for a circuit analysis
program with integrated circuit emphasis, since transmission lines used
within an integrated circuit (likely to be stripline or microstrip) are going
to be very short, both physically and electrically. The loss in a short
transmission line is normally quite small (a fraction of a dB) and, therefore,
negligible for most purposes.
If you wish to add loss to a PSpice transmission line, you can do so by
using lumped (as opposed to distributed) resistive elements. The dominant
loss mechanism in most practical transmission lines is the conductor loss due
to skin effect , not the dielectric loss. You can simulate a long and lossy line
by breaking it up into shorter sections and adding a small resistance in series
with each short section to represent the distributed conductor loss . Although
it is tempting to use extremely short sections (each with a very small series R
for loss), there is a tradeoff involved with this. In Transient Analysis, PSpice
will make the timestep (or internal computing interval) less than or equal to
one-half the minimum transmission delay of the shortest transmission line .
This can make a PSpice Transient Analysis take a very long time if short
transmission lines are used . Another problem is that transmission line loss
increases with frequency. It is not possible to specify a frequency-dependent
resistor, so line loss simulated by lumped resistors will be valid at only one
frequency. The PSpice limitation that transmission lines are lossless is not
a serious one. In the examples that follow, you will see that PSpice can be
used to solve an assortment of transmission line problems, which would be
all but impossible to solve in a reasonable time without a computer.
9-2 Chapter 9
Opbc ns Window Help
il L seeree P~rt
Figure 9.2 - PROPERTY EDITOR window for transm issio n line component.
Matched Load
This problem will show how PSp ice can be used in the time domain
to look at a single short pulse at the sending end and the receiving end of a
physically short transmission line.
Figure 9.3 shows a pulse voltage source , with 50 n output impedance,
V1 = OV
V2 = 10V
TO = 1n
TR = 1p
TF = 1p
PW = 3n
PER = 6n
7"0
OK II <:anca II tWiY II ~
5!P1
V
0
r
··
t
'.eN
, PULSE ATINPUTTOTR..A,NSMISSION lINE
2JN
eN
• val
• 5.SU
·, ....
1
··
t
2."
.
Sf D )
Is
D U(3)
I.Sns 1 . ltns 1 .S ns 2.ln s 2 .5n s :I .lns 3.5n5 11. 01\5 IJ. 5ns 5 . ens 5.5ns 6. lns 6.5ft5 7 . ln s
T1..
Figure 9.5 - AMS Simulator window plotting time delay between input end and load end of circuit.
9-4 Chapter 9
that whatever voltage changes appear at the input to the transmission line
(node 2) should occur 2 ns later at the output (node 3).
The PSpice SIMULATION SETIINGS window (see Figure 9.4) specifie s
that a Tran sient Anal ysis will run from 0 ns to 7 ns with a step size of
7 I-ts. The results of the PSpice Transient Analysis, displayed by PROBE,
are shown in Figure 9.5. Voltage V(2) is shown in the upper plot, and the
lower plot shows V(3).
The inpu t voltage, V(2) , rises from 0 V to 5 V at 1 ns and remains
5 V for 3 ns. The output voltage, V(3) , doe s the same as V(2) except that it
is dela yed by 2 ns. Since the transmission line is termin ated in a match ed
load, no reflections are seen. If the load is not matched, a reflection will
occur at the mismatch, and the input voltage will change at a time equal to
twice the transmission delay of the line. Thi s is the basi s of time -dom ain
reflectometry, which is used at the input side to examine tran smission lines
for defects . PSpice can be used to predict what a time-domain reflectometry
display should be for a cert ain transmission line circuit.
The last example in this chapter demon strates time-domain reflectometry
with mismatches between both generator/transmission line and transmission
line/load.
NL = 1 NL = .5
ZO = 75 ZO = 75
F = 100Meg F = 100Meg
R IN
~ '}i)VAC
-=- 0
Figure 9.6 - Transmissi on line balun circuit schemati c with voltage source .
AC 5weep Type
IftC SweeplNoise ~l @:f Linear 5larl Frequency: 20MegHz
Inrerval
OK II Cancel II !wit II ~
o
1 2'"
··•
t
~ 52 336M.!""O)
«I7533M.14 1.40)
"V
12V
3dB BANOVIIOTH
IV
'V
",' +--~--~---'-~-~--~-~~-~--~-~--~-~~-~--"-!--~--~----I
2_z 3 ....% ~ettlz 5 tlHHz 6 _2 7Dtlfz lottHz 9tlHHz 11lDtltz 11 1lttHz 121lttMz 13 0HHz lII Dt11z 1StHH z 16_2 17 IHH z 11 ,""2
• U(31. U) . 1.IJ. 1_
rrfOqu Pncy
Figure 9.8 - AMS Simula tor window plott ing voltage across RL.
9-6 Chapter 9
load. The design frequency of the balun is 100 MHz, so transmission line T2
is Y2 wavelength long at 100 MHz. Figure 9.7 shows the simulation profile
to be used on this schematic design, an AC Analysis in which the frequency
sweeps linearly from 20 MHz to 180 MHz.
The PROBE display of the PSpice analysis output data (Figure 9.8)
shows the graph of the voltage magnitude across the load resistor, trace
V(30,40), to be a maximum of 20 Vat 100 MHz. Using the 0.707 criterion,
the cursors in PROBE show that the voltage falls to 0.707 x 20 V, or
14.14 V, at approximately 47 .6 MHz and 152.4 MHz.
Thus, PSpice has directly provided the information to determine the
power bandwidth to be about 152.4 MHz - 47.6 MHz, or 104.8 MHz.
The power bandwidth is not necessarily the same as the usable bandwidth,
since the voltage standing wave ratio (VSWR) may be acceptable only over
a much narrower bandwidth. The higher the VSWR, the more power is
reflected by the load back to the source. The next problem will show how
to make PSpice provide information that can be used to calculate VSWR
at each frequency.
A very simple modification can be made to a circuit to make PSpice
calculate the input impedance of a circuit. In this next example, we will
slightly change the circuit of the previous problem to allow PROBE to graph
the input impedance of the balun circuit at each frequency. From this input
impedance data, the VSWR at each frequency can easily be calculated, and
a VSWR-based bandwidth can be determined.
NL = 1 NL = .5
ZO =75 ZO = 75
F = 100Meg F = 100Meg
~'
1Aa c
OAdc
r-:.
-
-=-0 300
Figure 9.9 - Transmission line balun circuit schematic with current source .
AC Sweep Type
IPC. Sweep!Noise ~I Linear Slarl Frequency: 60MegHz
Interval.
OutputFile 0 plions
[] Includedetailedbias point information for nonlinear
controlled sources and semiconductors (.0 P)
I Cancel I[ IWt II ~
9-8 Chapter9
v
o
I l50V
··•
t
100'/
.. +----":O"":::::---------::=_~==-"__====_--==------------"""_<;;:---___! I
SEl»
- lI.. +-----.-----r--
----,----~,.__--- ~-- -~----_._----q
,-, .. ' ( U(ZI»
11 at11z , ...lHN z
Figure 9.11 - AMS Simulator window plotting both output voltage and phase angle.
Qu arter-Wavelength Transformer
One method of matching a load to a transmi tter is to use a 14 wavelength
sectio n of transmissio n line to transform the impedance at its load side to the
characterist ic impedance of the system . Refer to Figu re 9.12 .
The purpo se of T3 (a 50 n line) is to transfor m the very low resistance
of the load, S n, to 500 n at node 4. Transmission line T2 (not a 50 n line)
is 14 wavelength long and transform s the impedance of 500 n at node 4 to
50 n at node 3, thus crea ting a perfect match at the design frequency.
141.42VAC
NL
F
=2
=50Meg
~~ -=
- 0
NL
F
=.25
=50Meg
-=
- 0
NL
F
=.25
=50Me g
-=- 0
AC 5weep Type
IJlC SweeplNoise @ Linear Start Frequency: 10Meg
Interval: I I
OutputFileOptions - ---- ---
[] Include detailed bias pointinformation for nonlinear
controlled sources and semiconductors (,OP)
OK II Cancel 1[ Ivt*f I[ ~
• 2• .-----------------_,_~~--_,_----------------.....,
• (SS032fol)HID)
n BANDIMOTH
"
SEl;t'L_ _ -.:.::::=======- ...L ...L -=======:: : : :== -.J
J zsur·"::'
··:":(:u.,:
(s:.,:):...
) - - - - - - - - - - - - - -, -- - - - , -- -- - - - - - - - - - - - - - ---,
,
.
l
, .OU
I
e
""
...
S"l.
a U( 5)
, ....
, ,. . .:. . . . .:. .==:=;::====:::;::=~......:....
, ....
. . .:.....z
._._......:...~......:.........:...~......:...-:..l.
SlIll z ....
. . .:. .......:...~......:....
, . . .:. ..:.==:;:=====:===.
r ..., , ....
. . .:. ..:...z
.J
Frl'quftlcy
Figure 9.14 - AMS Simulator window plotting output voltage and dB with respect to frequency.
9-10 Chapter 9
The voltage magnitude across the load, V(5), is plotted two ways in
Figure 9.14. The lower plot is the magnitude of node 5 voltage, while the
upper plot shows 20 log (node 5 voltage). The decibel data in the upper
plot makes it easy to evaluate the half power, or -3 dB, bandwidth of this
matching circuit. Using the cursors in the PSpice window, the -3 dB points
have been indicated and designate the bandwidth.
The DB(V(5)) graph (upper plot) shows that load voltage is a maximum
of 27 dBV at the design frequency of 50 MHz and falls off on either side.
The 3 dB bandwidth is the range of frequencies over which the magnitude is
within 3 dB of27 dBY. The cursors in PROBE easily show that the bandwidth
is from approximately 45 MHz to 55 MHz, a 10 MHz range.
Time-Domain Reflectometer
An excellent way to understand how pulses behave on transmission
lines is to use a time-domain reflectometer (TDR), which sends a train
of voltage steps into the sending end of a transmission line and displays
the reflections when they arrive back at the sending end. By observing the
sending-end voltage, with a knowledge of voltage reflection coefficients,
you can quickly determine both the length of the transmission line and the
nature of the load impedance. A similar process is used by bats (in air) and
by porpoises (in water); it is called SONAR.
Ord inarily, the TDR is matched to the transmission line (that is, a 50 n
TDR is used on 50 n lines). This is desirable because the reflected pulses
arrive at the sending end, are absorbed by the generator impedance, and do
not get reflected back toward the load again . An excellent way to realize how
little you really know about pulses on transmission lines is to use a TDR
that is not matched to the line. In practice this is avoided, as the backward-
traveling pulse reflected from the load and forward-traveling pulse reflected
l - - - - - ,4
V1 =QV
V2=2V
=
TD 1n RLOAD
TR = 1p 1E-6
TF= 1p
PW=.1n
-=-0
Analysis type:
Run to time: 5.5n : seconds (T5TOP)
[TITle Oomail(Tr.meri) ... 1
5tart saving data after: 0 ; seconds
Options :
Transient options
'J - ...
EJ Monte CarioIWOfSI Case Maximum step size: 5.5u . seconds
EJ Parametric Sweep
[E] T~ure (Sweep) EJ 5kip the initial transient bias point calculation (5KIPBP)
[J Save Bias Point
lEI Load Bias Pori Ii] Run in resume mode [ Output F~e Options... I
EJ Save Oleck Points
EJ Restart 5mJI ation
Cancel II ~ ][ ~
9-12 Chapter 9
.. t-----~ ~ __;F+R
r _- - -- _: !- -;F+Rr - --'
F+R
-5'''''' .
• U(Z)
..+ - -- -- - - - ;
SU »
- Sl.... +---..,.--- -..,.----r-----r----r---..,.....--..,.....- -...,---~ -- ~ - - _ l
Is ' . Sns 1 . ... '1 1 . Snfi l .lns 2 . Sns 3 . ln s S .lns $ . S"S
0 "'(:' )
rio.
Figure 9.17 - AMS Simulator window plotting voltage from both node 2 and node 3 (F, R, and F+R labels have been
added to indicate direc ti on of pulse).
9-14 Chapter 9
Chapter 10
Subcircuits
Many circuits are made with basic electronic building blocks, such as
operational amplifiers (op-amps), logic gates and comparators. For example,
an active filter might contain six identical op-amps . One way to create an
input schematic for such an active filter to be analyzed using the PSpice
software would be to place the op-amp six times in the schematic capture
window. In additi on, resistors and capacitors certainly will be attached
to those op-amp s. This appro ach can be tedious and monotonous work ,
especially when you begin to work with larger and more complex schematic
designs. Fortun ately, PSpic e permit s us to define an often-used or redundant
circuit block in a single new comp onent model. This circuit block can then
be used many times, like a part, each time the circuit block is used in a
schematic design. PSpi ce calls such circuit blocks subcircuits.
Table 1 0 . 1 - - - - - - - - - - - - - - - - - - - - -
Linear Dependent Sources
Linear Dependent Source Abbreviation PSpice Component
Name (see Figure 10.1)
Voltage-controlled voltage source VCVS E
Current-controlled current source CCCS F
Voltage-controlled current source VCCS G
Current-controlled voltage source CCVS H
Subcircuits 10·1
E1 F1 G1 H1
~ ~~ ~ ~
E GAIN = 1 F GAIN = 1 G GAIN = 1 H GAIN =1
Figure 10.1 - Linear dependent source schematic symbols (see Table 10.1).
The schematic symbols for each of the four linear dependent sources are
shown in Figure 10.1. Each of these source components consists of four
terminals . Two terminal s are sensory terminals that detect an input voltage,
in the case of the VCVS or VCCS (volta ge-controlled voltage source or
voltage-controlled current source), or input current in the case of the CCCS
or CCVS (current-controlled current source or current-controlled voltage
source) . The input to the sensor terminals, in conjunction with a user-defined
gain constan t, will determine how much voltage or current will be present
at the output terminal s of the linear dependent source .
Using component E, the voltage-controlled voltage source, a circuit
will be constructed in the Cadenc e Allegro Design Entry/OrCAD Capture
schematic capture window to show how to create a subcircuit using the
OrCAD /PSpice software. After the subcircuit has been created, it will be
demonstrated that a VCVS exhibits similar behavior to a typical op-amp, in
the sense that it is possible for a user to create a certain amount of voltage
gain that can be seen between an input and output voltage.
Out
-=-0
10-2 Chapter 10
and the output voltage or current to be present within the terminal s to the
right ofthe component. Thus, our input pins (which we will talk about injust
a moment) have been attached to these. Also, note the presence of R1. This
large I MQ resistance between the input terminals is characteristic of the
enormous input impedance of a typic al op-amp . A linear dependent source
exhibits almost ideal behavior, so R1 is there only to help mimic the input
termin als of an op-amp model. To the right of the terminals, the negative
output has been grounded, and the output has been designated at the positive
output pin of the VCVS component. With the negative pin grounded , all
the potential developed between the output pins will be seen at the positive
terminal/output pin, and again, will simulate a singular outpu t of an op-amp.
To summarize, the input pins (designated + and - ) at the left of the
schematic are similar to the input pins of an op-amp. An input poten tial
attached to these pins will be sensed and acted upon by the VCVS component
and produce an output based on a given value of gain. In the case of this
sample circuit, the gain has been specified as 50,000.
Now, to place and designate the input and output pins of a subcircuit,
select the button in the right toolbar titled PLACE PORT. You will be
presented with the window shown in Figure 10.3 . Scroll through the
Symbol
OK
PORT LEFT -L
Cancel
POR TBO TH -R /C,/l,PSYtv' ""
Add Librar}'...
PORTLEFT -L/ Design CcD ~P O RTl£ FT-L
PORTLEFT-R/ C,/l,PSYM [ Remove Libra!}' 1
PORTNO-L/C,/l,PSYM
Help
Libraries:
Name:
PO RTLEFT -L
Subcircuits 10-3
available ports and find ports PORTLEFT- L and PORTRIGHT-R . Placing the
port called PORTLE FT-L will create a terminal that will appear on the left
of the subcircuit block that you will create, and placing PORTRIGHT-R will
create a terminal that will appear on the right of your subcircuit block. Two
PORTLEFT-L pins have been placed on the input side of the design and have
been named simply + and - . The terminal - denotes the port that connects
directly to the negative sensory terminal of the VCVS, and the terminal +
connects directly to the positive sensory termi nal of the VCVS. The output
terminal of the VCVS component connects directly to a PORTRIGHT-R port
and has been named OUT . Thus a single output pin will appear on the soon -
to-be-created subc ircuit block named OUT .
Now we turn to the first step in creating the subc ircuit block based
on this design . After drawing the schematic to be reduced into subcirc uit
form , save the design and select the CREATE NETLIST option found in the
PSPICE menu, as shown in Figure 10.4. This will present you with a CREATE
NETLIST window. Click the PSPICE tab at the top of the window so that
the CREATE NETLI ST window looks similar to Figure 10.5. If this CREATE
NETLIST window does not open, you may need to use anot her metho d of
creating the netIist. There are subtle differences between some of the most
recent versions of the software, and whether or not you experience this
problem of not being able to open the CREATE NETLIST window depends on
(3 .30. 1.&1)
The fOlOft'lg 2 polflts have ~ tdentifJed as net conned Wit y (!'lange poIlts from the tast opera tion
(3 30 . 1.20)
(3.30 . 1 80)
CtUt~ , PSpc., Meld: 101IN- Kti\~ srmuIMtoot> pt"Cfk.
I
10-4 Chapter 10
~ Creeee Netfist ,~ ~
PCB fdlor I EDIF 2 00 I INF I t.ayou I PSpice I SPICE I VOliog I VHOl I 001er !
Option:!
D u.ate ~ Format Nell:;t ISeImgs-1
~ Oeee SubGrt:ut Format NetI,.
.ji) Descend
Use TenJllote:
ate
:::J ii; X 1"
•
IPSpiceTenJll
1._~ DoUct Descend :_------------------- ---- ----_:
I
: {i] Place DRClMlk.,. for Eitm and W~
0 ~ Mode(1 62 and PriorReIeeseej
I OK II ~ II ~ I
Figure 10.5 - CREATE NETLIST window.
the version of the OrCAD/PSpice software you are using. Another proce ss
that surely will work for creating the netlist is to select the project tab in the
OrCAD window. This will display the project folder and all associated files
in a hierarchal format. Select the schematic page that contains this design by
clicking on it, and then select the CR EAT E NETLIST button from the toolbar
at the top of the screen . For more information regarding this method, refer
to Chapter 3.
Once the CREATE NETLIST window has been opened and the PSPICE
tab has been selected, check the box to create a subc ircuit format netlist
with the DESCEND bubble chosen. This means that a netlist will be created
that describes the schematic to be contained within the subcircuit. The
fact that this subcircuit descends means that once the subcircuit has been
implemented in a new design, the subcircuit netlist will lie on a hierarchical
tier below the top schematic page of the design . The text box at the bottom
of the window designates the destination and the file name for the netlist
of the subcircuit block . The VIEW OUTPUT box has been checked in this
window, so after pressing OK, the completed subcircuit netlist file will be
opened in a new window.
Subcircuits 10-5
I!d Ope n l ibrary - ~
~ - - - -- - -_. ---
Lookin. SCHEMATIC 1
... -.:
Recent Places
Name i Date mod ified
~-Op-a-m-pS-ub-ci-rcu-it.-U-B-----~ 8113/20138:36AM
Type
PSpice M,
Desktop
l ibraries
Com puter
Nrlworl: ,1
1-_ -==== ========:::::'-
Re name:
III
I SDT ~Jb)
Figure 10.6 show s that the netlist for the subcircuit block based on the
schematic design created earlier in the chapter has been saved under the file
name "OpampSubcircuit" .
10-6 Chapter 10
eaeeace _ '" 1<1
so"r~
. :! " BCn"
E El
lO.-ll.l
.Ur03
.. ~:;),~ ): ll.<;::IT
:! ~..tI'..JJ f Cl "
oarO .. -$:lk
- O\o~
;
.. ~ '7 '
l-g:Z:·Si~;;~:*~~~:-----· 1
,~,. .•, ~
~.-: t-{ .:W~
(;iJ~U
_ _, t";;'Ci ,.... .
, ~
:IID
-~
,
::'~"
,- ~
.... S.-""POll
.
' r
i _-Il ~ . ..
.
..
I
1.""'-'1
SCHEMATI Cl + - Out
OUT 0 + - SOl<
Model Name Type Modified Date/Time
+ - !MEG TC= O, O
SCHEMATICl SUBCKT
Figure 10.8 - MODE L EDITOR window displaying imported VCVS design netlist.
Subcircuits 10-7
Create Parts for l ibrary
Desktop
Libraries
Computer
, ~ III
Network
Fieran< : I -::J ~
Crea te a new project and open a blank schematic page in the OrCAD
schematic capture window. Next, add a new library in the PLACE PART
toolbar by clicking the ADD LIBRARY button pre viou sly mentioned in
Chapte r 2. Browse and find the name of the OrCAD library that was ju st
create d using the Model Ed itor program. In this case the library name chosen
is OpampS ubcirc uit.olb (see Figure 10.10). Open this library.
This library now is active in the schematic window along with an of
the other components that you have been using up to this point. There is
10-8 Chapter 10
only one component in this library, and it is shown in Figure 10.11.
=9~1 OUTf- lt is the subcircuit block SCHEMATICl, and it features three pins
that correspond with the ports placed in the schematic design in the
SCHEMAllC1 beginning of the chapter.
U1
lbaI)' Path
OK 11 Ca-1C<l I[ PWt II ~
Subcircuits 10-9
U 6 ._
....
2 .1lrII .
..
- 2.•
-'. IU
-•.IU Is+---~--~---~--~--~---~--~--~---~---;
1 . 1M 1 .2M 1. 61tS ' . 7M I .'M 1.'1115 1. ....
• U( 11O.D :2 )
e,-
TI ..
Figure 10.14 - AMS Simulator window plotting the load voltage with respect to time .
terminal. Recall that the VCVS component within this subcircuit has a gain
of 50,000, so it is expec ted that we will see an output of 5 V after simulating
this circuit.
Before simulating, it is essential to configure the new library. In the
SIMU LATION SETTINGS window, select the CONFIGURATION FILES tab.
Click LIBRARY and then browse to find the OpampSubcircuit.olb file (see
Figure 10.13). Click ADD TO DESIGN and apply the se changes after
opening the library file. This action allow s the PSpi ce software to attach the
underlying netlist data for the SCHEMATIC I component to the simulation
profile. Even though the subcircuit block is visible in the schematic design,
the netlist data is not associated with the schematic from a simulation
standpoint. If the user neglects to configure the library for the subcircuit
component, a simulation will yield errors. Most likely, the PSpice software
will inform the user that the component is undefined and that all of the
attached traces and components are floating.
A Transient Analysis was carried out on this circuit with a start time of
Os and an end time of 1 ms with a step size of 1 its. As predicted, the output
voltage measures exactly 5 V (see Figure 10.14).
In Summation
Being able to create a subcircuit can significantly reduce the complexity
of a design and can be especially helpful in an instance where a circuit might
feature redundant branches or networks. These subcircuits can be utilized
to simplify some of the sample circuits in the next chapter.
10-10 Chapter 10
Chapter 11
Sample Circuits
RA RD RF
2k 4k 500
-;,J-
300 •
RI
200
7"0
RC RE
3 ~ M*M
l~
400
RA RD RG
....&IE
2
RB
5
300 200
11-2 Chapter 11
with respect to ground, current and power, respectively. Since we want
to find the voltage across resistor RG, it will be necessary to subtract
manually the voltage at node 5 from the voltage at node 4, as follows:
V RG = V(4) - V(5) = 1.4474 - 0.8977 = 0.5497 V
While it is not necessary for this problem, the Small Signal Bias
Solution will also yield the branch currents, and the power dissipated within
each component is displayed in the outputs shown Figures 11.3 and 11.4.
The de circuit in Figure 11.5 contains a voltage source, a current source,
and three resistors. The voltage across the 40 Q resistor (R2) and the current
through the 30 Q resistor (R1) will be determined. Similar to the previous
example, these values can be found using the Small Signal Bias Solution.
Figure 11.6 displays the voltage at each node of the circuit with respect
to ground. The voltage measured from node 4 of the circuit is the voltage
drop across the 40 Q resistor. Referring to the output from Figure 11.6, this
potential is measured at -5.143 V de.
11
R1
r- ~'
2 4
30
500mA
6V
-T R2
40
R3
20
1
-=:1-
-=-0
11
R1
2 4
30
500mA
V
6V
-T R2
40
R3
20
-=-0
11
R1
2 4
30
v
6V
R2 R3
40 20
G1 2
~ RA I
15 I < RC
~ 25
1 I 3
> RB
GAIN =5 ;,. 25
RD
<
-- - 6
8V
~TV1 V2
4
JIt--4
12V -'--
-=- 0
11-4 Chapter 11
using the Small Signal Bias Solution. With reference to the discussion in
Chapter 4, just as was seen in that first sample circuit, here the circuit
voltages, currents, and wattages can be toggled on and off in the schematic
capture window after the Small Signal Bias Solution is complete.
Figure 11.9 displays all the node voltages in the circuit. According to the
simulation results, the voltage drop across resistor RD is equal to 1.891 V.
Another element of the problem statement was to find the current
across the resistor RB. The circuit currents are displayed in Figure 11.10.
The Small Signal Bias Solution results indicate that the current across RB,
the 25 n resistor, is 318.2 rnA.
RC
25
RB
25
RD
6
8V
TV1
-=-0
RC
25
RB
25
RD
6
8V
T V1
4
10 20
D1N4002
VD
-T
840mV
-=- 0
Figure 11.11 - Diode test circ uit schematic.
Sweep variable
I~} Voltage source Name: VD
OJ:t;ons:
e> Current source
e Global parameter btodettcpe r ·1
~ .. C) Modelparameter Model nerne I -.J
EJ Seccodev Sweep C~
o Morte CarIolWoost Case ~ Temperature Peremeter name.
OK II CMC<i I l~ FwIY 11 ~
11·6 Chapter 11
Figure 11.13 shows the diode volt-amp characteristic s. Using the
cursor in PROBE , at 600 mV the diode current is 1.763 rnA, while at 810 mV
the current has risen to 163.763 rnA. If the Y axis is made logarithmic rather
than linear, a straight line graph results due to the relationship bet ween
voltage and current in a diode. Remember that the PSpice software has
ability to display a trace that plots a mathematical expression. This functi on
is used to the graph the diode 's static resistance , VD/ID, in Figure 11.14, and
e 20 ....
: : Er:F::E·E.F
c . . ."JJ·:·F
.
~ 151M +--i-:--Cc---!-";'-+--+--+--:---i--i-t-:--C'-i- t-+--+--:--f--i--:--:-H--,.-+-+-+-...,--:-+--i--i-rl--,.-:--,...-+...,--:--i-t--:-",L-J
y
n
t
--+.+.+.....+.+..... ~
:::f:::f:::j::: :::[:::1:::1:::
"'r"T"r-' ··'to ··r·ot"
.... . . ... ..... "... 12...
""'" " ... " ... ...... .....
ea...
S Jill, :
!,..'t:LI..,...,...,.. 1:::~. .:: 1 """":I:rT:.·:::r:: . . ....< .. ~::: : -:: : rr: : : ::: :j.::FI.: ..:
.
f ' :••+ ..;....:.. ..,.. + : > t I: :i·: :t::!~~~ ~;· ·j ,·.. ! :· · f·..,··+- ..,.. + ··,..··: ,..·, : '..·'.. ·I· ..·,..··, 1:::{.:::: :r:
.l±l· it"' jj
", ±", <
t··'LU
"",,:rt ::r::j:±
:;::[:J :::;:::iJ=
:: 1·:: Lt
:::; :tt;::T:1JjjII::tt±±~~~~
6 0BnIJ
.."""
62(11,0
e V(IJ D: -)I I ( O)
610nU l Don U
""'" .... .
nenu lI OnU . .Gnu
Figure 11.14 - AMS Simulator window plotting the static resistance of the diode .
.
Y
"
"I
., ,, ,..,.. :~r ·LL : ::T:r::j::~~T:Y~L
. . . -_. -- --
. ..
.................... . . . ... . . .
. . , " . . , . . , : ". .. :
Figure 11.15 - AMS Simu lator window plotting the dynam ic resistance of the diode.
VDD
J
~".v RD
10k
10V
VDD
-
9
~VDD
OV. I V-BA
-T-T-E-R--'~'--J-2N4395-
~ AREA =8
o
11-8 Chapter 11
the diode 's dynamic resistance , d(VD)/d(ID) , in Figure 11.15. It is interesting
to note that at 640 mV, the static resistance is approximately 173 .0, while
the dynamic resistance is much lower, 14 .o.
Before moving into some real circuits with practical applications, we
will carry out the same proces s used for the 1N4002 diode using a JFET.
The proce ss will look very similar to example s carried out in Chapter 8,
except we will use other simulation and trace technique s to explore other
characteri stics of the transistor. The test circuit of Figure 11.16 uses an
N-channel JFET, J 1. A graph of drain voltage versus gate-source voltage
is desired. The gate-source voltage, VBATIERY, is stepped from -2.5 V to
0.5 V in steps of 20 mV.
Before creating a simulation profile and carrying out a simulation, we
will use the Property Editor to modify the physical characteristics of the
JFET. Double -click on the JFET to open the PROPERTY EDITOR window
(see Figure 11.17) . Under the AREA column, change the numerical value
to "8" . However, the element line for the JFET contains an area factor of
8. This means that the physical area of JFET Jl is 8 times larger than the
default JFET, and several of the JFET parameters will be affected.
The voltage source, VBATIERY, swee ps from - 2.5 V to 0.5 V in
increments of 0.2 V. For this particular simulation profile, VBATIERY is the
only component with parameters that will be swept. Sweeping the value
of this single source will yield a transfer cur ve for the transistor in the
PSpi ce OUTPUT PLOT window. The simulation parameters are defined in
the SIMULATION SETIINGS window as shown in Figure 11.18.
Figure 11.19 is a graph of drain voltag e, V(3), versus gate-source
voltage, VBATIERY. The drain voltage begin s to drop when VBATTERY
o
SlNtPage JrEmDCSWEEPS..• ][~ PAGEl r SOtEHATL. 1
INew Propelty...JI Apply I IOisplay...] I Oelele Property] I Pivot I Filter by: I< Culfent properties >
6 Valuefist I;
OK
u , au
o
.1
t
.' ::. :. :,.': :.:.:.;.'::,:.:..' :. '. ' :. ... " '. ' ... i:.... , . ':,:. -:: : : : : ..
I...c....:.. ·:,.. .
. . ~
Figure 11.19 - AMS Simulator window plotting JFET transfer cur ve.
11-10 Chapter 11
reaches - 2 V, and the JFET is saturated whe n VBATIERY is above - 1.3 V.
The PROBE cursor could be used to get exact num erical data, if need ed.
Figure 11.20 is a schematic diagram of a transistor-transistor logic
(TTL) 7404 inverter. The output is connected to a 2 kQ pull -up resi stor. In
order to determine the tran sfer charac teri stic of this circuit, a de source, VIN,
will be swept. The range of the input voltage sweep will cause changes in the
output voltage characteristic of a logical 1 changing to a logical 0 at room
temperature. The sweep parameters will be discu ssed below.
To simulate the change in logic level from 1 to 0, the de voltage source
will be swept from 1.10 V to 1.60 V. In order to provide a high -resolution
output plot, the DC Sweep will occur in I mV incremental steps . These
simulation parameters have been outlined in Figure 11.21.
The graph of Figure 11.22 shows that the output voltage stay s at
nearly 5 V until the input voltage increases to about 1.28 V. As the input
voltage rises from 1.28 V to 1.38 V, the output monotonically decreases.
For input voltages above 1.38 V, the output is less than 30 mV, indicating
that transi stor Q4 is well into saturation.
One note of caution: In a circuit that is bi-stabl e or has hysteresis, such
as a Schmitt trigger (a TTL 7414 IC is one example) , the use of de analysis
can be problematic. In the de analysis, previous circuit values are not taken
VCC
4 j
RCQ3
130
RCQ2
-tl8J2
1.6K
RBOl
4k N2222
RPULLUP
5 2k
'\ 01
2 0 1N4148
1
05
3
~ Q2N2222 9
Vcc
Q2N2222
~ 04 9
~Vl
VIN
OV -...=-
-T REQ2
Q2N2222 5V -
lk 0 'T
I - -
-
7'
o
. _ x_
- - - -
6 Value i ,t
0" ; ; : : : ; : : ; ; : ; ; ; ; : ; ; ; ; ; ; ; :
u
··_( -( -t ·( - .. _ . .".. ..- ...•...•........... .....-_ ....... ,----..... ...•...•...•...•... ..., ...,...,....... .
...•...•...,...•... ...•...•...,...•...
::Fj:::FF
~. _ .~ - _ . -.- _
p
t
... ..... ...... -.....- -_................. ...........•...•.... ... ..........., ... :::i:::t::j:::1:::.
···r··-.···,···.··-
~
~ ~
U ...•.......•....... ... ... .......... ... _ ................. _. .. ................... ...........•...•... .......•...•....... ...........•...•... ...... ............. ...................
t
~ . OU
1\1
1.I OU
...................
.U ( Q ~:c)
1 .1 SU 1.2 OU 1.2SU , .31\1 1. 3SU
tRr
................... ................ _... ................... ...................... ................... ......... ......... ...•...•...•....... ...............•.... ................... . ..........•.......
................... .................,.... ..................... ................... .............. ....... . .................. .................... . ..................
••• •••• J • •••~ ...... . .
U_U1H
Figure 11.22 - AMS Simula tor window plotting TIL inverter transfer curve.
11-12 Chapter 11
AC Sweep Examples
The RC circuit of Figure 11.23 is connected to a 1 V sinusoidal source.
It should have a half-power, or - 6 dB, frequency of 500 Hz . A PSpice AC
Analysis will be used to generate a Bode plot (a grap h of the magnitude
and phase of the output voltage versus frequency) of the circ uit respo nse .
The schematic design of Figure 11.23 calls for the source voltage ,
V1, to be stepped from 5 Hz to 0.5 MHz logarithmically, with 100 step s
per decade of frequ ency. The output voltage (at node 5) will be plotted in
decibels in the OUTPUT PLOT window. These simulation parameters are
shown in Figure 11.24.
3 ~5
1VK ~
OVdC~
'" ~ C
.159u
ACSweep Type
t) Linear StartFrequency: 5Hz
L OK I[ UnceI I[ !Wt II ~
• -I
=---FS~K
I
08(U( 5 »
·•" -5lkS+---+---+--+--+--+-~.,__+_-_+--_+--+--+--+_--
·
1
Figure 11.25 - AMS Simula tor wi ndow plotting roll -off in dB and phase.
11-14 Chapter 11
8
RTOP
2k
V1 CTOP
1Vac <: .796 u
OVdc - 6
RBOT
2k CBOT
T .796u
""mV
,V
,I
..
,· :;:;-; ~:== ~~
· lOOmV
' 00 OJJ,m 333m) ~
.:::~ :~~
.. ..
..
, ... V1"<S}
·
1
·· ..
, ..
:~
~:
··, .. J_l~ ~ :' _l~_ ~.l.~~J. /.
~
·
1
.. .. .. ..
.. .. .. .. ~~::: ..
.. .. .. .. ..
»
S<l
-1 .Id,
,.." ,
U (
•
)
3
"" 1 ...,
F rpqurncy
3 ..., 1 ....
Figure11.27- AMs Simulator window plotting bothvoltage magnitude and phase at node6.
L2 L3
C2
RIN
3
e 5
2 --j 4 "
50 '" , - v 2.9uH ",-~ l UH ROUT
" , - v 950p
0.3
VOFF =OV e L1 RP
VAMPL =2V C1 5.5uH C3 710 6
FREQ = 2MegHz 125p 184p
AC =2V
COUT
o BOp
7' 0
Simulation Settings - AC
Config.rcrtion Fies
OK I [ Cancel I[ ~ 11 ~
11-16 Chapter 11
by hand at a single frequency. It is a matching network that is to be used at
several frequencies. However, ROUT and GOUT, the resi stive and reactive
part s of the load imp edance, vary with frequency. For this rea son the anal ysis
will be at 2 MHz only.
T he inp ut file of Fig ure 11.28 calls for an AC Analysis at one freq uency,
with six voltages to be printed. The load resi stance, ROUT, is between nodes
5 and 6, and the voltage ac ro ss ROUT and GOUT is between node 6 and
ground. In order to find the magnitude of the ac voltages at each node of
the circuit at one specific frequency, an AC Sweep simulation profile will
be created with a relatively small range. These sim ulation parameters are
shown in Figure 11.29.
Note that since you need onl y to ob ser ve the behavior of the circuit at
2 MHz, the range of the frequency has been set to start at 1.99 MHz and
end at 2.0 1 MHz, with 50 data points per decade. This will provide you
with an output plot displaying only this miniscule portion of the frequency
spe ctrum, with traces centered around 2 MHz.
Voltage measurement markers were placed into the schematic diagram
shown in Figure 11.28 at each nod e of the circuit. The magnitude of each
trace has been labeled on the plot sho wn in Figure 11.30.
Obviously, this is not a high-efficiency matching network. Some of
the voltages, across reactances VM (4) and VM (6) for example, exceed the
input voltage ; this is indicative of some resonance effects occurring in the
matching network.
One of the limitations of PSpice is shown here, which is that a load
·,
U II .IU
··•
VC:ll:a9t NOdtS&.6·0CXXXI~"'.3~l
t
/ .
c::: VoIl;,ge NfJde 4 "(00''',3 0l32)
3."
cc.::....V OJl.a9t' NocI3 "' (2 OOXlM,2.6OO8)
1. . .
/ V~ age Node 1.= (20c00 M,51700 4rn)
.
1. 91 l1H1i1 z
a U(1 )
1. 9 9 D1t11;l 1 . 9921'4 % 1 ." II"" z
• Vel) .. U(3) ... Uell } • U(5) • U(6)
1. 99 6HHz 1 .9 91 tlHz 2 . 11I0 tIfz 2.GOZt1M z 2 .001l" "Z 2 . II06 HHz 2.IOl tllz 2 • • 1OtlHz 2. U12t14z
Fr l'q utoncIJ
Figure 11.30 - AMS Simulator window, plotti ng the voltage at node 1 thro ugh node 6.
LL LR
CL CR
"
1--=2'-----rv-YV"'I~-------<r ~----1 ~6
~ W~~
3 ----11- 1mH 63.33nF I
" ""' ' mH
RR
f ~~ OVdCY
3
l::....•..••.••.••• ••.•.. •..•.•••.••.•.•.•.• . .• .• .•.•.•.•.••. ••.• • .•. t/t:\ •• • • •.• • • •..• • • • • • ••••.• . •.• • • •• •. • • ••...•• ••
... .. ...... . ... .............. . . . . /7.Q7.V -/- /. . -\ \........ . ... . .
D" ::::: ::::' :::::'::::':::'::":':"'::'::':::::::::::::.::: ::··:::j ·::·::::r::::y:::::: ·:\;::::::·:·:::::: :·:::::::::::::::::::::.::: .::::.:::: .
. . "'~" " j :\ "~' . .
. ••••.•.•.•••.••.•.~,.•.••;i•• •. • • . • •. •~• ~.~~.•••••
'.2 -'- _~ ....... ::. ~~.::::: :.:::. . ~ .: :?
. +-- -- - - - - - - - - -- - - - - - - -- - - - -- - -- - -- -- ----1
15KHz 25kHz
U( 3) U( 6 ) . 111
Frp quft\ cy
Figure 11.32 - AMS Simulator window plott ing voltage measured from each RLC branch.
11-18 Chapter 11
A similar technique can be applied by placing the two circuits in series when
a current source is the input.
Each circuit is resonant at 20 kHz ; they differ in the series loss
resistance, which determines quality factor Q and bandwidth. The source,
v, will be swept linearly from IS kHz to 25 kHz, and the voltage across the
two load resistors will be plotted.
Figure 11.32 shows the graph of res istor voltage versus frequency
for the two circuits. The substantial difference in the bandwidth of the two
circuits is apparent - the left circuit, with a resistance of lOn, has a lower
Q and larger bandwidth than the right circuit, which has a resistance of
3 n. The PROBE cursors, on the V(3) trace, are located at the half-power
frequencies (19.207 kHz and 20.813 kHz), with the bandwidth computed
to be 1.5967 kHz.
The analysis of a circu it containing an RF transformer with a coefficient
of coupling less than 1 is somewhat tedious, even at a single frequency. To
get a freq uency response plot is not a task anyone would enjoy (or have
time to do) by hand. Figure 11.31 illustrates such a circuit, which is fed by
a current source.
One limitation of PSpice is apparent in this circuit - each node must
have a de path to groun d so that a Small Signal Bias Solution can be found .
This is true for any circu it, even if the Bias Solution is meaningless beca use
there are no de sources in the circuit. Resistor ROC PATH is added to the
circuit so that each node will have a de path to ground. As shown in the
schematic in Figure 11.33, ROCPATH has a value of I x 10 12 n, so its
effect on the circuit perfo rmance is neglig ible . Both primary and secondary
windings of the transformer are resonant at 2 MHz, and the coefficient of
coupling is greater than optimum coupling. This means that the transformer
is overcoupled and will have a very undesirable frequency response.
RPR IM RSEC
2
CRIM
RSO URCE 3l6.63pF CSEC
lOOk RL
T 1 316.6 3PF 30k
RDC PATH
-:-0
1T
··
I
6 OIl
-- --
~~~~~/:
.( 1
-- --
--
--
··,
t
-- -- --
s OIl
R_'-070~':;<: _ --
• OIl
:fA: ..:..:.:.::.... ..
.-
-y- ::k
.... ...
......
- -
-~/ ----X
.. ..
.-
3 OIl
-- _.
.-
.. ..
-y~-
...... ..
-~>z-'
...- .......
_. .. .. -/ {
...... ...
.~\.
.... -.. ..
..
..
, OIl
.- ..
.. --/2(;-.-
..........
:~: :~: ·)SC
...... ...... ..
. ~:
-- -. -- .. .~
.. ::::::::::...::::::"
.. .. .. .. ..
1
,....z , , ...t:
•( .3)
r r lP qu ~cy
R CRIGHT
3 5
-I 9
6 10uF 20uF
CMID
Wac ~
V ~ 2Aa
OAdc v
" RDUMMY
1T
OVdc - ell L
1mH
-=-0
11-20 Chapter 11
on circuit behavior. The simulation profile dictates that an analysi s occur at
101 frequencies linearly spaced between I kHz and 2 kHz . Results of the
AC Analysis will be plotted in the AMS Simulator window.
In this particular example, the default phase shift of the current source
will be -30°. To assign this default parameter, double-click on the current
source, I, to ope n the Property Editor (see Figure 11.36) . Under the phase
column, enter a value of - 30°.
Figure 11.37 is a graph of the phasor output voltage. The upper plot
indicates that the voltage at node 5 is at a minimum around 1.6 kHz, and that
the phase changes abruptly at the same frequency. PSpice always expresses
phase angles such that the magnitude of the phase angle is 180° or less.
Thus, what appears to be an abrupt change in phase angle may simply be
due to how it is expressed by PSpice.
ACMA G ACPKASl
2Aoc . JO
lOY
V
0
........................ .......... .. . ........... ... . ... -_. .. _... _-- --_. ------_.. -------.. .. --_. .. . .. . _-_.. _._.-.. . .. .. .. . .. .. . _----.. . .. .. . .. . ------_._ .- . . _._-- _._---.. ......
_
I . _----- -_............. -_ .............. ......... _._.- ........... . . __............... - ............. . . . . ........... ............. ... ...............- . . ............_- ........... -_.. __........
,
I .. . _._-- . _--_........ ................... .......... . .. _. _. _._. ... -.. .. .
.
. . ... ... _- -----_ ... - .. . _--_ .- .. _
9 ....... . . _.-.......... .................. ................ :::::: :.::~::::::: : :: :: : :: ......... ...... ... .... ...... ..... .. .. ......... :~~ .
sv
. ~j~
".
OY
Viol")
•
,,
h
(I S9~K,~ 272)
·• ..
e
·
1
SEt»
- 2 0 Od
1 .CKHl 2 . 000Hz
VP(5 )
Fr ~ qlJ t'ncy
Figure 11.37 - AMS Simulator window plotting both voltage magnitude and phase measured from node 5.
15.92k
C1A
3
R2A RINA
15.9 2Meg
4
R3A -=- 0
-=-0
R4A L...../W,,------------J
10k 4.14k
-=-0 R18
15.92k
C18 C28
'---------1 f--_.1~2--j f-----~"-------___._____,
.01u .01u L--_-IT" ~+--_ _-.-J'1f\f\,...15
R2A2
15.92k 75
R38
R48 L...../\II!',, - ---J
10k 15k
-=-0
11-22 Chapter 11
20
// ~
10
/ BlJtl~h Re s pon~ e
->
- 20
- 30
-.. /
1 1 0HZ 30 Cflz 1. III Hz 3 . IKH z 1. MZ
.. D8 ( U( S)} • DB(U(1 S)
Fr l'qllf'ncy
Figure 11.39 - AMS Simulator window plotting the frequency response of each filter.
results if you create a similar design using one of the many op-arnp models in
the PSpice library. According to the simulation parameters ofthis particular
example, the frequency of the source is swept logarithmically from 100 Hz
to 10kHz, with 50 frequenc ies per decade.
The plot of the filters' output, Figure 11.39, indicates that the gain of
the Chebyshe v-response filter is higher than the Butterworth-response filter
in all frequencies, with a noticeable peak at 1.122 kHz. While quantitative
data could be obtained from this graph by using the CURSOR feature
of the AMS Simulator windo w, the graph is of great use in qualitatively
understandin g the difference between the se two filters .
A two-transistor BJT differenti al amplifier is shown in Figure 11.40. It
is fed by a voltage source at the base of Q I. This schematic design incl udes
two NPN BJTs. In order to perform an analysis, a simulation profile can
be set up so the frequency is swept logarithmically from 100 Hz to 1 GHz.
A voltage marker has been placed on node 6 of the schematic design to
produce a voltage trace in the output AMS Simulator window. This voltage
trace will be modified in the AMS Simu lator window so the output voltage
(which is the gain, since the input voltage magnitude is 1) will be plotted
in decibels.
Th is is a uniqu e sample circuit in the sense that it utilizes components
from the Breakout library that don 't necessaril y have defined characteristics
and can be modified. Notice the transistor models in the schematic design
are both the QBREAKN component from the Breakout library. The Breakout
library (search for this in the PSpice library) co ntains general tran sistor and
f
R4
5k
2
Q3
3
~Q breakn
VEE
VSig
I
I
Wa c ~
OVdc -
4
1- V3
R6
I• 12v
1
4.8k
Figure 11.40 - Differential amplifier design using BJTs from the Breakout library.
diode mode ls that are fully custom izable to a user 's specifications . This
model is of an NPN transistor. For this example, we desire a forward beta of
60 and significant junction capacitances representative of discrete devices,
not transistors on an integrated circ uit. In order to change the characteristics
of this transistor model, right-cl ick on either of the QBREAKN transistors
and select EDIT PSPICE MODEL. This will open the PSpice Model Editor
(see Figure 11.41).
Model Editor will indirectly amend the element line for the transistor in
the circuit's netlist by adding user-specified data. In the center of the MODEL
EDITOR window is a large textbox where you will first see a single line of
text that reads as follows:
.model Qbreakn NPN
Click inside the text box and modify the line so it reads, as shown in
Figure 11.42:
.model Qbreakn NPN (BF=60 CJC=16p CJE=30p)
We will discuss the contents of the parentheses in a moment.
The first portion of this line, .model Qbreak NPN, declares that the
transistor model that will be modified is the NPN, Qbreakn. When Mod el
11-24 Chapter 11
"""OfHori:ont.l!y
Mtml4'Vtftlcdy cadence
MinorBCllh
Roh lt
[6it P~._
EditPatt
............
S)tow fooc:print
linl<O",.e.-~P¥t Clrl..t
y_ DJUUw P¥t~ Ctrl-+D
rt':":t:"d l ' ~.··, ,,,,
COflMdto IJIK
l~ '
,. I
;..;;;j
__oc_~" :. ~I
" 1' · · · , · · · ·· ·1 . t. . . .. • . . . ,.
IUFO(ORNET-11:56) PSpiCe neUistgenerabonc ~e :
Cfealinlj PSpke toletlisl ! ll ..........r. :/Ili f
It.jF O(ORt tET-104 1) Wrtlilg PSpiCe flat t.jf:t1l5tJ: \C ha~ I~ ~, : p I.Jf .
IUFO(ORt lET -1156 ): PSpice netlist geoerabon cQn1)Ie,ei
Figure 11 .42 - MODEL EDITOR window featuring transistor model from the Breakoutlibrary.
50
0
B
v
~~
»->:
(l5613K,4IJ 7)
25
(.t lOOlM, 939)
0
'------- ~ <,
- ""Mill
. · Ud
.
s
-2 Sd
------- <,
(,fl001M. '&5 2)
<,
_
s - SIkl
~
1
<,
- zse
SEt »
1 0 1Hz
o UP ( 6 )
'OOltz 1 . GKHz 3.C«Hz 1 0KHz 30K Hz 1001(112 30 01(H" 1 . GUHz 3 .atlHz 1 0tlHz
--- r--
3".lIz 1 00t llz 3D1I1Hl: 10 KH Z
Fr'l' qu l'lIcy
Figure 11.43 - AMS Simulator window measuring phase and dB at node 6 with respect to frequ ency.
11-26 Chapter 11
40.897 dBV, or 111 V. This is a ridiculous result and could not happen in
the actual circuit because the power supplies would limit the output to about
12 Vpp. However, it is convenient to use 1 Vas the input magnitude, since
the output voltage is then the same as the circuit gain.
If the input were specified as 1 kV, the output would simply be 111 kYo
Clearly, you must be careful when interpreting results of an AC Analysis to
be sure that the numbers are reasonable. If you wanted to see the effects of
nonlinearities, such as clipping of the output due to the transistors becoming
cut off and saturated, a Transient Analysis would have to be performed.
The Transient Analysis does not use a small-signal model as does the AC
Analysis.
The Bode plot shows the half-power frequency to be at 4.1 MHz, as
indicated by the 3 dB (2.958 dB is shown) drop in VDB(6) and the phase
angle of --45° near that frequency.
R
11<
VIN
C
2uF
11 n
0 _ _ • _L ~~ . 2'IlI , 5/11
_ _ -1- ~ ' . L
- -- - -- -- --
Figure 11.45 - Property Editor for VPWL displaying timing instances.
."'~ --
cadenc
II VI V2 V3 V' VS
Figure 11.46 - Property Editor for VPWL displaying voltages associated with each timing instance.
.
U 1 . QU
.
1
t
: ' .IU
I I\Vlj I 1\ I 1\
0. 6u
1/
/ \ \ 1/
/ \ \ 1/
/ \ \
~
/ \ / /i / / \~
I . "U
\ ----------
/ .> \ /V /
] c pacitorV age \ 7 \
0.2 U
'"
I/~
"., U(5 )
O.S ns
_ U( 8 )
-: 1 . Gns 1 .5~
\ 1/a. .... 2.>"5 3 .Ons 3 . 5ns
\I It. Ons ".5"'1 5 .,,"s 5 .S ,"
\
......
Tl_
Figure 11.47 - AMS Simulator window plotting capacitor voltage in relation to the input triangular waveform with
respect to time.
11-28 Chapter 11
time. Create voltage columns for each of the seven voltages , similar to
what is shown in Figure 11.46. When the Transient Analysis runs, the PWL
waveform will be generated based on each pairing of voltage magnitude and
time; T1 will be associated with the magnitude of V1, T2 with V2, all the way
through T7 and V7.
Figure 11.47 features this triangle voltage from 0 ms to 6 ms only.
Note that there are seven time-voltage pairs in the PWL definition (see
Figures 11.45 and 11.46). A simulation profile will be created for a Transient
Analysis that ranges from 0 ms to 6 ms, using time steps of 0.01 ms.
An examination of the graph of the capacitor voltage in the output file,
shown in Figure 11.47, indicates that the capacitor voltage started at 0 V and
had nearly reached steady-state in 6 ms. The average value of the triangle
input voltage is 0.5 V.
For analyses that require many cycles of a periodic triangle waveform,
using a PWL source can become rather tedious. A better way to generate
a periodic triangle, pulse, saw tooth, etc . waveform is to use the PULSE
function (the VPULSE component in the PSpice library). When doing so,
it is important to use a tiny (compared to the period) but non-zero value of
pulse width. The rise time and fall time are set to equal half the period of
the triangle waveform.
The PWL source is a unique source as it gives the user the opportunity
to deliver any conceivable periodic or dynamic voltage/current to a circuit.
It is a broad concept, but might be better understood from the standpoint
of the component's element line within the netlist. An element line will lay
out all the instances of time and voltage/current in a single line of data . For
example, a periodic triangle waveform identical to the PWL triangle in this
example could be produced by the following element line:
VIN 5 0 PWL(O 0 1m 1 2m 0 3m 1 4m 0 5m 1 sm 0)
Outside of the parentheses, PWL designates that this is a PWL voltage
source . Inside the parentheses, the data can be broken up into pairs. The
first two values are both 0; the first value of the pair is time, and the second
is the magnitude of voltage. In a sense, this can be looked at as similar to
an ordered pair. What this means is at the time of 0 s, the source will output
o V. Moving on to the next pair, the values are 1m 1. This means that at
1 ms the source will output I V. The fact that this is a PWL source means
that between the times declared there will be a linear rise or fall between
the declared magnitudes of voltage . This example of a triangular waveform
is ideal for this type of source. Based on the values discussed in the first
two pairs, it is expected that we will see a linear rise from starting from
oV at 0 s to I V at 1 ms depicting the rising edge of a triangular waveform.
To demonstrate an alternative method of generating a triangular
I-IN
• C
SOm
.SuF
L
-=-0
11-30 Chapter 11
O<CAD Capture CIS- Lik - [Property Editoij
~ Fife Place 51Analysis Macro
T1 T2 T3
o 1m 1.1m
-------------------------------
- .~ -- - - -' - - - - - - -- ~ --~- ~ ----~._----
Figure 11.50 - Property Editor for VPWL displaying curren t magnitudes associated with each timing instance.
1. ..
C
u
.
,r-
n
t O.SA
so u~ urrent
1 . 6 11
~
I
g .~A
1.2.11
.. es
<I 1(I -fH)
'''-lans U.8ns 1 . 2M 10 6 m;. 2 . 011'> 2. l m s 2 . 8ns 3 .2n... 3 . 6~ 'l .U n s
Tint'
Figure 11.51 - AMSSimulator window plotting source current with respect to time.
....
·•
1
··• ....
t
/\ .: I 1\
. -I \ 1/ 1\ 1 \
Tank ottage ____
-211M.'
\1 \ / \ / \
~
-IiIQU
D .~"s '. 6ns
V
2 . 0ns 2 .~ "s 2 . ' n~
~IJ 3. 6ns ~ .on s
".. U( 1)
1 .8 M ' . 2RS
TiM'
3 .2 " "
Figure 11.52 - AMS Simulator window plotting tank voltage with respect to time.
R
2
10k
V1
C
1.6uF
-=-0
11-32 Chapter 11
After ente ring the low-pass filter circuit into the OreAD schematic capture
workspace, one must enter the timing and voltage pairs of the PWL voltage
source, V1. Using the same method as shown in the two previous examples,
adding new columns into the Property Editor, the voltage and timing pairs
are incorporated into the schematic design to replicate a beating heart. You
may recall how tedious it was when entering the timing/magnitude pairs in
the previous examples, and a waveform as complex as this can be rather
monotonous and time con suming, but it can be done (see Figure 11.54).
However, there is a much easier method.
With the PWL element line discussed earlier in this chapter, it is possible
to simulate a circuit using onl y a netlist text file. To refresh yourself on this
process, refer to the second netlis t discussion (Chapter 5). Using a VPWL
source named "VGEN", a netlist was created in a Text Editor as shown in
R
1 2
f~
10k
1"-
C
1.6uF
T1 = 0 '11 =-1 T21 = 100m '121 =-9 141 = 200m '141 = 34 T61 = 300m '151 = 1 T81 = 400m '181 = 28
T2 = 5m '12 = 2 T22 = 105m 'In =-7 T42 = 205m '142 = 12 T52 = 305m '162 = 3 T82 = 405m '182 = 32
T3 = 10m '13 = 2 T23 =11 Om '123 =-8 143 = 210m '143 = -10 T63 = 310m '163 = 2 T83 = 410m '183 = 33
T4= 15m '14 = 2 T24=11 5m '124 =-9 T44 = 215m '144 =-25 T64 = 315m '164 = 2 T84 = 415m '184 = 35
T5= 20m '15 =4 T25 = 120m '125 = -7 14 5 = 220m '145 =-30 T65 = 320m '165 =4 T85 = 420m '185 = 38
T6 = 25m '15 = 5 T26 = 125m '125 = -7 T45 = 225m '14 5 = -30 T65 = 325m '155 = 5 T65 = 425m '185 = 38
T7 = 30m '17 = 4 T27 = 130m '127 =-8 T47 = 230m '147 =-26 T57 = 330m '167 = 3 TB? = 430m '187 = 37
T8 = 35m '18 = 8 T28 = 135m '128 = -6 T48 = 235m '148 =-20 r ea = 335m '158 = 6 T65 = 435m '188 = 39
T9 = 40m '19 = 8 T29 = 140m '129 = -7 T49 = 240m '149 = -14 T69 = 340m '169 = 7 T89 = 440m '189 = 36
T10 = 45m '110 = 7 T30 = 145m '130 = -9 T5 0 = 245m '150 =-10 T70 = 345m '170 = 7 TOO = 445m '190 = 34
T11 = 50m '111 = 8 13 1 = 150m '131 =-9 T51 = 250m '151 = -5 T71 = 350m '171 = 9 T91 = 450m '191 = 31
T12 = 55m '112 = 8 132 = 155m '132 =-8 T52 = 255m '15 2 =-2 T72 = 355m '172 = 11 T92 = 4 55m '192 = 26
T13 = 60m '113 = 6 133 = 160m '133 = -10 T53 = 260m '153 =-3 T73 = 360m '173 = 11 T93 = 4 60m '193 = 22
T14 = 65m '114 = 4 13 4 = 165m '134 =-9 T54 = 265m '154 = -3 T74 = 365m '174 = 12 T94 = 465m '194 = 19
T15 = 70m '115 = 3 T35 = 17 0m '135 = -2 T55 = 270m 'I SS =-1 T7S = 370m '175 = 15 T95 = 470m '195 = 14
T16 = 75m '116 = -1 136 = 175m '136 = 9 T56 = 275m '156 = -1 T75 = 375m '176 = 18 T96 = 4 75m '196 = 10
T17 = 80m '117 = -4 T37 = 180m '137 = 25 T57 = 280m '157 = -2 m = 380m 'In = 18 T87 = 480m '197 = 7
T18 = 85m '118 = -4 138 = 180m '138 = 4 4 T58 = 285m '158 = 0 T78 = 385m '178 = 23 T98 = 485m '198 = 5
T19 = 90m '119 = -6 139 = 190m '139 = 54 T59 = 290m '159 = 1 T79 = 390m '179 = 25 T99 = 490m '199 = 2
T20 = 95m '120 =-9 T40 = 195m '140 = 49 T60 = 295m '160 = 0 TOO = 395m '180 = 25 T100 = 495m '1100 = 1
T101 = 800m '1101 = 1
Figure11.54- Schematic file with timing and voltage properties displayed(Schematic Capturemethod).
Figure 11.55 - AMSSimulator window with an active netlist depicting the schematic design (Netlist method) .
...
·•
u
f\
1
··• ...
E G Unfiltered Source Volt
-. I/ r ~,
..
gel
' ou \\ EKG Filte ed LPF r:
. ~ ~", ~// \/ ~ ~
-, .
~':: '"
,.d/
\v7
V
-.ou Is
II U(1) • U( 2 )
s_ ,,- .. - 2'_ ,,-
liM'
3.- os_
..- ..- s._
Figure 11.56 - AMs Simulator window plotting pure EKG (Input) and filtered EKG (Output) .
11-34 Chapter 11
+ symbol in the first column to indi cate a continuation of the previous line.
An interesting circuit to study with Transient Analysis is a half-wave
rectifier with a capacitor filter. The inrus h current at the time of turn- on is
not easily measured in the labo ratory without some kind of storage device
(analog or digital storage oscill oscop e). With PSpice Tran sient Ana lysis
this phenomenon can be easily exa mined in great detail, and insight can be
gained into power supply operation. Figure 11.57 is the schematic diagram
of the rectifier circuit. A Tran sient Analysis will be carried out for this circuit
that will run from 0 ms to 40 ms with a step size of 40 us.
Figure 11.58 plots the load voltage on the top and the diode current on
01 R1
10 15
-{)t-
1
01N3940 1
VOFF=OV
. VAC CFILTER
RLOAD
1k
VAMPL= 100V "-' 40uF
FREQ = 50Hz
AC=1V
~
-=- 0
, " ,T·_
V{:....
'5:....
1_ -, -,-_ _ -,. ...,-- _ _ -,. ...,-- _ _ -,. , -_ _ --;_ _ ---,
Figure 11.58 - AMs Simulator window plotting output voltage and diode current with respect to time.
VDD
«
I VDD
10V.:b-
V1 = 0 V1
V2= 10
TD=1U
TR=5N
TF =5N
PW =5U
PER = 10U -=- 0
V1 =0
V2= 10
TD =1U
TR =5N
TF =5N
11 -36 Chapter 11
loaded resistively and capaciti vely. The circuit consists of four enhancement-
type MOSFETs and two VPULSE sources that output square waveforms
that make up a binary input to the NAND circuit. For enhancement-mode
MOSFETs, VTO is positive for N-channel devices and negative for
P-channel devices. The starting time of the pulses is delayed by I us, and
the rise and fall times (5 ns) are quite small compared to the pulse widths
(5 us and 10 us). A simulation profile is set up to run from 0 ms to 24 f.ls
with a step size of 24 ns.
The analysi s results are shown in Figure 11.60. The upper plot contains
the two input voltages and the lower plot is the NAND output voltage by
itself. It can be seen that the NAND gate output is low only when both
inputs are high , and the rise and fall times of the output are significant. If
desired , the cursor in PROBE could be used to measure rise time and fall
time of the output.
A 7404 TTL inverter logic gate is shown in Figure 11.61 . It is fed by a
TIL-compatible square wave (well, nearly square). The output is connected
to a pull -up resistor of 2 ill. Thi s design uses a configuration of four NPN
BJTs connected to a VPULSE input, V2.
Again, this design will use the NPN transistor from the PSpice Breakout
library. In order to run the simulation, parameters need to be declared in
Model Editor. Open Model Editor as shown in Figure 11.62. The parameters
for the four transi stors are shown in the MODEL EDITOR window (see Figure
11.63). Save these changes and run a Transient Analysis on the circuit with
a start time of 0 ns and an end time of 105 ns with a step size of 105 ps.
!1IU
,su
D .
.. Is
• Uel)
.. ,.. ,..
-~,--~---+--------- -~------I------~-~--j
:U'I , " us 18.,'1 'Iu,
22u5
Yio,
,..., ' Iu,
,
...,I
..., ,. ,
tJ
10,.. 12us 16u5 181$5 'Iu, 22'1'5
~y
,
u su
..
.. Is
. U(IJ )
-_--~-- ---~-~--~--~--_--~-~--'--~-__l
2.5 ... , hs 'u, 'Iu, 1 211'1
,
11111'1 1 6115 1 1115 ..., ,
22:11'1 2 o\Us
Figure 11.60 - AMS Simulator window plotting the inputs and outputs of the NAND circuit with respect to time.
RC03
VCC 130
<? RCQ2
~V1 1.6K
03
7
5V
-T RB0 1
4k
~ RPULLUP
2k
-=- 0 5
2 Dl
Q2 D1N4002
1 3
'.V 01
Obreakn
Ob akN
6
V1 =0 V2
V2 = 4
TO = 10n REQ2
TR=2n lk 0
TF =2n
PW=20n
PER = 48n
-=- 0
'!'iJiiiiII" i
cadence _ It
6M-
Glot..-lRep..clt_
A~ P. rt :~} To ~ovp
~~ PMt'sl F Il~." G fC ~
~~.2~
"1· ' ' · 2· .. .~ ··t· ... t · ..... . ' "L. ~
I
J
Cfeating pspce Hensl
INFO(ORrlET-I 041 ). Wrrt.ng PSpIce Flat t~t!isIJ \CHAPTER 12\PSPtC E Fll ES'F igUre 12.5!\fgu re 12-58-PSplc e Fite5\SCHElIAOC1 \SCHEf.tATlCt ~!
11·38 Chapter 11
The input file, Figure 11.6 1, describes the input pulse as going from
o V to 4 V after a IOns delay, with a 2 ns rise time and fall time , a pulse
width of 20 ns and a period of 48 ns. Th e transistor model QBREAKN
includes a substantial number of parameters that override the PSpice default
parameters for a BJT.
The PROBE display is a graph of input and output voltage s (see Figure
11.64). The output waveform is valid from a logic standpoint, and it shows
the distortions that are to be expected from a TTL logic gate operated at
20.8 MHz.
Transient Analyses on astable circuits and free-runn ing oscillators can
.
V 6. 1U
I
t
.
; 5.1tU+----"
....
3."
2 .0 U
,...
..esL----L~_____.:;::====:;=::f..-~-~~~~====:::;:::t-~-~~ I
aU ( 1)
1 Dns
. U( ' ) "." "." 5 1n, 71... " ns 91n. 1 Ion s 11lns
Figure 11.64 - AMS Simulator window plotting the input and output waveforms of the inverter circuit.
R1 R4
1k 1k
VCC
<;> V1
C2
6V ~
20u -T
~
C1 -=-0
1 20u
4
Q2 03
'-L.
-=- 0
11·40 Chapter 11
~""
Simulation Settings - TRAN
•• ..>.<"
~ Iype:
Run to time: 2.5s seconds (TSTOP)
[TITle Doman (Tr<mien) ... 1
Start saving data after: 0 seconds
Options :
General Settings - Transient options
lEJ Mott e CarlolWor.:tCase Maximum step size: 2.5ms seconds
IE] Parametric Sweep
lEJTempernlu"e (Sweep) [J Skip the initial transientbias point calculation (SKIPSP)
EJ Save BiasPoirt
[J Load Bias Poirt
EJ Save 01eck Poirts
EJ Run in resume mode IOutflUt Fae Options... )
EJ Restart SiTUation
OK I[ Ca1ceI I[ PWt )[ ~
=ttt~ I
(RE LTOL)
Bestaccuracy at .!tollage;: 1.Ou volts (VNTOL)
Best accuracy ofcl!lrenls: U lp ,,",ps (ABSTOL)
Best accuracy at chaiges:
---
O.Olp coulombs (CHGTOL)
Mininurn conductance 101 any 1!Ianch: 1.(£·12 1/0hm (GMIN)
DCllndbills "blind"~eJation imt 150 OTL1)
DCandbills"bestguess" ~eration ~: 20 OTL2)
Irarnient tine point ~eJation timt 10 [ITL4)
Default ~ temperature: 27.0 'C (TNOM)
I OK II Qlncel ]1 ewr II ~ I
Figure 11.67 - Adjusting relative accuracy in SIMULATION SETTINGS window.
·
u
?/
1 au
··•
t
/'
/ V
- 2 . SU
-: //
- S . 8U
D V( 2)
V /
U
.
~
t
6.W
: ' .IV
( (
Z ...
sn,» ~
ou
..D U ( 1)
1 .2 5 1 . "5 1S.6 s 1. l s 1 .b 1. 2 5
Ti ...
1....5 1 .6 5 1 •• s 2 . es 2 .25 2. "5 2. 6s
Figure 11.68- AMSSimulator window plotting the fr ee-running oscillation of the astable circuit.
RE
RA
5
10k
RC
10k
GAIN =50000
10k E
DA RIN2
2 1Meg
Dbreak
RB GAIN = 50000 E RD
DB
3 4
V1
10k
RIN1 5k
-=- 0
VOFF =0 Dbreak
"v 1Meg
VAMPL= 1V
FREQ = 100Hz
AC = 1V
-=- 0
-=- 0
11-42 Chapter 11
A real diode has an offse t or barrie r voltage (about 0.6 V for silico n) that
mu st be overcome before forward conduction begin s. Thi s makes real diodes
unusable by themselves to rectify low-level voltages like audio signals. For
rectifying small voltages, another technique must be used to overcome thi s
limitation. Figure 11.69 is a pre cision rectifier circuit, sometimes called an
absolute value circuit. The input file in Figure 11.69 models the two op-
amps using VCVSs with a gain of 50 ,000 V N, which is controlled by the
differential voltage across nodes 10 and 20 in the subcircuit. Each VCVS
essen tiall y models an op-amp (similar to pri or examples) with a very high
input resi stance. The very large open-loop gain of the VCVS-m odel ed op-
amp Ell is used to negate the diode offset voltage.
The diodes are truly ordinary in that they are mod eled by the PSpice
default diode parameters, which gives them an offset voltage typi cal of
silicon. The input voltage is a I Vp, 100 Hz sinuso id, and the Tran sient
Analysi s occurs for two complete peri ods of the input. Thus the simulation
profi le will be set for a total runtime of 20 ms with a step size of 20 IlS.
In Figure 11.70 the input voltage is plotted in the top gra ph and the
output voltage in the one belo w. Th e output voltage is indeed the absolute
value of the input voltage, with no visib le differ ence between input and
output peak voltage caused by a diode . The accuracy of this circuit depends
on both the large op en -loop voltage gain of the op -am p and the ex act
matching of the resistors.
Figure 11.71 is the schematic diagram of an amplitude modulation
gen erator, although PSpice has a built -in model for a frequency modulation
generator (SFFM ind ependent source), it do es not ha ve an amplitude
U1
:
0\1 • Vi')
··Z
~....."' ;i"::::'"
':'::::\
• ./
~:::: . :::::/ '\ '-. l::: / ",;
fl. .
; .:::::::/:.:.: . .. . ~:::: :\ <I:::: '.:" .< . : .:\~:: : ::
Figure 11.70 - AMS Simula tor window plotting the full-wave rectif ication of the input waveform.
10
20
VCAR VMOD IN
VOFF=OV VOFF= 1V <: R2 30
VAMPL = 10V <: VAMPL = 1V 1
FREQ= 40kHz Rl FREQ = 2kHz v
AC= 1V 1 AC = lV
7"0
SEl »
.V V . .. - • '.r:~.!Y.~ .. :.\-1::\1..
. 0 - -
.:-:HJI:: ~V·.V.:y.~. ~:' •.:::.:.::•.:::.:~YY: ...
tJ...~.. . ·~u:··v~· .
•• ,
V·
•••• • •
-,'" - - - + - -- -
Is I . 1M D. 2ill1S D. 3 M 1 . lIftS 1 . 5ns 1 .6 M 1 .7 ns I . '"S D. 9 M 1 . 1M
II U( 3 1)
Figure 11.72 - AMs Simulator window plotting the carrier, modulation, and modulated waveforms.
11-44 Chapter 11
u , ..
I v
••
2•
Figure 11.73 - AMs Simulator window plotting a fast Fourier transform of the modulated waveform.
In Summation
This chapter puts together all aspects of the design and simulation
procedures covered in the previo us chapter in an effort to demonstrate the
capabi lities of the OrCAD/PSpice software through practical applications.
The last chapter of this book takes these procedures a step further and begins
to explore some of the more advanced feature s of the Cadence software
package.
Advanced Analysis
Until this final chapter, the text has focused mainly on carrying out
four basic simulation types on various circuit designs and interpreting the
simulation results from the Cadence Allegro AMS Simulator or PSpice ND
software. From a design standpoint, these simulation types are essential
to lay the proper groundwork for a given circuit, but it is important to
remember that any simu lation results yielded by these designs are based
on the behavior of an ideal PSpice model. The Transient Analysis, DC
Sweep, AC Sweep and Bias Point Calculation can characterize the general
behavior and functionality of a circuit, but they do not take into consideration
component tolerances, environmental factors (such as temperature), and
noise generated from real components.
The PSpice software has the capability to take all of these factors
into consideration and give you an idea of what you might expect from a
particular component choice and all of the possible ways it can impact the
performance of a circuit. These types of simulations fall into the realm of
what we will call Advanced Analysis (AA).
There are five types of AA simulations that will be discussed in this
chapter. They are Sensitivity Analysis, Monte Carlo Analysis, Smoke
Analysis, Noise Analysis and Temperature Analysis. The point must be
made that all of these simulation types are so immensely complex that each
one could have multiple chapters devoted to it. The purpose of this chapter
is to define their most primary functions and give the user some insight by
using the most basic examples.
VCC
vcc
<;> 1 2
~VDC
20V _ R1 RC
-T 40k 4.7k
C1
~ C2 Q1
3
f."-- - - ----l f--
10u Out
~O
VOFF=OV
VAMPL = 250mV
FREQ = 1kHz
AC = 250mV
~
f VIN 10u
R2
3.5k
42N3904
~ RE
470
<
RLOAD
47k
~o
12-2 Chapter 12
Browse File
Network
'" [ Open )
I~ I.mlry\.ob} "'I I Cancel I
~ • x
.. _--- - _. . -- - - - -
2N3897ITHYRISTR ", i
2N3898ITHY1
2N3898ITHYRISTR
2fl38991THY1
2N38991THYRISTR
2N39021BJN
2N390318 JN
~I
1
1l§li~~~!!~~!;tW~.":-
I Libraries:
h:OT •
74Af:.
I 74Af:.T •
Figure 12.3 - Advanced
Analysis 2N3904 selected in I74ALS
74M
II ~
PLACE PART window .
P'cI'O!l.-.g
=< ;~";..-,
Parts per Pkg
I a?
_ Pb" [ ::==:J
IJJ
.~. N",mol ' ColWerl
GJ Search fOfPart
VCC
9
~VDC
20V _ R1
-T 40k
~
-=- 0 C2
~
I:IN 10u
VOFF =OV ~
VAMPL = 250mV
FREQ = 1kHz R2 < RLOAD
AC =250mV 3.5k 47k
12-4 Chapter 12
select R1, R2, RC, and RE in the OrCAD Capture schematic capture window
and double -click on them to open the Property Editor. There is a column
within the Property Editor labeled TOLERANCE . Under this column, declare
the desired tolerance percentage for each compon ent. In Figure 12.5, the
10% tolerance has been declared for each of the four resistors.
After applying the changes, with the TOLERANCE column still selected,
you can click the DISPLAY button to label this parameter in the OrCAD
workspace. This has been done in Figure 12.6.
• • x
...,_ b en loA I~ "Aa' t' I SOI£HATL.\ Pool
!
[N... ~ .I ~JJ~'?±'r::L l£....;p;q;e;t)IJ Fl~by: E§£~~ ~_ ~ ... . .. .. ,_..
=11 1 c=- _·
ret 0402CS·' [tj/(OILCRAFT
, /
./ / ~. .--: ,-; .~ //
TC2
~,O, //.1,'-'-
TOlERANCE
'0" i
0402CS·l1N/(Q ILCRAFT
O<1(J2CS·l2NlCOll CRAFT n
21EE SCHEUAnc1 : PAGE1f0
31 EE SCHfUATlC1 : PAGUI/"
/
//
.~ 9
// 0 ~/
/,
,
/
"/ /.
'/
//
"/
// 0
...
//
/
~
/
/
'0%
' 0"
-I ().4.!)2(S· 1:·WCOll CAton
O.(I)2(S ·1 5~l lCO l lCRAFT
0402CS·H;/JICOILCRAFT
./ , 0402Cs·,eN/COILCRAFT
41 ffi SCHfIAATJC1: PAGE1I/ / .O~ 0-
I ~4Cl.:."CS -19.'~ICOILCRAF!
//
,>/ 0 /. --: / '0% ---J
I I libralle;.
VCC
VCC <;>
9
~VDC
2
TOLERANCE = 10%
20V _ R1 RC
40k 4.7k
OLERANCE = 10%
C1
~-------1~
C2
~v
-=-0 10u
ln v
VOFF=OV
FREQ = 1kHz
AC=250mV
"':-'
VAMPL = 250mV sf VIN 10u
RLOAD
47k
-=-0
EditPropmi 6 _.
Edit Part
&port FPGA
...
Show Foot print
-£dot PSpK. Modd 2n3904
Part Lnt y
,E5~~~::~: cil
Export Par.lmd.m to Opt imizer
lmport Mod~ Para met er$._
Iin k Detab ase Part Ctri+l 2N3899/THYI
2N3899/THYR1STR
View Djt.lbue Part.. Ctrl+O
Ots(o!nd ~ i ~ f & tt: n'l
I lb.....
"
S) ncmonv e UO\"'"
,
C2 ~;J.70 1 -
VOFF -ru
v__
FRED
• $
' '''''
M;, _ :!lOnl V
VlN
-v
l Ow 1W;
1.\ACT
1.<ALS
1<AS
I
o
12-6 Chapter 12
~. bitAoUWb2n3904 - AMS Model EdROf- Sirnullhon Pat'Ml"eh~f . '~
~ fil< Ed. 'i..., !!!odd Pjot look \'(mdow !:1~p cadence - /1 x!
~~ t:) g ~ Q ~ ~ 9 [j jftI - ~
~I", 0
- --
.-
Mod~Nam e Tl'P"
Si mulati on Para meter s
awbln.l904 " suacrr
.
.
Property Hame
IS
Nf
De &crip Oon
S.turlltitlncurrent
lI.axinu m forw ard betII
Ifw d enWsslOneeet
FWdearty vob~
!
Val ue
t 72 8E-16
25<1.395
' .85
Defau lt
Ott
'00
100 IlEG
,
Unit
A
Ih tri bulion
':"-:.'-: ..:"./
V .. ..
FLAt
......... ..
....-: ...-.......
Posfof
20
Hegtol
20
iii
l;t
f1]
I
VAf
Hi cur. beta roIoff " :.-:............. .
' '
'I
"
I(f 001637.(' A 'I
:•..:••...•......
!Sf
NE
B-Elet.ka;e cur
B-Eleak~ . ceet
99 7'-"&-15
1.20003
1E-13
1.'
A
":., > .
'I '
r~
I"
OR lJ.axreverse beta 1
_._.~
'J
'.1
HI! r ev emaa.ioncoer 0.89 1964 1
VAA Re-.. , e .r1y vo la ~ 7,740...6 100I.~EG V ';I I
IKll Hilrevbeta rolDtf 016374 1 100UEG A rJ
ISC B-C Ieala;e cur . 9.97«6£-15 1E-15 A i:t1
NC B-C leak efris coef . 2.843<3 2 ''1'
...
RS zero bias RUse
Rbase cutoff CUfTent
18 .3394
0.01 , OQUEG
• Ohm
A
/ ..,:. r;i
"
RflII
RE
,", base~ce
~erf"eSlS1anee
001
0.00133911
•• 0'Ohrn
im
,<!
'I
R<:
XTB
CoIe-ctof r esistlnce
Beta teffl) exponent
2.08353
1,2GSS8
•• Ohm
.......__ ._...... "
xn
EO
1S~~nt
IS tefTl)enfig)' !jl3p
1.).(879
12<16 1,11
3
eV ..-: .,::.-:
--
_._.. "j
f1] .
-~~
Modd Test (1leodOnly)
. ~ s...u-. lW
- I
" b pevr.ce model eeee ceo by ll n a l c Q_uprl!v tor 2n3 9 0'i en Frl. Feb
. ~ ab c kt a'olb 2n 3 90 <l C B E
-- ..• _.
, 18 : 0 3 : 16 IS'; 2 001
(]
.
'jl
+ par~:
+
+
I C_ VBE....1 . 1 0 250 E-3 6
t c Vcr-l . l02 50 E- 3 €
.
Ready NUt.!
Figure 12.8 - MODEL EDITOR window dis playi ng AA 2N3904 model data.
tolerance of the transistor can deviate 20% in the positive direction and
20 % in the negative direction. The 2N3904 transi stor model has a beta
value defined at 254.395. With these tolerances in place, an AA can predict
variations in the behavior of this amplifier circuit with arbitrary beta
values that fall within the range of 203.516 to 305 .274 . It can be noted
that these POSTOl and NEGTOl columns are modifiable for all component
parameters. In this example, a tolerance has been assigned only to the beta
factor. In actuality, the results of an AA simulation would be more closely
representative of a real component if one were to assign tolerances to more
of these model parameters.
VCC
?J ··
~VDC 2
20V _ TOLERANCE= 10%
R1 RC
40k 4.7k
:r
OLERANCE= 10%
3
-=-0 C2
v
10u
IN 4 2N3904;,.,_...
VOFF = OV :--
VAMPL = 250mV
FREQ= 1kHz
OLERANCE = 10%
R2
f~·~·~·~;~CE :
RE
10%
RLOAD
AC=250mV 3.5k 470 47k
12-8 Chapter 12
has been added to the plot shown in Figure 12.12 .
Obviously, the same gain can be observed in both waveforms. The key
difference is the de offset seen with the trace of the node 3. Referring to
the Bias Point Calculation, this voltage is determined to be 10.93 V. During
the AA simulations, using node 3 as a reference point, we will assess the
~ --..
LJ Marte CariolWorstCase
Transienl oplions -
Maximum step size: 1us
--- ---..- . . . ._-
seconds
EJ Parametric Sweep
EJ T~lXe (Sweep)
EJ 5kiptheinitial trensient bias poinl calculation (5KIPBPJ
E] Save Bas Pan
E] load Bas Pan EJ Run inresumemode I OutputFileOplion$_.. 1
EJ Save 01ed< Pons
D RestiSt smJ aIion
....
··
1
d
(735 2.( 2 167
L'
·
u .
1
2. "
··•
t
V ~
.
I ~. V./
v r.
- 2. DU
-~
~
- .. . 1lI
os 1 . 1M 1 . 2,", t . 3rlS I."'''"' O. S"S 0 .6 "s 1. 7 .. S 0.'"" 1. 9"s 1._
D U(OUJ)
lino
Figure 12.11 - AMS Simulator window plotting load voltage with respect to time .
·
--
U 1!;U
--
1
··•
t
I-----
10U
---- -- ---
~ I---
---
su
OU
------r---- ---.....-----
»>: -- ~
-s u
o. 1. 1-s 1. 2M 1 .311K t.S": 1.61tS l. lllS I . ' IIS 1.9M 1 . ...
a U(OUT } • U( 3 )
Th .
Figure 12.12 - AMS Simulator window plotting load voltage and node 3 voltage with respect to time.
OutputFileOptions
EJ Include detailed bias point information fornonlinear
controlled sources and semiconductors (.OP)
OK II 0nceI II !'9i*t II ~
12·10 Chapter 12
L 2 . 5U
o
•d
U
o
1 2. 0U
t ~
-: (10.471K.2.1675) ~
•9
p
1.5U
\
1.0U
\
O.5U
10Hz
c U(OUT)
100H z 1 .0KHz 1 0KHz
Fr pqupncy
100KHz 1 .0I1Hz 1 0HHz
'\
10 0HHZ
Sensitivity Analysis
The first simulation type to be discussed is the Sensitivity Analysis. The
Sensitivity Analysis will carry out a series of runs on a circuit while varying the
values of components within their declared tolerance ranges. (Note that in the
Lite - demo - version of the software there are limitation s on the number of
runs that can be used. You may need to set the number of runs to a value lower
than that used in the example s in this chapter.) Let's begin by opening the AA
window. To do this, select ADVANCED ANALYSIS, then SENSITIVITY under the
PSpice drop-down menu. This is shown in Figure 12.15.
This opens the AMS ADVANCED ANALYSIS window (see Figure 12.16).
Mo st of the Sensitivity Analysis simulations discussed in thi s chapter
utilize this window. You will immediately notice that the drop-down menu
at the top of the screen reads SENSITIVITY. In the OrCAD window, had
the user selected Monte Carlo, or Smoke, this same window would have
opened; however, the user interface would look slightly different based on
the selected simulation type . Also, it is important to note that all of the
parameterized components are listed in the upper portion of the window.
The lower portion of the window is devoted to measurements and project
specifications.
A' rwPAHCE . ~
I
I.
I
I
·IP=;IT HYRISTR~V.[]
~=~~:lISTR
2H38S3ITHYl
2H3999ITHYAISTR
2H39'J2I8JN
I 2N39J3IBJN
i ~tI! ·· · -
OlE~ .. t0'4 Ur ! lbaciel.
C:,
CJ X
~
' _SHOT •
7lOO . ~ ...
i ~'
R:l: RE Ja..0IIl0 7"AS • .( c'"
3~ m m
! - ~ Podago>g
P~tpetPkg
. " 1#
- ~
..
' "=-. 0 x
cadence - tJ )(
•
e-_ Pwarne1er
V"'-U! " 0
_I_a-l
, Ab. s.n ~
Pallln\nCts
Uno" :.-"
- RC
R2
Al
VJol.Uf
VAUl£
V"'-U!
.. TDOl'JODOt ~ 1
~sooooooC~
' Ok j
,,
i
01 8f 2S4.mooc . !
I ·
• 'jOnlOffl Prot.. 1 U • .uurem~nl 1_ 1 &.lin ilia:, r
CIc:t.... 10 rnpcn. -..lftft'Jed ctftttod w8Wl PScla,_
·
I I I
1 i
-
I
I
B -. 1
·
1
- . ~-- _. --
Figure 12.16 - AMS ADVANCED ANALYSIS win dow, Sensitivity.
12-12 Chapter 12
First, we will demonstrate how to declare a measurement; then we will
discuss how this measurement is relevant to the Sensitivity Analy sis, what
the Sensitivity Analy sis is, and its applications. Earlier, it was stated that
we will be using the voltage at node 3 as a reference and would monitor
the stability of the bias as component values varied . Therefore, for our
Sen sitivity Analysis, we use the same measurement V(3), the voltage at
node 3, that was seen in the Bias Point Calculation and used as a trace
measurement for the Transient Analy sis and AC Sweep .
To add this V(3) measurement to the Sensiti vity Analysis window, select
CREATE NEW MEASUREMENT under SENSITIV ITY under the ANALYSIS drop-
down menu . This is shown in Figure 12.17.
The EDIT MEASU REM ENT window (see Figure 12.18) bears a
remarkable resemblance to the ADD TRACE window in the AMS Simulator
software . In the top left corner of the window, there is a PROFILE drop-down
menu. Earlier in the chapter, three simulations were carried out on the BIT
amplifier - a Transient Analysi s (Simulation Profile Title, transient.sim),
AC Sweep (Simulation Profile Title, ac.sim), and a Bias Point Calculation.
SCHEMAllCl • .~ ~ _ _~ _ _ _ .~ _ :=:'o.!!.il. .1'_
~ EUe fdit 1"'" Bun ~ W;ndow H<lp cadence - e x
!f5. g- ~ Sm~ ~~ements... ~
! "!! OQtimi:.fi •.
:. 1
C,ut~.tlewMusutem~
Qptim~~'- ":....:~=:::===:..==========i~
1'-- Component rP.
Mont e;Carie
Smo~e
Send t o
[Ind in DeUgn
;;.
- - - - - --:l':""
... -.,---------Ji'3
.~~
Paramm'i c Plott er ._ ._ _ .- --
Display :
-
r~ -~"~-~_-:~~--=-- -=-=~--=-=~=- ------- =--------~-.. .E
I-
..•.• . .•:.•. .•.:.".·.•. .•.•.·.•..• ..••. ....••. • .
~ -J.•·.•9..-.•.5•.:OO·.•..•:..•.•0.•.•=.'.•:•..·.l·
,
p
.....h.•.......•... •.:..•..•::.•. ...•.•.
.::.:::..•·.-..".·.·.i:...•.·." __
., : :.,::.:. : : : : ~::._ ~:: ::. : :: .,: : .: : ~.:~:::~::.:~:~::=:.~:. __~:: :.::~.:._ -.:: . : : .~: ~::. ~::~:. ~::.~:~~=.=:j' . .
[=
"
Figure 12.17 - Creating a new reference measureme nt.
~=======""J- NUt.!
Measurement:
OK
These profiles exist in this drop-down menu. Transient.sim has been selected
in Figure 12.18. With the transient simulation profile selected, all of the
available measurements (V, I, and W) that existed in the ADD TRACE window
are now visible in the column browser of the EDIT MEASUREMENT window.
The measurement V(3) can either be found and selected in the column
browser, or it can be entered manuall y into the measurement text box. Click
OK to add this measurem ent. The measurem ent text box can also be used
in conjunction with the functions and analog operators at the right of the
EDIT MEASUR EMENT window to perform any measuremen t imaginable to
evaluate a circuit' s performance. You also may have noticed the IMPORT
MEASUR EMENT feature under the analysis menu shown in Figure 12.17.
This method allows you to directly import a trace function saved from an
earlier simulation. This can be especially handy if you are dealing with a
complicated funct ion from the AMS Simulator and simply want to carry that
function over into the AMS ADVANCED ANALYSIS window.
Now that our measurement is in place , we must define the purpose
of the Sen siti vity Analys is. The Sen siti vity Analys is will dete rmine
which components of a design have values that are the most critical to the
performance of the circuit. In other words, if each component value is varied
within its tolerance range, which will yield the most significant change in
the reference measurement declared in the EDIT MEASUR EMENT window.
12-14 Chapter 12
Remember, the BIT amplifier has four resistors with tolerances and the
transistor itself has a tolerance for its beta factor. The Sensitivity Analysis
will determine this and can present the data in a variety of ways.
The two types of sensitivity results that will be presented in this chapter
are Absolute Sensitivity and Relative Sensitivity. The easiest way to define
each interpretation of the data is to also offer a series of examples, as follows:
• Absolute Sensitivity - A ratio that illustrates the amount of change
in a measured value due to an incremental change in a component value
Example - If there is a 1 n change in resistance, there will be a
0.7 V change in output voltage .
• Relative Sensitivity - The percent change seen in a measured value
if a component value is varied by 1%.
Example - If there is a I % change in resistance, there will be a 4%
change in output power.
With the measurement in place, to run the Sensitivity Analysis, click
the RUN button at the center of the toolbar at the top of the screen. The
results of the Absolute Sensitivity Analysis are shown in Figure 12.19.
1- Plrwneto,.. .
, ~ l ine ar
C _nf P",met., Orlg;n.1 C U" OU"" Ab o Se non """
13
~.::.
21
10
3
07266" • I
. I~ -I
~bon. .--
, OnlOrf
1' 1
Pn>r""
tnmsie ntsim V {3}
Me asurement
--- 10 9m
ti m
5 763-0
Uso
145 216
""
. .. ,....
~;:--:l .
E3 """""" J;l ..... ·c.,;,1
--
-- ---- , ,, .. - - .....- -- -
.--
~
Scnmivity run:" of oS co m plet ed
Sensitivityrun: 5 of 5 comp leted
Womc n e rullS u nd erw~.....
Minim um run: 1 of 1 completed
-
Maxim um run; 1 ct 1 cc rnplet ed
I Runs,fo r sim uliltio n p rof ile trll n ~Mt.s im co mpleted
e
U - -------- -- --- --- --- Secnsitivityanalysis com plleted ----- ---------------
12-16 Chapter 12
SCHEMATIC! • AMS Advanced Ana is - sibvityJ _ ~ _~ ~ . ' I--=- ~ ~ l<__,
B Fde Edit VI~'1 Run Analysis Window H~p caden ce - fJ x
JfJ 8 ~ il:l ----...0 Al iA c-
II! Sfflt itivty
. _-- .__. -- TL ~ ..
I -_ .._--- _._- - ---_.
P.,.;nel ef.
·
•
Component Paramet er
LUf
LUf
Origin"
3'"
QLUn OM
'I:~l~r;~
Rei sen ll itMty
127160"'"
1282901,
Linear
,.,
. t/
....
3
WE
LUf
<7 0
.23 51;
-S757f 6m
1
•
250' 21• .. ; 234 .. f'OBOm 1
·
• V
. 0nI0!f
i"
I Profile
tranunt.sm
I U eas u rement
V(3-)
-
to 9291
'I..
~!~bonl
5.1034
Max
1452 f6
~ .... , - . <0<.<
·
-
M;»:imu m run: 1 of 1 co m pleted
Runs for sim ulation profile transient.sim co m pleted
---- -- ----- --------- Sensitivity analysis c omplet~ ---- - -- --- --- -- -- - --
~
for t-klp, pres s F1 NUM
Figure 12.20 - AMS ADVANCED ANALYSIS window, Relative Sensit ivity results.
12-18 Chapter 12
/'_..,....;.... .o;;<ro:"'.' ,," .,,~.~ •..:.
Edit Measurement ,~
" "-'UJ
Profile: [ transient.sim ~I
. Simulation Output Variables Functions or Macros-
I I [ Measurements
Measurement:
t
n ---------------'
Cancel 1[ HeiR
Profile Setting,
- --
l'Urber d Bins:
12-20 Chapter 12
Figure
12.24-AMS cadence - if x
ADVANCED
ANALYSIS
window,
Probobil ity Donsity G~pIIIRuns: 1 to 100)
Monte Carlo
PDF.
VOl
. I-
......
MordeCldorvn t$;(~td
Monte CIdQ1'\Il"l96 c~td
Mon(t C~ run J1 tomplttfod
-
Monu· CM'to Nn M c-.pkted
Montt C.do Nl'l 9:licom,ltted
MonteCMk>Ntl lD:lc~otd
MonttCMfo .~s(~td.
,....
Figure
cadence _ " x
12.25- AMS
ADVANCED
ANALYSIS
window, Cumulativ e Disttibution Gnlph (Runs: 1 to 100)
Monte Carlo
1"~ ]""'" t+" i~": " j''~; '+"" i!': "'i:"' i;"'i":' ':!:
:i' 7f'+'f";"'
' :' :' ' t:' ',:"""""'
CDF.
so +'+-'H" 'i +'1" '~ '.; . : ;":''':'++';''':''+'+'~''j'''~'+'1''+
."s. t ,m"!:" '!:",,""-nti
,'";"""'j:"''"
:j '-!' """' :i' " :""",
, ,n,.,..':t tmtt !:' "',:"'1
t t:""''n:t
~ . : :t:l:t::[l:# RfHr!" l::r: [ :rl:: :! ::FI::+ ::r:rl+r~+Tt: : rr:f::Fl
7,5 7.7 a, 8.5 as 9.3 91 99 10.3 10.7 11 1 11.5 11.9 12 3 12.7 13.' 13.5 13.9 14.3 14.7
VOl
I
CJd l"><tfl! lO ~ " lM UIlf' lIItnI Ctf.tIN Vt lllitt PS;ict
+--1-,
1- ..
.r--l -+ F1. I
1-
1-
I
I
I .. oj 9 , I~===::j~==!
-j --
-
1- -'... ~
Temperature Analysis
The next type of simulation , the Temperature Sweep, technically is not
considered an AA simulation method in the most recent version of Cadence,
but it is slightly more complex than the standard simu lation procedures.
We know that electrical components will exhibit different behavior
under different temperature conditions, and PSpice will simulate all circuits
at a default value of 27 °C. This default setting can be changed under the
OPTIO NS tab in the SIMULATION SETIINGS window (see Figure 12.26) . This
poses a question as to whether it is possible to observe how a measurement
will change as the environmental temperature varies . This can be studied
12-22 Chapter 12
through a variation of the DC Sweep simulation type. As you may recall
from Chapter 3 and our discussion of a particular component's element line,
there exists a temperature coefficient that dictates change in a component 's
parameter as the temperature of the environment changes.
Before going any further, we must make sense of this temperature
coefficient. The temperature coefficient (TC) reads from the element line
as follows:
TC =TC 1, TC2
Example: Default Value, TC = 0, 0
Recall that the default temperature of any simulation is at the nominal
default of 27 °C. The ma thematical formula that interprets this temperature
coefficient is given as:
loc Sweep
0p00ns:
~I
Sweep variable
e> VoUage source
e> Currentsource
() Global parameter
Name
Moriettj'fl~
L __=-__. .J
I OK II Cancel I ~; 1 ~ I
Figure 12.27 - SIMULATION SETIINGS window,Temperature Sweep.
H 11 OOU
o
;
d • •• .. ··· f·· ·'·· · ··' f· ··' ·· " O_' -.-, _._, , _. - , " , , , "-..,, · ·· ..··· t···r··· """' ,"' ,'"
• ••. • ••••.••
t
10 .85U
...,
:: ::: :::::iiiiii::rtiii::: '"1''':''':''' , , , ·..,..···..·.. ·N .. · ~ ..·
20 22 24 26 28 30 32 34 36 38
a U( 3 )
TEllP
12-24 Chapter 12
Noise Analysis
The next type of simulation also is not considered an AA simulation
method in the most recent version of Cadence, but is extremely important
and will be able to help us assess the effectiveness of a design and ensure that
this design will produce a quality output. This simulation method is Noise
Analysis, and it expands upon a basic AC Sweep simulation. Return to the
DreAD window and create a new simulation profile for an AC Sweep. In the
SIMULATION SETT INGS window, set the sweep to start at 10Hz and continue
to 100 MHz with a logarithmic scale and 100 data points per decade (see
Figure 12.29). In the bottom half of this window, check the box to enable
the NOISE ANALYSIS. The first text box in this region declares the voltage
output of the circuit. The net alias for the node above the load resistor in the
amplifier has been labeled "Out", so in this text box , simply enter "V(Out)."
The next text box declares the reference name for the voltage or current
source supplying the input signal. This feature makes this simulation type
incredibly versatile when considering the fact that certain circuits require more
than one analog voltage or current source. Take a differential amplifier for
example. If this differential amplifier has two inputs, two separate simulations
can be carried out to determine the amount of noise contributed at each input.
The reference name for the VSIN source for this circuit is "VIN".
Lastly, the user must enter an interval. The interval parameter can be
thought of as similar to the way the user defined the resolution of a Transient
Simulation Settings
outputFile 0 ptions
o Include detailed biaspoint information far nonlinear
controlledsourcesand semiconductors (.OPl
OK II e-:el I [-~ ~]
U nU
·········i·········· ·········i·.········ ..·······i·········· ~ ; _- ; _- - ; .
········i·········· j••••.••..•..•• ...••{.••..••.••. .••••••• ~ .•••••..-- ...••.••••.;--... •..•• ••..•-•..:.••.•••.--- .-.••••.-; ------ -•••
.....-: _-..:. ~ .
..
_ ----. _ '_ - ; -- :
.........: : __.; ; ;- : ;.......•..
11Hz 1I ..z 1 • • Hz 1. "2 lOC*Nz 1.ltItz 1etlfz 111t11z
" U( DHUIU ) • U(l HOISE )
Fn quf'nc!.j
Figure 12.30 - AMs Simulator window plott ing input and output noise voltage with respect to frequency.
12-26 Chapter 12
---- - - - --
I~-~
--- -~ ~-
Vll}
9
Vl3}
~~l
O llioJaI
;, ~~.
. {]
I I
VlOIIOISE} Q(t erb @
VIOlA} AllSlJ
V\VCC) ARCTANl)
V\VIN:'1 eo- ATANlJ
Noj:er.-Ill: ) AVGlJ
AVGlq .J
AM.!!..... ~~(J
:
O ~..t>aCUII llodn
EfIIII,lA)q .J
EINMIN(. J
E>cJ'l1
GlJ
IMGlJ
LOGII
1 0 v~ b(ed LO G1 ~ 1
Mil
MAXlI .
FlAI Li:t
I raceE"I'feuion:jD8M1NOISElJ
. - - 1 []D 1 ~1 ~
-.
H -1 4 5
0
i
s
e Output Noise dB
- 150
\
---
-.
d lJ
B --.....
- 15 5
- 16 0
\
-16 5
- 17 0
~
1 0Hz 100llz 1 .OKHz
Input Noise dB
-,
10KHz 100K llz 1 .011l1z 10 1lliz
/'
100UHz
e OB(U(OHOI SE» • OB(U( IHOI SE»
F r e qu ~ ncy
Figure 12.32 - AMS Simulator window plotting noise voltage in dB with respec t to frequency.
V 3.0V
0
I (10 000K,2 .1675) \
Volt;Jge Acr es RLOAO ___
I
a 2.DV
9
• ~~
1.0V
SEL»
-.
OV
a V (OUI)
H -1~ 0
0
i
s
e - 15 0
<, PUlpUI Noise dB
~
d
8
- 160
""'---.
- 170
10HZ 1 00Hz
a 08( U( OHOlSEJ) • OB( U( lHOI SE»
Inpul NOise dB ,
1. 0KHz 10KHz
Ft"equfoncy
100K Hz 1.0I111 z 101111z
----
100 11llz
12-28 Chapter 12
Smoke Analysis
For the last simulation type to be discus sed in this chapter, return to
the ADVANCED ANALYSIS window. In this example we will perform a Smoke
Ana lysis on the BJT amplifier design . The Smoke Anal ysis will evaluate
the stress on all the components in a circuit due to power dissipation,
temperature, excessive curr ent, or voltage. To begin , open the drop -down
menu in the toolbar at the top of the windo w and select SMO KE. The window
shown should resemble that shown in Figure 12.34.
To perform these assessments, the Cadence soft ware utili zes
manufacturer operating conditions (MOCs) and derating factors . These two
factor s are used to determine whether all the components of a circuit will
operate under safe operating limit s.
Before running the Smoke Analysis, it is important to implement a
derating factor . A derat ing facto r is a percentage of the MaC of a component
parameter. For example, if a Smoke Analysis simulation with a 100%
derating factor were to be completed, the Cadence software would compare
a component's level of performanc e directly to the MaC. If a Smoke
Analy sis simulation with an 80% derating factor were to be completed, the
Caden ce software would compare a component's level of performance to
80% of the Mac. Designing a circuit with components that operate well
under the MaC will certainl y have a gre ater life expectancy than a circui t
with components that operate very close to or at the MaC.
cadence _ ~ x
.- t
-I- _.- -+ -1 .+-_... :. . . . .
'to - - -. ~.:r------=i --f-: • t .- .
.. . _.-_._ . . _- --._-- - _ ._- -
.+==: -
:~--::- --_
---1--.-1 j -- --
~ .. " ±=t.
=!~-,
- -I
1--.
,
i.,
.- .. -
H·
1" -!-=±:± .-==
's .....
Table 12.1 - - - - - - - - -- - - - - - - - - - - - - - - - -
Smoke Parameters
Smoke Componen t Definition (wlunit)
Parameter
IB BJT Maximum base cur rent (A)
IC BJT Maximum collec tor current (A)
PDM BJT Maximum power dissipation (W)
RCA BJT Thermal resistance, Case- to-A mbient (degCIW)
RJC BJT Thermal resistance, Junction-to-Case (degCIW)
SBINT BJT Secondary breakdown intercept (A)
SBMI N BJT Derated percent at TJ (secondary breakdown)
SBSLP BJT Secondary breakdown slope
SBTSLP BJT Temperature derating slope (secondary breakdown)
TJ BJT Maximu m junction temperature (degC)
VCB BJT Maximum collector-base voltage (V)
VCE BJT Maximum collec tor-emitter voltage (V)
VEB BJT Maximum emitter-base voltage (V)
CI Capacitor Maximum ripple (I)
CV Capac itor Voltage rating (V)
SLP Capaci tor Temperature de rating slope (V/degC)
TBRK Capacitor Breakpoint temperature (degC)
TMAX Capacitor Maximum temperature (degC)
IV Current Supply Maximum voltage current source can withstand (V)
LI Inductor Cur rent rating (I)
LV Inductor Dielectric strength (V)
PDM Resisto r Maximum power dissipation (W)
RBA Resistor Slope of power dissipa tion vs. temperature (W/degC)
RV Resistor Voltage rating (V)
TMAX,TB Resistor Maximum temperature resistor can withstand (degC)
VI Voltage Supply Maximum current voltage source can withstand (I)
12-30 Chapter 12
Figure 12.35-
PROFILE SETTINGS
window, NO DERATING
setting.
I~
OK II Caral II Reset II
Figure
cadence - if " 12.36-AMS
ADVANCED
ANALYSIS
window,
" .... Smoke
,". Analysis, NO
>7
n DERATING
n setting.
"
""
""
IS
::00
::00 ...
IS
,.."" .
Smo« ............_ _
Snd.eAAt~r~
........- s. Sm .....,... .. - .•- .••.••.•.•. .
SmokIf~W((ffiItd
__..
Perf~rt9StnoltA.NJyM(WI;ptol"" tu~. Wn'_
$mo '''''''''''
- - · --- --- ----- St~ ~. ~.-. - --- -_._._---. -
___3
OK JI Cancel I[ Reset II ~
Figur e 12.37 - PROFILE SETTINGS window, STA NDA RD DERATING sett ing.
12-32 Chapter 12
SOGlAllCt·
1361< { <lit ~ a... ~
_.
l!{....... lJ«II' cadence - if "
-- "'- -
ib~ ~ e • •...-t.. - LD -:>
... C•
Cl
CN
AIlS
I
se
10 •• 1012M
... """"
CN
I 10 OS 'OC.t2et 2S
1lI
T1I
1-
A_
2CC
m
' OCI
l OCI ,..
2CG
"'5'1
.-,3711
2S
:1
- .,.
'"
01 T' A...... ISO ICC )1)132' :11
)0_
~ Ol
.. 0'
~
..""
.. "" ~ A_
"".
1:
:scm
m-
, -. ' CC
.,
101)
') ~:'~~
£C
~.uiie..
1' .1tJO
17' -
Zt
:c
"17
..... .,. .... ....
zee sa....
--
R' 11- A...... 2CC ICC 17
RI
II< 11 A_
:co
eee
lOCI :flO
lOt
"
:lA07fl
11
.
'OCI IS
RE 1lI 2CC
,..
20C :0=
..... ...."
'CC
-
llLOAO 1lI A_ :co '01) :am
"
..............
RLOAO 1lI :co 'cc :co :>-
.
R:
R:
RI
11
....
11
A
A_
i :co
:co
:scm
'OCI
'cc
••
lOll
:co
114l'QZa
21.5$.4:1
277"" .•
lUI Il>lS :- os 114i'i,...
••
ti.. l "'" ....
A_ 1-11.teo1l"11 7$ o.I: .~ _ . l& Tm>oo
-
..r.i~ •
·•
lUI 417.1&1)'", I• t6. 7~
c:
CN
CN
A_ se
so
to
to
••
'S
1!41'3
1!.I:t -I
8 -. I
Smoh~wcc.~ .
-
_ .......... fiMIwd
._ •••••••••_ •••••• Sl~ Smol................... . . .. .. .. .....
Perl'ON'l"lt"9 StnoU AtWysitOC\ Frcf iLt 'tramifotLsiftol'_
Smote ~ ~Hd td
q-,
_.
Smob ........... fonishfd
Figure 12.38 - AMS ADVA NCED AN A LYSIS window, SmokeAnalysis, STANDARD DERATING setting.
SETTINGS win dow for the Smoke Analysis and select STANDARD DERATING
(see F igure 12.3 7) . This will implement a set of derating factors designated
wit hin the Ca dence software for a give n component. These two derating
types are the on ly selectable choices in the PROFILE SETT INGS window,
though it is possible for a user to declare derating factors in custom derating
files and import them.
After making this cha nge to the profile, close the PROFILE SETTI NGS
window and run the sim ulation. The results are shown in Figure 12.38. Take
note of the % DERATING column. The column is no longer fixed at 100. To
unde rstan d how this will impact the result, we will dissect the first row, 01.
The veE (max collector emitter voltage) smoke parameter is rated at 40 V.
The derating factor imposed by the Cadence software is 50. Th is means
that the derated maximum value will be 50 % of the rated value, 20 V. This
is indicated in the MAX DERATING column. The % MAX will be calc ulated
based on the measured co llec tor-emitter voltage with respect to the MAX
DERATING value, 20. This comes out to approximately 63%. With the results
In Summation
There are two other types of AA not discussed in this chapter. They
are the Optimizer and the Parametric Plotter, and they are typically used
heavily during the design process of a circuit. The Optimizer can assist
in finding certain component values to ensure that a design will meet a
user-defined specification. The Parametric Plotter is a simulation type that
sweeps multiple component values or model parameters simultaneously.
More inform ation and literature regarding these simulation types can be
obtained through Cadence Design Systems.
12-34 Chapter 12
Appendix
Additional Circuit
Examples
This appendix provides additional circuitry that was not covered in earlier
chapters. In these pages we are going to look at circuits for 1) Low-Pass Filter;
2) Operational Amplifier; 3) Phase-Shift Oscillator, 4) Astable Multivibrator;
and 5) Hartley Oscillator.
1) Low-Pass Filter
A low-pass filter is an electronic filter that passes low-frequency
signals and attenuates (reduces the amplitude of) signals with frequencies
higher than the cutoff frequency. The actual amount of attenuation for each
frequency varies from filter to filter. It is sometimes called a high -cut or
treble cut filter when used in audio applications. As one would imagine, a
low-pass filter is the oppo site of a high -pass filter, and a band -pass filter is
a combination of a low-pass and a high-pass. See the low-pas s RC circuit in
Figure A.t . The AC Analysis in Figure A.2 shows VIN versus VOUT from
R1
vin
10K
vou!
I
V1
10Va ~
OVdc 1 C1
0.0015"'
- - - -'
I
Figure A.1 - Low-pass RC circuit.
Figure A.2 - AC Analysis showing VIN versus OUT for the low-pass RC filter.
I Hz to 100 kHz . Other output graphs could be phase versus frequency, linear
amplitude versus frequency, and logarithmic amplitude versus frequ enc y.
2) Operational Amplifier
In Figure A.3 an operational amplifier has been introduced as a PSpi ce
element, providing gain for an active filter. An AC Analysis is shown.
Figure A.4 offers a Bode plot of amplitude versus frequency, with results
showing VOUTIVIN . It has range of frequencies from 1 Hz to 10 kHz.
C2 Figure A.3-
Operational
amplifier as
0.033uF a PSpice
element.
R2
R1 C1
VI
VOUT
2.7K 0.033 F
A-2 Appendix
11
iA
........................ -_ ........................ ....._------------------ ._ .... _---- --------------- ----------------------. ........ -............... _-
---................. -.. ..---------............... ...........--.......... .............. _----- -_ .... --_............. _------ ---- ---- ---........ ---.. ...-----................ ...... _- ------------------
.-..................... - ...-.-----................ ......... __............ ............. _- ----------- --------_..._--- -------- -- -----.. -............ ...._-_................ ._--------------------....
--_ ...... __............ -------------_... __....... ------------------------ .._-- ..._...-------------- ·······················t ·········· ············· ----------------_ .._.... -..............._- --_..... -
5
~
-------------_._--_.. __.- ---- _._------ ._.. .......... :~ . . ........ ...... . ....
::::::::::::::::::::::J --------------_..-..-..-- ... ----_.- _._.. ................ .... . - ... - - - _.__................... .. ...
--.-................. .. - .. _-------...-.-........ ..... _._. .............. . ..... ........... ..... _ - ............ ..._... ....
-------... -... ---------- ----------- ---..--------- .. ... -------- ........... ~ •
................... ... . ..................... -
r~r--. -- - -- - ...
,• 3 . IHz
'OIl ' 3 1Hz ,'OIl, 310Hz , ,"'",
. 011'
U(UQUT) I U( UI")
r r enuenc
"'"' 3
"'"'
Figure A.4 - Frequency response, Bode plot.
3) Phase-Shift Oscillator
The RC phase -shift oscillator circuit seen in Figure A.S is a great
example of using a common op-amp to make a sinusoidal oscillator. In the
original circuit , R5 was a I Mn potentiometer. A 300 kn fixed resistor can
be used, giving a gain of - 300 kilO k = - 30. VI was added to kickstart the
oscillator for the simulation. Since the RC-RC -RC feedback network has a
R5
1M
C5
R1 t, f-=2,-+--,
10uF
10K U1 r-+-- - - +--=ft--- - - -- - - - - - - - - - - - -----,
3
+ R2 R3 R4
OUl>---=----~
10K 10K 10K
2 , O~+-'--
2 2 2
uA741
1 C1 1 C2 C3
1 Q1uF 1 Q1~ O.1uF
-:-0
-:-0
1. On
gain of - Yz9at the frequency where oscillation will occur, the output graph of
pin 6 versus time (a Transient Analysis) will show the growth of oscillation
until clipping occurs . Figure A.6 shows the output of the circuit, and the
oscillations can be observed. Maximum variation can be seen between
1 Hz and 3 Hz. As frequency increases, variation in signal decreases.
Readers may try decreasing the value of R5 and rerunning the analysis.
Eventually the oscillator won't start due to insufficient gain.
A-4 Appendix
4) Astable Multivibrator
Figure A.7 show an astable multivibrator. Again, V I was added to
kickstart the circuit. We implemented a Transient Analysis, evaluating the
value of resistance and capacitance to calculate time. Initially, the input
voltage was set to 12 V, then by reduc ing voltage we observe that time is
increasing as voltage decreases (see Figure A.S).
-'--0
R1 R2 R3 R4
1 C1 10 47 C3 470
-1 J---------j -11-------1
100uF 10uF
vo ut
vin
20
~
5
2N2=1
-'--0
21 .115 ..
21 . 01 On
\ :
..
:
21 . 1 15l1li
:
J-+-- -;--:
:
:
21 .IItOR
es 1 . 2a s 0 . /f" 5 1 .6 M G.8 ns 1 .0n5 1 . 2n 5 1....n 5 1 .6 l1li5 1 . 8"5 2 . ln s
U(uo ut) I V( ui n)
.,
Figure A.a - Response graph ,Transient Analysis.
01
C2
2.7pF
Q2N2222
D1 R1
C4 1N4148 1M
200pF
L1
2uH
III
vout
A·6 Appendix
V1
2v
R4
,-----------.ll,jl./'v--.----..-- - , vout
68 f-- - - - ----'
C3 C2
0.01 l O.01
R1
-=-0 47
10Va r\..,
V2
O1okT
l
R3 2N~2222l
~
1Vdc -
4.7k
-=- 0
l R5
270
~~:~:, _:~::.:~::: r: :. :. :.:.:.:.'.:.::,.::,=:,:.:.:, :.:.:.:. ~. :. :.:.:. ~.: :.:,:, :,!,:.:,:,'. :,:,:.:, :.;,: :, :. :, ~.,' :, :, :, ~,',' :, :,:, :.:,:' :" :.~ :, :, :. :. :.~:, :, :, ,: ~,;:, :, :, :, =.~:' ,'',.:: .. ::~:: ::1 ::::~:::: ----.;....";" ---'.-- ::::}:::t ::t ::: :::::::::::: .r .
.,
, .+-+--+--+--+-+---+---+---1f--i--;-+--+--+--+-+--+---+-f--i-+-+--+--+--+-+---+---+---1f--i--;-+--+--+--+-+--+---+-f--i--I
, :, ,: .' :, 1
,:,' :, :, ,: ,1
:. :, :,,::,
, , - - ~----~-- : ::j::::r :t:::: ----~--.+-- + -- '--..--'--.----y--.
-, .
Is
U2 (C 1}
' . 2"5
I (R 3 :1 ) U( TX1: 1I)
' ./iUK 1 . 6" s '.8M 1 ....5 1 . 2111"0 1. l as 2._
Ti ...
Please use this form to give us your comments on this book and what you'd like to see in future editions,
or e-mail us at pUbsfdbk@arrl .org (publications feedback). If you use e-mail, please include your name, call, e-mail ad-
dress and the book title, edition and printing in the body of your message. Also indicate whether or not you are an ARRL
member.
Where did you purchase this book? 0 From ARRL direct ly o From an AR RL dea ler
Is there a dealer who carries ARR L publicati ons within:
05 miles 015 miles 030 miles of your location ? ONot sure .
License class:
o Novice 0 Technician o Technician with code 0 General o Advanced o Amateur Extra
Call Sign
Address