Orcad PSPICE User Manual

OrCAD PSpice
®
User’s Guide
Copyright © 1998 OrCAD, Inc. All rights reserved.
Trademarks
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 email info@orcad.com Technical Support email techsupport@orcad.com World Wide Web http://www.orcad.com OrCAD Design Network (ODN) http://www.orcad.com/odn
9300 SW Nimbus Ave. Beaverton, OR 97008 USA

Contents

Before you begin xxiii
Welcome to OrCAD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiii
OrCAD PSpice overview . . . . . . . . . . . . . . . . . . . . . . . . . . xxiv
How to use this guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxv
Typographical conventions . . . . . . . . . . . . . . . . . . . . . . . xxv
Related documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . xxvi
Online Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxvii
If you have the demo CD-ROM . . . . . . . . . . . . . . . . . . . . xxviii
OrCAD demo CD-ROM . . . . . . . . . . . . . . . . . . . . . . xxviii
What’s New . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxix
Part one Simulation primer
Things you need to know 1Chapter 1
Chapter overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
What is PSpice? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Analyses you can run with PSpice . . . . . . . . . . . . . . . . . . . . . . . 3
Basic analyses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
DC sweep & other DC calculations . . . . . . . . . . . . . . . . . . 3
AC sweep and noise . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Transient and Fourier . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Advanced multi-run analyses . . . . . . . . . . . . . . . . . . . . . . . 6
Parametric and temperature . . . . . . . . . . . . . . . . . . . . . . 6
Monte Carlo and sensitivity/worst-case . . . . . . . . . . . . . . . 7
Analyzing waveforms with PSpice . . . . . . . . . . . . . . . . . . . . . . 8
What is waveform analysis? . . . . . . . . . . . . . . . . . . . . . . . . 8
Using PSpice with other OrCAD programs . . . . . . . . . . . . . . . . . . 9
Using Capture to prepare for simulation . . . . . . . . . . . . . . . . 9
What is the Stimulus Editor? . . . . . . . . . . . . . . . . . . . . . . . 9
What is the Model Editor? . . . . . . . . . . . . . . . . . . . . . . . . . 10
Contents
Files needed for simulation . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Files that Capture generates . . . . . . . . . . . . . . . . . . . . . . . 10
Netlist file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Circuit file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Other files that you can configure for simulation . . . . . . . . . . . 11
Model library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Stimulus file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Include file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Configuring model library, stimulus, and
include files . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Files that PSpice generates . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Waveform data file . . . . . . . . . . . . . . . . . . . . . . . . . . 14
PSpice output file . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Simulation examples 15Chapter 2
Chapter overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Example circuit creation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Finding out more about setting up your design . . . . . . . . . . . . 21
Running PSpice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Performing a bias point analysis . . . . . . . . . . . . . . . . . . . . . 22
Using the simulation output file . . . . . . . . . . . . . . . . . . . . . 24
Finding out more about bias point calculations . . . . . . . . . . . . 25
DC sweep analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Setting up and running a DC sweep analysis . . . . . . . . . . . . . . 26
Displaying DC analysis results . . . . . . . . . . . . . . . . . . . . . . 28
Finding out more about DC sweep analysis . . . . . . . . . . . . . . 31
Transient analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Finding out more about transient analysis . . . . . . . . . . . . . . . 36
AC sweep analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Setting up and running an AC sweep analysis . . . . . . . . . . . . . 37
AC sweep analysis results . . . . . . . . . . . . . . . . . . . . . . . . 39
Finding out more about AC sweep and noise analysis . . . . . . . . 41
Parametric analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Setting up and running the parametric analysis . . . . . . . . . . . . 43
Analyzing waveform families . . . . . . . . . . . . . . . . . . . . . . 45
Finding out more about parametric analysis . . . . . . . . . . . . . . 48
Performance analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Finding out more about performance analysis . . . . . . . . . . . . . 51
iv
Part two Design entry
Preparing a design for simulation 55Chapter 3
Chapter overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Checklist for simulation setup . . . . . . . . . . . . . . . . . . . . . . . . . 56
Typical simulation setup steps . . . . . . . . . . . . . . . . . . . . . . . 56
Advanced design entry and simulation setup steps . . . . . . . . . . . 57
When netlisting fails or the simulation
does not start . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Things to check in your design . . . . . . . . . . . . . . . . . . . . 58
Things to check in your system configuration . . . . . . . . . . . . 59
Using parts that you can simulate . . . . . . . . . . . . . . . . . . . . . . . 60
Vendor-supplied parts . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Part naming conventions . . . . . . . . . . . . . . . . . . . . . . . . 61
Finding the part that you want . . . . . . . . . . . . . . . . . . . . 62
Passive parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Breakout parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Behavioral parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Using global parameters and expressions for values . . . . . . . . . . . . 67
Global parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Declaring and using a global parameter . . . . . . . . . . . . . . . 67
Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Specifying expressions . . . . . . . . . . . . . . . . . . . . . . . . . 69
Defining power supplies . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
For the analog portion of your circuit . . . . . . . . . . . . . . . . . . . 74
Defining stimuli . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Analog stimuli . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Using VSTIM and ISTIM . . . . . . . . . . . . . . . . . . . . . . . . 76
If you want to specify multiple stimulus types . . . . . . . . . . . 77
Things to watch for . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Unmodeled parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Do this if the part in question is from the OrCAD libraries . . . . 79
Check for this if the part in question is custom-built . . . . . . . . 81
Unconfigured model, stimulus, or include files . . . . . . . . . . . . . 81
Check for this . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
Unmodeled pins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
Check for this . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Missing ground . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Check for this . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Missing DC path to ground . . . . . . . . . . . . . . . . . . . . . . . . 84
Check for this . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
Contents
v
Contents
Creating and editing models 85Chapter 4
Chapter overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
What are models? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Models defined as model parameter sets . . . . . . . . . . . . . . 87
Models defined as subcircuit netlists . . . . . . . . . . . . . . . . 87
How are models organized? . . . . . . . . . . . . . . . . . . . . . . . . . 88
Model libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
Model library configuration . . . . . . . . . . . . . . . . . . . . . . . 89
Global vs. design models and libraries . . . . . . . . . . . . . . . . . 89
Nested model libraries . . . . . . . . . . . . . . . . . . . . . . . . . . 90
OrCAD-provided models . . . . . . . . . . . . . . . . . . . . . . . . . 90
Tools to create and edit models . . . . . . . . . . . . . . . . . . . . . . . . 91
Ways to create and edit models . . . . . . . . . . . . . . . . . . . . . . . . 92
Using the Model Editor to
edit models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
Ways to use the Model Editor . . . . . . . . . . . . . . . . . . . . . . 94
Model Editor-supported device types . . . . . . . . . . . . . . . . . . 95
Ways To Characterize Models . . . . . . . . . . . . . . . . . . . . . . 96
Creating models from data sheet information . . . . . . . . . . . 96
Analyzing the effect of model parameters
on device characteristics . . . . . . . . . . . . . . . . . . . 97
How to fit models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Running the Model Editor alone . . . . . . . . . . . . . . . . . . . . . 99
Starting the Model Editor . . . . . . . . . . . . . . . . . . . . . . . 99
Enabling and disabling automatic part creation . . . . . . . . . . 100
Saving global models (and parts) . . . . . . . . . . . . . . . . . . 100
Running the Model Editor from the schematic page editor . . . . . . 101
What is an instance model? . . . . . . . . . . . . . . . . . . . . . . 101
Starting the Model Editor . . . . . . . . . . . . . . . . . . . . . . . 102
Saving design models . . . . . . . . . . . . . . . . . . . . . . . . . 102
What happens if you don’t save the instance model . . . . . . . . 103
The Model Editor tutorial . . . . . . . . . . . . . . . . . . . . . . . . . 104
Creating the half-wave rectifier design . . . . . . . . . . . . . . . 104
Using the Model Editor to edit the D1 diode model . . . . . . . . 105
Entering data sheet information . . . . . . . . . . . . . . . . . . . 105
Extracting model parameters . . . . . . . . . . . . . . . . . . . . . 107
Adding curves for more than one temperature . . . . . . . . . . 108
Completing the model definition . . . . . . . . . . . . . . . . . . 109
Editing model text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
Editing .MODEL definitions . . . . . . . . . . . . . . . . . . . . . 110
Editing .SUBCKT definitions . . . . . . . . . . . . . . . . . . . . . 111
vi
Contents
Changing the model name . . . . . . . . . . . . . . . . . . . . . . 111
Starting the Model Editor
from the schematic page editor in Capture . . . . . . . . . . 111
What is an instance model? . . . . . . . . . . . . . . . . . . . . . 112
Starting the Model Editor . . . . . . . . . . . . . . . . . . . . . . 112
Saving design models . . . . . . . . . . . . . . . . . . . . . . . . 113
Example: editing a Q2N2222 instance model . . . . . . . . . . . . . . 114
Starting the Model Editor . . . . . . . . . . . . . . . . . . . . . . 114
Editing the Q2N2222-X model instance . . . . . . . . . . . . . . 114
Saving the edits and updating the schematic . . . . . . . . . . . 115
Using the Create Subcircuit command . . . . . . . . . . . . . . . . . . . 115
Changing the model reference to an existing model definition . . . . . . 117
Reusing instance models . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
Reusing instance models in the same schematic . . . . . . . . . . . . 118
Making instance models available to all designs . . . . . . . . . . . 119
Configuring model libraries . . . . . . . . . . . . . . . . . . . . . . . . . 120
The Libraries and Include Files tabs . . . . . . . . . . . . . . . . . . . 120
How PSpice uses model libraries . . . . . . . . . . . . . . . . . . . . 121
Search order . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
Handling duplicate model names . . . . . . . . . . . . . . . . . . 122
Adding model libraries to the configuration . . . . . . . . . . . . . . 122
Changing design and global scope . . . . . . . . . . . . . . . . . . . 123
Changing model library search order . . . . . . . . . . . . . . . . . . 124
Changing the library search path . . . . . . . . . . . . . . . . . . . . 125
Creating parts for models 127Chapter 5
Chapter overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
What’s different about parts used for simulation? . . . . . . . . . . . . . 129
Ways to create parts
for models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
Preparing your models for part creation . . . . . . . . . . . . . . . . . . 130
Using the Model Editor to create parts . . . . . . . . . . . . . . . . . . . 131
Starting the Model Editor . . . . . . . . . . . . . . . . . . . . . . . . . 131
Setting up automatic part creation . . . . . . . . . . . . . . . . . . . 132
Basing new parts on a custom set of parts . . . . . . . . . . . . . . . . . 133
Editing part graphics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
How Capture places parts . . . . . . . . . . . . . . . . . . . . . . . . 135
Defining grid spacing . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
Grid spacing for graphics . . . . . . . . . . . . . . . . . . . . . . 136
Grid spacing for pins . . . . . . . . . . . . . . . . . . . . . . . . . 136
Attaching models to parts . . . . . . . . . . . . . . . . . . . . . . . . . . 138
vii
Contents
MODEL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
Defining part properties needed for simulation . . . . . . . . . . . . . . 139
PSPICETEMPLATE . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
PSPICETEMPLATE syntax . . . . . . . . . . . . . . . . . . . . . . 140
PSPICETEMPLATE examples . . . . . . . . . . . . . . . . . . . . 143
Analog behavioral modeling 147Chapter 6
Chapter overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
Overview of analog behavioral modeling . . . . . . . . . . . . . . . . . . 148
The ABM.OLB part library file . . . . . . . . . . . . . . . . . . . . . . . . 149
Placing and specifying ABM parts . . . . . . . . . . . . . . . . . . . . . . 150
Net names and device names in ABM expressions . . . . . . . . . . 150
Forcing the use of a global definition . . . . . . . . . . . . . . . . . . 151
ABM part templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
Control system parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
Basic components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
Limiters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
Chebyshev filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
Integrator and differentiator . . . . . . . . . . . . . . . . . . . . . . . 160
Table look-up parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
Laplace transform part . . . . . . . . . . . . . . . . . . . . . . . . . . 164
Math functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
ABM expression parts . . . . . . . . . . . . . . . . . . . . . . . . . . 168
An instantaneous device example: modeling a triode . . . . . . . . . 171
PSpice-equivalent parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
Implementation of PSpice -equivalent parts . . . . . . . . . . . . . . 175
Modeling mathematical or instantaneous relationships . . . . . . . . 176
EVALUE and GVALUE parts . . . . . . . . . . . . . . . . . . . . 176
EMULT, GMULT, ESUM, and GSUM . . . . . . . . . . . . . . . . 178
Lookup tables (ETABLE and GTABLE) . . . . . . . . . . . . . . . . . 179
Frequency-domain device models . . . . . . . . . . . . . . . . . . . . 181
Laplace transforms (LAPLACE) . . . . . . . . . . . . . . . . . . . . . 181
Frequency response tables (EFREQ and GFREQ) . . . . . . . . . . . 183
Cautions and recommendations for simulation and analysis . . . . . . . 186
Instantaneous device modeling . . . . . . . . . . . . . . . . . . . . . 186
Frequency-domain parts . . . . . . . . . . . . . . . . . . . . . . . . . 187
Laplace transforms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
Non-causality and Laplace transforms . . . . . . . . . . . . . . . 188
Chebyshev filters . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
Frequency tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
Trading off computer resources for accuracy . . . . . . . . . . . . . . 191
viii
Basic controlled sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
Creating custom ABM parts . . . . . . . . . . . . . . . . . . . . . . . 192
Part three Setting Up and Running Analyses
Setting up analyses and starting simulation 195Chapter 7
Chapter overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
Analysis types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
Setting up analyses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
Execution order for standard analyses . . . . . . . . . . . . . . . . . 198
Output variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
Modifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
Starting a simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
Starting a simulation from Capture . . . . . . . . . . . . . . . . . . . 206
Starting a simulation outside of Capture . . . . . . . . . . . . . . . . 207
Setting up batch simulations . . . . . . . . . . . . . . . . . . . . . . . 207
Multiple simulation setups within one circuit file . . . . . . . . . 207
Running simulations with multiple circuit files . . . . . . . . . . 208
The PSpice simulation window . . . . . . . . . . . . . . . . . . . . . 208
Contents
DC analyses 213Chapter 8
Chapter overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213
DC Sweep . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
Minimum requirements to run a DC sweep analysis . . . . . . . . . 214
Overview of DC sweep . . . . . . . . . . . . . . . . . . . . . . . . . . 216
Setting up a DC stimulus . . . . . . . . . . . . . . . . . . . . . . . . . 218
Nested DC sweeps . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
Curve families for DC sweeps . . . . . . . . . . . . . . . . . . . . . . 221
Bias point . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223
Minimum requirements to run a bias point analysis . . . . . . . . . 223
Overview of bias point . . . . . . . . . . . . . . . . . . . . . . . . . . 223
Small-signal DC transfer . . . . . . . . . . . . . . . . . . . . . . . . . . . 225
Minimum requirements to run a small-signal DC transfer analysis . 225
Overview of small-signal DC transfer . . . . . . . . . . . . . . . . . . 226
DC sensitivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
Minimum requirements to run a DC sensitivity analysis . . . . . . . 228
Overview of DC sensitivity . . . . . . . . . . . . . . . . . . . . . . . . 229
AC analyses 231Chapter 9
Chapter overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231
ix
Contents
AC sweep analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
Setting up and running an AC sweep . . . . . . . . . . . . . . . . . . 232
What is AC sweep? . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
Setting up an AC stimulus . . . . . . . . . . . . . . . . . . . . . . . . 233
Setting up an AC analysis . . . . . . . . . . . . . . . . . . . . . . . . . 235
AC sweep setup in example.opj . . . . . . . . . . . . . . . . . . . . . 237
How PSpice treats nonlinear devices . . . . . . . . . . . . . . . . . . 239
What’s required to transform a device into a linear circuit . . . . 239
What PSpice does . . . . . . . . . . . . . . . . . . . . . . . . . . . 239
Example: nonlinear behavioral modeling block . . . . . . . . . . 239
Noise analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
Setting up and running a noise analysis . . . . . . . . . . . . . . . . . 241
What is noise analysis? . . . . . . . . . . . . . . . . . . . . . . . . . . 242
How PSpice calculates total output
and input noise . . . . . . . . . . . . . . . . . . . . . . . . 242
Setting up a noise analysis . . . . . . . . . . . . . . . . . . . . . . . . 243
Analyzing Noise in the Probe window . . . . . . . . . . . . . . . . . 245
About noise units . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
Transient analysis 249Chapter 10
Chapter overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249
Overview of transient analysis . . . . . . . . . . . . . . . . . . . . . . . . 250
Minimum requirements to run a transient analysis . . . . . . . . . . 250
Minimum circuit design requirements . . . . . . . . . . . . . . . 250
Minimum program setup requirements . . . . . . . . . . . . . . 250
Defining a time-based stimulus . . . . . . . . . . . . . . . . . . . . . . . 252
Overview of stimulus generation . . . . . . . . . . . . . . . . . . . . 252
The Stimulus Editor utility . . . . . . . . . . . . . . . . . . . . . . . . . . 253
Stimulus files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253
Configuring stimulus files . . . . . . . . . . . . . . . . . . . . . . . . 254
Starting the Stimulus Editor . . . . . . . . . . . . . . . . . . . . . . . 254
Defining stimuli . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256
Example: piecewise linear stimulus . . . . . . . . . . . . . . . . . 256
Example: sine wave sweep . . . . . . . . . . . . . . . . . . . . . . 257
Creating new stimulus symbols . . . . . . . . . . . . . . . . . . . . . 259
Editing a stimulus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260
To edit an existing stimulus . . . . . . . . . . . . . . . . . . . . . 260
To edit a PWL stimulus . . . . . . . . . . . . . . . . . . . . . . . . 260
To select a time and value scale factor for PWL stimuli . . . . . . 260
Deleting and removing traces . . . . . . . . . . . . . . . . . . . . . . 261
x
Contents
Manual stimulus configuration . . . . . . . . . . . . . . . . . . . . . 261
To manually configure a stimulus . . . . . . . . . . . . . . . . . 261
Transient (time) response . . . . . . . . . . . . . . . . . . . . . . . . . . . 263
Internal time steps in transient analyses . . . . . . . . . . . . . . . . . . 265
Switching circuits in transient analyses . . . . . . . . . . . . . . . . . . . 266
Plotting hysteresis curves . . . . . . . . . . . . . . . . . . . . . . . . . . . 266
Fourier components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268
Parametric and temperature analysis 271Chapter 11
Chapter overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
Parametric analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
Minimum requirements to run a parametric analysis . . . . . . . . . 272
Overview of parametric analysis . . . . . . . . . . . . . . . . . . . . 273
RLC filter example . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274
Entering the design . . . . . . . . . . . . . . . . . . . . . . . . . . 274
Running the simulation . . . . . . . . . . . . . . . . . . . . . . . 275
Using performance analysis to plot overshoot and rise time . . . 275
Example: frequency response vs. arbitrary parameter . . . . . . . . 278
Setting up the circuit . . . . . . . . . . . . . . . . . . . . . . . . . 278
Temperature analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281
Minimum requirements to run a temperature analysis . . . . . . . . 281
Overview of temperature analysis . . . . . . . . . . . . . . . . . . . . 282
Monte Carlo and sensitivity/worst-case analyses 283Chapter 12
Chapter overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283
Statistical analyses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284
Overview of statistical analyses . . . . . . . . . . . . . . . . . . . . . 284
Output control for statistical analyses . . . . . . . . . . . . . . . . . . 285
Model parameter values reports . . . . . . . . . . . . . . . . . . . . . 285
Waveform reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
Collating functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287
Temperature considerations in statistical analyses . . . . . . . . . . 288
Monte Carlo analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289
Reading the summary report . . . . . . . . . . . . . . . . . . . . 291
Example: Monte Carlo analysis of a pressure sensor . . . . . . . . . 293
Drawing the schematic . . . . . . . . . . . . . . . . . . . . . . . . 293
Defining part values . . . . . . . . . . . . . . . . . . . . . . . . . 294
Setting up the parameters . . . . . . . . . . . . . . . . . . . . . . 295
Using resistors with models . . . . . . . . . . . . . . . . . . . . . 296
Saving the design . . . . . . . . . . . . . . . . . . . . . . . . . . . 297
Defining tolerances for the resistor models . . . . . . . . . . . . 297
xi
Contents
Setting up the analyses . . . . . . . . . . . . . . . . . . . . . . . . 299
Running the analysis and viewing the results . . . . . . . . . . . 300
Monte Carlo Histograms . . . . . . . . . . . . . . . . . . . . . . . . . 301
Chebyshev filter example . . . . . . . . . . . . . . . . . . . . . . . 301
Creating models for Monte Carlo analysis . . . . . . . . . . . . . 302
Setting up the analysis . . . . . . . . . . . . . . . . . . . . . . . . 302
Creating histograms . . . . . . . . . . . . . . . . . . . . . . . . . . 303
Worst-case analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306
Overview of worst-case analysis . . . . . . . . . . . . . . . . . . . . . 306
Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307
Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307
Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308
Caution: An important condition for
correct worst-case analysis . . . . . . . . . . . . . . . . . . 308
Worst-case analysis example . . . . . . . . . . . . . . . . . . . . . . . 309
Tips and other useful information . . . . . . . . . . . . . . . . . . . . 313
VARY BOTH, VARY DEV, and VARY LOT . . . . . . . . . . . . 313
Gaussian distributions . . . . . . . . . . . . . . . . . . . . . . . . 314
YMAX collating function . . . . . . . . . . . . . . . . . . . . . . . 314
RELTOL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314
Sensitivity analysis . . . . . . . . . . . . . . . . . . . . . . . . . . 314
Manual optimization . . . . . . . . . . . . . . . . . . . . . . . . . 314
Monte Carlo analysis . . . . . . . . . . . . . . . . . . . . . . . . . 315
Part four Viewing results
Analyzing waveforms 319Chapter 13
Chapter overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319
Overview of waveform analysis . . . . . . . . . . . . . . . . . . . . . . . 320
Elements of a plot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321
Elements of a Probe window . . . . . . . . . . . . . . . . . . . . . . . 322
Managing multiple Probe windows . . . . . . . . . . . . . . . . . . . 323
Printing multiple windows . . . . . . . . . . . . . . . . . . . . . . 323
Setting up waveform analysis . . . . . . . . . . . . . . . . . . . . . . . . . 324
Setting up colors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324
Editing display and print colors in the PSPICE.INI file . . . . . . 324
Configuring trace color schemes . . . . . . . . . . . . . . . . . . . 326
Viewing waveforms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327
Setting up waveform display from Capture . . . . . . . . . . . . . . 327
Viewing waveforms while simulating . . . . . . . . . . . . . . . . . . 328
Configuring update intervals . . . . . . . . . . . . . . . . . . . . 329
xii
Contents
Interacting with waveform analysis during simulation . . . . . 329
Pausing a simulation and viewing waveforms . . . . . . . . . . 330
Using schematic page markers to add traces . . . . . . . . . . . . . . 331
Limiting waveform data file size . . . . . . . . . . . . . . . . . . . . 334
Limiting file size using markers . . . . . . . . . . . . . . . . . . . 334
Limiting file size by excluding intern al subcircuit data . . . . . . 336
Limiting file size by suppressing the first part
of simulation output . . . . . . . . . . . . . . . . . . . . . 336
Using simulation data from multiple files . . . . . . . . . . . . . . . 337
Appending waveform data files . . . . . . . . . . . . . . . . . . . 337
Adding traces from specific loaded waveform data files . . . . . 338
Saving simulation results in ASCII format . . . . . . . . . . . . . . . 339
Analog example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341
Running the simulation . . . . . . . . . . . . . . . . . . . . . . . 341
Displaying voltages on nets . . . . . . . . . . . . . . . . . . . . . 343
User interface features for waveform analysis . . . . . . . . . . . . . . . 344
Zoom regions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344
Scrolling traces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346
Modifying trace expressions and labels . . . . . . . . . . . . . . . . . 346
Moving and copying trace names and expressions . . . . . . . . . . 347
Copying and moving labels . . . . . . . . . . . . . . . . . . . . . . . 348
Tabulating trace data values . . . . . . . . . . . . . . . . . . . . . . . 349
Using cursors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350
Displaying cursors . . . . . . . . . . . . . . . . . . . . . . . . . . 350
Moving cursors . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351
Example: using cursors . . . . . . . . . . . . . . . . . . . . . . . . 352
Tracking simulation messages . . . . . . . . . . . . . . . . . . . . . . . . 354
Message tracking from the message summary . . . . . . . . . . . . . 354
The Simulation Message Summary dialog box . . . . . . . . . . 354
Persistent hazards . . . . . . . . . . . . . . . . . . . . . . . . . . . 355
Message tracking from the waveform . . . . . . . . . . . . . . . . . . 356
Trace expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356
Basic output variable form . . . . . . . . . . . . . . . . . . . . . . . . 357
Output variable form for device terminals . . . . . . . . . . . . . . . 358
Analog trace expressions . . . . . . . . . . . . . . . . . . . . . . . . . 364
Trace expression aliases . . . . . . . . . . . . . . . . . . . . . . . 364
Arithmetic functions . . . . . . . . . . . . . . . . . . . . . . . . . 364
Rules for numeric values suffixes . . . . . . . . . . . . . . . . . . 365
Other output opti ons 367Chapter 14
Chapter overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367
xiii
Contents
Viewing analog results in the PSpice window . . . . . . . . . . . . . . . 368
Writing additional results to the PSpice output file . . . . . . . . . . . . 369
Generating plots of voltage and current values . . . . . . . . . . . . 369
Generating tables of voltage and current values . . . . . . . . . . . . 370
Setting initial state 373Appendix A
Appendix overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373
Save and load bias point . . . . . . . . . . . . . . . . . . . . . . . . . . . . 374
Save bias point . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 374
Load bias point . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375
Setpoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 376
Setting initial conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378
Convergence and “time step too small errors” 379Appendix B
Appendix overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 379
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380
Newton-Raphson requirements . . . . . . . . . . . . . . . . . . . . . 380
Is there a solution? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381
Are the Equations Continuous? . . . . . . . . . . . . . . . . . . . . . 382
Are the derivatives correct? . . . . . . . . . . . . . . . . . . . . . 382
Is the initial approximation close enough? . . . . . . . . . . . . . . . 383
Bias point and DC sweep . . . . . . . . . . . . . . . . . . . . . . . . . . . 385
Semiconductors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385
Switches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 386
Behavioral modeling expressions . . . . . . . . . . . . . . . . . . . . 387
Transient analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 388
Skipping the bias point . . . . . . . . . . . . . . . . . . . . . . . . . . 389
The dynamic range of TIME . . . . . . . . . . . . . . . . . . . . . . . 389
Failure at the first time step . . . . . . . . . . . . . . . . . . . . . . . . 390
Parasitic capacitances . . . . . . . . . . . . . . . . . . . . . . . . . . . 391
Inductors and transformers . . . . . . . . . . . . . . . . . . . . . . . . 391
Bipolar transistors substrate junction . . . . . . . . . . . . . . . . . . 392
Diagnostics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393
xiv
Index 395
Figures
Figure 1 User-configurable data files that PSpice reads . . . . . . . . . . . . . . . . 11
Figure 2 Diode clipper circuit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Figure 3 Connection points. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Figure 4 PSpice simulation output window. . . . . . . . . . . . . . . . . . . . . . . 22
Figure 5 Simulation output file. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Figure 6 DC sweep analysis settings. . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Figure 7 Probe window. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Figure 8 Clipper circuit with voltage marker on net Out. . . . . . . . . . . . . . . . 29
Figure 9 Voltage at In, Mid, and Out. . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Figure 11 Trace legend with cursors activated. . . . . . . . . . . . . . . . . . . . . . 30
Figure 12 Trace legend with V(Mid) symbol outlined. . . . . . . . . . . . . . . . . . 30
Figure 13 Voltage difference at V(In) = 4 volts. . . . . . . . . . . . . . . . . . . . . . 31
Figure 14 Diode clipper circuit with a voltage stimulus. . . . . . . . . . . . . . . . . 32
Figure 15 Stimulus Editor window. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Figure 16 Transient analysis simulation settings. . . . . . . . . . . . . . . . . . . . . 34
Figure 17 Sinusoidal input and clipped output waveforms. . . . . . . . . . . . . . . 35
Figure 18 Clipper circuit with AC stimulus. . . . . . . . . . . . . . . . . . . . . . . . 37
Figure 19 AC sweep and noise analysis simulation settings. . . . . . . . . . . . . . . 38
Figure 20 dB magnitude curves for “gain” at Mid and Out. . . . . . . . . . . . . . . 40
Figure 21 Bode plot of clipper’s frequency response. . . . . . . . . . . . . . . . . . . 41
Figure 22 Clipper circuit with global parameter Rval. . . . . . . . . . . . . . . . . . 42
Figure 23 Parametric simulation settings. . . . . . . . . . . . . . . . . . . . . . . . . . 44
Figure 24 Small signal response as R1 is varied from 100
Figure 25 Small signal frequency response at 100 and 10 kΩ input resistance. . . . 47
Figure 26 Performance analysis plots of bandwidth and gain vs. Rval. . . . . . . . . 50
Figure 27 Relationship of the Model Editor to Capture and PSpice . . . . . . . . . . 93
Figure 28 Process and data flow for the Model Editor. . . . . . . . . . . . . . . . . . 96
Figure 29 Model Editor workspace with data for a bipolar transistor. . . . . . . . . 97
Figure 30 Design for a half-wave rectifier. . . . . . . . . . . . . . . . . . . . . . . . 104
Figure 31 Model characteristics and parameter values for DbreakX. . . . . . . . . 105
Figure 32 Assorted device characteristic curves for a diode. . . . . . . . . . . . . . 108
Figure 33 Forward Current device curve at two temperatures. . . . . . . . . . . . 109
to 10 k
Ω . . . . . . . . . . . 45
Figures
Figure 34 Rules for pin callout in subcircuit templates. . . . . . . . . . . . . . . . . 146
Figure 35 LOPASS filter example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
Figure 36 HIPASS filter part example. . . . . . . . . . . . . . . . . . . . . . . . . . . 158
Figure 37 BANDPASS filter part example. . . . . . . . . . . . . . . . . . . . . . . . 159
Figure 38 BANDREJ filter part example. . . . . . . . . . . . . . . . . . . . . . . . . 159
Figure 39 FTABLE part example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
Figure 40 LAPLACE part example one. . . . . . . . . . . . . . . . . . . . . . . . . . 165
Figure 41 Viewing gain and phase characteristics of a lossy integrator. . . . . . . . 165
Figure 42 LAPLACE part example two. . . . . . . . . . . . . . . . . . . . . . . . . . 165
Figure 43 ABM expression part example one. . . . . . . . . . . . . . . . . . . . . . 169
Figure 44 ABM expression part example two. . . . . . . . . . . . . . . . . . . . . . 169
Figure 45 ABM expression part example three. . . . . . . . . . . . . . . . . . . . . . 170
Figure 46 ABM expression part example four. . . . . . . . . . . . . . . . . . . . . . 170
Figure 47 Triode circuit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
Figure 48 Triode subcircuit producing a family of I-V curves. . . . . . . . . . . . . 173
Figure 49 EVALUE part example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
Figure 50 GVALUE part example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
Figure 51 EMULT part example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
Figure 52 GMULT part example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
Figure 53 EFREQ part example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
Figure 54 Voltage multiplier circuit (mixer). . . . . . . . . . . . . . . . . . . . . . . 186
Figure 55 PSpice simulation window . . . . . . . . . . . . . . . . . . . . . . . . . . 210
Figure 56 Example schematic EXAMPLE.OPJ. . . . . . . . . . . . . . . . . . . . . . 217
Figure 57 Curve family example schematic. . . . . . . . . . . . . . . . . . . . . . . 221
Figure 58 Device curve family. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222
Figure 59 Operating point determination for each member of the curve family. . . 222
Figure 60 Circuit diagram for EXAMPLE.OPJ. . . . . . . . . . . . . . . . . . . . . . 237
Figure 61 AC analysis setup for EXAMPLE.OPJ. . . . . . . . . . . . . . . . . . . . . 238
Figure 62 Device and total noise traces for EXAMPLE.DSN. . . . . . . . . . . . . . 247
Figure 63 Transient analysis setup for EXAMPLE.OPJ. . . . . . . . . . . . . . . . . 263
Figure 64 Example schematic EXAMPLE.OPJ. . . . . . . . . . . . . . . . . . . . . . 264
Figure 65 ECL-compatible Schmitt trigger. . . . . . . . . . . . . . . . . . . . . . . . 266
Figure 66 Netlist for Schmitt trigger circuit. . . . . . . . . . . . . . . . . . . . . . . . 267
Figure 67 Hysteresis curve example: Schmitt trigger. . . . . . . . . . . . . . . . . . 268
Figure 68 Passive filter schematic. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274
Figure 69 Current of L1 when R1 is 1.5 ohms. . . . . . . . . . . . . . . . . . . . . . 276
Figure 70 Rise time and overshoot vs. damping resistance. . . . . . . . . . . . . . . 277
Figure 71 RLC filter example circuit. . . . . . . . . . . . . . . . . . . . . . . . . . . . 278
Figure 72 Plot of capacitance versus bias voltage. . . . . . . . . . . . . . . . . . . . 280
Figure 73 Example schematic EXAMPLE.OPJ. . . . . . . . . . . . . . . . . . . . . . 282
Figure 74 Example schematic EXAMPLE.DSN. . . . . . . . . . . . . . . . . . . . . 288
Figure 75 Monte Carlo analysis setup for EXAMPLE.DSN. . . . . . . . . . . . . . . 290
xvi
Figures
Figure 76 Summary of Monte Carlo runs for EXAMPLE.OPJ. . . . . . . . . . . . . 291
Figure 77 Parameter values for Monte Carlo pass three. . . . . . . . . . . . . . . . 292
Figure 78 Pressure sensor circuit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293
Figure 79 Model definition for RMonte1. . . . . . . . . . . . . . . . . . . . . . . . . 298
Figure 80 Pressure sensor circuit with RMonte1 and RTherm model definitions. . 299
Figure 81 Chebyshev filter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302
Figure 82 1 dB bandwidth histogram. . . . . . . . . . . . . . . . . . . . . . . . . . . 305
Figure 83 Center frequency histogram. . . . . . . . . . . . . . . . . . . . . . . . . . 306
Figure 84 Simple biased BJT amplifier. . . . . . . . . . . . . . . . . . . . . . . . . . 309
Figure 85 Amplifier netlist and circuit file. . . . . . . . . . . . . . . . . . . . . . . . 310
Figure 86 YatX Goal Function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311
Figure 87 Correct worst-case results. . . . . . . . . . . . . . . . . . . . . . . . . . . 312
Figure 88 Incorrect worst-case results. . . . . . . . . . . . . . . . . . . . . . . . . . 312
Figure 89 Schematic using VARY BOTH. . . . . . . . . . . . . . . . . . . . . . . . . 313
Figure 90 Circuit file using VARY BOTH. . . . . . . . . . . . . . . . . . . . . . . . 313
Figure 91 Analog and digital areas of a plot. . . . . . . . . . . . . . . . . . . . . . . 321
Figure 92 Two Probe windows. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322
Figure 93 Trace legend symbols. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338
Figure 94 Section information message box. . . . . . . . . . . . . . . . . . . . . . . 339
Figure 95 Example schematic EXAMPLE.OPJ. . . . . . . . . . . . . . . . . . . . . . 341
Figure 96 Waveform display for EXAMPLE.DAT. . . . . . . . . . . . . . . . . . . 342
Figure 97 Cursors positioned on a trough and peak of V(1) . . . . . . . . . . . . . 352
Figure 98 Waveform display for a persistent hazard. . . . . . . . . . . . . . . . . . 355
Figure A-1 Setpoints. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 376
xvii
Figures
xviii
Tables
Table 1 DC analysis types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Table 2 AC analysis types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Table 3 Time-based analysis types . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Table 4 Parametric and temperature analysis types . . . . . . . . . . . . . . . . . . 6
Table 5 Statistical analysis types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Table 2-1 25
Table 10 Association of cursors with mouse buttons. . . . . . . . . . . . . . . . . . 30
Table 2-1 31 Table 2-1 36 Table 2-2 41 Table 2-3 48 Table 2-4 51 Table 5 58 Table 6 59
Table 7 Passive parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Table 8 Breakout parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Table 9 Operators in expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Table 10 Function s in arithmetic expressions . . . . . . . . . . . . . . . . . . . . . . 71
Table 11 System variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
Table 12 74 Table 13 75 Table 14 77 Table 15 78 Table 16 80
Table 17 Models supported in the Model Editor . . . . . . . . . . . . . . . . . . . 95
Table 1 Sample diode data sheet values . . . . . . . . . . . . . . . . . . . . . . . 106
Table 2 Part names for custom part generation. . . . . . . . . . . . . . . . . . . . 133
Table 3 139 Table 4 141 Table 5 142 Table 6 145
Table 7 Control system parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
Tables
Table 1 ABM math function parts . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
Table 2 ABM expression parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
Table 1 PSpice -equivalent parts . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
Table 1 Basic controlled sources in ANALOG.OLB . . . . . . . . . . . . . . . . . 192
Table 2 Classes of PSpice analyses . . . . . . . . . . . . . . . . . . . . . . . . . . 196
Table 3 Execution order for standard analyses . . . . . . . . . . . . . . . . . . . . 198
Table 4 PSpice output variable formats . . . . . . . . . . . . . . . . . . . . . . . 201
Table 5 Element definitions for 2-terminal devices . . . . . . . . . . . . . . . . . 202
Table 6 Element definitions for 3- or 4-terminal devices . . . . . . . . . . . . . . 203
Table 7 Element definitions for transmission line devices . . . . . . . . . . . . . 204
Table 8 Element definitions for AC analysis specific elements . . . . . . . . . . 205
Table 9 DC sweep circuit design requirements . . . . . . . . . . . . . . . . . . . 214
Table 10 218 Table 11 218 Table 12 219
Table 1 Curve family example setup . . . . . . . . . . . . . . . . . . . . . . . . . 221
Table 2 233 Table 3 233 Table 4 234 Table 5 234 Table 6 236 Table 7 242 Table 8 244 Table 9 246
Table 10 Stimulus symbols for time-based input signals . . . . . . . . . . . . . . 252
Table 1 Parametric analysis circuit design requir ements . . . . . . . . . . . . . . 272
Table 1 Collating functions used in statistical analyses . . . . . . . . . . . . . . . 287
Table 1 294 Table 2 295 Table 3 300
Table 1 Default waveform viewing colors. . . . . . . . . . . . . . . . . . . . . . . 325
Table 2 326 Table 3 328 Table 4 330 Table 5 332 Table 6 333 Table 1 346
Table 2 Mouse actions for cursor control . . . . . . . . . . . . . . . . . . . . . . . 351
Table 3 Key combinations for cursor control . . . . . . . . . . . . . . . . . . . . 351
Table 4 357 Table 5 358
Table 6 Output variable formats . . . . . . . . . . . . . . . . . . . . . . . . . . . 358
xx
Tables
Table 7 Examples of output variable formats . . . . . . . . . . . . . . . . . . . . 360
Table 8 Output variable AC suffixes . . . . . . . . . . . . . . . . . . . . . . . . . 361
Table 9 Device names for two-terminal device types . . . . . . . . . . . . . . . 361
Table 10 Terminal IDs by three & four-terminal device type . . . . . . . . . . . . 362
Table 11 Noise types by device type . . . . . . . . . . . . . . . . . . . . . . . . . . 363
Table 12 Analog arithmetic functions for trace expressions . . . . . . . . . . . . 364
Table 13 Output units for trace expressions . . . . . . . . . . . . . . . . . . . . . 366
Table 14 369 Table 15 370
xxi
Tables
xxii

Before you begin

Welcome to OrCAD

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..
Notation Examples Description
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 List A 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 functionality Release 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 profiles PSpice 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-end Release 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 interface The 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 model The 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 analog­digital 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 libraries The 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 analyses PSpice 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 parts PSpice has numerous built-in models with
parameters that you can tweak for a given device. These include independent temperature effects.
Model behavior PSpice 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 1 DC analysis types
For this DC analysis... PSpice computes this. ..
DC sweep Steady-state voltages and currents
when sweeping a source, a model parameter, or temperature over a range of values.
Bias point detail Bias 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 sensitivity Sensitivity 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 sweep Small-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.
Noise For 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...
Transient Voltages and currents tracked over
time.
Fourier DC 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 4 Parametric and temperature analysis types
shows the circuit values that you can ste p for each
For this analysis... You can step one of these...
Parametric global parameter
model parameter component value DC source operational temperature
Temperature operational 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 5 Statistical analysis types
For this statistical analysis... PSpice does this...
Monte Carlo For 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 results This 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 four Viewing 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
1 From the Windows Start menu, choose the OrCAD
Release 9 program folder and then the Capture shortcut to start Capture.
2 In the Project Manager, from the File menu, point to
New and choose Project.
3 Select Analog Circuit Wizard. 4 In the Name text box, enter the name of the project
(CLIPPER).
5 Click 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
1 In Capture, switch to the schematic page editor.
Example circuit creation
2 From the Place menu, choose Part to display the Place
Part dialog box.
3 Add the library for the parts you need to place:
a Click the Add Library button. b Select SOURCE.OLB (from the PSpice library) and
click Open.
4 In the Part text box, type
VDC.
5 Click OK. 6 Move the pointer to the correct position on the
schematic page (see Figure 2) and click to place the first part.
7 Move the cursor and click again to place the second
part.
8 Right-click and choose End Mode to stop placing
parts.
To place the diodes
1 From 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
2 Add the library for the parts you need to place:
a Click the Add Library button. b Select DIODE.OLB (from the PSpice library) and
click Open.
3 In the Part text box, type
D1N39 to display a list of
diodes.
4 Select D1N3940 and click OK. 5 Press r to rotate the diode to the correct orientation. 6 Click to place the first diode (D1), then click to place
the second diode (D2).
7 Right-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)
1 Click the text to select it, then drag the text to a new
location.
To place the other parts
pre
1 From the Place menu, choose Part to display the Place
Part dialog box.
2 Add the library for the parts you need to place:
a Click the Add Library button. b Select ANALOG.OLB (from the PSpice library)
and click Open.
3 Follow 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)
4 To place the off-page connector parts
(OFFPAGELEFT-R), click the Place Off-Page Connector button on the tool palette.
5 Add the library for the parts you need to place:
a Click the Add Library button. b Select CAPSYM.OLB (from the Capture library)
and click Open.
18
6 Place the off-page connector parts according to
Figure 2.
7 To place the ground parts (0), click the GND button on
the tool palette.
8 Add the library for the parts you need to place:
a Click the Add Library button. b Select SOURCE.OLB (from the PSpice library) and
click Open.
9 Place the ground parts according to Figure 2.
To connect the parts
Example circuit creation
1 From the Place menu, choose Wire to begin wiring
parts. The pointer changes to a crosshair.
2 Click the connection point (the very end) of the pin on
the off-page connector at the input of the circuit.
3 Click the nearest connection point of the input resistor
R1.
4 Connect the other end of R1 to the output capacitor. 5 Connect the diodes to each other and to the wire
between them:
a Click the connection point of the cathode for the
lower diode.
b Move the cursor straight up and click the wire
between the diodes. The wire ends, and the junction of the wire segments becomes visible.
c Click again on the junction to continue wiring. d Click the end of the upper diode’s anode pin.
6 Continue 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
1 From the Place menu, choose Net Alias to display th e
Place Net Alias dialog box.
2 In the Name text box, type 3 Click OK. 4 Place 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.
5 Right-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.
1 Double-click the name of an off-page connector to
display the Display Properties dialog box.
2 In the Name text box, type the new name. 3 Click OK. 4 Select 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.
1 Double-click the second VDC part to display the Parts
spreadsheet.
2 Click in the first cell under the Reference column. 3 Type in the new name Vin. 4 Click Apply to update the changes to the part, then
close the spreadsheet.
5 Continue naming the remaining parts until your
schematic looks like Figure 2 on page 2-16.
To change the values of the parts
1 Double-click the voltage label (0V) on V1 to display
the Display Properties dialog box.
2 In the Value text box, type 3 Click OK. 4 Continue 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
1 From 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
1 In Capture, switch to CLIPPER.OPJ in the schematic
page editor.
2 From 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
3 In the Name text box, type 4 From the Inherit From list, select None, then click
Create. The Simulation Settings dialog box appears.
5 From the Analysis type list, select Bias Point. 6 Click OK to close the Simulation Settings dialog box.
Bias.
To simulate the circuit from within Capture
1 From 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
1 From 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. 2 When 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
1 In 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.
2 In the Name text box, type 3 From the Inherit From list, select Schematic1-Bias,
then click Create. The Simulation Settings dialog box appears.
4 Click the Analysis tab. 5 From the Analysis type list, select DC Sweep and enter
the values shown in Figure 6.
DC Sweep.
26
Figure 6 DC sweep analysis settings. 6 Click OK to close the Simulation Settings dialog box. 7 From the File menu, choose Save. 8 From 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
1 From PSpice’s Trace menu, choose Add Trace. 2 In the Add Traces dialog box, select V(In) and V(Mid). 3 Click OK.
To display a trace using a marker
1 From Capture’s PSpice menu, point to Markers and
choose Voltage Level.
2 Click to place a marker on net Out, as shown in
Figure 8.
Figure 8 Clipper circuit with voltage marker on net Out. 3 Right-click and choose End Mode to stop placing
markers.
4 From the File menu, choose Save.
DC sweep analysis
or
5 Switch 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.
Table 10
Association of cursors with mouse
buttons.
cursor 1 left mouse button cursor 2 right mouse button
Figure 11
Trace legend with cursors
activated.
To place cursor s on V( In) and V(Mid)
1 From PSpice’s Trace menu, point to Cursor and
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.
2 To display the cursor crosshairs:
a Position the mouse anywhere inside the Probe
window.
b Click to display the crosshairs for the first cursor. c Right-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.
3 Place the first cursor on the V(In) waveform:
a Click 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
b To 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.
4 Place the second cursor on the V(Mid) waveform:
a Right-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.
b Right-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.
c To 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
1 From 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
1 From Capture’s PSpice menu, point to Markers and
choose Delete All.
2 Select the ground part beneath the VIN source. 3 From the Edit menu, choose Cut. 4 Scroll down (or from the View menu, point to Zoom,
then choose Out).
5 Place a VSTIM part (from the PSpice library
SOURCESTM.OLB) as shown in Figure 14.
Transient analysis
6 From the Edit menu, choose Paste. 7 Place the ground part under the VSTIM part as shown
in Figure 14.
8 From the View menu, point to Zoom, then choose All. 9 From the File menu, choose Save to save the design.
To set up the stimulus
1 Select the VSTIM part (V3). 2 From the Edit menu, choose PSpice Stimulus.
The New Stimulus dialog box appears.
3 In the New Stimulus dialog box, type 4 Click SIN (sinusoidal), then click OK. 5 In the SIN Attributes dialog box, set the first three
properties as follows:
Offset Voltage = 0 Amplitude = 10 Frequency = 1kHz
6 Click 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. 7 Click OK.
Figure 16
settings.
press V+@
Transient anal ysis simulation
8 From the File menu, choose Save to save the stimulus
information. Click Yes to update the schematic.
9 From the File menu, choose Exit to exit the Stimulus
Editor.
To set up and run the transient analysis
1 From Capture’s PSpice menu, choose
New Simulation Profile. The New Simulation dialog box appears.
2 In the Name text box, type 3 From the Inherit From list, select
Schematic1-DC Sweep, then click Create. The Simulation Settings dialog box appears.
4 Click the Analysis tab. 5 From the Analysis list, select Time Domain (Transient)
and enter the settings shown in Figure 16. TSTOP = 2ms Start saving data after = 20ns
Transient.
34
6 Click OK to close the Simulation Settings dialog box.
or press
I
7 From 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)
1 From PSpice’s Trace menu, choose Add Trace. 2 In the trace list, select V(In) and V(Out) by clicking
them.
3 Click OK to display the traces. 4 From the Tools menu, choose Options to display the
Probe Options dialog box.
5 In the Use Symbols frame, click Always if it is not
already enabled.
6 Click 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
1 In Capture, open CLIPPER.OPJ. 2 Select the DC voltage source, Vin, and press D to
remove the part from the schematic page.
37
Chapter 2 Simulation examples
3 From 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.
4 In the Part text box, type
VAC (from the PSpice library
SOURCE.OLB) and click OK.
5 Place the AC voltage source on the schematic page, as
shown in Figure 17.
6 Double-click the VAC part (0V) to display the Parts
spreadsheet.
7 Change the Reference cell to Vin and change the
ACMAG cell to 1V
.
8 Click Apply to update the changes and then close the
spreadsheet.
To set up and run the AC sweep simulation
1 From Capture’s PSpice menu, choose New Simulation
Profile.
2 In the Name text box, enter AC Sweep, then click
create. The Simulation Settings dialog box appears.
3 Click the Analysis tab.
38
4 From 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.
5 Click OK to close the Simulation Settings dialog box.
N
Y
6 From the PSpice menu, choose Run to start the
simulation. PSpice performs the AC analysis.
To add markers for waveform analysis
AC sweep analysis
1 From Capture’s PSpice menu, point to Markers, point
to Advanced, then choose db Magnitude of Voltage.
2 Place one Vdb marker on the Out net, then place
another on the Mid net.
3 From 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
1 From Capture’s PSpice menu, point to Markers, point
to Advanced and choose Phase of Voltage.
2 Place a Vphase marker on the output next to the Vdb
marker.
3 Delete the Vdb marker on Mid. 4 Switch to PSpice.
In the Probe window, the gain and phase plots both appear on the same graph with the same scale.
5 Click the trace name VP(Out) to select the tr ace. 6 From the Edit menu, choose Cut. 7 From the Plot menu, choose Add Y Axis. 8 From 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
1 In Capture, open CLIPPER.OPJ. 2 Double-click the value (1k) of part R1 to display the
Display Properties dialog box.
3 In the Value text box, replace 1k with 4 Click OK.
{Rval}.
To add a PARAM part to declare the parameter Rval
1 From Capture’s Place menu, choose Part. 2 In the Part text box, type
library SPECIAL.OLB) , then click OK.
3 Place one PARAM part in any open area on the
schematic page.
4 Double-click the PARAM part to display the Parts
spreadsheet, then click New.
5 In 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.
6 Click in the cell below the Rval column and enter 1k
as the initial value of the parametric sweep.
7 While this cell is still selected, click Display. 8 In the Display Format frame, select Name and Value,
then click OK.
9 Click 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
1 From 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.
2 In the Name text box, type
Parametric.
3 From the Inherit From list, select AC Sweep, then clic k
Create. The Simulation Settings dialog box appears.
4 Click the Analysis tab. 5 Under Options, select Parametric Sweep and enter the
settings as shown below.
44
Figure 23 Parametric simulation settings. 6 Click OK. 7 From 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
1 In 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
2 Click 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
1 From the Trace menu, choose Add Trace to display the
Add Traces dialog box.
2 In 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
3 Click 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.
4 Plot the new trace by specifying a waveform
expression:
a From the Trace menu, choose Add Trace. b In the Trace Expression text box, type the
following waveform expression:
Vdb(Out)@1-Vdb(OUT)@21
c Click OK.
5 Use the search commands to find the value of the
difference trace at its maximum and at a specific frequency:
a From the Tools menu, point to Cursor and choose
Display.
b Right-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
c From the Trace menu, point to Cursor and choose
Max.
d From the Trace menu, point to Cursor and choose
Search Commands.
e In the Search Command text box, type the
following:
search forward x value (100)
f Select 2 as the Cursor to Move option.
g Click 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
Ω.
6 From the Trace menu, point to Cursor and choose
Display to turn off the display of the cursors.
7 Delete 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 parameters Using 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
1 In Capture, open CLIPPER.OPJ.
Performance analysis
2 From 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.
3 Click the Wizard button. 4 Click the Next> button. 5 In the Choose a Goal Function list, click Bandwidth,
then click the Next> button.
6 Click in the Name of Trace to search t ext box and type
V(Out).
7 Click in the db level down for bandwidth calc text box
and type
8 Click 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
9 Click 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.
a From the Plot menu, choose Axis Settings. b Click the X Axis tab. c Under Scale, choose Log. d Click OK.
To plot gain vs. Rval manually
1 From the Plot menu, choose Add Y Axis. 2 From the Trace menu, choose Add to display the Add
Traces dialog box.
3 In the Functions or Macros frame, select the Goal
Functions list, and then click the Max(1) goal function.
4 In the Simulation Output Variables list, click V(out). 5 In 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.
1 Find the topic that is of interest in the first column of
any of these tables.
2 Go 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
1 Select the error or warning message. 2 Press 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
1 In Capture, from the Place menu, choose Part. 2 In 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
1 In Windows Explorer, double-click LIBLIST.PDF,
located in the directory where PSpice is installed. Acrobat Reader starts and displays the OrCAD
Library List.
2 From the Tools menu, choose Find. 3 In the Find What text box, type the generic part name. 4 Enter 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.
5 If 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 7 Passive 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 ...
C C_VAR
Linductor L R
R_VAR XFRM_LINEAR
K_LINEAR T ideal transmission line T TLOSSY Lossy transmission line T
COUPLED*
T
n
T
COUPLEDX**
n
KCOUPLE
* For these device types, t he OrCAD libraries supply several parts. Refer to the
online parts.
**
n
OrCAD PSpice A/D Reference Manual
capacitor C
resistor R
transformer K and L
coupled transmission line T 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 8 Breakout parts
Use this breakout part. .. For t h is device type...
BBREAK GaAsFET B CBREAK capacitor C DBREAK JBREAK KBREAK ind u ct o r coupling K LBREAK inductor L MBREAK QBREAK RBREAK resistor R
*
x
*JFET J
x
* MOSFET M
x
x*
diode D
bipolar transistor Q
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
eference Manual, and then look in
the Capture Parts section.
SBREAK voltage-controlled
switch TBREAK transmission line T WBREAK current-controlled
switch XFRM_NONLINEAR transformer K and L ZBREAKN IGBT Z
* 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
1 Place 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
2 Double-click the PARAM part to display the Parts
spreadsheet, then click New.
3 Declare up to three global parameters by doing the
following for each global parameter:
a Click New. b In the Property Name text box, enter NAMEn, then
click OK. This creates a new property for the PARAM part,
NAMEn in the spreadsheet.
c Click in the cell below the NAMEn column and
enter a default value for the parameter.
d While this cell is still selected, click Display. e In 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.
4 Click 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
.
5 Close the Parts spreadsheet.
To use the global parameter in your circuit
1 Find the numeric value that you want to replace: a
component value, model parameter value, or other property value.
2 Replace 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...