OrCAD, OrCAD Layout, OrCAD Express, OrCAD Capture, OrCAD PSpice, and
OrCAD PSpice A/D are registered trademarks of OrCAD, Inc. OrCAD Capture CIS,
and OrCAD Express CIS are trademarks of OrCAD, Inc.
Microsoft, Visual Basic, Windows, Windows NT, and other names of Microsoft
products referenced herein are trademarks or registered trademarks of Microsoft
Corporation.
All other brand and product names mentioned herein are used for identification
purposes only, and are trademarks or registered trademarks of their respective
holders.
Part Number 60-30-636
First edition 30 November 1998
Technical Support (503) 671-9400
Corporate offices(503) 671-9500
OrCAD Japan K.K.81-45-621-1911
OrCAD UK Ltd.44-1256-381-400
Fax(503) 671-9501
General emailinfo@orcad.com
Technical Support emailtechsupport@orcad.com
World Wide Webhttp://www.orcad.com
OrCAD Design Network (ODN) http://www.orcad.com/odn
OrCAD® offers a total solution for your core design tasks:
schematic- and VHDL-based design entry; FPGA and
CPLD design synthesis; digital, analog, and mixed-signal
simulation; and printed circuit board layout. What's more,
OrCAD's products are a suite of applications built around
an engineer's design flow--not just a collection of
independently developed point tools. PSpice is just one
element in OrCAD's total solution design flow.
With OrCAD’s products, you’ll spend less time dealing
with the details of tool integration, devising
workarounds, and manually entering d ata to keep file s in
sync. Our products will help you build better products
faster, and at lower cost.
Before you begin
OrCAD PSpice overview
OrCAD PSpice simulates analog-only circuits. After you
prepare a design for simulation, OrCAD Capture
generates a circuit file set. The circuit file set, containing
the circuit netlist and analysis commands, is read by
PSpice for simulation. PSpice formulates these into
meaningful graphical plots, which you can mark for
display directly from your schematic page using markers.
xxiv
How to use this guide
This guide is designed so you can quickly find the
information you need to use PSpice.
This guide assumes that you are familiar with Microsoft
Windows (NT or 95), including how to use icons, menus,
and dialog boxes. It also assumes you have a basic
understanding about how Windows manages
applications and files to perform routine tasks, such as
starting applications, and openin g and saving your work.
If you are new to Windows, please review your Microsoft Windows User’s Guide.
Typographical conventions
Before using PSpice, it is important to understand the
terms and typographical conventions used in this
documentation.
How to use this guide
This guide generally follows the conventions used in the
Microsoft Win dows User’s Guide. Procedures for
performing an operation are generally numbered with the
following typographical conventions..
NotationExamplesDescription
C+r
monospace
font
Press C+
Type
VAC...
r
A specific key or key
stroke on the keyboard.
.Commands/te xt entered
from the keyborad.
xxv
Before you begin
Related documentation
Documentation for OrCAD products is available in both
printed and online forms. To access an online manual
instantly, you can select it from the Help menu in its
respective program (for example, access the Capture
User’s Guide from the Help menu in Capture).
Note
The documentation you receive depends on the software
configuration you have purchased.
The following table provides a brief description of those
manuals available in both printed and online forms.
This manual... Provides information about how to use .. .
OrCAD Capture
User’s Guide
OrCAD Layout
User’s Guide
OrCAD PSpice & Basics
User’s Guide
OrCAD PSpice
User’s Guide
OrCAD PSpice Optimizer
User’s Guide
OrCAD Capture, which is a schematic capture front-end program
with a direct interface to other OrCAD programs and options.
OrCAD Layout, which is a PCB layout editor that lets you specify
printed circuit board sturcture, as well as the components, metal,
and graphics required for fabrication.
PSpice with Probe, the Stimulus Editor, and the Model Editor,
which are circuit an alysis programs that l et you create, simulate,
and test analog and digital circuit designs. This manual provides
examples on how to specify simulation parameters, analyze
simulation results, edit input signals, and create models. (PSpice
Basics is a limited version that does not include the Stimulus
Editor.)
OrCAD PSpice with Probe is a circuit analysis program that lets
you create, si mulate, and test analo g-only circuit des igns.
.
OrCAD PSpice Optimizer, which is an analog performance
optimization program that lets you fine-tune your analog circuit
designs.
xxvi
The following table provides a brief description of those
manuals available online only.
This online manual... Provides this...
OrCAD PSpice
Online Reference Manual
Reference material for PSpice . Also included: det ailed descri ptions of the
simulation controls and analysis specifications, start-up option
definitions, and a list of device types in the analog and digital model
libraries. User interface commands are provided to instruct you on each
of the screen commands.
Related documentation
OrCAD Application Notes
Online Manual
OrCAD PSpice Library ListA complete list of the analog and digital parts in the model and part
A variety of articles that show you how a particular task can be
accomplished using OrCAD’s products, and examples that demonstrate
a new or different approach to solving an engineering problem.
libraries.
Online Help
Choosing Search for Help On from the Help menu
displays an extensive online help system.
The online help includes:
•step-by-step instructions on how to set up PSpice
simulations and analyze simulation results
•reference information about PSpice
•Technical Support information
If you are not familiar with Windows (NT or 95) Help
system, choose How to Use Help from the Help menu.
xxvii
Before you begin
If you have the demo CD-ROM
OrCAD demo CD-ROM
The OrCAD demo CD-ROM has the following limitati ons
for PSpice:
•circuit simulation limited to circuits with up to 64
nodes, 10 transistors, two operational amplifiers or 65
digital primitive devices, and 10 transmission lines
(ideal or non-ideal) with not more than 4 pairwise
coupled l ines
•device characterization using the Model Editor
limited to diodes
•stimulus generation limited to sine waves (analog)
and clocks (digital)
•sample library of approximately 39 analog and 134
digital parts
•displays only simulation data create d using the d emo
version of the simulator
xxviii
•PSpice Optimizer limited to one goal, one parameter
and one constraint
•designs created in Capture can be saved if they have
no more than 30 part instances
What’s New
What’s New
New PSpice interface with integrated waveform
analysis functionalityRelease 9 of PSpice incl udes all
of Probe’s features and adds to them. Included in one
screen are tabbed windows for viewing plots, text
windows for viewing output files or other text files, and a
simulation status and message window. Also included is
a new, self-documenting analysis setup dia log for creating
simulation profiles (see below). PSpice now provides an
editable simulation queue which shows you how many
files are currently in line to be simulated. You can edit or
re-order the list as needed. And the plotting features have
been improved by providing user-controlled grid setti ngs,
grid and trace properties (style and color) and metafile
format copy and paste functions.
Simulation profilesPSpice Release 9 introduces the
concept of simulation profiles. Each simulation profile
refers to one schematic in a design and includes one
analysis type (AC, DC, or Transient) with any options
(sensitivity, temperature, parametric, Monte Carlo, etc.).
You can define as many profiles as you need for your
design and you can set up multiple analyses of the same
type. Simulation profiles help you keep your analysis
results separate, so you can delete one without losing the
rest.
To find out more, see Analyzing
waveforms on page -319.
New OrCAD Capture front-endRelease 9 integrates
OrCAD Capture as the front-end schematic entry tool for
PSpice. Capture provides a professional design entry
environment with many advanced capabilities that now
work hand-in-hand with PSpice. These include a project
manager, a new property editor spreadsheet, right mouse
button support, and many other time-saving features.
xxix
Before you begin
R
To find out more, see Creating and
editing models on page -85.
To find out more, refer to MOSFET devices
in the Analog Devices chapter of the
online OrCAD PSpice A/D
eference Manual.
New Model Editor interfaceThe Model Editor
(formerly known as Parts) has been improved and
modernized for Release 9. It now provides a unified
application for editing models either in text form or by
modifying their specifications. The Model Editor now also
supports Darlington modeling.
EKV version 2.6 MOSFET modelThe EKV model is a
scalable and compact model built on fundamental
physical properties of the device. Use this model to design
low-voltage, low-current analog, and mixed analogdigital circuits that use sub-micron technologies.
Version 2.6 models the fo llowing:
•geometrical and process related aspects of the device
(oxide thickness, junction depth, effective channel
length and width, and so on)
•effects of doping profile and substrate effects
•weak, moderate, and strong inversion behavior
•mobility effects due to vertical and lateral fields and
carrier velocity saturation
•short-channel effects such as channel-length
modulation, source and drain charge sharing, and the
reverse short channel effect
•thermal and flicker noise modeling
•short-distance geometry and bias-dependent device
matching for Monte Carlo analysis
Enhanced model librariesThe model libraries
supplied with PSpice Release 9 have been enhanced to
include the latest models from various vendors, as well as
models for popular optocouplers, Darlingtons, and DAC
and ADC devices.
xxx
Part one
Simulation primer
Part one provides basic information about circuit
simulation including examples of common analyses.
•Chapte r 1, Things you need to know, provides an
overview of the circuit simulation process including
what PSpice does, descriptions of analysis types, an d
descriptions of important files.
•Chapte r 2, Simulation examples, presents examples of
common analyses to introduce the methods and tools
you’ll need to enter, simulate, and analyze your
design.
Things you need to know
Chapter overview
1
This chapter introduces the purpose and function of the
OrCAD
•What is PSpice? on page 1-2 describes PSpice
•Analyses you can ru n wit h PS pic e on page 1-3 introduces
•
•
•
®
PSpice circuit simulator.
capabilities.
the different kinds of basic and advanced analyses that
PSpice supports.
Using PSpice with other OrCAD programs on page 1-9
presents the high-level simulation design flow.
Files needed for simulation on page 1-10 describes the
files used to pass information between OrCAD
programs. This section also introduces the things you
can do to customize where and how PSpice finds
simulation information.
Files that PSpice generates on page 1-14 describes the
files that contain simulation results.
Chapter 1 Things you need to know
What is PSpice?
OrCAD PSpice is a simulation program that models the
behavior of a circuit containin g analog devices. Used with
OrCAD Capture for design entry, you can think of PSpice
as a software-based breadboard of your circuit that you
can use to test and refine your design before ever touching
a piece of hardware.
Run basic and advanced analysesPSpice can
perform:
•DC, AC, and transient analyses, so you can test the
response of your circuit to different inputs.
•Parametric, Monte Carlo, and sensitivity/worst-case
analyses, so you can see how your circuit’s behavior
varies with changing component values.
The range of models built into PSpice
include not only those for resistors,
inductors, capacitors, and bipolar
transistors, but also these:
• transmission line models, including
delay, reflection, loss, dispersion, and
crosstalk
• nonlinear magnetic core models,
including saturation and hysteresis
•
six MOSFET models, including BSIM3
version 3.1 and EKV version 2.6
•
five GaAsFET models, includ ing
Parker-Skellern and TriQuint’s TOM2
model
•
IGBTs
Use parts from OrCAD’s extensive set of libraries
The model libraries feature over 11,300 analog models of
devices manufactured in North America, Japan, and
Europe.
Vary device characteristics without creating
new partsPSpice has numerous built-in models with
parameters that you can tweak for a given device. These
include independent temperature effects.
Model behaviorPSpice supports analog behavioral
modeling, so you can describe functional blocks of
circuitry using mathematical expressions and functions.
2
Analyses you can run wi th PSpice
R
Analyses you can run with
PSpice
Basic analyses
DC sweep & other DC calculations
These DC analyses evaluate circuit performance in
response to a direct current source. Table 1
what PSpice calculates for each DC analysis type.
Table 1DC analysis types
For this DC analysis...PSpice computes this. ..
DC sweepSteady-state voltages and currents
when sweeping a source, a model
parameter, or temperature over a range
of values.
Bias point detailBias point data in addition to what is
automatically computed in any
simulation.
summarizes
See Chapter 2,
examples
showing how to run each type of analysis.
See Part t hree
unning Analyses, for a more
detailed discussion of each type of analysis
and how to set it up.
Simulation
, for introductory examples
, Setting Up and
DC sensitivitySensitivity of a net or part voltage a s a
function of bias point.
Small-signal
DC transfer
Small-signal DC gain, input resistance,
and output resistance as a function of
bias point.
3
Chapter 1 Things you need to know
AC sweep and noise
These AC analyses evaluate circuit performance in
response to a small-signal alternating current source.
Table 2
analysis type.
summarizes what PSpice calculates for each AC
Table 2
Note
AC analysis types
For this AC analysis...PSpice computes this. ..
AC sweepSmall-signal response of the circuit
(linearized around the bias point) when
sweeping one or more sources over a
range of frequencies. Outputs include
voltages and currents with magnitude
and phase; you can use this information
to obtain Bode plots.
NoiseFor each frequency specified in the AC
analysis:
Propagated no ise contributi ons at an
•
output net from every noise
generator in the circuit.
RMS sum of the noise contributions
•
at the output.
Equivalent input noise.
•
To run a noise analysis, you must also run an AC sweep analysis.
4
Transient and Fourier
These time-based analyses evaluate circui t performance in
response to time-varying sources. Table 3
what PSpice calculates for each time-based analysis type.
summarizes
Analyses you can run wi th PSpice
Table 3
Note
Time-bas ed analysis types
For this time-bas e d
analysis...PSpice computes this...
TransientVoltages and currents tracked over
time.
FourierDC and Fourier components of the
transient analysis results.
To run a Fourier analysis, you must also run a transient analysis.
5
Chapter 1 Things you need to know
Advanced multi-run analyses
The multi-run analyses—parametric, temperature, Monte
Carlo, and sensitivity/worst-case—result in a series of DC
sweep, AC sweep, or transient analyses depending on
which basic analyses you enabled.
Parametric and temperature
For parametric and temperature analyses, PSpice steps a
circuit value in a sequence that you specify and runs a
simulation for each value.
Table 4
kind of analysis.
Table 4Parametric and temperature analysis types
shows the circuit values that you can ste p for each
For this analysis...You can step one of these...
Parametricglobal parameter
model parameter
component value
DC source
operational temperature
Temperatureoperational temperature
6
Monte Carlo and sensitivity/worst-case
Monte Carlo and sensitivity/worst-case analyses are
statistical. PSpice changes device model parameter values
with respect to device and lot tolerances that you specify,
and runs a simulation for each valu e.
Analyses you can run wi th PSpice
Table 5
summarizes how PSpice runs each statistical
analysis type.
Table 5Statistical analysis types
For this statistical
analysis...PSpice does this...
Monte CarloFor each simulation,
device model parameters for which you
have defined a tolerance.
Sensitivity/
worst-case
Computes the probable worst-case
response of the circuit in two steps:
Computes component sensitiv ity to
1
changes in the device model
parameters. This means PSpice
nonrandomly
parameters for which you have
defined a tolerance, one at a time for
each device and runs a simulation
with each change.
Sets
2
devices to their worst-case values
(assumed to be at one of the
tolerance limits) and runs a final
simulation.
model parameters for
all
r a ndomly
varies device model
varies all
all
7
Chapter 1 Things you need to know
Taken together, simulation and waveform
analysis is an iterative process. After
analyzing simulation results, you can refine
your design and simulation settings and
then perform a new simulation and
waveform analysis.
Analyzing waveforms with
PSpice
What is waveform analysis?
After completing the simulation, PSpice plots the
waveform results so you can visualize the circuit’s
behavior and determine the validity of your design.
Perform post-simulation analysis of the
resultsThis means you can plot addition al information
derived from the waveforms. What you can pl ot depends
on the types of analyses you run. Bode plots, phase
margin, derivatives for small-signal characteristics,
waveform families, and histograms are only a few of the
possibilities. You can also plot other waveform
characteristics such as rise time versus temperature, or
percent overshoot versus component value.
8
Using PSpice with other OrCAD
programs
Using Capture to prepare for simulation
Capture is a design entry program you need to prepare
your circuit for simulation. This means:
•placing and connecting part symbols,
•defining component values and other attributes,
•defining input waveforms,
•enabling one or more analyses, and
•marking the points in the circuit where you want to
see results.
Capture is also the control point for running other
programs used in the simulation design flow.
Using PSpice with other OrCAD programs
What is the Stimulus Editor?
The Stimulus Editor is a graphical in put waveform edi tor
that lets you define the shape of time-based signals used
to test your circuit’s response during simulation. Using
the Stimulus Editor, you can define:
•
analog stimuli with sine wave, pulse, piecewise l inear,
exponential pulse, single-frequency FM shapes
The Stimulus Editor lets you draw analog piecewise linear
stimuli by clicking at the points along the timeline that
correspond to the input values that you want at
transitions.
9
Chapter 1 Things you need to know
What is the Model Editor?
The Model Editor is a model extractor that generates
model definitions for PSpice to use during simulation. All
the Model Editor needs is information about the device
found in standard data sheets. As you enter the data sheet
information, the Model Editor displays device
characteristic curves so you can verify the model-based
behavior of the device. When you are finished, the Mode l
Editor automatically creates a part for the model so you
can use the modeled part in your design immediately.
Files needed for simulation
To simulate your design, PSpice needs to know about:
•the parts in your circuit and how they are connected,
•what analyses to run,
•the simulation models that correspond to the parts in
your circuit, and
•the stimulus definitions to test with.
This information is provided in various data files. Some of
these are generated by Capture, others come from
libraries (which can also be generated by other programs
like the Stimulus Editor and the Model Editor), and still
others are user-defined.
Files that Capture generates
When you begin the simulation process, Capture first
generates files describing the parts and connections in
your circuit. These files are the netlist file and the circuit
file that PSpice reads before doing anything else.
10
Netlist file
R
Files needed for simula t ion
The netlist file contains a li st of device na mes, values, and
how they are connected with other devices. The name that
Capture generates for this file is DESIGN_NAME.NET.
Circuit file
The circuit file contains commands describing how to run
the simulation. This file also refers to other files that
contain netlist, model, stimulus, and any other
user-defined information that apply to the simulation.
The name that Capture generates for this file is
DESIGN_NAME.CIR.
Other files that you can configure for simulation
OrCAD
Stimulus Editor
global
model
libraries
OrCAD
Model Editor
MODEL
+BF=
model
definitions
input
waveforms
Refer to the online OrCAD PSpice
eference Manual for the syntax of
the statements in the netlist file and the
circuit file.
stimulus file
simulation
primitives
local
model
libraries
OrCAD
PSpice
custom
include file
Figure 1 User-configurable data files that PSpice reads
Before starting simulation, PSpice needs to read other files
that contain simulation informa tion for your circuit. These
are model files, and if required, stimulus files and include
files.
The circuit file (.CIR) that Capture generates
contains references to the other
user-configurable files t hat PSpice needs to
read.
11
Chapter 1 Things you need to know
You can create these files using OrCAD programs like the
Stimulus Editor and the Model Editor. These programs
automate file generation and provide graphical ways to
verify the data. You can also use the Model Text view in
the Model Editor (or another text editor like Notepad) to
enter the data manually.
Model library
A model library is a file that contains the electrical
definition of one or more parts. PSpice uses this
information to determine how a part will respond to
different electrical inputs.
These definitions take the form of either a:
•model parameter set, which defines the behavior of a
part by fine-tuning the underlying model built into
PSpice, or
A subcircuit, sometimes called a
macr omodel, is analogous to a
procedure call in a software programming
language.
See What is the Model Editor?
on page 1-10 for a description.
•subcircuit netlist, which describes the structure and
function of the part by interconnecting other parts and
primitives.
The most commonly used models are available in the
OrCAD model libraries shipped with your programs. The
model library names have a .LIB extension.
If needed, however, you can create your own models and
libraries, either:
•manually using the Model Text view in the Model
Editor (or another text editor like Notepad), or
•
automatically using the Model Editor.
12
Stimulus file
S
Files needed for simula t ion
A stimulus file contains time-based definitions for analog
input waveforms. You can create a stimulus file either:
•manually using the Model Text View of the Model
Editor (or a standard text editor) to create the
definition (a typical file extension is .STM), or
•automatically using the Stimulus Editor (which
generates a .STL file extension).
Include file
An include file is a user-defined file that contains:
•PSpice commands, or
•supplemental text comments that you want to appear
in the PSpice output file (see page 1-14
).
You can create an include file using any text editor, such
as Notepad. Typically, include file names have a .INC
extension.
Configuring model library, stimulus, and
include files
PSpice searches model libraries, stimulus files, and
include files for any information it needs to complete the
definition of a part or to run a simulation.
Note
Not all stimulus definitions require a
stimulus file. In some cases, like DC and AC
sources, you must use a schematic symbol
and set its attribut es.
ee What is the Stimulus Editor?
on page 1-9 for a description.
Example: An include file that contains
definitions, using the PSpice .FUNC
command, for functions that you want to
use in numeric expressions elsewhere in
your design.
More on libraries...
Configuration for model li braries is similar
to that for other li braries that C apture uses,
including part libraries. To find out more,
refer to your Capture user’s guide.
The files that PSpice searches depend on how you
configure your model libraries and other files. Much of the
configuration is set up for you automatically, however,
you can do the following yourself:
•
Add and delete files from the configuration.
•
Change the scope of a file: that is, whether the file
applies to one design only (local) or to any design
(global).
•
Change the search order.
13
Chapter 1 Things you need to know
Files that PSpice generates
After reading the circuit file, netlist file, model libraries,
and any other required inputs, PSpice starts the
simulation. As simulation progresses, PSpice saves res ults
to two files—the data file and the PSpice output file.
For a description of how to display
simulation results, see Part fourViewing results.
For a description of the wav eform analyzer
program, see What is waveform
analysis? on page 1-8.
There are two ways to add waveforms to
the display:
• From within PSpice, by specifying trace
expressions.
• From within Capture, by cross-probing.
,
Waveform data file
The data file contains simulation results that that can be
displayed graphically. PSpice reads this file automatic ally
and displays waveforms reflecting circuit response at
nets, pins, and parts that you marked in your schematic
(cross-probing). You can set up your design so PSpice
displays the results as the simulation progresses or after
the simulation completes.
After PSpice has read the data f ile an d displays the initial
set of results, you can add more waveforms and to
perform post-simulation analysis of the data.
PSpice output file
The PSpice output file is an ASCII text file that contains:
•the netlist representation of the circuit,
•the PSpice command syntax for simulati on commands
and options (like the enabled analyses),
•
simulation results, and
•warning and error messages for problems
encountered during read-in or simulation.
Example: Each instance of a VPRINT1
symbol placed in your schematic causes
PSpice to generate a ta ble of voltage values
for the connecting ne t, and to write the
table to the PSpice output file.
14
Its content is determined by:
•
the types of analyses you run,
•
the options you select for running PSpice, and
•
the simulation control symbols (like VPRINT1 and
VPLOT1) that you place and connect to nets in your
design.
Simulation examples
Chapter overview
The examples in this chapter provide an introduction to
the methods and tools for creating circuit designs,
running simulations, and analyzing simulation results.
All analyses are performed on the same example circuit to
clearly illustrate analysis setup, simulation, and
result-analysis procedures for each analysis type.
2
This chapter includes the following sections:
•
Example circuit creation on page 2-16
•
Performing a bias point analysis on page 2-22
•
DC sweep an alysis on page 2-26
•
Transient analysis on page 2-32
•
AC sweep an alysis on page 2-37
•
Parametric analysis on page 2-42
•
Performance analysis on page 2-49
Chapter 2 Simulation examples
Example circuit creation
This section describes how to use OrCAD Capture to
create the simple diode clipper circuit shown in Figure 2.
16
Figure 2 Diode clipper circuit.
To create a new PSpice project
1From the Windows Start menu, choose the OrCAD
Release 9 program folder and then the Capture
shortcut to start Capture.
2In the Project Manager, from the File menu, point to
New and choose Project.
3Select Analog Circuit Wizard.
4In the Name text box, enter the name of the project
(CLIPPER).
5Click OK, then click Finish.
No special libraries need to be configured at thi s time.
A new page will be displayed in Capture and the new
project will be configured in the Project Manager.
To place the voltage sources
1In Capture, switch to the schematic page editor.
Example circuit creation
2From the Place menu, choose Part to display the Place
Part dialog box.
3Add the library for the parts you need to place:
aClick the Add Library button.
bSelect SOURCE.OLB (from the PSpice library) and
click Open.
4In the Part text box, type
VDC.
5Click OK.
6Move the pointer to the correct position on the
schematic page (see Figure 2) and click to place the
first part.
7Move the cursor and click again to place the second
part.
8Right-click and choose End Mode to stop placing
parts.
To place the diodes
1From the Place menu, choose Part to display the Place
Part dialog box.
or
Note
There are two sets of library files
supplied with Capture and PSpice. The
standard schematic part libraries are found
in the directory Capture\Library. The part
libraries that are desi gned for simulation
with PSpice are found in the sub-directory
Capture\Library\PSpice. In order to have
access to specific parts, you mus t fir st
configure the library in Capture using the
Add Library function.
or
2Add the library for the parts you need to place:
aClick the Add Library button.
bSelect DIODE.OLB (from the PSpice library) and
click Open.
3In the Part text box, type
D1N39 to display a list of
diodes.
4Select D1N3940 and click OK.
5Press r to rotate the diode to the correct orientation.
6Click to place the first diode (D1), then click to place
the second diode (D2).
7Right-click and choose End Mode to stop placing
parts.
When placing parts:
•
Leave space to connect the parts with
wires.
•
You will change part names an d values
that do not match those shown in
Figure 2 later in this section.
17
Chapter 2 Simulation examples
To move the text associated with the diodes (or any other object)
1Click the text to select it, then drag the text to a new
location.
To place the other parts
pre
1From the Place menu, choose Part to display the Place
Part dialog box.
2Add the library for the parts you need to place:
aClick the Add Library button.
bSelect ANALOG.OLB (from the PSpice library)
and click Open.
3Follow similar steps as described for the diodes to
place the parts listed below, ac cording to Figure 2. The
part names you need to type in the Part name text box
of the Place Part dialog box are shown in parentheses:
•resistors (R)
•capacitor (C)
4To place the off-page connector parts
(OFFPAGELEFT-R), click the Place Off-Page
Connector button on the tool palette.
5Add the library for the parts you need to place:
aClick the Add Library button.
bSelect CAPSYM.OLB (from the Capture library)
and click Open.
18
6Place the off-page connector parts according to
Figure 2.
7To place the ground parts (0), click the GND button on
the tool palette.
8Add the library for the parts you need to place:
aClick the Add Library button.
bSelect SOURCE.OLB (from the PSpice library) and
click Open.
9Place the ground parts according to Figure 2.
To connect the parts
Example circuit creation
1From the Place menu, choose Wire to begin wiring
parts.
The pointer changes to a crosshair.
2Click the connection point (the very end) of the pin on
the off-page connector at the input of the circuit.
3Click the nearest connection point of the input resistor
R1.
4Connect the other end of R1 to the output capacitor.
5Connect the diodes to each other and to the wire
between them:
aClick the connection point of the cathode for the
lower diode.
bMove the cursor straight up and click the wire
between the diodes. The wire ends, and the
junction of the wire segments becomes visible.
cClick again on the junction to continue wiring.
dClick the end of the upper diode’s anode pin.
6Continue connecting parts until the circuit is wired as
shown in Figure 2 on page 2-16.
or
To stop wiring, right-click and choose End
Wire. The pointer changes to the default
arrow.
Clicking on any valid connection poi nt ends
a wire. A valid connection poin t is shown as
box
(see Figure 3).
a
Figure 3
If you make a mistake when placing or
connecting components:
1 From the Edit menu, choose Undo, or
Connection points.
click .
To assign names (labels) to the nets
1From the Place menu, choose Net Alias to display th e
Place Net Alias dialog box.
2In the Name text box, type
3Click OK.
4Place the net alias on any segment of the wire that
connects R1, R2, R3, the diodes, and t he capacitor. The
lower left corner of the net alias must touch the wire.
5Right-click and choose En d Mode to quit the Net Alias
function.
Mid.
19
Chapter 2 Simulation examples
To assign names (labels) to the off-page connectors
Label the off-page connectors as shown in Figure 2 on
page 2-16.
1Double-click the name of an off-page connector to
display the Display Properties dialog box.
2In the Name text box, type the new name.
3Click OK.
4Select and relocate the new name as desired.
To assign names to the parts
A more efficient way to change the
names, values and other properties of
several parts in your design is to use the
Property Editor, as follows:
1 Select all of the parts to be modified
by pressing C and clicking each
part.
2 From the Edit menu, choose
Properties.
The Parts Spreadsheet appears.
Change the entries in as many of the
cells as needed, and then click Apply to
update all of the changes at once.
1Double-click the second VDC part to display the Parts
spreadsheet.
2Click in the first cell under the Reference column.
3Type in the new name Vin.
4Click Apply to update the changes to the part, then
close the spreadsheet.
5Continue naming the remaining parts until your
schematic looks like Figure 2 on page 2-16.
To change the values of the parts
1Double-click the voltage label (0V) on V1 to display
the Display Properties dialog box.
2In the Value text box, type
3Click OK.
4Continue changing the Part Value properties of the
parts until all the parts are defined as in Figure 2 on
page 2-16.
Your schematic page should now have the sam e parts,
wiring, labels, and properties as Figure 2 on page 2-16.
5V.
20
pre
To save your design
1From the File menu, choose Save.
Finding out more about setting up your design
About setting up a design for simulation
For a checklist of all of the things you need to do to se t up
your design for simulation, and how to avoid common
problems, see Chapte r 3,
Preparing a design for simulation.
Example circuit creation
21
Chapter 2 Simulation examples
Running PSpice
When you perform a simulation, PSpice generates an
output file (*.OUT).
You can set up a simulation profile to run
one analysis at a time. To run multiple
analyses (for example, both DC sweep and
transient analyses), set up a batch
simulation. For more information, see
Chapte r 7,
and starting simulation.
Setting up analyses
While PSpice is running, the progress of the simulation
appears and is updated in the PSpice simulation output
window (see Figure 4).
Figure 4 PSpice simulation output window.
Performing a bias point analysis
To set up a bias point analysis in Capture
1In Capture, switch to CLIPPER.OPJ in the schematic
page editor.
2From the PSpice menu, choose New Simulation
Profile to display the New Simulation dialog box.
The root schematic listed is the schematic
page associated with the simulation profile
you are creating.
22
3In the Name text box, type
4From the Inherit From list, select None, then click
Create.
The Simulation Settings dialog box appears.
5From the Analysis type list, select Bias Point.
6Click OK to close the Simulation Settings dialog box.
Bias.
To simulate the circuit from within Capture
1From the PSpice menu, choose Run.
PSpice simulates the circuit and calculates the bias
point information.
Running PSpice
Note
Because waveform data is not calculated during a bias point
analysis, you will not see any plots displayed in the Probe window
for this simulation. To find out how to view the results of this
simulation, see
Using the simulation output file
below.
23
Chapter 2 Simulation examples
Using the simulation output file
The simulation output file acts as an audit trail of the
simulation. This file optionally echoes the contents of the
circuit file as well as the results of the bias point
calculation. If there are any syntax errors in the netlist
declarations or simulation commands, or a nomalies while
performing the calculation, PSpice writes error or
warning messages to the output file.
To view the simulation output file
1From PSpice’s View menu, choose Output File.
Figure 5 shows the results of the bias point calc ulation
as written in the simulation output file.
24
Figure 5 Simulation output file.
2When finished, close the window.
PSpice measures the current through a two terminal
device into the first terminal and out of the second
terminal. For voltage sources, current is measur ed from
the positive terminal to the negative terminal; this is
opposite to the positive current flow convention and
results in a negative value in the output file.
Finding out more about bias point calculations
Table 2-1
To find out more about this...See this...
Running PSpice
bias point calculations
Bias point on page 8-223
25
Chapter 2 Simulation examples
DC sweep analysis
You can visually verify the DC response of the cli pper by
performing a DC sweep of the input voltage source and
displaying the waveform results in the Probe window in
PSpice. This example sets up DC sweep analysis
parameters to sweep Vin from -10 to 15 volts in 1 volt
increments.
Setting up and running a DC sweep analysis
To set up and run a DC sweep analysis
1In Capture, from the PSpice menu, choose
New Simulation Profile.
The New Simulation dialog box appears.
Note
The default settings for DC Sweep
simulation are Voltage Source as the swept
variable type and Linear as the sweep type.
To use a different swept variable type or
sweep type, choose different options under
Sweep variable and Sweep type.
2In the Name text box, type
3From the Inherit From list, select Schematic1-Bias,
then click Create.
The Simulation Settings dialog box appears.
4Click the Analysis tab.
5From the Analysis type list, select DC Sweep and enter
the values shown in Figure 6.
DC Sweep.
26
Figure 6 DC sweep analysis settings.
6Click OK to close the Simulation Settings dialog box.
7From the File menu, choose Save.
8From the PSpice menu, choose Run to run the analysis.
DC sweep analysis
27
Chapter 2 Simulation examples
Displaying DC analysis results
Probe windows can appear during or after the simulation
is finished.
28
press
I
press C+M
Figure 7 Probe window.
To plot voltages at nets In and Mid
1From PSpice’s Trace menu, choose Add Trace.
2In the Add Traces dialog box, select V(In) and V(Mid).
3Click OK.
To display a trace using a marker
1From Capture’s PSpice menu, point to Markers and
choose Voltage Level.
2Click to place a marker on net Out, as shown in
Figure 8.
Figure 8 Clipper circuit with voltage marker on net Out.
3Right-click and choose End Mode to stop placing
markers.
4From the File menu, choose Save.
DC sweep analysis
or
5Switch to PSpice. The V(Out) waveform trace appears,
as shown in Figure 9.
Figure 9 Voltage at In, Mid, and Out.
29
Chapter 2 Simulation examples
This example uses the cursors feature to
view the numeric values for two traces an d
the difference between them by placing a
cursor on each trac e.
choose Display.
Two cursors appear for the first trace defined in the
legend below the x-axis—V(In) in this example. The
Probe Cursor window also appears.
2To display the cursor crosshairs:
aPosition the mouse anywhere inside the Probe
window.
bClick to display the crosshairs for the first cursor.
cRight-click to display the crossha irs for the second
cursor.
In the trace legend, the part for V(I n) is outlined i n the
crosshair pattern for each cursor, resulting in a dashed
line as shown in Figure 11.
3Place the first cursor on the V(In) waveform:
aClick the portion of the V(In) trace in the proximity
of 4 volts on the x-axis. The cursor crosshair
appears, and the current X and Y values for the
first cursor appear in the cursor window.
Your ability to get as close to 4.0 as possible
depends on screen resolution and window
size.
Figure 12
Trace legend with V(Mid)
symbol outlined.
30
bTo fine-tune the cursor location to 4 volts on the
x-axis, drag the crosshairs until the x-axis value of
the A1 cursor in the cursor window is
approximately 4.0. You can also press r and l
for tighter control.
4Place the second cursor on the V(Mid) waveform:
aRight-click the trace legend part (diamond) for
V(Mid) to associate the second cursor with the Mid
waveform. The crosshair pattern for the second
cursor outlines the V(Mid) trace part as shown in
Figure 12.
bRight-click the portion on the V(Mid) trace that is
in the proximity of 4 volts on the x-axis. The X and
Y values for the second cursor appear in the cursor
window along with the difference (dif) between
the two cursors’ X and Y values.
cTo fine-tu ne the location of the second cursor to 4
volts on the x-axis, drag the crosshairs until the
x-axis value of the A2 cursor in the cursor window
is approximately 4.0. You can also press V+r
and V+l for tighter control.
DC sweep analysis
Figure 13 shows the Probe window with both cursors
placed.
Figure 13 Voltage difference at V(In) = 4 volts.
To delete all of the traces
1From the Trace menu, choose Delete All Traces.
At this point, the design has been saved. If needed,
you can quit Capture and PSpice and complete the
remaining analysis exercises later using the saved
design.
There are also ways to display the
difference between two voltages as a trac e:
• In PSpice, add the trace expression
V(In)-V(Mid).
• In Capture, from the PSpice menu,
point to Markers and choose Voltage
Differential. Place the two markers on
different pins or wires.
You can also delete an individual trace by
selecting its name in the trace legend and
then pressing D.
Example: To delete the V(In) trace, click the
V(In), located under the plot’s
text,
x-axis, and then press D.
Finding out more about DC sweep analysis
Table 2-1
To find out more about this...See this...
DC sweep analysis
DC Sweep on page 8-214
31
Chapter 2 Simulation examples
Transient analysis
This example shows how to run a transient analysis on the
clipper circuit. This requires adding a time-domain
voltage stimulus as shown in Figure 14.
32
Figure 14 Diode clip per circuit wit h a voltage stimu lus.
To add a time-domain voltage stimulus
1From Capture’s PSpice menu, point to Markers and
choose Delete All.
2Select the ground part beneath the VIN source.
3From the Edit menu, choose Cut.
4Scroll down (or from the View menu, point to Zoom,
then choose Out).
5Place a VSTIM part (from the PSpice library
SOURCESTM.OLB) as shown in Figure 14.
Transient analysis
6From the Edit menu, choose Paste.
7Place the ground part under the VSTIM part as shown
in Figure 14.
8From the View menu, point to Zoom, then choose All.
9From the File menu, choose Save to save the design.
To set up the stimulus
1Select the VSTIM part (V3).
2From the Edit menu, choose PSpice Stimulus.
The New Stimulus dialog box appears.
3In the New Stimulus dialog box, type
4Click SIN (sinusoidal), then click OK.
5In the SIN Attributes dialog box, set the first three
properties as follows:
Offset Voltage = 0
Amplitude = 10
Frequency = 1kHz
6Click Apply to view the waveform.
SINE.
or press C+v
Note
The Stimulus Editor is
not included in PSp ice Basics.
If you do not have the
Stimulus Editor
1 Place a VSIN part instead of V STIM and
double-click it.
2 In the Edit Part dialog box, click User
Properties.
3 Set values for the VOFF, VA MPL, and
FREQ properties as defined in step 5
When finished, click OK.
.
The Stimulus Editor window should look like
Figure 15.
33
Chapter 2 Simulation examples
Figure 15 Stimulus Editor window.
7Click OK.
Figure 16
settings.
press V+@
Transient anal ysis simulation
8From the File menu, choose Save to save the stimulus
information. Click Yes to update the schematic.
9From the File menu, choose Exit to exit the Stimulus
Editor.
To set up and run the transient analysis
1From Capture’s PSpice menu, choose
New Simulation Profile.
The New Simulation dialog box appears.
2In the Name text box, type
3From the Inherit From list, select
Schematic1-DC Sweep, then click Create.
The Simulation Settings dialog box appears.
4Click the Analysis tab.
5From the Analysis list, select Time Domain (Transient)
and enter the settings shown in Figure 16.
TSTOP = 2ms
Start saving data after = 20ns
Transient.
34
6Click OK to close the Simulation Settings dialog box.
or press
I
7From the PSpice menu, choose Run to perform the
analysis.
Transient analysis
PSpice uses its own internal time steps for
computation. The internal time step is adjusted
according to the requirements of the transient analysis
as it proceeds. PSpice saves data to the waveform data
file for each internal time step.
To display the input sine wave and clipped wave at V(Out)
1From PSpice’s Trace menu, choose Add Trace.
2In the trace list, select V(In) and V(Out) by clicking
them.
3Click OK to display the traces.
4From the Tools menu, choose Options to display the
Probe Options dialog box.
5In the Use Symbols frame, click Always if it is not
already enabled.
6Click OK.
Note
The internal time step is different
from the Print Step value. Print Step
controls how often optional text format
data is written to the simula tion output
file(*.OUT).
These waveforms illustrate the clipping of
the input signal.
Figure 17 Sinusoidal input and clipped output waveforms.
35
Chapter 2 Simulation examples
Finding out more about transient analysis
Table 2-1
To find out more about this...See this...
transient analysis for analog
designs*
* Includes how to set up time-based stimuli using the Stimulus Editor.
Chapter 10, Transient
analysis
36
AC sweep analysis
The AC sweep analysis in PSpice is a linear (or small
signal) frequency domain analysis that can be used to
observe the frequency response of any circuit at its bias
point.
Setting up and running an AC sweep analysis
In this example, you will set up the clipper circuit for AC
analysis by adding an AC voltage source for a stimulus
signal (see Figure 18) and by setting up AC sweep
parameters.
AC sweep analysis
Figure 18 Clipper circuit with AC stimulus.
To change Vin to include th e AC stimulus signal
1In Capture, open CLIPPER.OPJ.
2Select the DC voltage source, Vin, and press D to
remove the part from the schematic page.
37
Chapter 2 Simulation examples
3From the Place menu, choose Part.
Note
PSpice simulation is not
case-sensitive, so both M and m can be used
as “milli,” and MEG, M eg, an d meg c an all
be used for “mega.” However, waveform
analysis treats M and m as mega and milli,
respectively.
4In the Part text box, type
VAC (from the PSpice library
SOURCE.OLB) and click OK.
5Place the AC voltage source on the schematic page, as
shown in Figure 17.
6Double-click the VAC part (0V) to display the Parts
spreadsheet.
7Change the Reference cell to Vin and change the
ACMAG cell to 1V
.
8Click Apply to update the changes and then close the
spreadsheet.
To set up and run the AC sweep simulation
1From Capture’s PSpice menu, choose New Simulation
Profile.
2In the Name text box, enter AC Sweep, then click
create.
The Simulation Settings dialog box appears.
3Click the Analysis tab.
38
4From the Analysis type list, select A C Sweep/Noise
and enter the settings shown in Figure 19.
Figure 19 AC sweep and noise analysis simulation settings.
5Click OK to close the Simulation Settings dialog box.
N
Y
6From the PSpice menu, choose Run to start the
simulation.
PSpice performs the AC analysis.
To add markers for waveform analysis
AC sweep analysis
1From Capture’s PSpice menu, point to Markers, point
to Advanced, then choose db Magnitude of Voltage.
2Place one Vdb marker on the Out net, then place
another on the Mid net.
3From the File menu, choose Save to save the design.
AC sweep analysis results
PSpice displays the dB mag nitude (20log10) of th e voltage
at the marked nets, Out and Mid, in a Probe window as
shown in Figure 20 below. VDB(Mid) has a lowpass
response due to the diode capacitances to ground. The
output capacitance and load resistor act as a highpass
filter, so the overall response, illustrated by VDB( out), is a
bandpass response. Because AC is a linear analysis and
the input voltage was set to 1V, the output voltage is the
same as the gain (or attenuation) of the circu it.
ote
ou must first define a simulation
profile for the AC Sweep/Noise analysis
in order to use advanced markers.
39
Chapter 2 Simulation examples
Figure 20 dB magnitude curves for “gain” at Mid and Out.
To display a Bode plot of the output voltage, inc luding phase
Note
Depending upon where the Vphase
marker was placed, the trace name may be
different, such as VP(Cout:2), VP(R4:1), or
VP(R4:2).
For more information on Probe windows
and trace expressions, see C h a p t er 13,
Analyzing waveforms.
press C+x
press C+V
1From Capture’s PSpice menu, point to Markers, point
to Advanced and choose Phase of Voltage.
2Place a Vphase marker on the output next to the Vdb
marker.
3Delete the Vdb marker on Mid.
4Switch to PSpice.
In the Probe window, the gain and phase plots both
appear on the same graph with the same scale.
5Click the trace name VP(Out) to select the tr ace.
6From the Edit menu, choose Cut.
7From the Plot menu, choose Add Y Axis.
8From the Edit menu, choose Paste.
The Bode plot appears, as shown in Figure 21.
40
Figure 21 Bode plot of clipper’s frequency response.
Finding out more about AC sweep and
noiseanalysis
AC sweep analysis
Table 2-2
To find out more about this...See this...
AC sweep analysis
noise analysis based on an
AC sweep analysis
AC sweep analysis on
page 9-232
Noise analysis on
page 9-241
41
Chapter 2 Simulation examples
Parametric Analysis is
Note
not supported in PS pice
Basics.
Parametric analysis
This example shows the effect of varying input resistance
on the bandwidth and gain of the clipper circuit by:
•Changing the value of R1 to the expression {Rval}.
•Placing a PARAM part to declare the parameter Rval.
•Setting up and running a parametric analysis to step
the value of R1 using Rval.
42
Figure 22 Clipper circuit with global parameter Rval.
This example produces multiple analysis runs, each with
a different value of R1. After the analysis is complete, you
can analyze curve families for the analysis runs using
PSpice.
Setting up and running the parametric analysis
To change the value of R1 to the expression {Rval}
Parametric analysis
1In Capture, open CLIPPER.OPJ.
2Double-click the value (1k) of part R1 to display the
Display Properties dialog box.
3In the Value text box, replace 1k with
4Click OK.
{Rval}.
To add a PARAM part to declare the parameter Rval
1From Capture’s Place menu, choose Part.
2In the Part text box, type
library SPECIAL.OLB) , then click OK.
3Place one PARAM part in any open area on the
schematic page.
4Double-click the PARAM part to display the Parts
spreadsheet, then click New.
5In the Property Name text box, enter Rval (no curly
braces), then click OK.
This creates a new property for the PARAM part, as
shown by the new column labeled Rval in the
spreadsheet.
PARAM (from the PSpice
PSpice interpret s t e xt in curly braces as an
expression that evaluates to a numerical
value. This example uses the simplest form
of an expression—a constant. The value of
R1 will take on the value of the Rval
parameter, whatever it may be.
For more inf o rmation about using
Note
the Parts spreadsheet, see the OrCAD
Capture User’s Guide.
6Click in the cell below the Rval column and enter 1k
as the initial value of the parametric sweep.
7While this cell is still selected, click Display.
8In the Display Format frame, select Name and Value,
then click OK.
9Click Apply to update all the changes to the PARAM
part.
10 Close the Parts spreadsheet.
11 Select the VP marker and press
marker from the schematic page.
12 From the File menu, choose Save to save the design.
D to remove the
This example is only interested in the
magnitude of the response.
43
Chapter 2 Simulation examples
To set up and run a parametric analysis to step the value of R1
using Rval
1From Capture’s PSpice menu, choose
New Simulation Profile.
The New Simulation dialog box appears.
The root schematic listed is the schematic
page associated with the simulation profile
you are creating.
This profile specifies that the parameter
Rval is to be stepped from 100 to 10k
logarithmically with a resolution of 10
points per decade.
The analysis is run for each value of Rval.
Because the value of R1 is defined as
{Rval}, the analysis is run for each v alue of
R1 as it logarit hm ically increases from
Ω to 10 kΩ in 20 steps, resulting in a
100
total of 21 runs.
2In the Name text box, type
Parametric.
3From the Inherit From list, select AC Sweep, then clic k
Create.
The Simulation Settings dialog box appears.
4Click the Analysis tab.
5Under Options, select Parametric Sweep and enter the
settings as shown below.
44
Figure 23 Parametric simulation settings.
6Click OK.
7From the PSpice menu, choose Run to start the
analysis.
Analyzing waveform families
Continuing from the example above, there are 21 analysis
runs, each with a different value of R1. After PSpice
completes the simulation, the Available Sections dialog
box appears, listing all 21 runs and the Rval parameter
value for each. You can select one or more runs to display.
To display all 21 traces
Parametric analysis
1In the Available Sections dialog box, click OK.
All 21 traces (the entire family of curves) for VDB(Out)
appear in the Probe window as shown in Figure 24.
Figure 24 Small signal response as R1 is varied from 100
Ω
to 10 k
2Click the trace name to select it, then press D to
remove the traces shown.
Ω
To select individual runs, click each one
separately.
To see more information about the section
that produced a speci fic t race, double-click
the corresponding symbol in the legend
below the x-ax is.
You can also remove the traces by
removing the VDB marker from your
schematic page in Capture.
45
Chapter 2 Simulation examples
press I
To compare the last run to the first run
1From the Trace menu, choose Add Trace to display the
Add Traces dialog box.
2In the Trace Expression text box, type the following:
You can avoid some of the typing for the
Trace Expression text box by selecting
V(OUT) twice in the trace list and inserting
text where appropriate in the resulting
Trace Expression.
press I
Vdb(Out)@1 Vdb(Out)@21
3Click OK.
Note
The difference in gain is apparent. You can also plot the difference
of the waveforms for runs 21 and 1, then use the search commands
to find certain characteristics of the difference.
4Plot the new trace by specifying a waveform
expression:
aFrom the Trace menu, choose Add Trace.
bIn the Trace Expression text box, type the
following waveform expression:
Vdb(Out)@1-Vdb(OUT)@21
cClick OK.
5Use the search commands to find the value of the
difference trace at its maximum and at a specific
frequency:
aFrom the Tools menu, point to Cursor and choose
Display.
bRight-click then left-click the trace part (triangle)
for Vdb(Out)@1 - Vdb(Out)@21. Make sure that
you left-click last to make cursor 1 the active
cursor.
The search command tells PSpice to search
for the point on the trace where the x-axis
value is 100.
46
cFrom the Trace menu, point to Cursor and choose
Max.
dFrom the Trace menu, point to Cursor and choose
Search Commands.
eIn the Search Command text box, type the
following:
search forward x value (100)
fSelect 2 as the Cursor to Move option.
gClick OK.
Figure 25 shows the Probe window with cursors
placed.
Figure 25 Small signal frequen cy response at 100 and 10 kΩ
input resistance.
Parametric analysis
Note that the Y value for cursor 2 in the cursor box is
about 17.87. This indicat es that when R1 is set to 10 k
the small signal attenuation of the circuit at 100Hz is
17.87dB greater than when R1 is 100
Ω.
6From the Trace menu, point to Cursor and choose
Display to turn off the display of the cursors.
7Delete the trace.
Ω,
47
Chapter 2 Simulation examples
Finding out more about parametric analysis
Table 2-3
To find out more about this...See this...
parametric analysis
using global parametersUsing global parameters and
Parametric analysis on
page 11-272
expressions for values on
page 3-67
48
Performance analysis
Performance analysis is an advanced feature in PSpice
that you can use to compare the characteristics of a family
of waveforms. Performance analysis uses the principle of
search commands introduced earlier in this chapter to
define functions that detect points on each curve in the
family.
After you define these functions, you can apply them to a
family of waveforms and produce traces that are a
function of the variable that changed within the family.
This example shows how to use performance analysis to
view the dependence of circuit characteristics on a swept
parameter. In this case, the small signal bandwidth and
gain of the clipper circuit are plotted against the swept
input resistance value.
To plot bandwidth vs. Rval using the performance analysis wizard
1In Capture, open CLIPPER.OPJ.
Performance analysis
2From PSpice’s Trace menu, choose Performance
Analysis.
The Performance Analysis dialog box appears with
information about the currently loaded data and
performance analysis in general.
3Click the Wizard button.
4Click the Next> button.
5In the Choose a Goal Function list, click Bandwidth,
then click the Next> button.
6Click in the Name of Trace to search t ext box and type
V(Out).
7Click in the db level down for bandwidth calc text box
and type
8Click the Next> button.
The wizard displays the gain trace for the first run
(R=100) and shows how the bandwidth is measured.
This is done to test the goal function.
3.
At each step, the wizard provides
information and guidelines.
Click , then double-click V(Out).
49
Chapter 2 Simulation examples
9Click the Next> button or the Finish button.
A plot of the 3dB bandwidth vs. Rval appears.
10 Change the x-axis to log scale:
Double-click the x-axis.
or press I
The Trace list in cludes goal f unctions on ly in
performance analysis mode when the
x-axis variable is the swept parameter.
aFrom the Plot menu, choose Axis Settings.
bClick the X Axis tab.
cUnder Scale, choose Log.
dClick OK.
To plot gain vs. Rval manually
1From the Plot menu, choose Add Y Axis.
2From the Trace menu, choose Add to display the Add
Traces dialog box.
3In the Functions or Macros frame, select the Goal
Functions list, and then click the Max(1) goal function.
4In the Simulation Output Variables list, click V(out).
5In the Trace Expression text box, edit the text to be
Max(Vdb(out)), then click OK.
PSpice displays gain on the second y-axis vs. Rval.
Figure 26 shows the final performance analysis plot of 3dB
bandwidth and gain in dB vs. the swept input resistance
value.
50
Figure 26 Performance analysis plots of bandwidth and gain vs.
Rval.
Finding out more about performance analysis
Table 2-4
To find out more about this...See this...
Performance analysis
how to use performance
analysis
how to use search
commands and create goal
functions
RLC filter example on
page 11-274
Example: Monte Carlo
analysis of a pressure sens or
on page 12-293
PSpice A/D online Help
51
Chapter 2 Simulation examples
52
Part two
Design entry
Part two provides information about how to enter circuit
designs in OrCAD
•Chapter 3, Preparing a desi gn for simul ation, outlines the
things you need to do to successfully simulate your
schematic including troubleshooting tips for the most
frequently asked questions.
•Chapter 4, Creating and editing models, describes how to
use the tools to create and edit model definitions, and
how to configure the models for use.
•Chapte r 5, Creating parts for models, explains how to
create symbols for existing or new model definitions
so you can use the models when simulating from your
schematic.
•
Chapter 6, Analog behavioral modeli ng, describes how to
model analog behavior mathe mati call y or using table
lookups.
®
Capture that you want to simulate.
Preparing a design for
simulation
Chapter overview
3
This chapter provides introductory information to help
you enter circuit designs that simulate properly. If you
want an overview, use the checklist on page 3-56
you to specific topics.
Topics include:
•
Checklist for simulation setup on page 3-56
•Using parts that you can simulate on page 3-60
•
Using global parameters and expressions for values on
page 3-67
•
Defining power supplies on page 3-74
•
Defining stimuli on page 3-75
•
Things to watch for on page 3-79
to guide
Refer to your OrCAD Capture
User’s Guide for ge neral schematic
entry information.
Chapter 3 Preparing a design for simulation
Checklist for simulation setup
This section describes what you need to do to set up your
circuit for simulation.
1Find the topic that is of interest in the first column of
any of these tables.
2Go to the referenced section. For those sections that
provide overviews, you will find references to more
detailed discussions.
Typical simulation setup steps
For more information on this step...See this...To find out this...
Set component values
✔
and other properties.
Define power
✔
supplies.
Define input
✔
waveforms.
Set up one or more
✔
analyses.
Using parts that you can
simulate on page 3-60
Using global parameters an d
expressions for values on
page 3-67
Defining power supplies on
page 3-74
Defining stimuli on
page 3-75
Chapter 7, Setting up
analyses and starting
simulation
Chapter 8
Chapter 12
contents)
through
(see the table of
An overview of vendor, passive,
breakout, and behavioral parts.
How to define values using variable
parameters, functional calls, and
mathematical expressions.
An overview of DC power for
analog circuits..
An overview of DC, AC, and
time-based stimulus parts.
Procedures, general to all analysis
types, to set up and start the
simulation.
Detailed information about DC, AC,
transient, parametric, temperature,
Monte Carlo, and
sensitivity/worst-case..
56
For more information on this step...See this...
Checklist for simulation setup
Place markers.Using schematic page
✔
markers to add traces on
How to display results in PSpice by
picking design nets.
page 13-331
✔
Limiting waveform data file
How to limit the data file size.
size on page 13-334
Advanced design entry and simulation setup steps
For more information on this step...See this...To find out how to...
Create new models.Chapter 4, Creating and
✔
editing models
Chapter 6, Analog
behavioral modeling
Create new parts.Chapter 5, Creating parts
✔
for models
Define models using the Model
Editor or Create Subcircuit
command.
Define the behavior of a block of
analog circuitry as a mathematical
function or lookup table.
Create parts either automatically for
models using the part wizard or the
Parts utility, or by manually
defining AKO parts; define
simulation-specific properties.
OrCAD Capture User’s
The
Guide
Create and edit part graphics, pins,
and properties in general.
57
Chapter 3 Preparing a design for simulation
When netlisting fails or the simulation
does not start
If you have problems starting the simulation, there may be
problems with the design or with system resources. If
there are problems with the design, PSpice displays errors
and warnings in the Simulation Output window. You can
use the Simulation Output window to get more
information quickly about the specific problem.
To get online info rmation ab out an e rror or w arning sh own in the
Simulation Output window
1Select the error or warning message.
2Press 1.
The following tables list the most commonly encountered
problems and where to find out more about what to do.
Things to check in your design
Table 5
Make sure that...To find out more, see this...
The model libraries, stimulus files, and
✔
include files are configured.
The parts you are using have models.
✔
You are not using unmodeled pins.
✔
You have defined the grounds.
✔
Every analog net has a DC path to ground.
✔
The part template is correct.
✔
Hierarchical parts, if used, are properly
✔
defined.
Ports that connect to the same net have the
✔
same name.
58
Configuring model libraries on page 4-120
Unmodeled parts on page 3-79
properties needed for simulation on page 5-139
Unmodeled pins on page 3-82
Missing ground on page 3-83
Missing DC path to ground on page 3-84
Defining part properties needed for simulation on
page 5-139
The
OrCAD Capture User’s Guide
The
OrCAD Capture User’s Guide
and
Defining part
Things to check in your system configuration
Table 6
Make sure that...To find out more, see this...
Path to the PSpice programs is correct.
✔
Checklist for simulation setup
Directory containing your design has write
✔
permission.
Your system has sufficient free memory
✔
and disk space.
Your operating system manual
Your operating system manual
59
Chapter 3 Preparing a design for simulation
Using parts that you can
simulate
The OrCAD part libraries also include
special parts that you can use for
simulation only. These inclu de:
• stimulus parts
input signals to the circuit (see
Defining stimuli
page 3-75
• ground parts
analog circuits, which need reference
to ground
• simulation control parts
to do things like set bias values (see
Appendix A,
state
• output control parts
things like generate tables and
line-printer plots to th e PSpice output
file (see
output options
)
)
Chapter 14,
to generate
on
required by all
Setting initial
to do
Other
)
The OrCAD part libraries supply numerous parts
designed for simulation. These include:
•vendor-supplied parts
•passive parts
•breakout parts
•behavioral parts
At minimum, a part that you can simulate has these
properties:
•A simulation model to describe the part’s electrical
behavior; the mo del can be:
•explicitly defined in a model library,
•built into PSpice, or
•built into the part (for some kinds of analog
behavioral parts).
•A part with modeled pins to form electrical
connections in your design.
•A translation from design part to netlist statement so
that PSpice can read it in.
60
Note
Not all parts in the libraries are set up for simulation. For example,
connectors are parts destined for board layout only and do not
have these simulation properties.
Vendor-supplied parts
Using parts that you can simulate
The OrCAD libraries provide an extensive selection of
manufacturers’ analog parts. Typically, the library name
reflects the kind of parts contained in the library and the
vendor that provided the models.
Example: MOTOR_RF.OLB and MOTOR_RF.LIB contain
parts and models, respectively, for Motorola-made RF
bipolar transistors.
Part naming conventions
The part names in the OrCAD libraries usually reflect the
manufacturers’ part names. If multiple vendors supply
the same part, each part name includes a suffix that
indicates the vendor that supplied the model.
Example: The OrCAD libraries include several models for
the OP-27 opamp as shown by these entries in the online
Library List.
For a listing of vendor-supplied parts
contained in the OrCAD libraries, refer to
the online Library List.
To find out more about each model library,
read the comments in the .LIB file header.
61
Chapter 3 Preparing a design for simulation
Notice the following:
•There is a generic OP-27 part provided by OrCAD, the
OP-27/AD from Analog Devices, Inc., and the
OP-27/LT from Linear Technology Corporation.
•The Model column for all of these parts contains an
asterisk. This indicates that this part is modeled and
that you can simulate it.
Finding the part that you want
If you are having trouble finding a part, you can search the
libraries for parts with similar names by using either:
•the parts browser in Capture and restricting the parts
list to those names that match a specified wildcard text
string, or
•the online Library List and searching for the generic
part name using capabilities of the Adobe Acrobat
Reader.
Note
This method finds any part contained
in the current part libraries configuration,
including parts for user-defined models.
If you want to find out more about a part
supplied in the OrCAD libraries, such as
manufacturer or whether you can simulate
it, then search the online Library List
(see page3-63
).
62
To find parts using the parts browser
1In Capture, from the Place menu, choose Part.
2In the Part Name text box, type a text string with
wildcards that approximates the part name that you
want to find. Use this syntax:
<wildcard><part_nam e_fragment><wildcard>
where <wildcard> is one of the following:
*to match zero or more characters
?to match exactly one character
The parts browser displays only the matching part
names.
Using parts that you can simulate
or press C+F
To find parts using the online OrCAD Library List
1In Windows Explorer, double-click LIBLIST.PDF,
located in the directory where PSpice is installed.
Acrobat Reader starts and displays the OrCAD
Library List.
2From the Tools menu, choose Find.
3In the Find What text box, type the generic part name.
4Enter any other search criteria, and then click Find.
The Acrobat Reader displays the first page where it
finds a match. Each page maps the generic part name
to the parts (and corresponding vendor and part
library name) in the OrCAD libraries.
5If you want to repeat the search, from the Tools menu,
choose Find Again.
Note
If you are unsure of the device type, you can scan all of the device
type lists using the Acrobat search capability. The first time you do
this, you need to set up the across-list index. To find out more, refer
to the online Adobe Acrobat manuals.
Note
This method finds only parts that
OrCAD supplies that have models.
If you want to include user-defined parts in
the search, use the parts browser in Capture
(see page 3-62
Instead of the generic part name, you can
enter other kinds of search information,
such as device type or manufacturer.
press C+G
).
63
Chapter 3 Preparing a design for simulation
R
Passive parts
The OrCAD libraries supply several basic parts based on
the passive device models built into PSpice. These are
summarized in the following table.
Table 7Passive parts
To find out more about how to use these
parts and define their pr operties, look up
the corresponding PSpice device letter in
the Analog Devices chapter in the
online OrCAD PSpice A/D
eference Manual, and then see the
Parts sections.
Capture
These parts are
available...For this device t y pe ...
* For these device types, t he OrCAD libraries supply several parts. Refer to the
online
parts.
**
n
OrCAD PSpice A/D Reference Manual
capacitorC
resistorR
transformerK and L
coupled transmission lineT and K
Which is this PSpice
device letter...
for the available
64
Breakout parts
A
R
The OrCAD libraries supply passive and semiconductor
parts with default model definitions that define a basic set
of model parameters. This way, you can easily:
Using parts that you can simulate
To find out more about models, see What
are models? on page 4-87
.
•assign device and lot tolerances to model parameters
for Monte Carlo and sensitivity/worst-case analyses,
•define temperature coefficients, and
•define device-specific operating temp eratures.
These are called breakout parts and are summarized in the
following table.
Table 8Breakout parts
Use this
breakout part. ..For t h is device type...
BBREAKGaAsFETB
CBREAKcapacitorC
DBREAK
JBREAK
KBREAKind u ct o r couplingK
LBREAKinductorL
MBREAK
QBREAK
RBREAKresistorR
*
x
*JFETJ
x
*MOSFETM
x
x*
diodeD
bipolar transistorQ
Which is this PS pice
device letter...
To find out more about Monte Carlo and
sensitivity/worst-case analyses, see
Chapter 12,
sensitivity/worst-ca se analyses
Monte Carlo and
.
To find out more about setting temperature
parameters, see the Analog Devices
chapter in the online OrCAD PSpice
/D Reference Manua l and find the
device type that you are interested in.
To find out more about how to use these
parts and define their pr operties, look up
the corresponding PSpice device letter in
the Analog Devices chapter of the
online OrCAD PSpice A/D
switch
XFRM_NONLINEARtransformerK and L
ZBREAKNIGBTZ
* For this device type, the OrCAD libraries supply several breakout parts. Refer
to the onli ne
parts.
OrCAD PSpice Ref e rence Manual
S
W
for the available
65
Chapter 3 Preparing a design for simulation
Behavioral parts
Behavioral parts allow you to define how a block of
circuitry should work without having to define each
discrete component.
For more information, see Chapte r 6,
Analog behavioral modeling
.
Analog behavioral parts
behavioral modeling (ABM) to define each part’s behavior
as a mathematical expression or lookup table. The OrCAD
libraries provide ABM parts that operate as math
functions, limiters, Chebyshev filters, integrators,
differentiators, and others that you can customize for
specific expressions and lookup table s. You can also create
your own ABM parts.
These parts use analog
66
Using global parameters and
expressions for values
In addition to literal values, you can use global parameters
and expressions to represent numeric values in your
circuit design.
Global parameters
Using global parameters and expressions for values
A global parameter is like a programming variable that
represents a numeric value by name.
Once you have defined a parameter (declared its name
and given it a value), you can use it to represent circuit
values anywhere in the design; this applies to any
hierarchical level.
Some ways that you can use parameters are as follows:
•Apply the same value to multiple part instances.
•Set up an analysis that sweeps a var iable throu gh a
range of values (for example, DC sweep or parametric
analysis).
Declaring and using a global parameter
To use a global parameter in your design, you need to:
•define the parameter using a PARAM part, and
•
use the parameter in place of a literal value
somewhere in your design.
When multiple parts are set to the same
value, glob al parameters pr ovide a
convenient way to change all of their
values for “what-i f ” analyses.
Example: If two independent so urces have
a value defined by the parameter
VSUPPLY, then you can change both
sources to 10 volts by assi gning the value
once to VSUPPLY.
67
Chapter 3 Preparing a design for simulation
To declare a g l ob al parameter
1Place a PARAM part in your design.
Note
For more inf o rmation about using
the Parts spreadsheet, see the OrCAD
Capture User’s Guide.
Example: To declare the global parameter
VSUPPLY that will set the value of an
independent voltage source to 1 4 volts,
place the PARAM part, and then create a
new property named
14v
value of
.
VSUPPLY
with a
2Double-click the PARAM part to display the Parts
spreadsheet, then click New.
3Declare up to three global parameters by doing the
following for each global parameter:
aClick New.
bIn the Property Name text box, enter NAMEn, then
click OK.
This creates a new property for the PARAM part,
NAMEn in the spreadsheet.
cClick in the cell below the NAMEn column and
enter a default value for the parameter.
dWhile this cell is still selected, click Display.
eIn the Display Format frame, select Name and
Value, then click OK.
Note
The system variables in
T a ble 11 on p age 3-73
have reserved
parameter names. Do not use these parameter names when
defining your own parameters.
4Click Apply to update all the changes to the PARAM
part.
Example: To set the independent voltage
source, VCC, to the value of the VSUPPLY
parameter, set its DC property to
{VSUPPLY}
68
.
5Close the Parts spreadsheet.
To use the global parameter in your circuit
1Find the numeric value that you want to replace: a
component value, model parameter value, or other
property value.
2Replace the value with the name of the global
parameter using the following syntax:
{ global_parameter_name }
The curly braces tell PSpice to evaluate the parameter
and use its value.
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.