MicroSim Corporation
20 Fairbanks
Irvine, California 92618
(714) 770-3022
Version 8.0, June, 1997.
Copyright 1997, MicroSim Corporation. All rights reserved.
Printed in the United States of America.
TradeMarks
Referenced herein are the trademarks used by MicroSim Corporation to identify its products. MicroSim
Corporation is the exclusive owners of “MicroSim,” “PSpice,” “PLogic,” “PLSyn.”
Additional marks of MicroSim include: “StmEd,” “Stimulus Editor,” “Probe,” “Parts,” “Monte Carlo,” “Analog
Behavioral Modeling,” “Device Equations,” “Digital Simulation,” “Digital Files,” “Filter Designer,” “Schematics,”
“PLogic,” ”PCBoards,” “PSpice Optimizer,” and “PLSyn” and variations theron (collectively the “Trademarks”)
are used in connection with computer programs. MicroSim owns various trademark registrations for these marks in
the United States and other countries.
SPECCTRA is a registered trademark of Cooper & Chyan Technology, Inc.
Microsoft, MS-DOS, Windows, Windows NT and the Windows logo are either registered trademarks or trademarks
of Microsoft Corporation.
Adobe, the Adobe logo, Acrobat, the Acrobat logo, Exchange and PostScript are trademarks of Adobe Systems
Incorporated or its subsidiaries and may be registered in certain jurisdictions.
EENET is a trademark of Eckert Enterprises.
All other company/product names are trademarks/registered trademarks of their respective holders.
Copyright Notice
Except as permitted under the United States Copyright Act of 1976, no part of this publication may be reproduced
or distributed in any form or by any means, or stored in a data base or retrieval system, without the prior written
permission of MicroSim Corporation.
As described in the license agreement, you are permitted to run one copy of the MicroSim software on one
computer at a time. Unauthorized duplication of the software or documentation is prohibited by law. Corporate
Program Licensing and multiple copy discounts are available.
Welcome to the MicroSim family of products. Whichever
programs you have purchased, we are confident that you will
find that they meet your circuit design needs. They provide an
easy-to-use, integrated environment for creating, simulating,
and analyzing your circuit designs from start to finish.
xiv Before You Begin
MicroSim PSpice
Optimizer Overview
The MicroSim PSpice Optimizer is a circuit optimization
program that improves the performance of analog and mixed
analog/digital circuits. The PSpice Optimizer is fully integrated
with other MicroSim programs. This means you can design your
circuit with MicroSim Schematics, simulate with MicroSim
PSpice A/D (or MicroSim PSpice), analyze results with
MicroSim Probe and optimize performance within the same
environment.
MicroSim
PSpice
Optimizer
MicroSim
Parts
MODEL
+ BF =
symbols
packages
models
MicroSim
Schematics
MicroSim
PSpice A/D
MicroSim
Probe
MicroSim
PCBoards
SPECCTRA
Autorouter
packages
footprints
padstacks
reports
drill
Gerber
files
files
How to Use this Guide
g
g
g
g
This guide is designed so you can quickly find the information
you need to use the PSpice Optimizer.
How to Use this Guide xv
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 opening, and
saving your work. If you are new to Windows, please review
your Microsoft Windows User’s Guide.
Typographical Conventions
Before using the PSpice Optimizer, it is important to understand
the terms and typographical conventions used in this
documentation.
This guide generally follows the conventions used in the
Microsoft Windows 95 User’s Guide. Procedures for performing
an operation are generally numbered with the following
typographical conventions.
NotationExamplesDescription
ALL CAPSANALOG.SLB or
CLIPPER.SCH
Library files and file names.
For UNIX users:
All screen captures in this
manual are of Windows 95
boxes and windows.
dialo
Most options in these dialo
boxes and windows are
available in your operatin
environment. When certain
options are not available to you,
or you must do somethin
differently than what is primarily
outlined, information specific to
your platform is provided.
Press C+
Type
r
...Commands/text entered from
VAC
C+r
monospace
font
NotationExamplesDescription
A specific key or key stroke
on the keyboard.
the keyboard.
xvi Before You Begin
g
Related Documentation
Documentation for MicroSim products is available in both hard
copy and online. To access an online manual instantly, you can
select it from the Help menu in its respective program (for
example, access the Schematics User’s Guide from the Help
menu in Schematics).
Note
The documentation you receive depends on the
software confi
uration you have purchased.
The following table provides a brief description of those
manuals available in both hard copy and online.
This manual...Provides information about how to use...
MicroSim Schematics
User’s Guide
MicroSim PCBoards
User’s Guide
MicroSim PSpice A/D & Basics+
User’s Guide
MicroSim PSpice & Basics
User’s Guide
MicroSim PLSyn
User’s Guide
MicroSim Schematics, which is a schematic capture front-end program
with a direct interface to other MicroSim programs and options.
MicroSim PCBoards, which is a PCB layout editor that lets you specify
printed circuit board structure, as well as the components, metal, and
graphics required for fabrication.
PSpice A/D, Probe, the Stimulus Editor, and the Parts utility, which are
circuit analysis programs that let you create, simulate, and test analog and
digital circuit designs. It provides examples on how to specify simulation
parameters, analyze simulation results, edit input signals, and create
models.
MicroSim PSpice & MicroSim PSpice Basics, which are circuit analysis
programs that let you create, simulate, and test
analog-only circuit designs.
MicroSim PLSyn, which is a programmable logic synthesis program that
lets you synthesize PLDs and CPLDs from a schematic or hardware
description language.
MicroSim FPGA
User’s Guide
MicroSim Filter Designer
User’s Guide
MicroSim FPGA—the interface between MicroSim Schematics and
XACTstep—with MicroSim PSpice A/D to enter designs that include
Xilinx field programmable gate array devices.
MicroSim Filter Designer, which is a filter synthesis program that lets you
design electronic frequency selective filters.
The following table provides a brief description of those
manuals available online only.
This online manual...Provides this...
If You Have the Evaluation Version xvii
MicroSim PSpice A/D
Online Reference Manual
MicroSim Application Notes
Online Manual
Online Library ListA complete list of the analog and digital parts in the model and symbol
MicroSim PCBoards Online
Reference Manual
MicroSim PCBoards Autorouter
Online User’s Guide
Reference material for PSpice A/D. Also included: detailed descriptions 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.
A variety of articles that show you how a particular task can be accomplished
using MicroSim‘s products, and examples that demonstrate a new or different
approach to solving an engineering problem.
libraries.
Reference information for MicroSim PCBoards, such as: file name extensions,
padstack naming conventions and standards, footprint naming conventions, the
netlist file format, the layout file format, and library expansion and
compression utilities.
Information on the integrated interface to Cooper & Chyan Technology’s
(CCT) SPECCTRA autorouter in MicroSim PCBoards.
If You Have the
Evaluation Version
The evaluation version of the PSpice Optimizer has the
following requirements and limitations:
•Requires the MicroSim PSpice A/D with Schematics
evaluation package.
•Is limited to one goal, one parameter, and one constraint.
Things You Need to Know
Chapter Overview
This chapter introduces the purpose and function of the PSpice
Optimizer, the optimization process, and related terms.
1
What is the PSpice Optimizer?
capabilities and the criteria designs must meet for successful
optimization.
Using the PSpice Optimizer with Other MicroSim Programs
page 1-4 presents the high-level design flow for optimization
and how other MicroSim programs are integrated into each
design phase.
Terms You Need to Understand
that are important for optimizing designs successfully.
on page 1-2 describes optimizer
on page 1-5 defines the terms
on
1-2 Things You Need to Know
What is the PSpice
Optimizer?
The MicroSim PSpice Optimizer is a circuit optimization
program that improves the performance of analog and mixed
analog/digital circuits.
Run optimizations
iterative simulations, while adjusting the values of design
parameters until performance goals, subject to specified
constraints, are nearly or exactly met. Constraints can include
simple bounds on parameter values and nonlinear functions. The
PSpice Optimizer also computes Lagrange multipliers that
provide information on the cost of each constraint on the
solution.
Explore performance tradeoffs
values for design parameters, the PSpice Optimizer provides
graphical feedback showing performance. You can also tweak
goal and constraint values to examine changes to parameter
values.
Fit model parameters
set of measured data points, and a good starting point for the
parameter values, the PSpice Optimizer fits a more accurate
model.
The PSpice Optimizer performs
When you enter new
Given a parameterized model, a
Designs that You Can Optimize
g
What is the PSpice Optimizer? 1
-3
A design that you can optimize must meet the following criteria:
•It works; that is, it simulates with PSpice to completion and
behaves as intended.
•One or more of its components have a variable value, and
each value that is varied relates to an intended performance
goal.
•An algorithm exists to measure its performance as a
function of the variable value.
If you can visualize what factors should be adjusted to improve
performance, and how you would manually step through the
optimization process (even though the computations might seem
unwieldy), then the design is a good candidate for the PSpice
Optimizer.
Designs that You Cannot
Optimize
You cannot use the PSpice Optimizer to:
Optimization problems are not
always solvable by a particular
orithm.
al
•Create a working design. This especially applies when you
begin with a design that is far from meeting specifications.
•Optimize a design in which the circuit has several states
where a small change in a parameter value causes a change
of state.
Example: A flip-flop is on for some parameter value, and off
for a slightly different value.
1-4 Things You Need to Know
g
g
g
g
Using the PSpice
Optimizer with Other
Because you can use
Schematics, PSpice, and Probe
to desi
system, subcircuit, or component
level, use the PSpice Optimizer
to optimize at whatever level is
most appropriate.
n and simulate at the
MicroSim Pro
rams
The PSpice Optimizer is fully integrated with other MicroSim
programs. This means you can design your circuit with
MicroSim Schematics, simulate with MicroSim PSpice A/D (or
MicroSim PSpice), analyze results with MicroSim Probe and
optimize performance within the same environment. Figure 1-1
illustrates the typical design flow for circuit optimization.
Phase One
MicroSim
Schematics
MicroSim
Schematics
MicroSim
PSpice A/D
MicroSim
PSpice A/D
MicroSim
PSpice
Optimizer
MicroSim
Probe
Develop
the
Design
Phase Two
Set Up
the
Optimization
See Chapter 2, “Primer: How to
Optimize a Design
description of each desi
phase.
” for a detailed
n
Fi
ure 1-1
MicroSim
PSpice
Optimizer
MicroSim
PSpice A/D
Run
the
Optimization
Optimization Design Flow
Phase Three
Fit
Model
Parameters
Terms You Need to
Understand
Terms You Need to Understand 1
-5
Optimization
Optimization is the process of fine-tuning a
design by varying design parameters between successive
simulations until performance comes close to (or exactly meets) the
ideal performance.
The PSpice Optimizer solves four types of optimization problems
as described in Table 1-1.
Table 1-1
Problem TypePSpice Optimizer ActionExample
unconstrained minimizationreduces the value of a single goalminimize the propagation delay
constrained minimizationreduces the value of a single goal while
unconstrained least squares
constrained least squaresreduces the sum of squares of the
Optimization Problems
**
*
satisfying one or more constraints
reduces the sum of the squares of the
individual errors (difference between
the ideal and the measured value) for a
set of goals
individual errors for a set of goals
while satisfying one or more
constraints
through a logic cell
minimize the propagation delay
through a logic cell while keeping the
power consumption of the cell less than
a specified value
given a terminator design, minimize
the sum of squares of the errors in
output voltage and equivalent
resistance
minimize the sum of squares of the
figures of merit for an amplifier design
while keeping the open loop gain equal
to a specified value
*. All four cases allow simple bound constraints; that is, lower and upper bounds on all of
the parameters. The PSpice Optimizer also handles nonlinear goals and constraints.
**. Use unconstrained least squares when fitting model parameters to a set of
measurements, or when minimizing more than one goal.
A parameter defines a property of the design for
which the PSpice Optimizer attempts to determine the best value
within specified limits. A parameter can:
•Represent component values (such as resistance, R, for
a resistor).
•Represent other component attribute values (such as
slider settings in a potentiometer).
•Participate in expressions used to define component
values or other component attribute values.
The PSpice Optimizer can optimize designs with up to eight
variable parameters.
Example: A potentiometer symbol in a schematic uses the SET
attribute to represent the slider position. You can assign a
parameterized expression to this attribute to represent variable
slider positions between 1 and 0. During optimization, the
PSpice Optimizer varies the parameterized value of the SET
attribute.
Specification
A specification describes the ideal behavior
of a design in terms of goals and constraints.
Examples: For a given design, the gain shall be 20 dB ±1 dB; for
a given design, the 3 dB bandwidth shall be 1 kHz; for a given
design, the rise time must be less than 1 usec.
A design can have up to eight goals and constraints in any
combination, but there must always be at least one goal. You can
easily change a goal to a constraint and vice-versa.
The PSpice Optimizer accepts specifications in two formats:
internal and external.
Internal specifications
An internal specification is composed of goals and constraints
defined in terms of target values and ranges, which are entered
into the PSpice Optimizer through dialog boxes.
External specifications
g
g
g
An external specification is composed of measurement data,
which are defined in an external data file that is read by the
PSpice Optimizer.
Terms You Need to Understand 1
-7
Target value
A target value is the ideal operating value for
a characteristic of the design as defined by a goal or constraint
specification.
Goal
A goal defines the performance level that the design
should attempt to meet (e.g., minimum power consumption). A
goal specification includes:
•The name of the goal.
•A target value and an acceptable range.
•A circuit file to simulate.
•An evaluation for measuring performance.
•An analysis type used for simulation-based evaluations.
The goal specification can also include:
•The name of the file containing Probe goal function
definitions (.prb file).
•When using an external specification, the name of the file
containing measured data and the columns of data to be used
as reference.
Typically, the PSpice
Note
Optimizer measures
performance usin
an
evaluation that requires a
simulation, and therefore, you
must specify the circuit file for
the simulation. However,
when measurin
PSpice Optimizer
usin
performance
expressions which do not
require a simulation, you do
not need to specify a circuit
file.
1-8 Things You Need to Know
g
Constraint
A constraint defines the performance level that
the design must fulfill in which the target value exceeds, falls
below, or equals a specified value (e.g., an output voltage that
must be greater than a specific level). The constraint
specification includes:
•The name of the constraint.
•A target value and an acceptable range.
•A circuit file to simulate. (See note on previous page.)
•An evaluation for measuring performance.
•An analysis type used for simulation-based evaluations.
•An allowed relationship between measured values and the
target value, which can be one of the following:
<=measured value must be less than or equal
to the target value
=measured value must equal the target value
>=measured value must be greater than or
equal to the target value
The constraint specification can also include the name of the file
containing Probe goal function definitions (.prb file).
See Optimization on page 1-5
for more on least-squares and
minimization al
orithms.
Constraints are often nonlinear functions of the parameters in
the design.
Example: Bandwidth can vary as the square root of a bias
current and as the reciprocal of a transistor dimension.
Performance
The performance of a design is a measure of
how closely its specifications’ calculated values approach their
target values for a given set of parameter values. When there are
multiple specifications (at least one of which is a goal), the
PSpice Optimizer uses the sum of the squares of their deviations
from target to measure closeness. For a single specification
(goal), the PSpice Optimizer uses either the goal’s value, or the
square of its deviation from target.
Each aspect of a design’s performance is found by either:
•first performing the appropriate simulation, then running
Probe to measure characteristics of the resulting
waveform(s), or
•evaluating PSpice Optimizer expressions.
In many cases (particularly if there are multiple conflicting
specifications), it is possible that the PSpice Optimizer will not
meet all of the goals and constraints. In these cases, optimum
performance is the best compromise solution—that is, the
solution that comes closest to satisfying each of the goals and
constraints, even though it may not completely satisfy any single
one.
Terms You Need to Understand 1
-9
Evaluation
An evaluation is an algorithm that computes a
single numerical value, which is used as the measure of performance with respect to a design specification.
The PSpice Optimizer accepts evaluations in one of these three
forms:
•single-point Probe trace function
•Probe goal function
•PSpice Optimizer expression
Given evaluation results, the PSpice Optimizer determines
whether or not the changes in parameter values are improving
performance, and determines how to select the parameters for
the next iteration.
Trace function
A trace function defines how to evaluate a
design characteristic when running a single-point analysis (such
as a DC sweep with a fixed voltage input of 5 V).
Examples: V(out) to measure the output voltage; I(d1) to
measure the current through a component.
Refer to the online MicroSim
PSpice A/D Reference Manual
for the variable formats and
mathematical functions you can
use to specify a trace function.
1-10 Things You Need to Know
g
g
g
g
g
g
g
g
g
g
Refer to the Goal Function
wizard in Probe
user’s
how to develop and specify
functions.
Here are some quick tips. In
Probe:
• To test the value returned by
• To see the waveforms and
See Gain on page 7-5 for an
example of the YatX
function definition.
uide for information on
a specified
select Eval Goal Function
from the Trace menu.
marked points used to
evaluate a
select Display Evaluation in
the Probe Options dialo
(from the Tools menu, select
Options to display this dialo
box).
and your PSpice
oal
oal function,
oal function,
box
oal
Probe goal function
A Probe goal function defines how
to evaluate a design characteristic when running any kind of
analysis other than a single-point sweep analysis. A goal
function computes a single number from a Probe waveform.
This can be done by finding a characteristic point (e.g., time of
a zero-crossing) or by some other operation (e.g., RMS value of
the waveform).
For example, you can use Probe goal functions to:
•Find maxima and minima in a trace.
•Find distance between two characteristic points (such as
peaks).
•Measure slope of a line segment.
•Derive aspects of the circuit’s performance which are
mathematically described (such as 3 dB bandwidth, power
consumption, and gain and phase margin).
To write effective goal functions, determine what you are
attempting to measure, then define what is mathematically
special about that point (or set of points).
Note
Be sure that the goal functions accurately measure
what they are intended to measure. Optimization
results hi
functions behave. Discontinuities in
hly depend on how well the goal
oal functions
(i.e., sudden jumps for small parameter chan
can cause the optimization process to fail.
es)
PSpice Optimizer expression
A PSpice Optimizer
expression defines a design characteristic. The expression is
composed of optimizer parameter values, constants, and the
operators and functions shown in Table 1-2.
Example: To measure the sum of resistor values for two resistors
with parameterized values named R1val and R2val,
respectively, use the PSpice Optimizer expression R1val + R2val.
PSpice Optimizer expressions are evaluated
without usin
a simulation or Probe.
Derivative
A derivative defines mathematically how a
specification value changes with a small change in parameter
value.
For a given design, the PSpice Optimizer calculates derivatives
for each specification with respect to each parameter. Within an
applicable range, the optimizer uses the derivatives to estimate
new values for the goals and constraints.
See Derivatives on page 4-10 for
a detailed discussion.
Primer: How to Optimize a
g
Desi
n
Chapter Overview
This chapter guides you through the basic steps needed to setup
and run an optimization using a simple diode biasing design.
Optimizing a Diode Biasing Circuit—the Objective
describes the sample circuit and its ideal operating
characteristics.
on page 2-2
2
Why Use Optimization?
your design using the PSpice Optimizer saves time.
Phase One: Developing the Design
through the steps needed to create a working design.
Phase Two: Setting Up the Optimization
through the steps needed to define the parameters, goals, and
constraints that describe the optimization.
Phase Three: Running an Optimization
through the steps needed to optimize and finalize the design.
on page 2-3 explains why fine-tuning
on page 2-4 walks you
on page 2-6 walks you
on page 2-11 walks you
2-2 Primer: How to Optimize a Design
g
j
g
Optimizing a Diode
Biasin
Ob
Assume that you want to design a circuit that drives a current of
1 mA (±5 µA) through a diode (D1N914) using a 5 Vvoltage
source and a series resistor to control the current through the
diode. A circuit such as this is shown in Figure 2-1.
Fi
Your objective is to find a value for resistor R1 so that current
through diode D1 falls in the range 0.995 mA to 1.005 mA.
ective
ure 2-1
Circuit—the
Diode Biasing Design Example
Why Use Optimization?
g
g
g
g
g
g
g
Why Use Optimization? 2
-3
To solve the problem manually, you could assign an arbitrary
value to R1, manually calculate the current, then make an
educated guess to adjust the values until a satisfactory solution
is found. Or, you might use a simulation to sweep the value for
R1 with a DC Sweep analysis, carefully analyzing the results to
find the best solution.
These manual methods have two major disadvantages:
•Because the diode is a non-linear device, manual
calculations can be time-consuming.
•Sweeping a parameterized value can take a large number of
simulations, depending on the range and increment selected.
The PSpice Optimizer automates these processes by handling
calculations for you and intelligently directing the series of
simulations. Given results of the previous simulations, the
optimizer automatically adjusts the parameterized value of R1
for the next run, thus eliminating unnecessary iterations, which
in turn, provides a solution more quickly and with less effort.
Once the PSpice Optimizer settles on the best solution, you can
still explore available tradeoffs. When done manually, this
iterative process can be difficult and frustrating. With the
optimizer, you can tweak the parameter(s) and immediately
determine whether the design still meets specifications. You can
also change the value of the specification(s) and immediately
determine how parameter values change. If you are dissatisfied
with the result after any change, you can always return to the last
set of values.
When solving complex
problems, the manual approach
can be too unwieldy to consider.
For example:
• When your desi
multiple parameters or
complicated parameter
interactions, you may find it’s
nearly impossible to know
which parameters to chan
and how best to chan
them.
• When solvin
specifications, the solution
often depends on the order in
which
are optimized. This
sequential approach can
miss possible solutions since
it is impractical to repeat the
process startin
different
each time.
oals and constraints
oal or constraint
n has
e,
e
for multiple
with a
2-4 Primer: How to Optimize a Design
g
g
g
g
g
g
g
Phase One: Developing
Phase 1 is also the time to
investi
• The effects of individual
• Usin
ate:
components by replacin
component values with
parameters or parameterized
expressions.
PSpice to perform a
DC, AC, or parametric sweep
of each parameterized value.
the Desi
Before optimizing, you must have a working circuit. This means
first drawing the schematic, then iteratively simulating with
PSpice and adjusting the design until the circuit operates with
the intended behavior.
MicroSim
Schematics
MicroSim
PSpice A/D
n
Design
Schematic
Simulate
Note
resistor R1, its value is 1k.
Later, when you set up the
optimization, you will
parameterize R1’s value as
shown in Fi
When you initially place
ure 2-1.
Fi
Flow
ure 2-2
“Phase One: Developing the Design” Design
To draw the schematic for the diode biasing
desi
1
n
In Schematics, from the Draw menu, use Get New Part to
select and place the following symbols on the schematic: