PSpice® Advanced Analysis User’s Guide Advanced Analysis 1 Copyright © 1985-2001 Cadence Design Systems, Inc. All rights reserved. Trademarks Allegro, Ambit, BuildGates, Cadence, Cadence logo, Concept, Diva, Dracula, Gate Ensemble, NC Verilog, OpenBook online documentation library, Orcad, Orcad Capture, Orcad Layout, PSpice, SourceLink online customer support, SPECCTRA, Spectre, Vampire, Verifault-XL, Verilog, Verilog-XL, and Virtuoso are registered trademarks of Cadence Design Systems, Inc. Affirma, Assura, Cierto, Envisia, Mercury Plus, Quickturn, Radium, Silicon Ensemble, and SPECCTRAQuest are trademarks of Cadence Design Systems, Inc. Alanza is a service mark of Cadence Design Systems, Inc. All other brand and product names mentioned herein are used for identification purposes only and are registered trademarks, trademarks, or service marks of their respective holders. First edition April 2001 Cadence PCB Systems Division (PSD) offices PSD online customer support PSD customer support (877) 237-4911 PSD Sales (888) 671-9500 PSD Japan office 81-45-682-5770 PSD UK office 44-1344-865-444 PSD website http://www.pcb.cadence.com http://www.pcb.cadence.com/Technical/ PSD customer support email form http://www.pcb.cadence.com/Contact/Support/Support.asp PSD customer support connection http: // www.pcb.cadence.com / Technical / Connection / Connection.asp Advanced Analysis 2 Contents Before you begin Welcome 9 How to use this guide 10 Symbols and conventions 10 Related documentation 11 Websites 12 PSpice community website 12 Technical website 13 SourceLink online technical support 14 Chapter 1 Introduction In this chapter 15 Advanced Analysis overview 15 Project setup 16 Validating the initial project 17 Advanced Analysis files 18 Workflow 19 Numerical conventions 20 Chapter 2 Libraries In this chapter 23 Overview 23 Parameterized components 24 Location of Advanced Analysis libraries 27 Using Advanced Analysis libraries 27 Using the online Advanced Analysis library list 28 Using the library tool tip 30 Using Parameterized Part icon 30 Preparing your design for Advanced Analysis 31 Creating new Advanced Analysis-ready designs 31 Using the design variables table 34 Modifying existing designs for Advanced Analysis 35 Example 36 Advanced Analysis 3 Selecting a parameterized component 36 Setting a parameter value 37 Using the design variables table 38 For power users 39 Legacy PSpice optimizations 39 Chapter 3 Sensitivity In this chapter 41 Sensitivity overview 41 Sensitivity strategy 42 Plan ahead 43 Workflow 43 Sensitivity procedure 44 Setting up the circuit in the schematic editor 44 Setting up Sensitivity in Advanced Analysis 44 Running Sensitivity 45 Controlling Sensitivity 47 Sending parameters to Optimizer 49 Printing results 49 Saving results 49 Example 50 Setting up the circuit in the schematic editor 50 Setting up Sensitivity in Advanced Analysis 52 Running Sensitivity 54 Displaying run data 55 Controlling Sensitivity 58 Sending parameters to Optimizer 60 For power users 62 Sensitivity calculations 62 Advanced Analysis 4 Chapter 4 Optimizer In this chapter 65 Optimizer overview 65 Optimizer engines 66 Optimizer strategy 67 Plan ahead 67 Optimizer procedure 70 Setting up in the circuit in the schematic editor 70 Setting up Optimizer in Advanced Analysis 71 Running Optimizer 73 Assigning available values with the Discrete engine 75 Finding components in your schematic editor 76 Printing results 76 Saving results 77 Example 77 Overview 77 Setting up the circuit in the schematic editor 78 Setting up Optimizer in Advanced Analysis 80 Running Optimizer 87 Editing a measurement within Advanced Analysis 93 Saving results 94 Chapter 5 Smoke In this chapter 95 Smoke overview 95 Smoke strategy 96 Plan ahead 96 Workflow 97 Smoke procedure 97 Setting up the circuit in the schematic editor 97 Running Smoke 98 Printing results 99 Configuring Smoke 99 Example 101 Overview 101 Setting up the circuit in the schematic editor 101 Running Smoke 103 Printing results 105 Configuring Smoke 106 For power users 110 Smoke parameters 110 Advanced Analysis 5 Chapter 6 Monte Carlo In this chapter 115 Monte Carlo overview 115 Monte Carlo strategy 116 Plan Ahead 116 Workflow 117 Monte Carlo procedure 117 Setting up the circuit in the schematic editor 117 Setting up Monte Carlo in Advanced Analysis 119 Starting a Monte Carlo run 120 Reviewing Monte Carlo data 121 Controlling Monte Carlo 125 Printing results 127 Saving results 127 Example 128 Setting up the circuit in the schematic editor 128 Setting up Monte Carlo in Advanced Analysis 131 Running Monte Carlo 135 Reviewing Monte Carlo data 136 Controlling Monte Carlo 143 Printing results 146 Saving results 146 Chapter 7 Measurement Expressions In this chapter 147 Measurements overview 147 Measurement strategy 148 Procedure for creating measurement expressions 148 Setup 148 Composing a measurement expression 149 Viewing the results of measurement evaluations 150 Example 151 Viewing the results of measurement evaluations. 154 Measurement definitions included in PSpice 155 For power users 158 Creating custom measurement definitions 158 Definition example 160 Measurement definition syntax 162 Syntax example 170 Advanced Analysis 6 Chapter Contents Chapter 8 Optimization Engines In this chapter 173 LSQ engine 173 Principles of operation 173 Configuring the LSQ engine 180 Modified LSQ engine 184 Configuring the Modified LSQ engine 184 Random engine 189 Configuring the Random Engine 190 Discrete engine 192 Commercially available values 193 Glossary 195 Index 203 Advanced Analysis 7 Chapter Contents Advanced Analysis 8 Before you begin Welcome PSpice Advanced Analysis allows PSpice and PSpice A/D users to optimize performance and improve quality of designs before committing them to hardware. Advanced Analysis’ four important capabilities: sensitivity analysis, optimization, yield analysis (Monte Carlo), and stress analysis (Smoke) address design complexity as well as price, performance, and quality requirements of circuit design. Advanced Analysis is integrated with Cadence’s Concept HDL and Orcad Capture PCB design capture tools, and is available on Windows 98, Windows NT, and Windows 2000 platforms. Advanced Analysis 9 Before you begin How to use this guide This guide is designed to make the most of the advantages of onscreen books. The table of contents, index, and cross references provide instant links to the information you need. Just click on the text and jump. Each chapter about an Advanced Analysis tool is self-contained. The chapters are organized into these sections: • Overview: introduces you to the tool • Strategy: gives you tips on planning your project • Procedure: lists each step you need to successfully apply the tool • Example: lists the same steps with an illustrating example • For power users: provides background information If you find printed paper helpful, print only the section you need at the time. When you want an in-depth tutorial, print the example. When you want a quick reminder of a procedure, print the procedure. Symbols and conventions Our documentation uses a few special symbols and conventions. Notation Examples Description Bold text Import Measurements, Modified LSQ, PDF Graph Indicates that text is a menu or button command, dialog box option, column or graph label, or drop-down list option Icon graphic Lowercase file extensions Advanced Analysis , , .aap, .sim, .drt Shows the toolbar icon that should be clicked with your mouse button to accomplish a task Indicates a file name extension 10 Before you begin Related documentation In addition to this guide, you can find technical product information in the embedded auto-help, in related online documentation, and on our technical website. The table below describes the type of technical documentation provided with PSpice Advanced Analysis. See Websites on page 12 for additional online resources. This documentation component . . . Provides this . . . This guide— PSpice Advanced Analysis User’s Guide A comprehensive guide for understanding and using the features available in Advanced Analysis. Help system (automatic and manual) Provides comprehensive information for understanding the features in Advanced Analysis and using them to perform specific analyses. Advanced Analysis provides help in two ways: automatically (auto-help) and manually. Auto-help is embedded in its own window and automatically displays help topics that are associated with your current activity as you move about and work within the Advanced Analysis workspace and interface. It provides immediate access to information that is relative to your current task, but lacks the complete set of navigational tools for accessing other topics. The manual method lets you open the help system in a separate browser window and gives you full navigational access to all topics and resources outside of the help system. Using either method, help topics include: Online Advanced Analysis Library List Advanced Analysis − Explanations and instructions for common tasks − Descriptions of menu commands, dialog boxes, tools on the toolbar and tool palettes, and the status bar − Glossary terms − Reference information − Product support information An online, searchable library list for Advanced Analysis components 11 Before you begin This documentation component . . . Provides this . . . Online PSpice User’s Guide An online, searchable user’s guide Online PSpice Library List An online, searchable library list for PSpice model libraries Online PSpice Reference Guide An online, searchable reference manual for the PSpice simulation software products Online PSpice Quick Reference Concise descriptions of the commands, shortcuts, and tools available in PSpice Orcad Capture User’s Guide An online, searchable user’s guide Orcad Capture Quick Reference Card Concise descriptions of the commands, shortcuts, and tools available in Capture Websites Several websites are available for online research: • A community website that focuses on information for PSpice users. • A full technical website that offers comprehensive information and customer support for PSpice and related products. • The SourceLink website that offers in-depth customer support for Concept HDL, Allegro, and other Cadence products. PSpice community website http://www.pspice.com/ PSpice.com is a gathering place for all PSpice users. Activities include the exchanging of technical information, working with user and vendor PSpice models, and accessing a knowledge base of commonly asked questions answered by Cadence engineers. Advanced Analysis 12 Before you begin Technical website http://www.pcb.cadence.com/Technical/ Internet-based customer support is available to customers with current support options. The following table describes what the pcb.cadence.com technical website offers: This link on www.pcb.cadence.com/Technical/ . . . Provides this. . . Knowledge Base Problems and solutions database A searchable database containing thousands of articles on topics including schematic design entry, VHDL-based PLD design; analog, digital, and mixed-signal circuit simulation, and PCB layout methodologies. It also contains answers to frequently asked questions. Knowledge Exchange Online forum A real-time online forum that enables you to share information and ideas with other users and with our technical experts. You can submit issues or questions for open discussion, search the Knowledge Exchange for information, or send email to another participant for one-on-one communication. A list of new postings will appear each time you visit the Knowledge Exchange, providing you with a quick update of what's been discussed since your last visit. Support Connection Incident reporting A service that allows you to choose between viewing and updating existing incidents or creating new incidents. The incident information is delivered directly to us via our internal database. This service is only available to customers with current maintenance or Extended Support Options (ESOs) in the United States and Canada. Technical Library Online references Online customer support information that you can search through by category or product. You can find product manuals, product literature, technical notes, articles, samples, books, and other technical information for PSpice and Orcad Family tools. Advanced Analysis 13 Before you begin SourceLink online technical support http://sourcelink.cadence.com/ In addition to pcb.cadence.com and pspice.com, you can use the SourceLink website. It contains extensive information about new releases, installation, product documentation, known problems and solutions, helpful hints, educational resources, and much more. Advanced Analysis 14 Introduction 1 In this chapter • Advanced Analysis overview on page 15 • Project setup on page 16 • Advanced Analysis files on page 18 • Workflow on page 19 • Numerical conventions on page 20 Advanced Analysis overview PSpice Advanced Analysis is an add-on program for PSpice and PSpice A/D. Use these four Advanced Analysis tools to improve circuit performance, reliability, and yield: Advanced Analysis • Sensitivity identifies which components have parameters critical to the measurement goals of your circuit design. • The four Optimizer engines optimize the parameters of key circuit components to meet your performance goals. • Smoke warns of component stress due to power dissipation, increase in junction temperature, secondary breakdowns, or violations of voltage / current limits. 15 Chapter 1 Introduction • Monte Carlo estimates statistical circuit behavior and yield. Project setup Before you begin an Advanced Analysis project, you need: • Circuit components that are Advanced Analysis-ready Only those components that you want tested in Advanced Analysis have to be Advanced Analysis-ready. See Chapter 2, Libraries. Note: You can adapt passive RLC components for Advanced Analysis without choosing them from parameterized libraries. See Chapter 2, Libraries. • A circuit drawn in Capture or Concept HDL and successfully simulated in PSpice • PSpice measurements that check circuit behavior critical to your design Creating measurement expressions in PSpice Sensitivity, Optimizer, and Monte Carlo require measurement expressions as input. You should set these expressions up in PSpice to test the results. You can also create measurements while in Sensitivity, Optimizer, and Monte Carlo, but those measurements cannot be imported into PSpice for testing. Advanced Analysis 16 Chapter 1 Introduction Validating the initial project Before you use Advanced Analysis: 1 Make your circuit components Advanced-Analysis ready for the components you want to analyze. See Chapter 2, “Libraries," for more information. 2 Set up a PSpice simulation. The Advanced Analysis tools use the following PSpice simulations: This tool... Works on these PSpice simulations... Sensitivity Time Domain (transient) DC Sweep AC Sweep/Noise Optimizer Time Domain (transient) DC Sweep AC Sweep/Noise Smoke Time Domain (transient) Monte Carlo Time Domain (transient) DC Sweep AC Sweep/Noise 3 Run the circuit PSpice simulation and make sure the results and waveforms are what you expect. 4 Define measurements in PSpice to check the circuit behaviors that are critical for your design. Make sure the measurement results are what you expect. Note: For information on setting up circuits, see your schematic editor user guide, Project setup on page 16, and Chapter 2, "Libraries." For information on setting up simulations, see your PSpice user guide. Advanced Analysis 17 Chapter 1 Introduction For information on setting up measurements, see “Procedure for creating measurement expressions” on page 148. Advanced Analysis files The principal files used by Advanced Analysis are: • PSpice simulation profiles (.sim) • Advanced Analysis profiles (.aap) Advanced users may also use these files: • Device property files (.prp) • Custom derating files for Smoke (.drt) • Discrete value tables for Optimizer (.table) For syntax used to create and edit these files, see the technical notes posted on our web site at: www.pspice.com. Advanced Analysis 18 Chapter 1 Introduction Workflow There are many ways to use Advanced Analysis. This workflow shows one way to use all four features. Advanced Analysis 19 Chapter 1 Introduction Numerical conventions PSpice ignores units such as Hz, dB, Farads, Ohms, Henrys, volts, and amperes. PSpice adds the units automatically, depending on the context. Name Numerical User value types in: Or: Example Uses femto- 2f 10-15 F, f 1e-15 2F 2e-15 pico- 10-12 P, p 1e-12 40p 40P 40e-12 nano- 10-9 N, n 1e-9 70n 70N 70e-9 micro- 10-6 U, u 1e-6 .000001 20u 20U 20e-6 milli- 10-3 M, m 1e-3 .001 30m 30M 30e-3 .03 kilo- 103 1000 K, k 1e+3 2k 2K 2e3 2e+3 2000 Advanced Analysis 20 Chapter 1 Introduction Name Numerical User value types in: Or: mega- 106 1,000,000 MEG, meg 1e+6 Example Uses 20meg 20MEG 20e6 20e+6 20000000 giga- 109 G, g 1e+9 25g 25G 25e9 25e+9 tera- 1012 T, t 1e+12 30t 30T 30e12 30e+12 Advanced Analysis 21 Chapter 1 Introduction Advanced Analysis 22 Libraries 2 In this chapter • Overview on page 23 • Using Advanced Analysis libraries on page 27 • Preparing your design for Advanced Analysis on page 31 • Example on page 36 • For power users on page 39 Overview Advanced Analysis ships with over 30 Advanced Analysis libraries containing over 4,800 components. Cadence provides a separate library list for Advanced Analysis components. See Using the online Advanced Analysis library list on page 28 for details. The Advanced Analysis libraries contain parameterized and standard components. The majority of the components are parameterized. Standard components in the Advanced Analysis libraries are similar to PSpice library components and will not be discussed further in this document. Advanced Analysis 23 Chapter 2 Libraries Parameterized components A parameter is a physical characteristic of a component that controls behavior for the component model. In Capture, a parameter is called a property. A parameter value is either a number or a variable. When the parameter value is a variable, you have the option to vary its numerical solution within a mathematical expression and use it in optimization. When the parameter value is a variable, you have the option to vary its numerical solution within a mathematical expression and use it in optimization. In the Advanced Analysis libraries, components may contain one or more of the following parameters: • Tolerance parameters For example, for a resistor the positive tolerance could be POSTOL = 10%. • Distribution parameters For example, for a resistor the distribution function used in Monte Carlo analysis could be DIST = FLAT. • Optimizable parameters For example, for an opamp the gain bandwidth could be GBW = 10 MHz. • Smoke parameters For example, for a resistor the power maximum operating condition could be POWER = 0.25 W. To analyze a circuit component with an Advanced Analysis tool, make sure the component contains the following parameters: Advanced Analysis This Advanced Analysis tool... Uses these component parameters... Sensitivity Tolerance parameters Optimizer Optimizable parameters Smoke Smoke parameters 24 Chapter 2 Libraries This Advanced Analysis tool... Uses these component parameters... Monte Carlo Tolerance parameters, Distribution parameters (default parameter value is Flat / Uniform) Tolerance parameters Tolerance parameters define the positive and negative deviation from a component’s nominal value. In order to include a circuit component in a Sensitivity or Monte Carlo analysis, the component must have tolerances for the parameters specified. Use the Advanced Analysis library list to identify components with parameter tolerances. In Advanced Analysis, tolerance information includes: • Positive tolerance For example, POSTOL for RLC is the amount a value can vary in the plus direction. • Negative tolerance For example, NEGTOL for RLC is the amount a value can vary in the negative direction. Tolerance values can be entered as percents or absolute numbers. Distribution parameters Distribution parameters define types of distribution functions. Monte Carlo uses these distribution functions to randomly select tolerance values within a range. For example, in Capture’s property editor, a resistor could provide the following information: Advanced Analysis 25 Chapter 2 Libraries Property Value DISTRIB FLAT Optimizable parameters Optimizable parameters are any characteristics of a model that you can vary during simulations. In order to include a circuit component in an Optimizer analysis, the component must have optimizable parameters. Use the Advanced Analysis library list to identify components with optimizable parameters. For example, in Capture’s property editor, an opamp could provide the following gain bandwidth: Property Value GBW 1e7 Note that the parameter is available for optimization only if you add it as a property on the schematic instance and assign it a value. During Optimization, the GBW can be varied between any user-defined limits to achieve the desired specification. Smoke parameters Smoke parameters are maximum operating conditions for the component. To perform a Smoke analysis on a component, define the smoke parameters for that component. You can still use non-smoke-defined components in your design, but the smoke test ignores these components. Use the Advanced Analysis library list to identify components with smoke parameters. See also Chapter 5, “Smoke parameters.” Advanced Analysis 26 Chapter 2 Libraries For example, in Capture’s property editor, a resistor could provide the following smoke parameter information: Property Value POWER RMAX MAX_TEMP RTMAX Use the design variables table to set the values of RMAX and RTMAX to 0.25 Watts and 200 degrees Centigrade, respectively. See Using the design variables table on page 34. Location of Advanced Analysis libraries The program installs the Advanced Analysis libraries to the following locations: Capture symbol libraries <Target_directory> \ Capture \ Library \ PSpice \ AdvAnls \ PSpice Advanced Analysis model libraries <Target_directory> \ PSpice \ Library Using Advanced Analysis libraries In Capture, there are three ways to quickly identify if a component is from an Advanced Analysis library: Advanced Analysis • Looking in the online Advanced Analysis library list • Using the library tool tip in the Place Part dialog box • Using the Parameterized Part icon in the Place Part dialog box 27 Chapter 2 Libraries Using the online Advanced Analysis library list You can find the online Advanced Analysis library list from your Windows Start menu. 1 From the Start menu, select Programs, Cadence PSD_14.1, Online Documentation. The Cadence Documentation dialog box will appear. 2 Scroll to the PSpice directory and select the Advanced Analysis library list. The online Advanced Analysis library list contains the names of parameterized and standard libraries. Most of the libraries are parameterized. Each library contains the following items: • Component names and part numbers • Manufacturer names • Lists of component parameters for each component − Tolerance parameters − Optimizable parameters − Smoke parameters Some component libraries, primarily opamp libraries, contain components with all of the parameter types. Examples from the library list are shown below: Device Type Generic Name Part Name Part Library Mfg. Name Opamp AD101A AD101A OPA Bipolar Transistor 2N1613 2N1613 Analog Multiplier AD539 AD539 TOL OPT SMK Analog Devices Y Y Y BJN Motorola N Y Y DRI Analog Devices N N N The parameter columns are the three columns on the right in the list. The abbreviations in the parameter columns have the following meanings: Advanced Analysis 28 Chapter 2 Libraries This library list column heading... With the following notation... Means the component... TOL Y Has tolerance parameters in the model TOL N Does not have tolerance parameters in the model OPT Y Has optimizable parameters in the model OPT N Does not have optimizable parameters in the model SMK Y Has smoke parameters in the model SMK N Does not have smoke parameters in the model Advanced Analysis 29 Chapter 2 Libraries Using the library tool tip One easy way to identify if a component comes from an Advanced Analysis library is to use the tool tip in the Place Part dialog box. 1 From the Place menu, select Part. The Place Part dialog box appears. 2 Enter a component name in the Part text box. 3 Hover your mouse over the highlighted component name. A library path name appears in a tool tip. 4 Check for ADVANLS in the path name. If ADVANLS is in the path name, the component comes from an Advanced Analysis library. Using Parameterized Part icon Another easy way to identify if a component comes from an Advanced Analysis library is to use the Parameterized Part icon in the Place Part dialog box. 1 From the Place menu, select Part. The Place Part dialog box appears. 2 Enter a component name in the Part text box. Or: Scroll through the Part List text box 3 Look for in the lower right corner of the dialog box. This is the Parameterized Part icon. If this icon appears when the part name appears in the Part text box, the component comes from an Advanced Analysis library. Advanced Analysis 30 Chapter 2 Libraries Preparing your design for Advanced Analysis You may use a mixture of standard and parameterized components in your design, but Advanced Analysis is performed on only the parameterized components. You may create a new design or use an existing design for Advanced Analysis. There are several steps for making your design Advanced Analysis-ready. See Modifying existing designs for Advanced Analysis on page 35. Creating new Advanced Analysis-ready designs Select parameterized components from Advanced Analysis libraries. 1 Open the online Advanced Analysis library list found in Cadence Online Documentation. 2 Find a component marked with a Y in the TOL, OPT, or SMK columns of the Advanced Analysis library list. Components marked in this manner are parameterized components. 3 For that component, write down the Part Library and Part Name from the Advanced Analysis library list. 4 Add the library to your design in your schematic editor. 5 Place the parameterized component on your schematic. For example, select the resistor component from the pspice_elem Advanced Analysis library. Setting a parameter value For each parameterized component in your design, set the parameter value individually on the component using your schematic editor. Advanced Analysis 31 Chapter 2 Libraries A convenient way to add parameter values on a global basis is to use the design variable table. See Using the design variables table on page 34. Note: If you set a value for POSTOL and leave the value for NEGTOL blank, Advanced Analysis will automatically set the value of NEGTOL equal to the value of POSTOL and perform the analysis. Note: As a minimum, you must set a value for POSTOL. If you set a value for NEGTOL and leave the POSTOL value blank, Advanced Analysis will not include the parameter in Sensitivity or Monte Carlo analyses. Adding additional parameters If the component does not have Advanced Analysis parameters visible on the symbol, add the appropriate Advanced Analysis parameters using your schematic editor. For example: For RLC components, the parameters required for Advanced Analysis Sensitivity and Monte Carlo are listed below. The values shown are those that can be set using the design variables table. See Using the design variables table on page 34. Advanced Analysis Part Tolerance Property Name Value Resistor POSTOL RTOL% Resistor NEGTOL RTOL% Inductor POSTOL LTOL% Inductor NEGTOL LTOL% Capacitor POSTOL CTOL% Capacitor NEGTOL CTOL% 32 Chapter 2 Libraries For RLC components, the parameter required for Advanced Analysis Optimizer is the value for the component. Examples are listed below: Part Optimizable Property Name Value Resistor VALUE 10K Inductor VALUE 33m Capacitor VALUE 0.1u For example: For RLC components, the parameters required for Advanced Analysis Smoke are listed below. The values shown are those that can be set using the design variables table. See Using the design variables table on page 34. Part Smoke Property Name Value Resistor MAX_TEMP RTMAX Resistor POWER RMAX Resistor SLOPE RSMAX Resistor VOLTAGE RVMAX Inductor CURRENT DIMAX Inductor DIELECTRIC DSMAX Capacitor CURRENT CIMAX Capacitor KNEE CBMAX Capacitor MAX_TEMP CTMAX Capacitor SLOPE CSMAX Capacitor VOLTAGE CMAX If you use RLC components from the “analog” library, you will need to add parameters and set values; however, instead of setting values for the POSTOL and NEGTOL parameters, you set the values for the TOLERANCE parameter. The positive Advanced Analysis 33 Chapter 2 Libraries and negative tolerance values will use the value assigned to the TOLERANCE parameter. Using the design variables table The design variables table is a component available in the installed libraries that allows you to set global values for parameters. For example, using the design variables table, you can easily set a 5% positive tolerance on all your circuit resistors. The default information available in the design variables table includes variable names for tolerance and smoke parameters. For example, RTOL is a variable name in the design variables tables, which can be used to set POSTOL (and NEGTOL) tolerance values on all your circuit resistors. 1 From Capture’s Place menu, select Part. 2 Add the PSpice SPECIAL library to your design libraries. 3 Select the Variables component from the PSpice SPECIAL library. 4 Click OK. A design variable table of parameter variable names will appear on the schematic. 5 Double click on a number in the design variable table. The Display Properties dialog box will appear. 6 Edit the value in the Value text box. 7 Click OK. The new numerical value will appear on the design variables table on the schematic and be used as a global value for all applicable components. Parameter values set on a component instance will override values set in the design variables table. Advanced Analysis 34 Chapter 2 Libraries Modifying existing designs for Advanced Analysis Existing designs that you construct with standard components will work in Advanced Analysis; however, you can only perform Advanced Analysis on the parameterized components. To make sure specific components are Advanced Analysis-ready (parameterized), do the following steps: • Set tolerances for the RLC components Note: For standard RLC components, the TOLERANCE property can be used to set tolerance values required for Sensitivity and Monte Carlo. Standard RLC components can also be used in the Optimizer. Advanced Analysis • Replace active components with parameterized components from the Advanced Analysis libraries • Add smoke parameters and values to RLC components 35 Chapter 2 Libraries Example This example is a simple addition of a parameterized component to a new design. We’ll add a parameterized resistor to a schematic and show how to set values for the resistor parameters using the property editor and the design variables table. Selecting a parameterized component We know the pspice_elem library on the Advanced Analysis library list contains a resistor component with tolerance, optimizable, and smoke parameters. We’ll use that component in our example. 1 In Capture, from the Place menu, select Part. The Place Part dialog box appears. Add the pspice_elem library Select resistor from the pspice_elem library Note ADVANLS in library path name Icon tells you the part is parameterized 2 Use the Add Library browse button to add the pspice_elem library to the Libraries textbox. 3 Select Resistor and click OK. The resistor appears on the schematic. Advanced Analysis 36 Chapter 2 Libraries Setting a parameter value 1 Double click on the Resistor symbol. The Property Editor appears. Note the Advanced Analysis parameters already listed for this component. Distribution parameter Smoke parameter Tolerance parameters Smoke parameters Optimizable parameter Smoke parameter 2 Verify that all the parameters required for Sensitivity, Optimizer, Smoke, and Monte Carlo are visible on the symbol. Refer to the tables in Setting a parameter value on page 37. Advanced Analysis 3 Set the resistor VALUE parameter to 10k. 4 Set the resistor POSTOL parameter to RTOL%. 37 Chapter 2 Libraries Using the design variables table Set the resistor parameter values using the design variables table. We’ll do one parameter for this resistor. 1 Select the Variables part from the PSpice SPECIAL library. Note tool tip with the library path name The design variables table appears on the schematic. Double click on variable name to edit value 2 Advanced Analysis Double click on the RTOL number 0 in the design variables table. 38 Chapter 2 Libraries The Display Properties dialog box appears. Edit value from 0 to 10 Click OK 3 Edit the value in the Value text box. 4 Click OK. The new numerical value will appear on the design variable table on the schematic. Advanced Analysis will now use the resistor with a positive tolerance parameter set to 10%. If we added more resistors to this design, we could then set the POSTOL resistor parameter values to RTOL% and each resistor would immediately apply the 10% value from the design variables table. Note: Values set on the component instance override values set with the design variables table. For power users Legacy PSpice optimizations For tips on importing legacy PSpice Optimizations into Advanced Analysis Optimizer, see our technical note on importing legacy PSpice optimizations. Technical notes are posted on our web site at: www.pspice.com. Advanced Analysis 39 Chapter 2 Libraries Advanced Analysis 40 Sensitivity 3 In this chapter • Sensitivity overview on page 41 • Sensitivity strategy on page 42 • Sensitivity procedure on page 44 • Example on page 50 • For power users on page 62 Sensitivity overview Sensitivity identifies which components have parameters critical to the measurement goals of your circuit design. The Sensitivity Analysis tool examines how much each component affects circuit behavior by itself and in comparison to the other components. It also varies all tolerances to create worst-case (minimum and maximum) measurement values. You can use Sensitivity to identify the sensitive components, then export the components to Optimizer to fine-tune the circuit behavior. You can also use Sensitivity to identify which components affect yield the most, then tighten tolerances of sensitive Advanced Analysis 41 Chapter 3 Sensitivity components and loosen tolerances of non-sensitive components. With this information you can evaluate yield versus cost trade-offs. Absolute and relative sensitivity Sensitivity displays the absolute sensitivity or the relative sensitivity of a component. Absolute sensitivity is the ratio of change in a measurement value to a one unit positive change in the parameter value. For example: There may be a 0.1V change in voltage for a 1 Ohm change in resistance. Relative sensitivity is the percentage of change in a measurement based on a one percent positive change of a component parameter value. For example: For each 1 percent change in resistance, there may be 2 percent change in voltage. Since capacitor and conductor values are much smaller than one unit of measurement (Farads or Henries), relative sensitivity is the more useful calculation. For more on how this tool calculates sensitivity, see Sensitivity calculations on page 62. Sensitivity strategy If Sensitivity analysis shows that the circuit is highly sensitive to a single parameter, adjust component tolerances on the schematic and rerun the analysis before continuing on to Optimizer. Optimizer works best when all measurements are initially close to their specification values and require only fine adjustments. Advanced Analysis 42 Chapter 3 Sensitivity Plan ahead Sensitivity requires: • Circuit components that are Advanced Analysis-ready See Chapter 2, “Libraries,” for more information. • A circuit schematic and working PSpice simulation • Measurements set up in PSpice See “Procedure for creating measurement expressions” on page 148 Any circuit components you want to include in the Sensitivity data need to be Advanced Analysis-ready, with their tolerances specified. See Chapter 2, “Libraries,” for more information. Workflow Advanced Analysis 43 Chapter 3 Sensitivity Sensitivity procedure Setting up the circuit in the schematic editor Start with a working circuit in Concept HDL or Capture. Circuit components you want to include in the Sensitivity data need to have the tolerances of their parameters specified. Circuit simulations and measurements should already be set up. The simulations can be Time Domain (transient), DC Sweep, and AC Sweep/Noise analyses. 1 Open your circuit from your schematic editor. 2 Run a PSpice simulation. 3 Check your key waveforms in PSpice and make sure they are what you expect. 4 Check your measurements and make sure they have the results you expect. Note: For information on circuit layout and simulation setup, see your schematic editor and PSpice user guides. For information on components and the tolerances of their parameters, see “Preparing your design for Advanced Analysis” on page 31. For information on setting up measurements, see “Procedure for creating measurement expressions” on page 148. For information on testing measurements, see “Viewing the results of measurement evaluations” on page 150. Setting up Sensitivity in Advanced Analysis 1 From the PSpice menu in your schematic editor, select Advanced Analysis / Sensitivity. The Advanced Analysis Sensitivity tool opens. Advanced Analysis 44 Chapter 3 Sensitivity 2 In the Specifications table, click on the row containing the text “Click here to import a measurement created within PSpice.” The Import Measurement(s) dialog box appears. 3 Select the measurements you want to include. − Click Running Sensitivity on the top toolbar. The Sensitivity analysis begins. The messages in the output window tell you the status of the analysis. For more information, see Sensitivity calculations on page 62. Displaying run data Sensitivity displays results in two tables for each selected measurement: • • Parameters table − Parameter values at minimum and maximum measurement values − Absolute / Relative sensitivities per parameter − Linear / Log bar graphs per parameter Specifications table − Worst-case min and max measurement values Sorting data − Double click on column headers to sort data in ascending or descending order. Reviewing measurement data − Advanced Analysis Select a measurement on the Specifications table. 45 Chapter 3 Sensitivity A black arrow appears in the left column on the Specifications table, the row is highlighted, and the Min and Max columns display the worst-case minimum and maximum measurement values. The Parameters table will display the values for parameters and measurements using the selected measurement only. Interpreting @min and @max Values displayed in the @min and @max columns are the parameter values at the measurement’s worst-case minimum and maximum values. Changing from Absolute to Relative sensitivity See also: Sensitivity calculations on page 62. 1 Right click anywhere in the Parameters table. 2 Select Display / Absolute Sensitivity or Relative Sensitivity from the pop-up menu. Changing bar graph style from linear to log 1 Right click anywhere in the Parameters table. 2 Select Bar Graph Style / Linear or Log from the pop-up menu. Interpreting <MIN> results Sensitivity displays <MIN> on the bar graph when sensitivity values are very small but nonzero. Interpreting zero results Sensitivity displays zero in the absolute / relative sensitivity and bar graph columns if the selected measurement is not sensitive to the component parameter value. Advanced Analysis 46 Chapter 3 Sensitivity Controlling Sensitivity Data cells with cross-hatched backgrounds are read-only and cannot be edited.The graphs are also read-only. Pausing, stopping, and starting Pausing and resuming 1 Click on the top toolbar. The analysis stops, available data is displayed, and the last completed run number appears in the output window. 2 Click the depressed or to resume calculations. Stopping − Click on the top toolbar. If a Sensitivity analysis has been stopped, you cannot resume the analysis. Sensitivity does not save data from a stopped analysis. Starting − Advanced Analysis Click to start or restart. 47 Chapter 3 Sensitivity Controlling measurement specifications − To exclude a measurement specification from Sensitivity analysis: click on the applicable measurement row in the Specifications table. This removes the check and excludes the measurement from the next Sensitivity analysis. − To add a new measurement: click on the row containing the text “Click here to import a measurement created within PSpice.” The Import Measurement(s) dialog box appears. Or: Right click on the Specifications table and select Create New Measurement. The New Measurement dialog box appears. See “Procedure for creating measurement expressions” on page 148. Adjusting component values Use Find in Design from Advanced Analysis to quickly return to the schematic editor and change component information. For example: You may want to tighten tolerances on component parameters that are highly sensitive or loosen tolerances on component parameters that are less sensitive. Advanced Analysis 1 Right click on the component’s critical parameter in the Sensitivity Parameters table and select Find in Design from the pop-up menu. 2 Change the parameter value in the schematic editor. 3 Rerun the PSpice simulation and check results. 4 Rerun Sensitivity. 48 Chapter 3 Sensitivity Sending parameters to Optimizer 1 Select the critical parameters in Sensitivity. 2 Right click and select Send to Optimizer from the pop-up menu. 3 Select Optimizer from the drop-down list on the top toolbar. This switches the active window to the Optimizer view where you can double check that your critical parameters are listed in the Optimizer Parameters table. 4 Click the Sensitivity tab at the bottom of the Optimizer Specifications table. This switches the active window back to the Sensitivity tool. Printing results − Click . Or: From the File menu, select Print. Saving results − Click . Or: From the File menu, select Save. The final results will be saved in the Advanced Analysis profile (.aap). Advanced Analysis 49 Chapter 3 Sensitivity Example The Advanced Analysis examples folder contains several demonstration circuits. This example uses the RFAmp circuit. The circuit contains components with the tolerances of their parameters specified, so you can use the components without any modification. Two PSpice simulation profiles have already been created and tested. Circuit measurements, entered in PSpice, have been set up and tested. Note: See Chapter 2, “Libraries,” for information about setting tolerances for other circuit examples. Setting up the circuit in the schematic editor 1 In your schematic editor, browse to the RFAmp tutorials directory. <target_directory> \ PSpice \ Tutorials Advanced Analysis 50 Chapter 3 Sensitivity 2 Open the RFAmp project. 3 Select the SCHEMATIC1-AC simulation profile. 4 Click Assign global tolerances using this table Advanced Analysis to run a PSpice simulation. 51 Chapter 3 Sensitivity 5 Review the results. The waveforms in PSpice are what we expected. In PSpice, View Measurement Results The measurements in PSpice give the results we expected. Setting up Sensitivity in Advanced Analysis 1 From the PSpice menu in your schematic editor, select Advanced Analysis / Sensitivity. The Advanced Analysis window opens, and the Sensitivity tool is activated. Sensitivity automatically lists Advanced Analysis 52 Chapter 3 Sensitivity component parameters for which tolerances are specified and the component parameter original (nominal) values. Sensitivity Parameters table prior to the first run Sensitivity Specifications table before a project is set up and run In the Specifications table, click the row titled, “Click here to import a measurement created within PSpice.” A pop-up menu appears. 2 Advanced Analysis Select Import Measurements. 53 Chapter 3 Sensitivity The Import Measurement(s) dialog box appears with measurements configured earlier in PSpice. 3 Select the four ac.sim measurements. 4 Click OK. The Specifications table lists the measurements. Running Sensitivity − Click on the top toolbar. Select Sensitivity Click to start Advanced Analysis 54 Chapter 3 Sensitivity Displaying run data Results are displayed in the Parameters and Specifications tables according to the selected measurement. Parameter values that correspond to measurement min and max values Right click to change to Absolute Sensitivity Double click column headings to change the sort order Right click to change bar from Linear to Log Click to exclude from analysis Click to select the measurement data set for review Advanced Analysis Hover your mouse over a red flag to read the error messages Min means that the sensitivity is very small, but not zero A zero (0) displays if there is no sensitivity at all The measurement’s worst-case minimum and maximum values 55 Chapter 3 Sensitivity Sorting data − Double click on the Linear column header to sort the bar graph data in ascending order. Double click again to sort the data in descending order. Selecting the measurement to view − Select a measurement in the Specifications table. The data in the Parameters table relates to the measurement you selected. Table... Column heading... Means... Parameters Original The nominal component parameter values used to calculate nominal measurement. @Min The parameter value used to calculate the worst-case minimum measurement. @Max The parameter value used to calculate the worst-case maximum measurement. absolute sensitivity The change in the measurement value divided by a unit of change in the parameter value. relative sensitivity The percent of change in a measurement value based on a one percent change in the parameter value. Original The nominal value of the measurement using original component parameter values. Min The worst-case minimum value for the measurement. Max The worst-case maximum value for the measurement. Specifications To see all the parameter and measurement values used in Sensitivity calculations: from the View menu, select Log File. Changing from Absolute to Relative sensitivity See also: Sensitivity calculations on page 62. Advanced Analysis 1 Right click anywhere on the Parameters table. 56 Chapter 3 Sensitivity A pop-up menu appears 2 Select Relative Sensitivity. Changing the bar graph to linear view 1 Right click anywhere on the Parameters table. A pop-up menu appears. 2 Advanced Analysis Select Linear. 57 Chapter 3 Sensitivity Controlling Sensitivity Pausing, stopping, and starting Click to start Click to stop Click to pause Pausing and resuming 1 Click on the top toolbar. The analysis stops, available data is displayed, and the last completed run number appears in the output window. 2 Click the depressed or to resume calculations. Stopping − Click on the top toolbar. If a Sensitivity analysis has been stopped, you cannot resume the analysis. Starting − Advanced Analysis Click to start or resume. 58 Chapter 3 Sensitivity Controlling Measurements Click to remove this check mark and exclude this measurement from analysis Click here to edit the measurement expression Adjusting component values In the RF example, we will not change any component parameters. With another example you may decide after reviewing sensitivity results that you want to change component values or tighten tolerances. You can use Find in Design from Advanced Analysis to return to your schematic editor and locate the components you would like to change. 1 In the Parameters table, highlight the components you want to change. 2 Right click the selected components. A pop-up menu appears. Advanced Analysis 59 Chapter 3 Sensitivity 3 Left click on Find in Design. The schematic editor appears with the components highlighted. 4 Change the parameter value in the schematic editor. 5 Rerun the PSpice simulation and check results. 6 Rerun Sensitivity. Sending parameters to Optimizer Review the results of the Sensitivity calculations. We need to use engineering judgment to select the sensitive components to optimize: • We won’t change R5 or R9 because they control the input and output impedances. • We won’t change R2 or R3 because they control transistor biasing. The linear bar graph at the Relative Sensitivity setting shows that R4, R6, and R8 are also critical parameters. We will import these parameters and values to Optimizer. Advanced Analysis 1 In the Parameters table, highlight R4, R6, and R8. 2 Right click the selected components. 60 Chapter 3 Sensitivity A pop-up menu appears. 3 Select Send to Optimizer. 4 From the View menu, select Optimizer. Select Optimizer view to switch to the Optimizer window and see the parameters you sent over from Sensitivity Optimizer becomes the active window and your critical parameters are listed in the Optimizer Parameters table. Advanced Analysis 61 Chapter 3 Sensitivity For power users Sensitivity calculations Absolute sensitivity Absolute sensitivity is the ratio of change in a measurement value to a one unit positive change in the parameter value. For example: There may be a 0.1V change in voltage for a 1 Ohm change in resistance. The parameter value is varied within the set tolerance. Relative sensitivity Relative sensitivity is the percentage of change in a measurement based on a one percent positive change of a component’s parameter value. For example: For each 1 percent change in resistance, there may be 2 percent change in voltage. Relative sensitivity calculations determine the measurement change between simulations with the component parameter first set at its original value and then changed by 40 percent of its positive tolerance. Linearity is assumed. This approach reduces numerical calculation errors related to small differences. For example, assume that an analysis is run on a 100-ohm resistor which has a tolerance of 10 percent. The maximum value for the resistor would be 110 ohms. The analysis is run with the value of the resistor set to 104 ohms (40 percent of the 10 ohm tolerance) and a measurement value is obtained. Using that value as a base, Sensitivity assumes that the resistance change from 100 to 104 ohms is linear and calculates (interpolates) the measured value at 1 percent tolerance (101 ohms). Advanced Analysis 62 Chapter 3 Sensitivity Worst-case minimums and maximums For each measurement, Sensitivity sets all parameters to their tolerance limits in the direction that will increase the measurement value, runs a simulation, and records the measurement value. Sensitivity then sets the parameters to the opposite tolerance limits and gets the resulting value. If worst-case measurement values are within acceptable limits for the design, the measurements can in most cases be ignored for the purpose of optimization. Sensitivity assumes that the measured quantity varies monotonically throughout the range of tolerances. If not (if there is an inflection point in the curve of output function values), the tool does not detect it. Symptoms of this include a maximum worst-case value that is less than the original value, or a minimum value greater than the original value. Sensitivity analysis runs Sensitivity performs the following runs: • A nominal run with all parameters set at original values • The next run with one parameter varied within tolerance Values are obtained for each measurement. View the Log File for parameter values used in each measurement calculation. Advanced Analysis • Subsequent runs with one parameter varied within tolerance • A minimum worst-case run for each measurement • A maximum worst-case run for each measurement 63 Chapter 3 Sensitivity For our example circuit with 4 measurements and 12 parameters with tolerances, Sensitivity performs 21 runs. There is one worst-case minimum and one worst-case maximum run per measurement 1 + 12 + (2 x 4) = 21 runs The nominal run using the original parameter values There are four measurements used in this example There is one run for each parameter varied within tolerance. We use 12 parameters To see the details of parameter and measurement calculations: from the View menu select Log File. Advanced Analysis 64 Optimizer 4 In this chapter • Optimizer overview on page 65 • Optimizer strategy on page 67 • Optimizer procedure on page 70 • Example on page 77 Optimizer overview Optimizer is a design tool for analyzing analog circuits and systems. It helps you modify and optimize analog designs to meet your performance goals. Optimizer fine tunes your designs faster than trial and error bench testing can. Use Optimizer to find the best component or system values for your specifications. Use Optimizer for: Advanced Analysis • Improving design performance • Updating designs to meet specifications • Optimizing behavioral models for top-down design and model generation 65 Chapter 4 Optimizer You can also import legacy PSpice Optimizer projects. For details on this topic, see the technical note posted on our web site at: www.pspice.com Optimizer engines Optimizer includes four engines: • Least Squares Quadratic (LSQ) Optimization engine The LSQ engine uses a gradient-based algorithm that optimizes a circuit by iteratively calculating sensitivities and adjusting parameter values to meet the specified goals. • Modified LSQ engine The Modified LSQ engine uses both constrained and unconstrained minimization algorithms, which allow it to optimize goals subject to nonlinear constraints. The Modified LSQ engine generally runs faster than the LSQ engine because it runs a reduced number of incremental adjustments toward the goal. When using the Modified LSQ engine, you can set your measurement specifications as goals or constraints.The engine strives to get as close to the goals as possible while ensuring that the constraints are met. • Random engine The Random engine randomly picks values within the specified range and displays misfit error and parameter history. • Discrete engine The Discrete engine is used at the end of the optimization cycle to round off component values to the closest values available commercially. See also: Chapter 7, Optimization Engines Advanced Analysis 66 Chapter 4 Optimizer Optimizer strategy Advanced Analysis requires: • A circuit schematic and working PSpice simulation • Measurements set up in PSpice • Performance goals for evaluating measurements • Performance goals Use multiple engines Use these Optimizer engines for these reasons: • Modified LSQ engine: to rapidly converge on an optimum solution. • Random engine: to pick a starting point that avoids getting stuck in local minima when there is a problem converging. See “Local and global minimums” on page 174 • LSQ engine: to converge on an optimum solution if the Modified LSQ engine did not get close enough. • Discrete engine: to pick commercially available component values and run the simulation one more time with the selected commercial values. Plan ahead Select your optimization parameters and goals carefully for quicker optimizations and the best results. General guidelines: Component selection Advanced Analysis • Vary your specification’s most sensitive components. Run a sensitivity analysis to find them. • Use good engineering judgment. Don’t vary components whose values need to stay the same for successful circuit operation. 67 Chapter 4 Optimizer For example: if the input and output resistors need to be 50 ohms for impedance matching, do not choose those components to optimize. • Vary just one component if varying other components can cause the same effect. For example: in an RC filter combination, both the resistor and capacitor affect the bandwidth. Selecting one parameter simplifies the problem. If your goal cannot be met with one parameter, you can add the second parameter. Parameter limits setup • Make sure that ranges you specify take into account power dissipation and component cost. For example: a resistor with a small value (low ohms) could require a larger, more expensive power rating. Measurement specifications setup • Start with a small set of parameters (three or four) and add to the list during your optimization process, especially when running the LSQ engine. • Aim for parameters with initial values near the range midpoints. Optimizer has more trouble finding solutions if parameter values are close to the endpoint of the ranges. • Keep optimization parameter ranges within 1 or 2 orders of magnitude. • Determine your requirements first, then how to measure them. • Don’t set conflicting goals. For example: Vout > 5 and Vout < 2 when the input is 3V. • Make sure enough data points are generated around the points of measurements. Good resolution is required for consistent and accurate measurements. • Simulate only what’s needed to measure your goal. For example: for a high frequency filter, start your frequency sweep at 100 kHz instead of 1 Hz. Advanced Analysis 68 Chapter 4 Optimizer Workflow Advanced Analysis 69 Chapter 4 Optimizer Optimizer procedure Setting up in the circuit in the schematic editor Start with a circuit in Concept HDL or Capture. The circuit simulations and measurements should be already defined. The simulation can be a Time Domain (transient), a DC Sweep, or an AC Sweep/Noise analysis. 1 From your schematic editor, open your circuit. 2 Run a PSpice simulation. 3 Check your key waveforms in PSpice and make sure they are what you expect. 4 Test your measurements in PSpice and make sure they have the results you expect. Note: For information on circuit layout, and simulation setup, see your schematic editor or PSpice user guides. For information on setting up measurements, see Chapter 6, “Measurement Expressions." Advanced Analysis 70 Chapter 4 Optimizer Setting up Optimizer in Advanced Analysis Opening Optimizer in Advanced Analysis − From the PSpice menu in your schematic editor, select Advanced Analysis / Optimizer. The Advanced Analysis Optimizer tool opens. Selecting an engine − From the top toolbar engine drop-down list, select one of the four optimizing engines. Note: The Discrete engine is used at the end of the optimization cycle to round off component values to commercially available values. Setting up component parameters 1 In the Parameters table in Advanced Analysis, click on the row containing the text “Click here to import.” The Parameters Selection dialog box appears. 2 Highlight the components you want to vary and click OK. The components are now listed in the Parameters table. 3 Using engineering judgment, set the Parameters table Min and Max values for the Optimization. This sets the range the engine will vary the component’s parameters. Setting up measurement specifications 1 In the Specifications table, click on the row containing the text “Click here to import...” The Import Measurements dialog box appears with measurements configured earlier in PSpice. 2 Advanced Analysis Highlight the measurements you want to vary and click OK. 71 Chapter 4 Optimizer The components are now listed in the Specifications table. 3 Specify the acceptable minimum and maximum measurement values in the Specifications table Min and Max columns. 4 If you are using the Modified LSQ engine, mark the measurement as a goal or constraint by clicking in the Type column. The engine strives to get as close as possible to the goals while ensuring that the constraints are met. 5 Weigh the importance of the specification using the Weight column. Change the number in the weight column if you want to emphasize the importance of one specification with respect to another. Use a positive integer greater than or equal to one. Note: Trial and error experimenting is usually the best way to select an appropriate weight. Pick one weight and check the Optimizer results on the Error Graph. If the results do not emphasize the weighted trace more than the rest of the traces on the graph, pick a higher weight and rerun the Optimization. Repeat until you get the desired results. Advanced Analysis 72 Chapter 4 Optimizer Running Optimizer Starting a run − Click on the top toolbar. The optimization analysis begins. The messages in the output window tell you the status of the analysis. A nominal run is made with the original component parameter values. As the optimization proceeds, the Error Graph shows a plot with an error trace for each measurement. Data in the Parameters and Specifications tables is updated. Displaying run data − Place your cursor anywhere in the Error Graph to navigate the historical run data. The Parameters and Specifications tables display the corresponding data calculated during that run. Clearing the Error Graph history − Right click on the Error Graph and select Clear History from the pop-up menu. This removes all historical data and restores the current parameter values to original parameter values. Controlling optimization You can stop an analysis to explore optimization trends in the Error Graph, reset goals when results are not what you expected, or change engines. Pausing, stopping and starting Advanced Analysis − To start or continue, click − To pause, click on the top toolbar. on the top toolbar. 73 Chapter 4 Optimizer The analysis pauses at an interruptible point and displays the current data. − To stop, click on the top toolbar. Note: Starting after pause or stop resumes the analysis from where you left off. Controlling component parameters The range that Optimizer varies a component’s parameter is controlled by the Max and Min values. Default component values are supplied. For resistors, capacitors, and inductors the default range is one decade in either direction. For more efficient optimization, tighten up the range between the Min and Max values. Note: If you can’t edit a value, and this is not the first run, you may be viewing historical data. To return to current data: In the Error Graph, click to the right of the horizontal arrow. − To change the minimum or maximum value a parameter is varied: click in the Min or Max column in the Parameters table and type in the change. − To use the original parameter value (with no change) during the next optimizing run: click in the Parameters table to toggle the checkmark off. − To lock in the current value (with no change) of a parameter for the next optimizing run: click on the lock icon in the Parameters table to toggle the lock closed . Controlling measurement specifications Cells with cross-hatched backgrounds are read-only and cannot be edited. − Advanced Analysis To exclude a measurement from the next optimization run, click the in the Specifications table, which removes the checkmark. 74 Chapter 4 Optimizer − To hide a measurement’s trace on the Error Graph, click the graph symbol icon ( ) in the Specifications table, which toggles the symbol off. − To add a new measurement, click on the row that reads “Click here to import a measurement...” − To edit a measurement, click on the measurement you want to edit, then click on . Note: For instructions on setting up new measurements, see: “Procedure for creating measurement expressions” on page 148. The example for this topic comes with measurements already set up in PSpice. Assigning available values with the Discrete engine The Discrete engine is used at the end of the optimization cycle to round off components to commercially available values. 1 From the top toolbar engine field, select Discrete from the drop-down list. A new column named Discrete Table appears in the Parameters table. 2 For each row in the Parameters table that contains an RLC component, click in the Discrete Table column cell. An arrow appears, indicating a drop-down list of discrete values tables. 3 Select from the list of discrete values tables. A discrete values table is a list of components with commercially available numerical values. These tables are available from manufacturers, and several tables are provided with Advanced Analysis. 4 Click . The Discrete engine runs. Advanced Analysis 75 Chapter 4 Optimizer The Discrete engine first finds the nearest commercially available component value in the selected discrete values table. Next, the engine reruns the simulation with the new parameter values and displays the measurement results. At completion, the Current column in the Parameters table is filled with the new values. Shortcut: You can use Find in Design to locate components in your schematic editor. See below. 5 Return to your schematic editor and put in the new values. 6 While you are still in your schematic editor, rerun the simulation. Check your waveforms and measurements in PSpice and make sure they are what you expect. Finding components in your schematic editor You can use the Find in Design feature to return to your schematic editor and locate the components you would like to change. 1 In the Parameters table, highlight the components you want to change. 2 With the components selected, right click the mouse button. A pop-up menu appears. 3 Select Find in Design. The schematic editor appears with the components highlighted. Printing results − Click . Or: From the File menu, select Print. Advanced Analysis 76 Chapter 4 Optimizer Saving results − Click . Or: From the File menu, select Save. The final results will be saved in the Advanced Analysis profile (.aap). Example Overview This example uses the tutorial version of RFAmp located at: <target_directory> \ PSpice \ Tutorials \ The circuit is an RF amplifier with 50-ohm source and load impedances. It includes the circuit schematic, PSpice simulation profiles, and measurements. Note: For a completed example see: <target_directory> \ PSpice \ Capture_Samples \ AdvAnls \ RFAmp directory. The example uses the goals and constraints features in the Modified LSQ engine. The engine strives to get as close as possible to the goals while ensuring that the constraints are met. When designing an RF circuit, there is often a trade-off between the bandwidth response and the gain of the circuit. In this example we are willing to trade some gain and input and output noise to reach our bandwidth goal. Optimizer goal: • Increase bandwidth from 150 MHz to 200 MHz Note: Enter meg or e6 for MHz when entering these values in the Specifications table. Advanced Analysis 77 Chapter 4 Optimizer Optimizer constraints: • Gain of at least 5 dB (original value is 9.4 dB) • Max noise figure of 5 (original value is 4.1) • Max output noise of 3 nano volts per root Hz (original value is 4.3 nano volts per root Hz) Setting up the circuit in the schematic editor 1 In your schematic editor, browse to the RFAmp tutorials directory. <target_directory> \ PSpice \ Tutorials 2 Open the RFAmp project. The RF amplifier circuit example Assign global tolerances using this table 3 Advanced Analysis Select the SCHEMATIC1-AC simulation profile. 78 Chapter 4 Optimizer The AC simulation included in the RFAmp example 4 Click to run the PSpice simulation. 5 Review the results. The waveforms in PSpice are what we expected. In PSpice, View Measurement Results The measurements in PSpice give the results we expected. Advanced Analysis 79 Chapter 4 Optimizer Setting up Optimizer in Advanced Analysis Opening Optimizer in Advanced Analysis − From the PSpice menu in your schematic editor, select Advanced Analysis / Optimizer. The Optimizer tool opens. Error Graph Insertion row Specification table Parameters table Output window Selecting an engine 1 Click on the drop-down list to the right of the Optimizer tool name. A list of engines appears. Advanced Analysis 80 Chapter 4 Optimizer Click to display drop-down list 2 Select the Modified LSQ engine. Setting up component parameters 1 In the Parameters table, click on the row containing the text “Click here to import...” Click The Parameters Selection dialog box appears. Advanced Analysis 81 Chapter 4 Optimizer Hold down the CTRL key and click to add multiple components 2 3 Highlight these components in the Parameters Selection dialog box: − R6, the 470 ohm resistor − R4, the 470 ohm resistor − R8, the 3.3 ohm resistor Click OK. The components are now listed in the Parameters table. Advanced Analysis 82 Chapter 4 Optimizer Click to remove the checkmark, which tells Optimizer to use the Original value without variation during the next optimizing run. Click a Min or Max value to type in a change. Click to lock in the Current value without variation during the next optimizing run. Default component values are supplied. For resistors, capacitors, and inductors the default range is one decade in either direction. 4 In the Parameters table Min and Max columns, make these edits: − R8: min value 3, max value 3.6 − R6: min value 235, max value 705 − R6: min value 235, max value 705 This tightens the range the engine will vary the resistance of each resistor, for more efficient optimization. Setting up measurement specifications Measurements (set up earlier in PSpice) specify the circuit behavior we want to optimize. The measurement specifications set the min and max limits of acceptable behavior. When using the Modified LSQ engine, you can also weigh the importance of the measurement specifications and mark them as constraints or goals. The engine strives to get as close as possible to the goals while ensuring that the constraints are met. Advanced Analysis 83 Chapter 4 Optimizer When there is more than one measurement specification, change the number in the weight column if you want to emphasize the importance of one specification with respect to another. 1 In the Specifications table, click on the row containing the text “Click here to import....” Click to import measurements The Import Measurements dialog box appears with measurements configured earlier in PSpice. Advanced Analysis 84 Chapter 4 Optimizer Hold down the CTRL key and click to add multiple measurements 2 Select all the AC sim measurements and click OK. The components are now listed in the Specifications table. 3 4 In the Max(DB(V(Load))) row of the Specifications table: − Min column: type in a minimum dB gain of 5. − Max column: type in a maximum dB gain of 5.5. − Type column: leave as a Constraint − Weight column: type in a weight of 20 In the Bandwidth(V(Load),3) row: − Advanced Analysis Min column: type in a minimum bandwidth response of 200e6 85 Chapter 4 Optimizer 5 6 − Max column: leave empty (unlimited) − Type column: click in the cell and change to Goal − Weight column: leave the weight as 1 In the Min (10*log10(v(in... row: − Min column: leave empty − Max column: type in a maximum noise figure of 5 − Type column: leave as a Constraint − Weight column: leave the weight as 1 In the Max(V(onoise)) row: − Min column: leave empty − Max column: type in a maximum noise gain of 3n − Type column: leave as a Constraint − Weight column: type in a weight of 20 Note: For information on numerical conventions, “Numerical conventions” on page 20. Click a cell to type in a value Click a cell to get a drop-down list and select Goal Select number and edit Advanced Analysis 86 Chapter 4 Optimizer Running Optimizer Starting a run − Click on the top toolbar. Click to start optimization The optimization analysis begins. The messages in the output window tell you the status of the analysis. A nominal run is made with the original component parameter values. As the optimization proceeds, the Error Graph shows a plot with an error trace for each measurement. Data in the Parameters and Specifications tables is updated. Displaying run data − Place your cursor anywhere in the Error Graph to navigate the historical run data. The Parameters and Specifications tables display the corresponding data calculated during that run. Historical run data cannot be edited. It is read-only, as indicated by the cross-hatched background. Advanced Analysis 87 Chapter 4 Optimizer Click a run line to see data for that run The data in the Parameters and Specifications tables will change to reflect the values of that run Click to remove the checkmark, which excludes the measurement from the next optimization run Click the graph symbol to toggle the symbol off, which hides the measurements trace on the Error Graph Cells with cross-hatched backgrounds are read-only and cannot be edited. To clear the Error Graph and remove all historical data: right click on the Error Graph and select Clear History from the pop-up menu. Controlling optimization Pausing, stopping and starting You can stop and resume an analysis to explore optimization trends in the Error Graph, to reset goals, or to change engines when results are not what you expected. The analysis will stop, saving the optimization data. You can also use pause and resume to accomplish the same thing. Advanced Analysis • To start or resume, click • To pause, click on the top toolbar. on the top toolbar. 88 Chapter 4 Optimizer • To stop, click on the top toolbar. Click to start optimization Click to pause optimization Click to stop optimization Assigning available values with the Discrete engine The Discrete engine is used at the end of the optimization cycle to round off component values to the closest values available commercially. At the end of the example run, Optimization was successful for all the measurement goals and constraints. However, the new resistor values may not be commercially available values. You can find available values using the Discrete engine. Current values may not be commercially available Advanced Analysis 89 Chapter 4 Optimizer 1 From the top toolbar engine text box, select Discrete from the drop-down list. A new column named Discrete Table appears in the Parameters table. Discrete values tables for RLC components are provided with Advanced Analysis. 2 To select a discrete values table, click on any RLC component’s Discrete Table column. You will get a drop-down list of commercially available values (discrete values tables) for that component. Click here and select from the drop-down list of discrete values tables 3 Advanced Analysis Select the 2-10% discrete values table for resistor R8. Repeat these steps to select the same table for resistors R6 and R4. 90 Chapter 4 Optimizer 4 Click . Click The Discrete engine runs. First, the Discrete engine finds the nearest commercially available component. Next, the engine reruns the simulation with the new parameter values and displays the measurement results. At completion, the Current column in the Parameters table is filled with the new values. Current values that are commercially available (using discrete values tables) Shortcut: You can use Find in Design to locate components in your schematic editor. See below. 5 6 Advanced Analysis Return to your schematic editor and change: − R8 to 3.6 ohms − R6 to 680 ohms − R4 to 240 ohms While you are still in your schematic editor, rerun the simulation titled AC. 91 Chapter 4 Optimizer Check your waveforms and measurements in PSpice and make sure they are what you expect. Finding components in your schematic editor You can use Find in Design from Advanced Analysis to return to your schematic editor and locate the components you would like to change. 1 In the Parameters table, highlight the components you want to change. Click here to select components (hold down shift key to select several) 2 With the components selected, right click the mouse button. A pop-up menu appears. 3 Advanced Analysis Left click on Find in Design. 92 Chapter 4 Optimizer The schematic editor appears with the components highlighted. Editing a measurement within Advanced Analysis At some point you may want edit a measurement. You can edit from the Specifications table, but any changes you make will not appear in measurements in the other Advanced Analysis tools or in PSpice. 1 Click on the measurement you want to edit. A tiny box containing dots appears. Click to edit 2 Advanced Analysis Click . 93 Chapter 4 Optimizer The Edit Measurement dialog box appears. 3 Make your edits. It’s a good idea to edit and run your measurement in PSpice and check its performance before running Optimizer. 4 Click OK. − Click Saving results . Or: From the File menu, select Save. The final results will be saved in the Advanced Analysis profile (.aap). Advanced Analysis 94 Smoke 5 In this chapter • Smoke overview on page 95 • Smoke strategy on page 96 • Smoke procedure on page 97 • Example on page 101 • For power users on page 110 Smoke overview Long-term circuit reliability Smoke warns of component stress due to power dissipation, increase in junction temperature, secondary breakdowns, or violations of voltage / current limits. Over time, these stressed components could cause circuit failure. Smoke uses Maximum Operating Conditions (MOCs), supplied by vendors and derating factors supplied by designers to calculate the Safe Operating Limits (SOLs) of a component’s parameters. Smoke then compares circuit simulation results to the component’s safe operating limits. If the circuit simulation exceeds the safe operating limits, Smoke identifies the problem parameters. Advanced Analysis 95 Chapter 5 Smoke Use Smoke for Displaying Average, RMS, or Peak values from simulation results and comparing these values against corresponding safe operating limits Safe operating limits Smoke will help you determine: • Breakdown voltage across device terminals • Maximum current limits • Power dissipation for each component • Secondary breakdown limits • Junction temperatures Smoke strategy Smoke is useful as a final design check after running Sensitivity, Optimizer, and Monte Carlo, or you can use it on its own for a quick power check on a new circuit. Plan ahead Smoke requires: • Components that are Advanced Analysis-ready See Chapter 2, “Libraries“ See Smoke parameters on page 110 for lists of parameter names used in Advanced Analysis Smoke. • A working circuit schematic and transient simulation • Derating factors Smoke uses “no derating” as the default. Note: See Advanced Analysis online library list for components containing smoke parameter data. Advanced Analysis 96 Chapter 5 Smoke Workflow Smoke procedure Setting up the circuit in the schematic editor Advanced Analysis requires: • A circuit schematic and working PSpice simulation • Measurements set up in PSpice • Performance goals for evaluating measurements • Performance goals Smoke analysis also requires: • Any components included in a Smoke analysis must have smoke parameters specified. For more information see Chapter 2, "Libraries." Advanced Analysis 97 Chapter 5 Smoke • Time Domain (transient) analysis as a simulation Smoke does not work on other types of analyses, such as DC Sweep or AC Sweep/Noise analyses. 1 From your schematic editor, open your circuit. 2 Run a PSpice simulation. 3 Check your key waveforms in PSpice and make sure they are what you expect. Note: For information on circuit layout and simulation setup, see your schematic editor and PSpice user guides. See Smoke parameters on page 110. Running Smoke Starting a run − In your schematic editor, from the PSpice menu, select Advanced Analysis / Smoke. Smoke automatically runs on the active transient profile. Smoke calculates safe operating limits using component parameter maximum operating conditions and derating factors. The output window displays status messages. Viewing Smoke results • To select Average, RMS, or Peak values, right click at the top of the Value column and select from the pop-up menu. Check each value for red bar graphs. Red bars show values that exceed safe operating limits. Yellow bars show values within 90 to 100 percent of safe operating limits. • Advanced Analysis To sort data by the most stressed parts, double click at the top of the % Max column. 98 Chapter 5 Smoke The data will be sorted in ascending or descending order. • To view temperature parameters only, right click in the data display and select Temperature Only Parameters from the pop-up menu. Only average and peak values are useful when viewing temperature only parameters. • To locate a problem component in your schematic, right click on a component parameter and select Find in Design from the pop-up menu. This returns you to the schematic editor with the component selected. Printing results − Click . Or: From the File menu, select Print. Configuring Smoke Changing components or parameters Smoke results are read-only. To modify the circuit: 1 Make your changes in your schematic editor. 2 Rerun the PSpice simulation. Follow the steps for Setting up the circuit in the schematic editor on page 97 and Running Smoke on page 98. Advanced Analysis 99 Chapter 5 Smoke Selecting other deratings To select other deratings: 1 Right click on the screen and select Derating from the pop-up menu. 2 Select one of the three derating options on the pull-right menu: − No Derating − Standard Derating − Custom Derating Files Or: From the Edit menu in Advanced Analysis, select Profile Settings. Click the Smoke tab. Select either No derating (the default) or Standard derating from the drop-down list or browse to a custom derating file using the custom derating text box on the Smoke tab. 3 Click OK. 4 Click on the top toolbar to run a new Smoke analysis with the revised derating factors. New results appear. For information on creating a custom derating file, see our technical note posted on our web site at: www.pspice.com. Advanced Analysis 100 Chapter 5 Smoke Example Overview This example uses the tutorial version of RFAmp located at: <target_directory> \ PSpice \ Tutorials \ The circuit is an RF amplifier with 50-ohm source and load impedances. It includes the circuit schematic, PSpice simulation profiles, and measurements. Note: For a completed example see: <target_directory> \ PSpice \ Capture_Samples \ AdvAnls \ RFAmp directory. Setting up the circuit in the schematic editor 1 In your schematic editor, browse to the RFAmp tutorials directory. <target_directory> \ PSpice \ Tutorials 2 Advanced Analysis Open the RFAmp project. 101 Chapter 5 Smoke The RF Amplifier circuit example Assign global tolerances using this table 3 Select SCHEMATIC1-Tran for this Smoke analysis. The Transient simulation included in the RF Amp example Advanced Analysis 102 Chapter 5 Smoke 4 Click on the top toolbar to run the PSpice simulation. 5 Review the results. 6 The key waveforms in PSpice are what we expected. − From the PSpice menu in your schematic editor, select Advanced Analysis / Smoke. Running Smoke Starting a run The Smoke tool opens and automatically runs on the active transient profile. Smoke calculates safe operating limits using component parameter maximum operating conditions and derating factors. The output window displays status messages. Advanced Analysis 103 Chapter 5 Smoke Viewing Smoke results 1 Right click in the display and select Average, RMS, or Peak from the resulting pop-up menu. Toggle between average, RMS, and peak values Check each value for red bar graphs. Red bars show values that exceed safe operating limits. Yellow bars show values within 90 to 100 percent of safe operating limits. 2 Double click at the top of the % Max column header to sort the data by the most stressed parts. All bar graph results are green, showing that simulation values are less than 90 percent of safe operating limits. 3 Right click on the table and select Temperature Parameters Only from the pop-up menu. Only maximum resistor or capacitor temperature (TB) and maximum junction temperature (TJ) parameters are displayed. When reviewing these results, only average and peak values are meaningful. Advanced Analysis 104 Chapter 5 Smoke In this example, none of the parameters are stressed, as indicated by all green bars. The “No derating” default setting is100% of the derating factor The calculated SOL is the max derating = SOL = MOC x % derating Right click to select temperature only parameters Right click to select average, RMS, or peak power value % Max is the actual operating value / SOL x 100 Green bars are below Double click the column 90% of the safe header to sort data by the operating limits most stressed parts Status messages Printing results − Click . Or: From the File menu, select Print. Advanced Analysis 105 Chapter 5 Smoke Configuring Smoke Selecting another derating option The default derating option uses 100% derating factors, also called No Derating. We’ll now run the circuit with standard derating and examine the results. Selecting standard derating 1 Right click on the screen. A pop-up menu appears. 2 Select Derating from the pop-up menu. 3 Select Standard Derating from the pull-right menu. 4 Click on the top toolbar to run a new Smoke analysis. New results appear. 5 Sort the bar graph data by double clicking on the % Max column header. The data is sorted in ascending order. 6 Double click the column header one more time. The data is sorted in descending order and any red bar graphs display at the top of the column of data. Advanced Analysis 106 Chapter 5 Smoke The red bar indicates that Q1’s VCE parameter is stressed. Standard derating factors used in the calculations Standard Derating appears in the title Component Q1’s VCE parameter is stressed to 136 percent of its safe operating limit Right click and select Find in Design from the pop-up menu. This takes you to the schematic where the component parameter can be changed. 7 Resolve the component stress: − Select row Q1 VCE and use Find in Design from the right click pop-up menu to go to the schematic and adjust Q1’s VCE value. Or: − Right click and select Deratings \ No Derating to change the derating option back to No Derating. 8 Click on the top toolbar to rerun Smoke analysis after making any adjustments. 9 Check the results. Selecting custom derating If you have your own custom derating factors, you can browse to your own file and select it for use in Smoke. For information on creating a custom derating file, see our technical note posted on our web site at: www.pspice.com. Advanced Analysis 107 Chapter 5 Smoke 1 Right click on the screen, select Derating from the pop-up menu, and select Custom Derating Files from the pull-right menu. Or: From the Edit menu, select Profile Settings, and click the Smoke tab. Click the Smoke tab Click to browse to your custom derating file Advanced Analysis 2 Click the browse icon. 3 Browse and select your file. 108 Chapter 5 Smoke The file name is added to the list in the Custom Derating Files text box and the drop-down list. Select the custom derating file in the drop-down list after finding the file using the browse text box below. 4 Select the custom derating file from the drop-down list. 5 Click OK. 6 Click on the top toolbar to run a new Smoke analysis. New results appear. 7 Double click on the % Max column header to sort the bar graph. The data is sorted in ascending order. 8 Double click the column header one more time. The data is sorted in descending order. Red bars display at the top of the column. 9 Check the results. To make changes, follow the steps for changing derating options or schematic component values. See Selecting standard derating on page 106. Advanced Analysis 109 Chapter 5 Smoke For power users Smoke parameters The following tables summarize smoke parameter names you will see in the Smoke results. The tables are sorted by user interface parameter names and include: • Passive component parameters • Semiconductor component parameters • Op Amp component parameters For passive components, three names are used in Smoke analysis: symbol property names, symbol parameter names, and parameter names used in the Smoke user interface. This table is sorted in alphabetical order by parameter names that display in the Smoke user interface. Smoke User Interface Parameter Name Maximum Passive Operating Component Condition CI Capacitor CV Symbol Property Name Symbol Smoke Parameter Name Variable Table Default Value Maximum ripple CURRENT CIMAX 1A Capacitor Voltage rating VOLTAGE CMAX 50 V IV Current Supply Max. voltage current source can withstand VOLTAGE VMAX 12 V LI Inductor Current rating CURRENT LMAX 5A LV Inductor Dielectric strength DIELECTRIC DSMAX PDM Resistor Maximum power POWER dissipation of resistor RMAX 0.25 W RBA* (=1/SLOPE) Resistor Slope of power dissipation vs. temperature SLOPE RSMAX 0.005W/degC RV Resistor Voltage Rating VOLTAGE RVMAX -- Advanced Analysis 300 V 110 Chapter 5 Smoke Smoke User Interface Parameter Name Maximum Passive Operating Component Condition Symbol Property Name Symbol Smoke Parameter Name Variable Table Default Value SLP* Capacitor Temperature derating slope SLOPE of volt CSMAX temperature curve 0.005 V/degC TBRK* Capacitor Breakpoint temperature KNEE CBMAX 125 degC TMAX* Capacitor Maximum temperature MAX_TEMP CTMAX 125 degC TMAX, TB Resistor Maximum temperature resistor can withstand MAX_TEMP RTMAX 200 degC VI Voltage Supply Max. current voltage source can withstand CURRENT IMAX 1A * Internal parameters not shown in user interface The following table lists smoke parameter names for semiconductor components. The table is sorted in alphabetical order according to parameter names that will display in the Smoke results. Smoke Parameter Name and Symbol Property Name Semiconductor Component Maximum Operating Condition IB BJT Maximum base current (A) IC BJT Maximum collector current (A) PDM BJT Maximum power dissipation (W) RCA BJT Thermal resistance, Case-to-Ambient (degC/W) RJC BJT Thermal resistance, Junction-to-Case (degC/W) SBINT BJT Secondary breakdown intercept (A) SBMIN BJT Derated percent at TJ (secondary breakdown) SBSLP BJT Secondary breakdown slope Advanced Analysis 111 Chapter 5 Smoke Smoke Parameter Name and Symbol Property Name Semiconductor Component SBTSLP BJT Temperature derating slope (secondary breakdown) TJ BJT Maximum junction temperature (degC) VCB BJT Maximum collector-base voltage (V) VCE BJT Maximum collector-emitter voltage (V) VEB BJT Maximum emitter-base voltage (V) IF Diode Maximum forward current (A) PDM Diode Maximum power dissipation (W) RCA Diode Thermal resistance, Case-to-Ambient (degC/W) RJC Diode Thermal resistance, Junction-to-Case (degC/W) TJ Diode Maximum junction temperature (degC) VR Diode Maximum reverse voltage (V) IC IGBT Maximum collector current (A) IG IGBT Maximum gate current (A) PDM IGBT Maximum Power dissipation (W) RCA IGBT Thermal resistance, Case-to-Ambient (degC/W) RJC IGBT Thermal resistance, Junction-to-Case (degC/W) TJ IGBT Maximum junction temperature (degC) VCE IGBT Maximum collector-emitter (V) VCG IGBT Maximum collector-gate voltage (V) VGEF IGBT Maximum forward gate-emitter voltage (V) VGER IGBT Maximum reverse gate-emitter (V) ID JFET or MESFET Maximum drain current (A) IG JFET or MESFET Maximum forward gate current (A) PDM JFET or MESFET Maximum power dissipation (W) RCA JFET or MESFET Thermal resistance, Case-to-Ambient (degC/W) RJC JFET or MESFET Thermal resistance, Junction-to-Case (degC/W) TJ JFET or MESFET Maximum junction temperature (degC) Advanced Analysis Maximum Operating Condition 112 Chapter 5 Smoke Smoke Parameter Name and Symbol Property Name Semiconductor Component Maximum Operating Condition VDG JFET or MESFET Maximum drain-gate voltage (V) VDS JFET or MESFET Maximum drain-source voltage (V) VGS JFET or MESFET Maximum gate-source voltage (V) ID MOSFET or Power Maximum drain current (A) MOSFET IG MOSFET or Power Maximum forward gate current (A) MOSFET PDM MOSFET or Power Maximum power dissipation (W) MOSFET RCA MOSFET or Power Thermal resistance, Case-to-Ambient (degC/W) MOSFET RJC MOSFET or Power Thermal resistance, Junction-to-Case (degC/W) MOSFET TJ MOSFET or Power Maximum junction temperature (degC) MOSFET VDG MOSFET or Power Maximum drain-gate voltage (V) MOSFET VDS MOSFET or Power Maximum drain-source voltage (V) MOSFET VGSF MOSFET or Power Maximum forward gate-source voltage (V) MOSFET VGSR MOSFET or Power Maximum reverse gate-source voltage (V) MOSFET ITM Varistor Peak current (A) RCA Varistor Thermal resistance, Case-to-Ambient (degC/W) RJC Varistor Thermal resistance, Junction-to-Case (degC/W) TJ Varistor Maximum junction temperature (degC) IFS Zener Diode Maximum forward current (A) IRMX Zener Diode Maximum reverse current (A) PDM Zener Diode Maximum power dissipation (W) RCA Zener Diode Thermal resistance, Case-to-Ambient (degC/W) Advanced Analysis 113 Chapter 5 Smoke Smoke Parameter Name and Symbol Property Name Semiconductor Component Maximum Operating Condition RJC Zener Diode Thermal resistance, Junction-to-Case (degC/W) TJ Zener Diode Maximum junction temperature (degC) The following table lists smoke parameter names for Op Amp components. The table is sorted in alphabetical order according to parameter names that will display in the Smoke results. Smoke Parameter Name Op Amp Component Maximum Operating Condition IPLUS OpAmp Non-inverting input current IMINUS OpAmp Inverting input current IOUT OpAmp Output current VDIFF OpAmp Differential input voltage VSMAX OpAmp Supply voltage VSMIN OpAmp Minimum supply voltage VPMAX OpAmp Maximum input voltage (non-inverting) VPMIN OpAmp Minimum input voltage (non-inverting) VMMAX OpAmp Maximum input voltage (inverting) VMMIN OpAmp Minimum input voltage (inverting) Advanced Analysis 114 Monte Carlo 6 In this chapter • Monte Carlo overview on page 115 • Monte Carlo strategy on page 116 • Monte Carlo procedure on page 117 • Example on page 128 Monte Carlo overview Monte Carlo predicts the statistical behavior of a circuit when part values are varied within tolerance. Monte Carlo also calculates yield, which can be used for mass manufacturing predictions. Use Monte Carlo for: Advanced Analysis • Calculating yield based on your specs • Integrating measurements with graphical displays • Displaying results in a probability distribution function (PDF) graph • Displaying results in a cumulative distribution function (CDF) graph • Calculating statistical data • Displaying measurement values for every Monte Carlo run 115 Chapter 6 Monte Carlo Monte Carlo strategy Monte Carlo requires: • Circuit components that are Advanced Analysis-ready See Chapter 2, “Libraries“ • A circuit schematic and working PSpice simulation • Measurements set up in PSpice See “Procedure for creating measurement expressions” on page 148 Plan Ahead Setting options Importing measurements Advanced Analysis • Start with enough runs to provide statistically meaningful results. • Specify a larger number of runs for a more accurate graph of performance distribution. This more closely simulates the effects of mass production. • Specify a different random seed value if you want different results. • Set the graph bin number to show the level of detail you want. Higher bin numbers show more detail, but need more runs to be useful. • Find the most sensitive measurements in Sensitivity and perform Monte Carlo analysis on those measurements only. Limiting Monte Carlo to only important measurements saves run time. 116 Chapter 6 Monte Carlo Workflow Monte Carlo procedure Setting up the circuit in the schematic editor Starting out: • Advanced Analysis Have a working circuit in Concept HDL or Capture. 117 Chapter 6 Monte Carlo • Circuit simulations and measurements should already be defined. The simulations can be Time Domain (transient), DC Sweep, and AC Sweep/Noise analyses. • The circuit components you want to include in the data need to be Advanced Analysis-ready, with the tolerances of the circuit components specified. See Chapter 2, “Libraries," for information about component tolerances. 1 From your schematic editor, open your circuit. 2 Run a PSpice simulation. Note: Advanced Analysis Monte Carlo does not use PSpice Monte Carlo settings. Note: You can run Advanced Analysis Monte Carlo on more than one simulation profile at once. However, if you have a multi-run analysis set up in PSpice (for example, a parametric sweep or a temperature sweep), Advanced Analysis Monte Carlo will reduce the simulation profile to one run before starting the Advanced Analysis Monte Carlo calculations. For temperature sweeps, the first temperature value in the list will be used for the Advanced Analysis Monte Carlo calculations. 3 Check your key waveforms in PSpice and make sure they are what you expect. 4 Test your measurements and make sure they have the results you expect. Note: For information on circuit layout and simulation setup, see your schematic editor and PSpice user guides. For information on setting up measurements, see “Procedure for creating measurement expressions” on page 148 Advanced Analysis 118 Chapter 6 Monte Carlo Setting up Monte Carlo in Advanced Analysis Opening Monte Carlo − From the PSpice menu in your schematic editor, select Advanced Analysis / Monte Carlo. The Advanced Analysis Monte Carlo tool opens. Importing measurements from PSpice 1 In the Statistical Information table, click on the row containing the text “Click here to import a measurement created within PSpice.” The Import Measurement(s) dialog box appears. 2 Select the measurements you want to include. For more information, see Example section’s: Importing measurements from PSpice on page 132. Setting Monte Carlo options − From the Advanced Analysis Edit menu, select Profile Settings, click the Monte Carlo tab, and enter the following Monte Carlo options: • Number of runs This is the number of times the selected simulation profiles will be run. For each run, component parameters with tolerances will be randomly varied. Run number one uses nominal component parameter values. The maximum number of runs is primarily limited by the amount of available memory. • Starting run number The default starting run number is one. This is the nominal run. If the random seed value is kept constant, then you can change the starting run number in order to duplicate a partial Monte Carlo simulation. You can use this to isolate specific random results which are of Advanced Analysis 119 Chapter 6 Monte Carlo particular interest, without having to run an entire Monte Carlo simulation again. • Random seed value The random number generator uses this value to produce a sequence of random numbers. Change the seed in order to produce a unique random sequence for each Monte Carlo simulation. If the seed and device properties are not changed, then the same sequence of random numbers will be generated each time a Monte Carlo analysis is done. You can use this procedure to reproduce a random simulation. • Number of bins This value determines the number of divisions in the histogram. A typical value is one tenth of the number of runs. The minimum value is one and the maximum value is determined by the amount of available memory. It is recommended that this value be less than 10,000. Starting a Monte Carlo run − Click on the top toolbar. The Monte Carlo analysis begins. The messages in the output window tell you the status of the analysis. Monte Carlo calculates a nominal value for each measurement using the original parameter values. After the nominal runs, Monte Carlo randomly calculates the value of each variable parameter based on its tolerance and a Flat (Uniform) distribution function. For each profile, Monte Carlo uses the calculated parameter values, evaluates the measurements, and saves the measurement values. Monte Carlo repeats the calculations for the specified number of runs, then calculates and displays statistical data for each measurement. Advanced Analysis 120 Chapter 6 Monte Carlo For more detail on the displayed statistical data, see Example’s section: Reviewing Monte Carlo data on page 121. Reviewing Monte Carlo data You can review Monte Carlo results on two graphs and two tables: • Probability density function (PDF) graph • Cumulative distribution function (CDF) graph • Statistical Information table, in the Statistics tab • Raw Measurements table, in the Raw Meas tab Reviewing the Statistical Information table For each run, Monte Carlo randomly varies parameter values within tolerance and calculates a single measurement value. After all the runs are done, Monte Carlo uses the run results to perform statistical analyses. 1 Click the Statistics tab to bring the table to the foreground. 2 Select a measurement row in the Statistical Information table. A black arrow appears in the left column and the row is highlighted. The data in the graph corresponds to the selected measurement only. You can review results reported for each measurement: Column heading... Means... Cursor Min Measurement value at the cursor minimum location. Cursor Max Measurement value at the cursor maximum location. Advanced Analysis 121 Chapter 6 Monte Carlo Column heading... Means... Yield (in percent) The number of runs that meet measurement specifications (represented by the cursors) versus the total number of runs in the analysis. Used to estimate mass manufacturing production efficiency. Mean The average measurement value based on all run values. See Raw Measurement table for run values. Std Dev Standard deviation. The statistically accepted meaning for standard deviation. 3 Sigma (in percent) The number of measurement run values that fall within the range of plus or minus 3 Sigma from the mean 6 Sigma (in percent) The number of measurement run values that fall within the range of plus or minus 6 Sigma from the mean Median The measurement value that occurs in the middle of the sorted list of run values. See Raw Measurement table for run values Reviewing the PDF graph A PDF graph is a way to display a probability distribution. It displays the range of measurement values along the x-axis and the number of runs with those measurement values along the y-axis. 1 Select a measurement row in the Statistical Information table. 2 If the pdf graph is not already displayed, right click the graph and select PDF Graph from the pop-up menu. The corresponding PDF graph will display all measurement values based on the Monte Carlo runs. 3 Right click the graph to select zoom setting, another graph type, and y-axis units. A pop-up menu appears. Advanced Analysis − Select Zoom In to focus on a small range of values. − Select CDF Graph to toggle from the default PDF graph to the CDF graph. 122 Chapter 6 Monte Carlo − 4 Select Percent Y-axis to toggle from the default absolute y-axis Number of Runs to Percent of Runs. To change the number of bins on the x-axis: From the Edit menu, select Profile Settings, click the Monte Carlo tab, and typing a new number in the Number of Bins text box. If you want more bars on the graph, specify more bins— up to a maximum of the total number of runs. Higher bin numbers show more detail, but require more runs to be useful. Reviewing the CDF graph The CDF graph is another way to display a probability distribution. In mathematical terms, the CDF is the integral of the PDF. 1 Select a measurement row in the Statistical Information table. 2 If the cdf graph is not already displayed, right click on the PDF graph and select CDF Graph from the pop-up menu. The statistical display for the cumulative distribution function is shown on the CDF graph. 3 Right click the graph to select zoom setting and y-axis units. A pop-up menu will appear. 4 Advanced Analysis − Select Zoom In to focus on a small range of values. − Select PDF Graph to toggle from the current CDF graph to the default PDF graph. − Select Percent Y-axis to toggle from the default absolute y-axis Number of Runs to Percent of Runs. Change the number of bins on the x-axis by going to the Edit menu, selecting Profile Settings, clicking the 123 Chapter 6 Monte Carlo Monte Carlo tab, and typing a new number in the Number of Bins text box. • If you want more bars on the graph, specify more bins, up to a maximum of the total number of runs. Higher bin numbers show more detail, but require more runs to be useful. Working with cursors − To change a cursor location on the graph, click the cursor to select it and click the mouse in a new spot on the graph. A selected cursor appears red. This changes the cursor’s location on the graph, updates the measurement min or max values on the Statistical Information table, and displays a new calculated yield. Restricting calculation range To restrict the statistical calculations displayed in the Statistical Information table to the range of samples within the cursor minimum and maximum range, set the cursors in their new locations and select the restrict calculation range command from the right click pop-up menus. 1 Change cursors to new locations. See Working with cursors above. 2 Right click in the graph or in the Statistical Information table and select Restrict Calculation Range from the pop-up menu. The cross-hatched range of values that appears on the graph is the restricted range. Reviewing the Raw Measurements table The Raw Measurements table is a read-only table that has a one-to-one relationship with the Statistical Information table. For every measurement row on the Raw Measurements table, there is a corresponding measurement row on the Statistical Advanced Analysis 124 Chapter 6 Monte Carlo Information table. The run values in the Raw Measurements table are used to calculate the yield and statistical values in the Statistical Information table. 1 Click the Raw Meas tab. This brings the Raw Measurements table to the foreground. 2 Select a row and double click the far left row header. This sorts the row of data in ascending or descending order. Note: Copy and paste the row of data to an external program if you want to further manipulate the data. Use the Edit menu or the right click pop-up menu copy and paste commands. 3 From the View menu, select Log File / Monte Carlo to view the component parameter values for each run. Controlling Monte Carlo If you do not achieve your goals in the first Monte Carlo analysis, there are several things you can do to fine-tune the process. Pausing, stopping, and starting Pausing and resuming To review preliminary results on a large number of runs: − Click on the top toolbar when the output window indicates approximately Monte Carlo run 50. The analysis stops at the next interruptible point, available data is displayed and the last completed run number appears in the output window. 1 Advanced Analysis Click the depressed or to resume calculations. 125 Chapter 6 Monte Carlo Stopping − Click on the top toolbar. If a Monte Carlo analysis has been stopped, you cannot resume the analysis. Starting − Click to start or restart. Changing circuit components or parameters If you do not get the results you want, you can return to the schematic editor and change circuit parameters. 1 Try a different component for the circuit or change the tolerance parameter on an existing component. 2 Rerun the PSpice simulation and check the results. 3 Rerun Monte Carlo using the settings saved from the prior analysis. 4 Review the results. Controlling measurement specifications If you do not get the results you want and your design specifications are flexible, you can add, edit, delete or disable a measurement and rerun Monte Carlo analysis. Cells with cross-hatched backgrounds are read-only and cannot be edited. Advanced Analysis − To exclude a measurement from the next optimization run, click the in the Statistical Information table, which removes the checkmark. − To add a new measurement, click on the row that reads “Click here to import a measurement...” − To edit a measurement, click on the measurement you want to edit, then click . 126 Chapter 6 Monte Carlo − To edit a measurement specification Min or Max, click the minimum or maximum cursor on the graph (the selected cursor turns red), then click the mouse in the spot you want. The new value will display in the Cursor Min or Cursor Max column in the Statistical Information table. Note: For instructions on setting up new measurements, see: “Procedure for creating measurement expressions” on page 148. Printing results − Click . Or: From the File menu, select Print. To print information from the Raw Measurements table on the Raw Meas tab, copy and paste to an external program and print from that program. You can also print the Monte Carlo Log File, which contains more detail about measurement parameters. From the View menu select Log File, Monte Carlo. Saving results − Click . Or: From the File menu, select Save. The final results will be saved in the Advanced Analysis profile (.aap). Advanced Analysis 127 Chapter 6 Monte Carlo Example This example uses the tutorial version of RFAmp located at: <target_directory> \ PSpice \ Tutorials \ The circuit is an RF amplifier with 50-ohm source and load impedances. It includes the circuit schematic, PSpice simulation profiles, and measurements. Note: For a completed example see: <target_directory> \ PSpice \ Capture_Samples \ AdvAnls \ RFAmp directory. Setting up the circuit in the schematic editor 1 In your schematic editor, browse to the RFAmp tutorials directory. <target_directory> \ PSpice \ Tutorials 2 Advanced Analysis Open the RFAmp project. 128 Chapter 6 Monte Carlo The RF Amplifier circuit example Assign global tolerances using this table 3 Advanced Analysis Select the SCHEMATIC1-AC simulation profile. 129 Chapter 6 Monte Carlo The AC simulation included in the RF Amp example 4 Click to run a PSpice simulation. 5 Review the results. The waveforms in PSpice are what we expected. Advanced Analysis 130 Chapter 6 Monte Carlo The measurements in PSpice give the results we expected. In PSpice, View Measurement Results Setting up Monte Carlo in Advanced Analysis Opening Monte Carlo − Advanced Analysis From the schematic editor PSpice menu, select Advanced Analysis / Monte Carlo. 131 Chapter 6 Monte Carlo The Advanced Analysis Monte Carlo tool opens. PDF/CDF graph Top toolbar Raw Measurements tab Statistics tab Statistical Information table Click here to import more measurements Monte Carlo view tab. Click tab to bring Monte Carlo to the foreground Output window Importing measurements from PSpice 1 Advanced Analysis In the Statistical Information table, click on the row containing the text “Click here to import a measurement created within PSpice.” 132 Chapter 6 Monte Carlo The Import Measurement(s) dialog box appears. 2 3 Select the four measurements: − Max(DB(V(Load))) − Bandwidth(V(Load),3) − Min(10*Log10(V(inoise)*V(inoise)/8.28e-19)) − Max(V(onoise)) Click OK. Hover your mouse over a red or yellow message flag to read error message details Click and drag double-headed arrow, which appears between columns, to view all of cell contents Click to clear checkmark. No checkmark means the measurement is excluded from analysis. Advanced Analysis Measurements imported from PSpice 133 Chapter 6 Monte Carlo Setting Monte Carlo options 1 From the Advanced Analysis Edit menu, select Profile Settings, click the Monte Carlo tab, and enter the values shown in the text boxes. Select Edit / Profile Settings to bring up the Advanced Analysis Monte Carlo tab options Click tab to move this dialog box to the foreground Type values or leave default settings as is The example’s Number of Runs is 100; the default is 10 − Advanced Analysis Enter the Number of Runs. 134 Chapter 6 Monte Carlo Type 100. The default value is 10. − Enter the Starting Run Number. Use the default value of 1. − Enter a Random Seed Value. Use the default value of 1. − Enter the Number of Bins. Use the default value of 10. 2 Click OK. Running Monte Carlo Starting the analysis Starting a Monte Carlo run.e.htm 1 Select Monte Carlo from the drop-down list on the top toolbar. 2 Click . Select Monte Carlo from the drop-down list Click to start a Monte Carlo analysis The Monte Carlo analysis begins. The messages in the output window tell you the status of the analysis. Monte Carlo calculates a nominal value for each measurement using the original parameter values. After the nominal runs, Monte Carlo randomly calculates the value of each variable parameter based on its tolerance and a Flat (Uniform) distribution function. For each profile, Monte Carlo uses the calculated parameter Advanced Analysis 135 Chapter 6 Monte Carlo values, evaluates the measurements, and saves the measurement values. Monte Carlo repeats the above calculations for the specified number of runs, then calculates and displays statistical data for each measurement. Reviewing Monte Carlo data The Statistics tab is already in the foreground and the Statistical Information table contains results for the four imported measurements. − Select the Max(DB(V(load))) measurement row. A black arrow appears in the left column and the row is highlighted. The values in the PDF graph correspond to this measurement. For each Monte Carlo run, Monte Carlo randomly varies parameter values within tolerance and calculates a single measurement value. After all the runs are done, Monte Carlo uses the run results to perform statistical analyses. The following statistical results are reported for our example: Mean, Std Dev, 3 Sigma, 6 Sigma, and Median. In addition a yield is calculated and reported. Check Cursor Min and Cursor Max for acceptable values compared to design specs Hover mouse over the flag to see messages Advanced Analysis Check for acceptable yields (near 100%) Check statistical results Click in right corner of box to Select measurement, then click the select a different profile from dotted box to edit measurement expression the drop-down list 136 Chapter 6 Monte Carlo Reviewing the PDF graph The PDF graph is a bar chart. The x-axis shows the measurement values calculated for all the Monte Carlo runs. The y-axis shows the number of runs with measurement results between the x-axis bin ranges. The statistical display for this measurement’s probability density function is shown on the PDF graph. Right click on the graph and use pop-up menu to toggle to Percent Y-axis Hover your mouse above the bin; details will appear in a pop-up message This is the Monte Carlo graph right click pop-up menu Select this to zoom in on a specific area of the graph Select this to toggle to the PDF Graph Select to recalculate results for a different min/max range Select this to toggle between absolute runs and percentage of runs 1 Advanced Analysis Right click on the graph and select Percent Y-axis from the pop-up menu. 137 Chapter 6 Monte Carlo This changes the Y-axis units from Number of Runs to Percent of Runs. Y-axis changed to Percent of Runs 2 From the Edit menu, select Profile Settings, click the Monte Carlo tab, select the Number of Bins text box and type the number 20 in place of 10. Notice the higher level of detail on the PDF graph. Same statistical results, but 20 bins specified: twice as many bins as first PDF graph 3 Right click on the graph and select Zoom In from the pop-up menu. This allows you to zoom in on a specific range. 4 Select Zoom Fit to show the entire graph with cursors. 5 Click the Max cursor to select it (it turns red when selected), then click the mouse in a new location on the x-axis. This changes the cursor’s location and updates the max value and yield on the Statistical Information table. Note: Moving the cursor does not update the rest of the Advanced Analysis 138 Chapter 6 Monte Carlo statistical results for this new min / max range. Use Restrict Calculation Range to recalculate the rest of the statistical results for this min / max range. Reviewing the CDF graph The CDF graph is a cumulative stair-step plot. 1 Select the Max(DB(V(Load))) measurement in the Statistical Information table. 2 Right click on the PDF graph and select CDF Graph from the pop-up menu. CDF graph with max cursor selected; before cursor is moved for restricted range calculation 3 Right click on the graph and select Zoom In. This allows you to zoom in on a specific range. 4 Click the Max cursor. This selects the cursor and the cursor turns red. 5 Click the mouse at 10 on the x-axis. This moves the cursor to the new position on the x-axis. 6 Advanced Analysis Click the Min cursor and click the mouse at 9 on the x-axis. 139 Chapter 6 Monte Carlo These steps change the cursor locations and update the min, max, and yield values on the Statistical Information table. Cursor Min and Cursor Max data change to reflect moved cursor positions Yield value changes to reflect new min / max data Restricting the calculation range To quickly view statistical results for a different min / max range, use the Restrict Calculation Range command. 1 Set the graph cursors at Min = 9 and Max = 10. Or: Edit the min or max values in the Statistical Information table. Advanced Analysis 140 Chapter 6 Monte Carlo 2 Right click in the table or on the graph and select Restrict Calculation Range from the pop-up menu. Right click in the table, then select this command Right click in the graph, then select this command 3 Min cursor changed to 9 Edit Cursor Min and Cursor Max cells as a second way to change the range Advanced Analysis This tells Monte Carlo to recalculate the statistics for the new min / max range of values. Values outside this range will not be included in the calculations. Restricted range is cross-hatched Max cursor changed to 10 Note new results for statistics based on restricted min /max range 141 Chapter 6 Monte Carlo Ten bins of measurement data are displayed on the graph. Select Log File / Monte Carlo from the View menu to see parameter values and other details This selected measurement’s min, max, and other run results are plotted on the PDF graph Click Raw Meas tab for 100 run results Raw Measurements Table This read-only table has a one-to-one relationship with the Statistical Information Table. For every row on this table, there is a corresponding row on the other table where the statistics are displayed. 1 Click the Raw Meas tab. This makes the Raw Measurements table the active table on the screen. 2 Advanced Analysis Select the Max(DB(V(load))) measurement row and double click the far left row header. 142 Chapter 6 Monte Carlo This sorts the row run data in ascending order. Note: Copy and paste the row of data to an external program if you want to further manipulate the data. Click on the Raw Meas tab to make this table active Run 81 has the lowest measurement value This is a read-only table. Values can be copied and pasted to external programs Double click on a row header to sort Scroll right to see all run values. run data in ascending order. We In the middle of the table, the sorted the first row this way. bottom row reads, “Raw Measurements (Read only)” Controlling Monte Carlo Pausing, stopping, and starting Click to start Click to stop Click to pause Pausing and resuming 1 Click on the top toolbar. The analysis stops, available data is displayed, and the last completed run number appears in the output window. Advanced Analysis 143 Chapter 6 Monte Carlo 2 Click the depressed or PDF Graph title and Output window status messages indicate number of completed runs up to the point of pausing. to resume calculations. Partial results; compare these with final 100-run results. Stopping − Click on the top toolbar. If a Monte Carlo analysis has been stopped, you cannot resume the analysis. Note: Monte Carlo does not save data from a stopped analysis. After stopping, you cannot resume the same analysis. Advanced Analysis 144 Chapter 6 Monte Carlo Starting − Click to start or restart. Changing components or parameters When running other examples, if you do not get the results you want, go to the schematic editor and change circuit information. 1 Try a different component for the circuit Or: Change the tolerance of a parameter on an existing component. 2 Rerun the PSpice simulation and verify that the results are what you expect. 3 Rerun Monte Carlo using the settings saved from the prior analysis. 4 Review the results. Controlling measurement specifications If you do not get the results you want and your design specifications are flexible, you can change a specification or delete a measurement and rerun Monte Carlo analysis. Click here to remove the checkmark and exclude the measurement from further analysis Advanced Analysis Click on the dotted box and edit the measurement expression Edit Cursor Min and Cursor Max values on the table; rerun Monte Carlo; observe new results. 145 Chapter 6 Monte Carlo Printing results − Click . Or: From the File menu, select Print. To print information from the Raw Measurements table on the Raw Meas tab, copy and paste to an external program and print from that program. You can also print the Monte Carlo Log File, which contains more detail about measurement parameters. Saving results − Click . Or: From the File menu, select Save. The final results will be saved in the Advanced Analysis profile (.aap). Advanced Analysis 146 Measurement Expressions 7 In this chapter • Measurements overview on page 147 • Measurement strategy on page 148 • Procedure for creating measurement expressions on page 148 • Example on page 151 • For power users: Creating custom measurement definitions on page 158 Measurements overview Measurement expressions evaluate the characteristics of a waveform. A measurement expression is made by choosing the waveform and the waveform calculation you want to evaluate. The waveform calculation is defined by a measurement definition such as rise time, bandpass bandwidth, minimum value, and maximum value. For example, if you want to measure the risetime of your circuit output voltage, use the following expression: Risetime(v(out)) Advanced Analysis 147 Chapter 7 Measurement Expressions For a list of the PSpice measurement definitions, see Measurement definitions included in PSpice on page 155. You can also create your own custom measurement definitions. See Creating custom measurement definitions in the Power user section of this chapter. Measurement strategy • Start with a circuit created in Capture or Concept HDL and a working PSpice simulation. • Decide what you want to measure. • Select the measurement definition that matches the waveform characteristics you want to measure. • Insert the output variable (whose waveform you want to measure) into the measurement definition, to form a measurement expression. • Test the measurement expression. Procedure for creating measurement expressions Setup Before you create a measurement expression to use in Advanced Analysis: 1 Design a circuit in Capture or Concept HDL. 2 Set up a PSpice simulation. The Advanced Analysis tools use these simulations: 3 Advanced Analysis − Time Domain (transient) − DC Sweep − AC Sweep/Noise Run the circuit in PSpice. 148 Chapter 7 Measurement Expressions Make sure the circuit is valid and you have the results you expect. Composing a measurement expression These steps show you how to create a measurement expression in PSpice. Measurement expressions created in PSpice can be imported into Sensitivity, Optimizer, and Monte Carlo. You can also create measurements while in Sensitivity, Optimizer, and Monte Carlo, but those measurements cannot be imported into PSpice for testing. First select a measurement definition, and then select output variables to measure. The two combined become a measurement expression. Work in the Simulation Results view in PSpice. In the side toolbar, click on . 1 From the Trace menu in PSpice, select Measurements. The Measurements dialog box appears. 2 Select the measurement definition you want to evaluate. 3 Click Eval (evaluate). The Arguments for Measurement Evaluation dialog box appears. 4 Click the Name of trace to search button. The Traces for Measurement Arguments dialog box appears. Note: You will only be using the Simulation Output Variables list on the left side. Ignore the Functions or Macros list. 5 Uncheck the output types you don’t need (if you want to simplify the list). 6 Click on the output variable you want to evaluate. The output variable appears in the Trace Expression field. Advanced Analysis 149 Chapter 7 Measurement Expressions 7 Click OK. The Arguments for Measurement Evaluation dialog box reappears with the output variable you chose in the Name of trace to search field. 8 Click OK. Your new measurement expression is evaluated and displayed in the PSpice window. 9 Click OK in the Display Measurement Evaluation pop-up box to continue working in PSpice. Your new measurement expression is saved, but it no longer displays in the window. The only way to get another graphical display is to redo these steps. You can see a numerical evaluation by following the next steps. Viewing the results of measurement evaluations 1 From the View menu in PSpice, select Measurement Results. The Measurement Results table displays below the plot window. 2 Click the box in the Evaluate column. The PSpice calculation for your measurement expression appears in the Value column. Advanced Analysis 150 Chapter 7 Measurement Expressions Example First you select a measurement definition, and then you select an output variable to measure. The two combined become a measurement expression. Note: Work in the Simulation Results view in PSpice Work in the Simulation Results view in PSpice. In the side toolbar, click on . 1 From the Trace menu in PSpice, select Measurements. The Measurements dialog box appears. 2 Select the measurement definition you want to evaluate. 3 Click Eval (evaluate). The Arguments for Measurement Evaluation dialog box appears. 4 Advanced Analysis Click the Name of trace to search button. 151 Chapter 7 Measurement Expressions The Traces for Measurement Arguments dialog box appears. Note: You will only be using the Simulation Output Variables list on the left side. Ignore the Functions or Macros list. Advanced Analysis 152 Chapter 7 Measurement Expressions 5 Uncheck the output types you don’t need (if you want to simplify the list). 6 Click on the output variable you want to evaluate. The output variable appears in the Trace Expression field. 7 Click OK. The Arguments for Measurement Evaluation dialog box reappears with the output variable you chose in the Name of trace to search field. 8 Click OK. Your new measurement expression is evaluated and displayed in the PSpice window. Advanced Analysis 153 Chapter 7 Measurement Expressions 9 Click OK in the Display Measurement Evaluation pop-up box to continue working in PSpice. Your new measurement expression is saved, but does not display in the window. The only way to get another graphical display is to redo these steps. You can see a numerical evaluation by following the next steps. 10 Click Close. Viewing the results of measurement evaluations. 1 From the View menu, select Measurement Results. The Measurement Results table displays below the plot window. 2 Click the box in the Evaluate column. A checkmark appears in the Evaluate column checkbox and the PSpice calculation for your measurement expression appears in the Value column. Advanced Analysis 154 Chapter 7 Measurement Expressions Measurement definitions included in PSpice Definition Finds the. . . Bandwidth Bandwidth of a waveform (you choose dB level) Bandwidth_Bandpass_3dB Bandwidth_Bandpass_3dB_XRange CenterFrequency CenterFrequency_XRange ConversionGain ConversionGain_XRange Cutoff_Highpass_3dB Cutoff_Highpass_3dB_XRange Cutoff_Lowpass_3dB Cutoff_Lowpass_3dB_XRange DutyCycle DutyCycle_XRange Falltime_NoOvershoot Bandwidth (3dB level) of a waveform Bandwidth (3dB level) of a waveform over a specified X-range Center frequency (dB level) of a waveform Center frequency (dB level) of a waveform over a specified X-range Ratio of the maximum value of the first waveform to the maximum value of the second waveform Ratio of the maximum value of the first waveform to the maximum value of the second waveform over a specified X-range High pass bandwidth (for the given dB level) High pass bandwidth (for the given dB level) Low pass bandwidth (for the given dB level) Low pass bandwidth (for the given dB level) over a specified range Duty cycle of the first pulse/period Duty cycle of the first pulse/period over a range Falltime with no overshoot. Falltime_StepResponse Falltime of a negative-going step response curve Falltime_StepResponse_XRange Falltime of a negative-going step response curve over a specified range GainMargin Gain (dB level) at the first 180-degree out-of-phase mark Advanced Analysis 155 Chapter 7 Measurement Expressions Definition Max Max_XRange Min Min_XRange NthPeak Overshoot Overshoot_XRange Peak Period Period_XRange PhaseMargin PowerDissipation_mW Pulsewidth Pulsewidth_XRange Q_Bandpass Q_Bandpass_XRange Risetime_NoOvershoot Risetime_StepResponse Advanced Analysis Finds the. . . Maximum value of the waveform Maximum value of the waveform within the specified range of X Minimum value of the waveform Minimum value of the waveform within the specified range of X Value of a waveform at its nth peak Overshoot of a step response curve Overshoot of a step response curve over a specified range Value of a waveform at its nth peak Period of a time domain signal Period of a time domain signal over a specified range Phase margin Total power dissipation in milli-watts during the final period of time (can be used to calculate total power dissipation, if the first waveform is the integral of V(load) Width of the first pulse Width of the first pulse at a specified range Calculates Q (center frequency / bandwidth) of a bandpass response at the specified dB point Calculates Q (center frequency / bandwidth) of a bandpass response at the specified dB point and the specified range Risetime of a step response curve with no overshoot Risetime of a step response curve 156 Chapter 7 Measurement Expressions Definition Finds the. . . Risetime_StepResponse_XRange Risetime of a step response curve at a specified range SettlingTime Time from <begin_x> to the time it takes a step response to settle within a specified band SettlingTime_XRange Time from <begin_x> to the time it takes a step response to settle within a specified band and within a specified range SlewRate_Fall Slew rate of a negative-going step response curve SlewRate_Fall_XRange Slew rate of a negative-going step response curve over an X-range SlewRate_Rise Slew rate of a positive-going step response curve SlewRate_Rise_XRange Slew rate of a positive-going step response curve over an X-range Swing_XRange XatNthY XatNthY_NegativeSlope XatNthY_PercentYRange XatNthY_Positive Slope Difference between the maximum and minimum values of the waveform within the specified range Value of X corresponding to the nth occurrence of the given Y_value, for the specified waveform Value of X corresponding to the nth negative slope crossing of the given Y_value, for the specified waveform Value of X corresponding to the nth occurrence of the waveform crossing the given percentage of its full Y-axis range; specifically, nth occurrence of Y=Ymin+(Ymax-Ymin)*Y_pct/100 Value of X corresponding to the nth positive slope crossing of the given Y_value, for the specified waveform YatFirstX Value of the waveform at the beginning of the X_value range YatLastX Value of the waveform at the end of the X_value range Advanced Analysis 157 Chapter 7 Measurement Expressions Definition Finds the. . . Value of the waveform at the given X_value YatX Value of the waveform at the given percentage of the X-axis range YatX_PercentXRange X-value where the Y-value first crosses zero ZeroCross X-value where the Y-value first crosses zero at the specified range ZeroCross_XRange For power users Creating custom measurement definitions Measurement definitions establish rules to locate interesting points and compute values for a waveform. In order to do this, a measurement definition needs: • A measurement definition name • A marked point expression These are the calculations that compute the final point on the waveform. • One or more search commands These commands specify how to search for the interesting points. Strategy Advanced Analysis 1 Decide what you want to measure. 2 Examine the waveforms you have and choose which points on the waveform are needed to calculate the measured value. 3 Compose the search commands to find and mark the desired points. 158 Chapter 7 Measurement Expressions 4 Use the marked points in the Marked Point Expressions to calculate the final value for the waveform. 5 Test the search commands and measurements. Note: An easy way to create a new definition: From the PSpice Trace menu, select Measurements to open the Measurements dialog box, then: − Select the definition most similar to your needs − Click Copy and follow the prompts to rename and edit. Writing a new measurement definition 1 From the PSpice Trace menu, choose Measurements. The Measurements dialog box appears. 2 Click New. The New Measurement dialog box appears. 3 Type a name for the new measurement in the New Measurement name field. Make sure local file is selected. This stores the new measurement in a .prb file local to the design. 4 Click OK. The Edit New Measurement dialog box appears. 5 Type in the marked expression. 6 Type in any comments you want. 7 Type in the search function. Note: For syntax information, see Measurement definition syntax on page 162 Your new measurement definition is now listed in the Measurements dialog box. Advanced Analysis 159 Chapter 7 Measurement Expressions Using the new measurement definition Your new measurement definition is now listed in the Measurements dialog box. Note: For steps on using a definition in a measurement expression to evaluate a trace, see Composing a measurement expression on page 149. Definition example 1 From the PSpice Trace menu, choose Measurements. The Measurements dialog box appears. 2 Click New. The New Measurement dialog box appears. Advanced Analysis 3 Type in a name in the New Measurement name field. 4 Make sure use local file is selected. 160 Chapter 7 Measurement Expressions This stores the new measurement in a .prb file local to the design. 5 Click OK. The Edit New Measurement dialog box appears. marked point expression comments search function 6 Type in the marked expression: point707(1) = y1 7 Type in the search function. { 1|Search forward level(70.7%, p) !1; } Note: The search function is enclosed within curly braces. Always place a semi-colon at the end of the last search function. 8 Type in any explanatory comments you want: * *#Desc#* Find the .707 value of the trace. * *#Arg1#* Name of trace to search Advanced Analysis 161 Chapter 7 Measurement Expressions * Note: For syntax information, see Measurement definition syntax on page 162. Using the new measurement definition Your new measurement definition is now listed in the Measurements dialog box. For an example of using a definition in a measurement expression to evaluate a trace, see Example on page 151. Measurement definition syntax Check out the existing measurement definitions in PSpice for syntax examples. 1 From the Trace menu in PSpice, choose Measurements. The Measurement dialog box appears. 2 Advanced Analysis Highlight any example, and select View to examine the syntax. 162 Chapter 7 Measurement Expressions Using measurement definition syntax.r.htm Using measurement definition syntax.o.htm measurement_name (1, [2, …, n][, subarg1, subarg2, …, subargm]) = marked_point_expression { 1| search_commands_and_marked_points_for_expression_1; 2| search_commands_and_marked_points_for_expression_2; n| search_commands_and_marked_points_for_expression_n; } Measurement name syntax Can contain any alphanumeric character (A-Z, 0-9) or underscore _ , up to 50 characters in length. The first character should be an upper or lower case letter. Examples of valid function names: Bandwidth, CenterFreq, delay_time, DBlevel1. Comments syntax A comment line always starts with an asterisk. Special comment lines include the following examples: *#Desc#* The measurement description *#Arg1#* Description of an argument used in the measurement definition. Advanced Analysis 163 Chapter 7 Measurement Expressions These comment lines will be used in dialog boxes, such as the Arguments for Measurement Evaluation box. Marked Point Expressions syntax A marked point expression calculates a single value, which is the value of the measurement, based on the X and Y coordinates of one or more marked points on a curve. The marked points are found by the search command. All the arithmetic operators (+, -, *, /, ( ) ) and all the functions that apply to a single point (for example, ABS(), SGN(), SIN(), SQRT() ) can be used in marked point expressions. The result of the expression is one number (a real value). Marked point expressions differ from a regular expression in the following ways: Advanced Analysis • Marked point coordinate values (for example, x1, y3), are used instead of simulation output variables (v(4), ic(Q1)). • Multiple-point functions such as d(), s(), AVG(), RMS(), MIN(), and MAX() cannot be used. • Complex functions such as M(), P(), R(), IMG(), and G() cannot be used. 164 Chapter 7 Measurement Expressions • One additional function called MPAVG can also be used. It is used to find the average Y value between 2 marked points. The format is: MPAVG(p1, p2,[<.fraction>]) where p1 and p2 are marked X points and fraction (expressed in decimal form) specifies the range. The range specified by [<.fraction>] is centered on the midpoint of the total range. The default value is 1. Example: The marked point expression MPAVG (x1, x5, .2) will find the halfway point between x1 and x5 and will calculate the average Y value based on the 20 percent of the range that is centered on the halfway point. Search command syntax search [direction] [/start_point/] [#consecutive_points#] [(range_x [,range_y])] [for] [repeat:] <condition> Brackets indicate optional arguments. You can use uppercase or lowercase characters, because searches are case independent. [direction] forward or backward The direction of the search. Search commands can specify either a forward or reverse direction. The search begins at the origin of the curve. [Forward] searches in the normal X expression direction, which may appear as backwards on the plot if the X axis has been reversed with a user-defined range. Advanced Analysis 165 Chapter 7 Measurement Expressions Forward is the default direction. [/start_point/] The starting point to begin a search. The current point is the default. Use this… ^ Begin $ End xn To start the search at this… the first point in the search range the first point in the search range the last point in the search range the last point in the search range a marked point number or an expression of marked points, for example, x1 (x1 - (x2 - x1) / 2) [#consecutive points#] Defines the number of consecutive points required for a condition to be met. Usage varies for individual conditions; the default is 1. A peak is a data point with one neighboring data point on both sides that has a lower Y value than the data point. If [#consecutive_points#] is 2 and <condition> is PEak, then the peak searched for is a data point with two neighboring data points on both sides with lower Y values than the marked data point. [(range_x[,range_y])] Specifies the range of values to confine the search. The range can be specified as floating-point values, as a percent of the full range, as marked points, or as an expression of marked points. The default range is all points available. Advanced Analysis 166 Chapter 7 Measurement Expressions Examples This range… Means this… (1n,200n) X range limited from 1e-9 to 200e-9, Y range defaults to full range (1.5,20e-9,0,1m) both X and Y ranges are limited (5m,1,10%,90%) both X and Y ranges are limited [for] [repeat:] (0%,100%,1,3) full X range, limited Y range (,,1,3) full X range, limited Y range (,30n) X range limited only on upper end Specifies which occurrence of <condition> to find. If repeat is greater than the number of found instances of <condition>, then the last <condition> found is used. Example The argument: 2:LEvel would find the second level crossing. <condition> Must be exactly one of the following: • LEvel(value[,posneg]) • SLope[(posneg)] • PEak • TRough • MAx • MIn • POint • XValue(value) Each <condition> requires just the first 2 characters of the word. For example, you can shorten LEvel to LE. Advanced Analysis 167 Chapter 7 Measurement Expressions If a <condition> is not found, then either the cursor is not moved or the goal function is not evaluated. LEvel(vahlue[,posneg]) [,posneg] Finds the next Y value crossing at the specified level. This can be between real data points, in which case an interpolated artificial point is created. At least [#consecutive_points#]-1 points following the level crossing point must be on the same side of the level crossing for the first point to count as the level crossing. [,posneg] can be Positive (P), Negative (P), or Both (B). The default is Both. (value) can take any of the following forms: Value form Example a floating number 1e5 100n 1 a percentage of full range 50% a marked point x1 y1 or an expression of marked points (x1-x2)/2 a value relative to startvalue .-3 ⇒ startvalue -3 a db value relative to startvalue .-3db ⇒ 3db below startvalue a value relative to max or min max-3 ⇒ maxrng -3 .+3 ⇒ startvalue +3 .+3db ⇒ 3db above startvalue min+3 ⇒ minrng +3 a db value relative to max max-3db ⇒ 3db below maxrng or min min+3db ⇒ 3db above minrng decimal point ( . ) Advanced Analysis A decimal point ( . ) represents the Y value of the last point found using a search on the current trace expression of the 168 Chapter 7 Measurement Expressions goal function. If this is the first search command, then it represents the Y value of the startpoint of the search. SLope[(posneg)] Finds the next maximum slope (positive or negative as specified) in the specified direction. [(posneg)] refers to the slope going Positive (P), Negative (N), or Both (B). If more than the next [#consecutive_points#] points have zero or opposite slope, the Slope function does not look any further for the maximum slope. Positive slope means increasing Y value for increasing indices of the X expression. The point found is an artificial point halfway between the two data points defining the maximum slope. The default [(posneg)] is Positive. PEak Finds the nearest peak. At least [#consecutive_points#] points on each side of the peak must have Y values less than the peak Y value. TRough Finds nearest negative peak. At least [#consecutive_points#] points on each side of the trough must have Y values greater than the trough Y value. MAx Finds the greatest Y value for all points in the specified X range. If more than one maximum exists (same Y values), then the nearest one is found. MAx is not affected by [direction], [#consecutive_points#], or [repeat:]. MIn Finds the minimum Y value for all points in the specified X range. MIn is not affected by [direction], [#consecutive_points#], or [repeat:]. POint XValue(value) Finds the next data point in the given direction. Finds the first point on the curve that has the specified X axis value. The (value) is a floating-point value or percent of full range. Advanced Analysis 169 Chapter 7 Measurement Expressions XValue is not affected by [direction], [#consecutive_points#], [(range_x [,range_y])], or [repeat:]. (value) can take any of the following forms: Value form Example a floating number 1e5 100n 1 a percentage of full range 50% a marked point x1 y1 or an expression of marked points (x1+x2)/2 a value relative to startvalue .-3 ⇒ startvalue -3 a db value relative to startvalue .-3db ⇒ 3db below startvalue a value relative to max or min max-3 ⇒ maxrng -3 .+3 ⇒ startvalue +3 .+3db ⇒ 3db above startvalue min+3 ⇒ minrng +3 Syntax example Using The measurement definition is made up of: • A measurement name • A marked point expression • One or more search commands enclosed within curly braces This example also includes comments about: Advanced Analysis • The measurement definition • What arguments it expects when used 170 Chapter 7 Measurement Expressions • A sample command line for its usage Any line beginning with an asterisk is considered a comment line. Risetime definition Risetime(1) = x2-x1 * *#Desc#* Find the difference between the X values where the trace first *#Desc#* crosses 10% and then 90% of its maximum value with a positive *#Desc#* slope. *#Desc#* (i.e. Find the risetime of a step response curve with no *#Desc#* overshoot. If the signal has overshoot, use GenRise().) * *#Arg1#* Name of trace to search * * Usage: *Risetime(<trace name>) * { 1|Search forward level(10%, p) !1 Search forward level(90%, p) !2; } The name of the measurement is Risetime. Risetime will take 1 argument, a trace name (as seen from the comments). Advanced Analysis 171 Chapter 7 Measurement Expressions The first search function searches forward (positive x direction) for the point on the trace where the waveform crosses the 10% point in a positive direction. That point’s X and Y coordinates will be marked and saved as point 1. The second search function searches forward in the positive direction for the point on the trace where the waveform crosses the 90% mark. That point’s X and Y coordinates will be marked and saved as point 2. The marked point expression is x2-x1. This means the measurement calculates the X value of point 2 minus the X value of point 1 and returns that number. Advanced Analysis 172 Optimization Engines 8 In this chapter • LSQ engine on page 173 • Modified LSQ engine on page 184 • Random engine on page 189 • Discrete engine on page 192 LSQ engine The LSQ engine works with the measurement goals you define, minimizing the difference between the present circuit measurements and your goal by adjusting the circuit parameters you have chosen. Principles of operation Parameters The LSQ engine optimizes the design by minimizing the total error. Advanced Analysis 173 Chapter 8 Optimization Engines n Totalerror = ∑ ( err g ) 2 g=1 Each parameter that is varied adds a dimension to the problem. In the simple case of two parameters, you have a three-dimensional problem. Complexity increases as you add parameters. Local and global minimums Picture the problem in terms of a metaphor such as a mountain range. Define the direction north/south as parameter A, direction east/west as parameter B, and the ground altitude above sea level as the total error. A grid plot of the total error relative to the parameters then resembles a topographic map, as the mountain range metaphor figure Advanced Analysis 174 Chapter 8 Optimization Engines below shows. In the figure, the boundaries between shading colors represent equal error values, or altitude contours. The map is bounded by the ranges of parameter A and parameter B, which define your design space. The terrain has mountains and valleys, or regions of high or low total error. Some valleys are sinks, completely bounded by contours. The bottom of any valley in the design space is a local minimum. It may be in a sink, or at a point where the valley is cut off by a design space boundary. The global minimum is the lowest point within the area boundaries. Ideally, this point will be at sea level, or zero error. (There is no Death Valley, or negative error, sink in the metaphor.) Advanced Analysis 175 Chapter 8 Optimization Engines Your starting point depends on the initial values of each parameter. It might be close to a local minimum, or on a hill overlooking several local minimums. Typically, your starting point will be somewhere in the middle of the design space, but this can be changed by modifying component values. The LSQ engine, and you as the user, do not have an eagle’s eye view of the terrain such as the topographic map figure above gives us. Instead, the terrain is completely fogged in. The engine is set at a starting point without prior knowledge of the topography. It must search for the bottom of a valley (local minimum) by feeling its way with trial runs, and only taking steps that move downhill. The valley it moves into depends on the starting parameter values and the contour of the design space. Your search objective is to find the optimum solution. This may be the global minimum. However, if factors such as cost and manufacturability are considered, the optimum solution may be another local minimum with an acceptable total error. Finding the optimum result may require extensive searches with starting points widely distributed over the design space. This is especially true in complex schematics with numerous parameters. Before each step, the LSQ engine does a sensitivity run for each parameter. These runs are essentially tiny steps in the Parameter A and Parameter B directions. From the up or down movement found in each direction, the LSQ engine estimates the downhill direction, or direction of steepest descent. It then takes a step in that direction. E (0,0,1) Sensitivity (0.3,0,0.7) Sensitivity (0,0.3,0.5) (A, B, E) A (0,0,0) B Advanced Analysis TRIAL STEP 176 Chapter 8 Optimization Engines For the first step, no slope (gradient) is known, so a guess on the step size is made based on the internal parameters in the LSQ engine. Often the LSQ engine attempts to take several steps based on the sensitivity data or the results of each step, but only one step is accepted for each iteration. As the LSQ engine completes an iteration, it begins to estimate the slope of the mountain. This aids it in determining the size of the next step and whether the bottom of the valley (local minimum) has been found. When the engine finds a local minimum, it stops and reports the position and total error. This may or may not be the optimum solution or an acceptable solution. Local minima and searching Finding the optimum solution may be difficult in complex designs with many variables in the design space. Changing starting parameters, constraints, and goals can be used to search more of the design space in an attempt to find a better solution. This extended searching of the design space usually is not needed because the LSQ engine can easily find a global minimum that is not the optimum solution yet is acceptable. Sometimes the local minimum is not acceptable and modifications to the optimization problem might help find an acceptable global minimum. This limitation is shared by all minimizing algorithms like LSQ. If the LSQ engine gets stuck in an unacceptable local minimum, several options can help find an acceptable answer. Three good approaches are: Advanced Analysis • Start from different initial parameter values. • Change a goal to a more optimistic or less optimistic value. This changes the shape of the terrain, or total error surface. • Stop the Optimizer and then restart it. This throws out the slope (gradient) information, forcing the step size to be a guess which could get you out of the local minimum. 177 Chapter 8 Optimization Engines Parameter mapping For reasons of numerical accuracy and solution stability, the LSQ optimizing algorithm does not work directly with schematic parameter values. Instead, a mapping and normalizing algorithm relates the schematic parameters to the variables that are adjusted during optimization. The mapping and normalizing restricts the parameter values to a range that you specify, and concentrates adjustments on the center of the range. The LSQ engine uses a multiplier and an arctan function for mapping the values adjusted by the optimizer to the schematic parameter values. The arctan function is shown in the following figure. Arctan Mapping Function Curve Advanced Analysis 178 Chapter 8 Optimization Engines In the figure, the value adjusted in the Optimizer is the x-axis. Potentially, it can have any value from negative infinity to positive infinity. In practice, its values are limited by the system, and the absolute magnitudes are usually small when a solution is near. The arctan mapping function relates the normalized parameter range to the Optimizer adjusted value. When the adjusted value is near zero, the normalized parameter is near zero, and small value adjustments produce relatively large changes in the parameter. Farther from zero, the same adjustments produce smaller parameter changes, as shown in ranges A and B in the figure above. You define the actual parameter range by choosing minimum and maximum values. The actual range is scaled and offset to the normalized range. You should center the minimum and maximum values on the actual parameter starting value, so that the starting value corresponds to zero in the normalized range. The linear approximations in optimization algorithms work well over about 90-95 percent of the normalized parameter range. Difficulties occur when the parameter approaches either of its limits. When the parameter is within about one or two percent of the range from a minimum or maximum limit, the slope of the mapping function approaches zero and the parameter is essentially locked at its current value. When the parameter is slightly farther from a minimum or maximum limit, the slope of the arctan curve changes rapidly. Linear approximations cause overshoot of the zero point, and the normalized values tend to bounce back and forth between near-minimum and near-maximum values. This bouncing can occur for several iterations, but usually stops as the parameter values move out of this area. Advanced Analysis 179 Chapter 8 Optimization Engines Configuring the LSQ engine In most cases, you do not need to change the LSQ default options. The engine defaults do the best job in almost all situations. In the event that you do need to change a default option, use the Optimizer tab’s, Engine, LSQ options to do so. To view and change the default options: Advanced Analysis 1 From the Advanced Analysis Edit menu, select Profile Settings. 2 Click the Optimizer tab and select LSQ from the Engine drop-down list. 3 Edit default values in the labeled text boxes. 180 Chapter 8 Optimization Engines 4 Click OK. LSQ Engine Options Default Value Sensitivity Perturbation Size .005 Absolute Function Convergence Tolerance 1.0e-20 Relative Function Convergence Tolerance 1.0e-10 X-Convergence Tolerance 1.0e-4 False Convergence Tolerance 1.0e-14 Minimum Factor to Increment Trust Region 2.0 Maximum Factor to Increment Trust Region 4.0 Maximum number of trial runs 0 If the LSQ engine has problems finding a solution or stops too soon, the convergence options can be modified to affect the algorithm. Unlike PSpice where only one solution exists, the LSQ engine potentially has many solutions (minimums) available in the design space. Some of the available options are also in the PSpice options list, although their effect in the LSQ optimization might not be as easy to follow as in PSpice. The LSQ options affect how quickly a solution is obtained. By tightening the options, you may cause the LSQ engine to take extra iterations to find the solution. By loosening the options, you may find a less accurate solution. Optimization Run Controls One of the options available with the LSQ engine lets you limit the number of optimization trial runs. The Max Number of Trial Runs option provides a way for you to stop the optimizer after a specified number of trial runs. This option can be used in any optimization to limit how long the optimizer tries to find a solution. This is done by stopping the optimizer after the maximum number of trial runs have been completed. Advanced Analysis 181 Chapter 8 Optimization Engines Also, depending on your design, the LSQ engine might find a very steep valley that it cannot descend into. In this case, the engine bounces from one side to the other without getting anywhere. Probe, the PSpice waveform analysis feature, will help you prevent this situation. Sensitivity Analysis Options The following options control the values used in the sensitivity analysis. Note: Changes to the default values of these options can lead to an unpredictable solution (minimum). Use these options with extreme care. Sensitivity Perturbation Size The sensitivity perturbation size. This controls the delta increase used to determine the parameter value in each sensitivity run. The default is 0.005, which results in parameters using their present value times 0.5 percent for each sensitivity analysis. Increasing the following options tends to make the algorithm take larger steps sooner. The trust region is the distance that the algorithm trusts its predictions. Minimum Factor to Increment Trust Region The minimum factor by which to increase the trust region. This option allows you to set the minimum step size increase allowed by the LSQ engine for trial runs. Maximum Factor to Increment Trust Region The maximum factor by which to increase the trust region. This option allows you to set the maximum step size increase allowed by the LSQ engine for trial runs. Convergence Options The following options control the convergence (stopping) criteria for the LSQ engine. These options are similar to convergence options in PSpice. Note: Changes to the default values of these options can lead to an unpredictable solution (minimum). Use these options with extreme care. Advanced Analysis 182 Chapter 8 Optimization Engines Relative Function Convergence Tolerance A relative function convergence tolerance (RFCTOL) that checks the error size. Relative convergence occurs if the: Current Value – Goal Value ≤ RFCTOL × Current Value X-Convergence Tolerance The X-Convergence tolerance (XCTOL) that checks the step size. X-convergence occurs if a Newton step is tried and the relative step size is less than or equal to XCTOL. Absolute Function Convergence tolerance An absolute function convergence tolerance (AFCTOL). AFCTOL convergence occurs if the LSQ engine finds a point where the function value (half the sum of the squares) is less than AFCTOL, and RFCTOL and XCTOL tests have failed. False Convergence Tolerance The false-convergence tolerance (XFTOL) that checks if the solutions are converging to a noncritical point. False convergence occurs if: Advanced Analysis • There is no convergence of AFCTOL, RFCTOL, or XCTOL • The present step yields less than twice the predicted decrease • The relative step size is less than or equal to XFTOL 183 Chapter 8 Optimization Engines Modified LSQ engine The Modified LSQ engine uses both constrained and unconstrained minimization algorithms, which allow it to optimize goals subject to nonlinear constraints. The Modified LSQ engine runs faster than the LSQ engine because it runs a reduced number of incremental adjustments toward the goal. Configuring the Modified LSQ engine 1 From the Advanced Analysis Edit menu, select Profile Settings. 2 Click the Optimizer tab. 3 From the Engine drop-down list, select Modified LSQ. 4 Edit default values in the text boxes. See detailed explanations provided on the next few pages. Advanced Analysis 184 Chapter 8 Optimization Engines 5 Select the One Goal option that you prefer: Least Squares or Minimize. See Single goal optimization settings on page 188 for details. 6 Modified LSQ Engine Options Click OK. Default Value Function Delta The relative amount (as a percentage of current parameter value) 1% the engine moves each parameter from the proceeding value when calculating the derivatives. Max # of Optimizations The most attempts the Modified LSQ Engine should make before 20 giving up on the solution (even if making progress). The minimum fraction by which an internal step is reduced while 0.25 the Modified LSQ Engine searches for a reduction in the goal’s target value. If the data is noisy, consider increasing the Cutback value from its default of 0.25. The minimum step size the Modified LSQ engine uses to adjust 0 the optimization parameters. Cutback Threshold Delta calculations The optimizer uses gradient-based optimization algorithms that use a finite difference method to approximate the gradients (gradients are not known analytically). To implement finite differencing, the Modified LSQ engine: 1. Moves each parameter from its current value by an amount Delta. 2. Evaluates the function at the new value. 3. Subtracts the old function value from the new. 4. Divides the result by Delta. Note: There is a trade-off. If Delta is too small, the difference in function values is unreliable due to numerical inaccuracies. However if Delta is too large, the result is a poor approximation to the true gradient. Advanced Analysis 185 Chapter 8 Optimization Engines Editing Delta Enter a value in the Delta text box that defines a fraction of the parameter’s total range. Example: If a parameter has a current value of 10–8, and Delta is set to 1% (the default), then the Modified LSQ Engine moves the parameter by 10–10. The 1% default accuracy works well in most simulations. If the accuracy of your simulation is very different from typical (perhaps because of the use of a non-default value for either RELTOL or the time step ceiling for a Transient analysis), then change the value of Delta as follows: − If simulation accuracy is better, smaller adjustments are needed; decrease Delta by an appropriate amount. − If simulation accuracy is worse, larger adjustments are needed; increase Delta by an appropriate amount. Note: The optimum value of Delta varies as the square root of the relative accuracy of the simulation. For example, if your simulation is 100 times more accurate than typical, you should reduce Delta by a factor of 10. Threshold calculations The Threshold option defines the minimum step size the Modified LSQ Engine uses to adjust the optimization parameters. The optimizer assumes that the values measured for the specifications change continuously as the parameters are varied. In practice, this assumption is not justified. For some analyses, especially transient analyses, the goal function values show discontinuous behavior for small parameter Advanced Analysis 186 Chapter 8 Optimization Engines changes. This can be caused by accumulation of errors in iterative simulation algorithms. The hypothetical data glitch figure demonstrates a typical case. The effect of the glitch is serious—the optimizer can get stuck in the spurious local minimum represented by the glitch. The optimizer’s threshold mechanism limits the effect of unreliable data. Between iterations Enter a value that defines a fraction of the current parameter value. Example: A Threshold value of 0.01 means that the Modified LSQ Engine will change a parameter value by 1% of its current value when the engine makes a change. By default, Threshold is set to 0 so that small changes in parameter values are not arbitrarily rejected. To obtain good results, however, you may need to adjust the Threshold value. When making adjustments, consider the following: Advanced Analysis − If data quality is good, and Threshold is greater than zero, reduce the Threshold value to find more accurate parameter values. − If data quality is suspect (has potential for spurious peaks or glitches), increase the Threshold value to 187 Chapter 8 Optimization Engines ensure that the optimizer will not get stuck during the run. Least squares / minimization The Modified LSQ Engine implements two general classes of algorithm to measure design performance: least squares and minimization. These algorithms are applicable to both unconstrained and constrained problems. Least squares When optimizing for more than one goal, the Modified LSQ Engine always uses the least-squares algorithm. A reliable measure of performance for a design with multiple targets is to take the deviation of each output from its target, square all deviations (so each term is positive) and sum all of the squares. The Modified LSQ Engine then tries to reduce this sum to zero. This technique is known as least squares. Note that the sum of the squares of the deviations becomes zero only if all of the goals are met. Minimization Another measure of design performance considers a single output and reduces it to the smallest value possible. Example: Power or propagation delay, each of which is a positive number with ideal performance corresponding to zero. Single goal optimization settings When optimizing for more than one goal, the Modified LSQ Engine always uses the least-squares algorithm. For a single goal, however, you must specify the algorithm for the optimizer. 1 Do one of the following: − Select the Least Squares option button to minimize the square of the deviation between the measured and target value. Or: − Advanced Analysis Select the Minimize option button to reduce a value to the smallest possible value. 188 Chapter 8 Optimization Engines If your optimization problem is to maximize a single goal, then set up the specification to minimize the negative of the value. For example: To maximize gain, set up the problem to minimize –gain. Random engine When you use the LSQ or Modified LSQ engines, it is sometimes difficult to determine where your starting points for optimization should be. The Random engine provides a good way to find these points. The Random engine applies a grid to the design space and randomly runs analysis at the grid points. It keeps track of the grid points already run so that it never runs a duplicate set of parameter values. Once it finishes its initial analysis, it reruns the best points so you can easily use them for LSQ or Modified LSQ. Advanced Analysis 189 Chapter 8 Optimization Engines Configuring the Random Engine The Random Engine defaults are listed in a dialog box available from the Optimizer tab’s, Engine, Random options. To view and change the default options: Advanced Analysis 1 From the Advanced Analysis Edit menu, select Profile Settings 2 Click the Optimizer tab and select Random from the Engine drop-down list. 3 Edit the default value in the text box. 4 Click OK. 190 Chapter 8 Optimization Engines Steps per Range Random Engine Options Default Value Steps per Range 10 Max Number of Runs 10 Replay Best N Runs at End 0 Random Number Generator Seed 0 Specifies the number of steps into which each parameter’s range of values should be divided. For example, if this option is set to 7 and you have the following parameters Parameter Min Max A 1 4 B 10 16 The possible parameter values would be Parameter A = 1, 1.5, 2, 2.5, 3, 3.5, 4 Parameter B = 10, 11, 12, 13, 14, 15, 16 Max Number of Runs Specifies the maximum number of random trial runs that the engine will run. The engine will run either the total number of all grid points or the number specified in this option, whichever is less. Note: With 10 parameters, the number of grid points in the design exploration (NumSteps#params) would be 810 = 1,073,741,824. For example, if Max Number of Runs is 100, Steps per Range is 8, and you have one parameter being optimized, there will be 8 trial runs. However, if you have 10 parameters being optimized, then there will be 100 runs. Replay Best N Runs at End Advanced Analysis Specifies the number of “best” runs the engine should rerun and display at the end of the analysis. 191 Chapter 8 Optimization Engines Note: The Replay runs are done after the trial runs. If Max Number of Runs is 100 and Replay is 10, there may be up to 110 runs total. Random Number Generator Seed Specifies the seed for the random number generator. Unlike the Monte Carlo tool, the seed in this engine does not automatically change between runs. Therefore, if you rerun the Random engine without changing any values, you will get the same results. Discrete engine The Discrete engine finds the nearest commercially available value for a component. The other engines calculate component values, but those values might not be commercially available. The discrete engine is a conceptual engine, rather than a true engine in that it does not actually perform an optimization, it finds available values from lists. An example is a resistor that is assigned an optimal value of 1.37654328K ohms, which is not a standard value. Depending on the parameter tolerance and the manufacturer’s part number, the only values available might be 1.2K and 1.5K ohms. The Discrete engine selects parameter values based on discrete value tables for these parameters. Once a value is selected, the engine makes a final run that lets you review the results in both the Optimizer and the output tools. If the results of the discrete analysis are not acceptable, the design can be optimized again to find another global minimum that might be less sensitive. Advanced Analysis 192 Chapter 8 Optimization Engines Commercially available values Advanced Analysis includes discrete tables of commercially available values for resistors, capacitors, and inductors. These tables are text files with a .table file extension. See “Assigning available values with the Discrete engine” on page 75 for instructions on selecting the discrete tables provided with Advanced Analysis Optimizer. In addition, you can add your own discrete values tables to an Advanced Analysis project using the dialog box shown below. Required syntax for custom discrete values tables and instructions for using this dialog box are provided in a technical note available on our web site: www.pspice.com After you have found commercial values for your design, you should run Monte Carlo and Sensitivity to ensure that the design is producible. Occasionally, the optimization process can find extremely good results, but it can be sensitive to even minor changes in parameter values. Advanced Analysis 193 Chapter 8 Optimization Engines Advanced Analysis 194 Glossary absolute sensitivity The change in a measurement caused by a unit change in parameter value (for example, 0.1V : 1Ohm). bimodal distribution function Related to Monte Carlo. This is a type of distribution function that favors the extreme ends of the values range. With this distribution function, there is a higher probability that Monte Carlo will choose values from the far ends of the tolerance range when picking parameter values for analysis. component A circuit device, also referred to as a part. component parameter A physical characteristic of a component. For example, a breakdown temperature is a parameter for a resistor. A parameter value can be a number or a named value, like a programming variable that represents a numeric value. When the parameter value is a name, its numerical solution can be varied within a mathematical expression and used in optimization. constraint Related to Modified LSQ optimization engine. An achievable numerical value in circuit optimization. A constraint is specified by the user according to the user’s design specifications. The Modified LSQ engine works to meet the goals, subject to the specified constraints. Advanced Analysis 195 Glossary cumulative distribution function (CDF) A way of displaying Monte Carlo results that shows the cumulative probability that a measurement will fall within a specified range of values. The CDF graph is a stair-step chart that displays the full range of calculated measurement values on the x-axis. The y-axis displays the cumulative number of runs that were below those values. derating factor A safety factor that you can add to a manufacturer’s maximum operating condition (MOC). It is usually a percentage of the manufacturer’s MOC for a specific component. “No derating” is a case where the derating factor is 100 percent. “Standard derating” is a case where derating factors of various percents are applied to different components in the circuit. device See component distribution function Related to Monte Carlo. When Monte Carlo randomly varies parameter values within tolerance, it uses that parameter’s distribution function to make a decision about which value to select. See also: Flat (Uniform), Gaussian (Normal), Bimodal, and Skewed distribution functions. See also cumulative distribution function. Discrete engine Related to the Optimizer. The Discrete engine is a calculation method that selects commercially available values for components and uses these values in a final optimization run. The engine uses default tables of information provided with Advanced Analysis or tables of values specified by the user. discrete values table For a single component (such as a resistor), a discrete values table is a list of commercially available numerical values for that component. Discrete values tables are available from manufacturers, and several tables are provided with Advanced Analysis. Advanced Analysis 196 Glossary error graph A graph of the error between a measurement’s goal or constraint and the calculated value for the measurement. Sometimes expressed in percent. Error = (Calculated meas. value - Goal value) / Goal value Error = (Calculated meas. value - Constraint) / Constraint flat distribution function Also known as Uniform distribution function. Related to Monte Carlo. This is the default distribution function used by Advanced Analysis Monte Carlo. For a Flat (Uniform) distribution function, the program has an equal probability of picking any value within the allowed range of tolerance values. Gaussian distribution function Also known as Normal distribution function. Related to Monte Carlo. For a Gaussian (Normal) distribution function, the program has a higher probability of choosing from a narrower range within the allowed tolerance values near the mean. global minimum Related to the Optimizer. The global minimum is the optimum solution, which ideally has zero error. But factors such as cost and manufacturability might make the optimum solution another local minimum with an acceptable total error. goal A desirable numerical value in circuit optimization. A goal may not be physically achievable, but the optimization engine tries to find answers that are as close as possible to the goal. A goal is specified by the user according to the user’s design specifications. Least Squares Quadratic (LSQ) engine One of the most common circuit optimization engines for optimizing to fixed goals. Optimizes the design by minimizing the total error. local minimum Related to the Optimizer. Local minimum is the bottom of any valley in the error in the design space. LSQ engine See least squares quadratic (LSQ) engine and Modified LSQ engine. Advanced Analysis 197 Glossary Maximum Operating Conditions (MOCs) Maximum safe operating values for component parameters in a working circuit. MOCs are defined by the component manufacturer. Modified Least Squares Quadratic (LSQ) engine A circuit optimization engine that uses a slightly different algorithm than the LSQ engine, which results in fewer runs to reach results, and allows goal- and constraint-based optimization. measurement expression An expression that evaluates a characteristic of one or more waveforms. A measurement expression contains a measurement definition and an output variable. For example, Max(DB(V(load))). Users can create their own measurement expressions. nominal value For a component parameter, the nominal value is the original numerical value entered on the schematic. For a measurement, the nominal value is the value calculated using original component parameter values. model A mathematical characterization that emulates the behavior of a component. A model may contain parameters so the component’s behavior can be adjusted during optimization or other advanced analyses. Monte Carlo analysis Calculations that estimate statistical circuit behavior and yield. Uses parameter tolerance data. Also referred to as yield analysis. normal distribution function See Gaussian distribution function optimization An iterative process used to get as close as possible to a desired goal. original value See nominal value parameter See component parameter parameterized library A library that contains components whose behaviors can be adjusted with parameters. The Advanced Analysis libraries include components with tolerance parameters, smoke parameters, and optimizable parameters in their models. part See component Advanced Analysis 198 Glossary probability distribution function (PDF) graph A way of displaying Monte Carlo results that shows the probability that a measurement will fall within a specified range of values. The PDF graph is a bar chart that displays the full range of calculated measurement values on the x-axis. The y-axis displays the number of runs that met those values. For example, a tall bar (bin) on the graph indicates there is a higher probability that a circuit or component will meet the x-axis values (within the range of the bar) if the circuit or component is manufactured and tested. Random engine Related to Optimizer. The Random engine uses a random number generator to try different parameter value combinations then chooses the best set of parameter values in a series of runs. relative sensitivity Relative sensitivity is the percent change in measurement value based on a one percent positive change in parameter value for the part. Safe Operating Limits (SOLs) Maximum safe operating values for component parameters in a working circuit with safety factors (derating factors) applied. Safety factors can be less than or greater than 100 percent of the maximum operating condition depending on the component. sensitivity The change in a simulation measurement produced by a standardized change in a parameter value: ∆ measurement S ( measurement ) = --------------------------------∆ parameter See also relative and absolute sensitivity. skewed distribution function Advanced Analysis Related to Monte Carlo. This is a type of distribution function that favors one end of the values range. With this distribution function, there is a higher probability that Monte Carlo will choose values from the skewed end of the tolerance range when picking parameter values for analysis. 199 Glossary Smoke analysis A set of safe operating limit calculations. Uses component parameter maximum operating conditions (MOCs) and safety factors (derating factors) to calculate if each component parameter is operating within safe operating limits. Also referred to as stress analysis. specification A goal for circuit design. In Advanced Analysis, a specification refers to a measurement expression and the numerical min or max value specified or calculated for that expression. uniform distribution function See flat distribution function weight Related to Optimizer. In Optimizer, we are trying to minimize the error between the calculated measurement value and our goal. If one of our goals is more important than another, we can emphasize that importance, by artificially making that goal’s error more noticeable on our error plot. If the error is artificially large, we’ll be focusing on reducing that error and therefore focusing on that goal. We make the error stand out by applying a weight to the important goal. The weight is a positive integer (say, 10) that is multiplied by the goal’s error, which results in a “magnified” error plot for that goal. worst-case maximum Related to Sensitivity. This is a maximum calculated value for a measurement based on all parameters set to their tolerance limits in the direction that will increase the measurement value. worst-case minimum Related to Sensitivity. This is a minimum calculated value for a measurement based on all parameters set to their tolerance limits in the direction that will decrease the measurement value. Advanced Analysis 200 Glossary yield Advanced Analysis Related to Monte Carlo. Yield is used to estimate the number of usable components or circuits produced during mass manufacturing. Yield is a percent calculation based on the number of run results that meet design specifications versus the total number of runs. For example, a yield of 99 percent indicates that of all the Monte Carlo runs, 99 percent of the measurement results fell within design specifications. 201 Glossary Advanced Analysis 202 Index <MIN>, 46 @Max, 56 @Min, 56 A absolute sensitivity, 195 accuracy and RELTOL, 186 and Threshold value, 187 accuracy of simulation adjusting Delta value for, 186 optimum Delta value variation, 186 advanced analysis files, 18 algorithm least squares, 173 least squares quadratic, 181 arctan function, mapping parameters with, 178 B bar graph style linear view, 57 log view, 57 bimodal distribution function, 195 Advanced Analysis C CDF graph, 123 circuit preparation adding additional parameters, 32 creating new designs, 31 modifying existing designs, 35 selecting parameterized components, 31 setting parameter values, 31 using the design variables table, 34 clear history, 73 component, 195 component parameter, 195 configuring the Monte Carlo tool, 119 the Optimizer tool, 71 the Sensitivity tool, 44 the Smoke tool, 106 constraint, 195 convergence, false, 183 cross-hatched background, 74 cumulative distribution function (CDF), 196 cursors, 124 custom derating selecting the option, 107 customer support knowledge base, 13 knowledge exchange, 13 203 Index support connection, 13 technical library, 13 www.pcb.cadence.com/Technical, 13 D data sorting, 45 viewing, 45 Delta option, 185 derating factor, 196 derivatives calculating, 185 finite differencing, 185 design variables table, 34 device, 196 device property files, 18 dialog box Arguments for Measurement Evaluation, 151 Display Measurement Evaluation, 154 Measurements, 151 Traces for Measurement Arguments, 152 Discrete engine, 192, 196 discrete value tables, 18 discrete values table, 196 DIST, 25 distribution function, 196 bimodal, 195 flat, 197 Gaussian, 197 normal, 197 skewed, 199 uniform, 197 distribution parameter DIST, 25 E engine Discrete, 66, 75, 192 LSQ, 66, 173 Modified LSQ, 66, 184 Advanced Analysis Random, 189 engines Random, 189 error graph, 197 exponential numbers numerical conventions, 20 F file extensions .aap, 18 .drt, 18 .prp, 18 .sim, 18 Find in Design, 59, 76 flat distribution function, 197 G Gaussian distribution function, 197 global minimum, 174, 197 goal, 197 goal functions, 149 graphs cumulative distribution function, 123 cursors, 124 monte carlo CDF graph, 139 monte carlo PDF graph, 122, 137, 199 optimizer Error Graph, 73, 75, 88 probability distribution function, 122 sensitivity bar graph, 46, 55 smoke bar graph, 104–105, 107 I iterations, limiting in Enhanced LSQ optimization, 185 K keywords semiconductors, 111 knowledge base, 13 knowledge exchange, 13 204 Index L least squares algorithm, 173, 188 Least Squares option, 188 Least Squares Quadratic (LSQ) engine, 197 libraries installation location, 27 library list location, 28 selecting parameterized components, 31 tool tip, 30 using the library list, 28 libraries used in examples ANALOG, 33 PSPICE_ELEM, 36 SPECIAL, 34 linear bar graph style, 46 local minimum, 174, 197 log bar graph style, 46 loosening LSQ engine options, 181 LSQ algorithm, 173 LSQ engine iterations, 177 options AFCTOL, 183 defaults, 180 INCFAC, 182 RDFCMX, 182 RFCTOL, 183 XCTOL, 183 XFTOL, 183 LSQ engine options, 181 LTOL%, 32 M Max. Iterations option, 185 maximum operating conditions (MOCs), 198 measurement disable, 74 editing, 75, 93 exclude from analysis, 74 Advanced Analysis expressions, 147 hiding trace on graph, 75 importing from PSpice, 75 strategy, 148 measurement definition selecting and evaluating, 149 syntax, 162 writing a new definition, 160 measurement definitions creating custom definitions, 158 included in PSpice, 155 measurement expression, 198 measurement definition, 149 output variable, 149 output variables, 149 value in PSpice, 150 viewing in PSpice, 150 measurement expressions composing, 149 creating, 149 PSpice Simulation Results view, 149 setup, 148 Simulation Results view, 149 measurement expressions included in PSpice (list), 155 measurement results PSpice view menu, 150 measurements overview, 147 minimization, 188 minimization algorithm, 188 Minimize option, 188 model, 198 Modified LSQ engine, 198 Modified LSQ engine options, 185 monte carlo adding a measurement, 126 allowable PSpice simulations, 17 analysis runs, 120 CDF graph, 123 controlling measurement specifications, 126 cursors, 124 205 Index distribution parameters, 25 editing a measurement, 126 editing a measurement spec min or max value, 127 example, 129 excluding a measurement from analysis, 126 overview, 115 pausing analysis, 125 pdf graph, 122 printing raw measurement data, 127 procedure, 117 raw measurements table, 124 restricting calculation range, 124 resuming analysis, 125 statistical information table, 121 stopping analysis, 126 strategy, 116 workflow, 117 monte carlo results 3 sigma, 122 6 sigma, 122 cursor max, 121 cursor min, 121 mean, 122 median, 122 standard deviation, 122 yield, 122 monte carlo setup options number of bins, 120 Number of runs, 122 number of runs, 119 random seed value, 120 starting run number, 119 N NEGTOL, 32 nominal value, 198 normal distribution function, 197 numerical conventions, 20 mega, 21 milli, 20 Advanced Analysis O optimization choosing least squares or minimization, 188 controlling parameter perturbation, 185 for one goal, 188 limiting iterations, 185 optimizations Advanced Analysis, 65 PSpice, 39 optimizer adding a new measurement, 75 allowable PSpice simulations, 17 analysis runs, 73 clearing the Error Graph history, 73 constraints, 72 controlling component parameters, 74 controlling optimization, 73 displaying run data, 73 editing a measurement, 75 engines, 66 excluding a measurement from analysis, 74 goals, 72 hiding a measurement trace, 75 importing measurements, 71 overview, 65 pausing a run, 73 procedure, 70 setting up component parameters, 71 setting up in Advanced Analysis, 71 setting up measurement specifications, 71 setting up the circuit, 70 starting a run, 73 stopping a run, 74 strategy, 67 weighting the goals or constraints, 72 workflow, 69 options Delta, 185 Least Squares, 188 206 Index Max. Iterations, 185 Minimize, 188 original value, 198 output variables selecting, 149 P parameter, 24 parameterized components, 24 parameterized library, 198 Parameterized Part icon, 30 parameters controlling perturbation, 185 distribution, 25 optimizable, 24, 26 overriding global values, 39 sending to Optimizer from Sensitivity, 60 setting values, 31 smoke, 24, 26, 110 tolerance, 24–25 using the schematic editor, 32 part, 198 PDF graph, 122 POSTOL, 32 probability distribution function (PDF) graph, 199 project setup validating the initial project, 17 R Random engine, 189, 199 NumRuns option, 191 NumSteps option, 191 options, 191–192 Raw Measurements table, 124 read-only data, 74, 99, 142 red, 104 references Advanced Analysis library list, 11 auto-help, 11 related documentation, 11 relative sensitivity, 56, 199 Advanced Analysis RELTOL option, 186 restricting calculation range, 124 S safe operating limits (SOLs), 199 see also property, 24 see measurements, 149 Send to Optimizer, 61 sensitivity, 199 absolute, 62 absolute sensitivity, 56 allowable Pspice simulations, 17 analysis runs, 63 example, 50 import measurements, 45 interpreting MIN results, 46 overview, 41 procedure, 44 relative, 62 relative sensitivity, 56 results, 45 setting up in Advanced Analysis, 44 setting up the circuit, 43 strategy, 42 workflow, 43 worst-case maximum measurements, 63 worst-case minimum measurements, 63 zero results, 46 setting up the Monte Carlo tool, 119 the Optimizer tool, 71 the Sensitivity tool, 44 skewed distribution function, 199 smoke allowable PSpice simulations, 17 analysis runs, 95 changing derating options, 106 deratings, 100 example, 102 looking up parameter names, 110 overview, 95 procedure, 97 207 Index starting a run, 103 strategy, 96 viewing results, 104 workflow, 97 smoke parameters, 110 op amps, 114 passive components, 110 RLCs, 110 semiconductors, 111 smoke results display options temperature parameters only, 104 values, 104 smoke setup options custom derating, 107 no derating, 106 standard derating, 106 Standard Derating selecting the option, 106 stress analysis see Smoke syntax files, 18 measurement definition comments, 163 measurement definition example, 165, 170 measurement definition marked point expressions, 164 measurement definition names, 163 measurement definition search command, 165 measurement definitions, 162 T technical note creating a custom derating file, 100 file syntax, 18 technical notes location on Internet, 13 Temperature Parameters Only, 104 tightening LSQ engine options, 181 TOLERANCE, 35 tolerance as percent or absolute values, 25 Advanced Analysis NEGTOL, 25 POSTOL, 25 relative convergence, 183 X-Convergence, 183 tolerance parameters TOLERANCE, 35 U uniform distribution function, 197 units, 20 V validating the initial project, 17 VALUE, 33 variables component, 34 W web sites www.pspice.com, 18 website //sourcelink.cadence.com, 14 general, 12 PSpice community, 12 weight, 200 workflow monte carlo, 117 optimizer, 69 overall, 19 sensitivity, 43 smoke, 97 worst-case maximum, 200 worst-case minimum, 200 www.pcb.cadence.com, 13 Y yield, 201 yield analysis see Monte Carlo 208

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertising