Pspug.
Pspug.book Page 2 Wednesday, November 11, 1998 1:14 PM Copyright © 1998 OrCAD, Inc. All rights reserved. Trademarks OrCAD, OrCAD Layout, OrCAD Express, OrCAD Capture, OrCAD PSpice, and OrCAD PSpice A/D are registered trademarks of OrCAD, Inc. OrCAD Capture CIS, and OrCAD Express CIS are trademarks of OrCAD, Inc. Microsoft, Visual Basic, Windows, Windows NT, and other names of Microsoft products referenced herein are trademarks or registered trademarks of Microsoft Corporation.
Pspug.book Page iii Wednesday, November 11, 1998 1:14 PM Contents Before you begin xxiii Welcome to OrCAD . . . . . . . . . OrCAD PSpice overview . . . . . . How to use this guide . . . . . . . . Typographical conventions . . Related documentation . . . . . . . Online Help . . . . . . . . . . . If you have the demo CD-ROM OrCAD demo CD-ROM . . What’s New . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Pspug.book Page iv Wednesday, November 11, 1998 1:14 PM Contents Files needed for simulation . . . . . . . . . . . . . . . Files that Capture generates . . . . . . . . . . . . Netlist file . . . . . . . . . . . . . . . . . . . . . Circuit file . . . . . . . . . . . . . . . . . . . . Other files that you can configure for simulation Model library . . . . . . . . . . . . . . . . . . . Stimulus file . . . . . . . . . . . . . . . . . . . Include file . . . . . . . . . . . . . . . . . . . .
Pspug.book Page v Wednesday, November 11, 1998 1:14 PM Contents Part two Design entry Chapter 3 Preparing a design for simulation 55 Chapter overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . Checklist for simulation setup . . . . . . . . . . . . . . . . . . . . . Typical simulation setup steps . . . . . . . . . . . . . . . . . . . Advanced design entry and simulation setup steps . . . . . . . When netlisting fails or the simulation does not start . . . . . . . . . . . . . . . . . . . .
Pspug.book Page vi Wednesday, November 11, 1998 1:14 PM Contents Chapter 4 Creating and editing models 85 Chapter overview . . . . . . . . . . . . . . . . . . . . . . . . . What are models? . . . . . . . . . . . . . . . . . . . . . . . . . Models defined as model parameter sets . . . . . . . . Models defined as subcircuit netlists . . . . . . . . . . How are models organized? . . . . . . . . . . . . . . . . . . . Model libraries . . . . . . . . . . . . . . . . . . . . . . . . .
Pspug.book Page vii Wednesday, November 11, 1998 1:14 PM Contents Changing the model name . . . . . . . . . . . . . . . . . Starting the Model Editor from the schematic page editor in Capture . . . . . What is an instance model? . . . . . . . . . . . . . . . . Starting the Model Editor . . . . . . . . . . . . . . . . . Saving design models . . . . . . . . . . . . . . . . . . . Example: editing a Q2N2222 instance model . . . . . . . . . Starting the Model Editor . . . . . . . . . . . . . . . . .
Pspug.book Page viii Wednesday, November 11, 1998 1:14 PM Contents MODEL . . . . . . . . . . . . . . . . . . . . . Defining part properties needed for simulation PSPICETEMPLATE . . . . . . . . . . . . . . PSPICETEMPLATE syntax . . . . . . . . PSPICETEMPLATE examples . . . . . . Chapter 6 viii . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138 139 140 140 143 Chapter overview . . . . . . . . . . . . . . . . . . . . . . . .
Pspug.book Page ix Wednesday, November 11, 1998 1:14 PM Contents Basic controlled sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192 Creating custom ABM parts . . . . . . . . . . . . . . . . . . . . . . . 192 Part three Setting Up and Running Analyses Chapter 7 Setting up analyses and starting simulation 195 Chapter overview . . . . . . . . . . . . . . . . . . . . . . . Analysis types . . . . . . . . . . . . . . . . . . . . . . . . . Setting up analyses . . . . . . . . . . . . . . . .
Pspug.book Page x Wednesday, November 11, 1998 1:14 PM Contents AC sweep analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . Setting up and running an AC sweep . . . . . . . . . . . . . . What is AC sweep? . . . . . . . . . . . . . . . . . . . . . . . . Setting up an AC stimulus . . . . . . . . . . . . . . . . . . . . Setting up an AC analysis . . . . . . . . . . . . . . . . . . . . . AC sweep setup in example.opj . . . . . . . . . . . . . . . . . How PSpice treats nonlinear devices . . . . . .
Pspug.book Page xi Wednesday, November 11, 1998 1:14 PM Contents Manual stimulus configuration . . . . To manually configure a stimulus Transient (time) response . . . . . . . . . . Internal time steps in transient analyses . Switching circuits in transient analyses . . Plotting hysteresis curves . . . . . . . . . . Fourier components . . . . . . . . . . . . . Chapter 11 Chapter 12 . . . . . . . . . . . . . . . . . . . . . 261 261 263 265 266 266 268 Chapter overview . . . . . . . . . . . . . . . .
Pspug.book Page xii Wednesday, November 11, 1998 1:14 PM Contents Setting up the analyses . . . . . . . . . . . . . Running the analysis and viewing the results Monte Carlo Histograms . . . . . . . . . . . . . . Chebyshev filter example . . . . . . . . . . . . Creating models for Monte Carlo analysis . . Setting up the analysis . . . . . . . . . . . . . Creating histograms . . . . . . . . . . . . . . . Worst-case analysis . . . . . . . . . . . . . . . . . . . Overview of worst-case analysis . . . . . . .
Pspug.book Page xiii Wednesday, November 11, 1998 1:14 PM Contents Interacting with waveform analysis during simulation Pausing a simulation and viewing waveforms . . . . . Using schematic page markers to add traces . . . . . . . . . Limiting waveform data file size . . . . . . . . . . . . . . . Limiting file size using markers . . . . . . . . . . . . . . Limiting file size by excluding internal subcircuit data . Limiting file size by suppressing the first part of simulation output . . . . . . . . . . . .
Pspug.book Page xiv Wednesday, November 11, 1998 1:14 PM Contents Viewing analog results in the PSpice window . . . Writing additional results to the PSpice output file Generating plots of voltage and current values Generating tables of voltage and current values Appendix A Setting initial state xiv . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Pspug.book Page xv Wednesday, November 11, 1998 1:14 PM Figures Figure 1 Figure 2 Figure 3 Figure 4 Figure 5 Figure 6 Figure 7 Figure 8 Figure 9 Figure 11 Figure 12 Figure 13 Figure 14 Figure 15 Figure 16 Figure 17 Figure 18 Figure 19 Figure 20 Figure 21 Figure 22 Figure 23 Figure 24 Figure 25 Figure 26 Figure 27 Figure 28 Figure 29 Figure 30 Figure 31 Figure 32 Figure 33 User-configurable data files that PSpice reads . . . . . . . . . . . . . . . Diode clipper circuit. . . . . . . . . . . . . . . . . .
Pspug.
Pspug.book Page xvii Wednesday, November 11, 1998 1:14 PM Figures Figure 76 Figure 77 Figure 78 Figure 79 Figure 80 Figure 81 Figure 82 Figure 83 Figure 84 Figure 85 Figure 86 Figure 87 Figure 88 Figure 89 Figure 90 Figure 91 Figure 92 Figure 93 Figure 94 Figure 95 Figure 96 Figure 97 Figure 98 Figure A-1 Summary of Monte Carlo runs for EXAMPLE.OPJ. . . . . . . . . . . . Parameter values for Monte Carlo pass three. . . . . . . . . . . . . . . Pressure sensor circuit. . . . . . . . . . . . . . . . . . . .
Pspug.
Pspug.book Page xix Wednesday, November 11, 1998 1:14 PM Tables Table 1 Table 2 Table 3 Table 4 Table 5 Table 2-1 Table 10 Table 2-1 Table 2-1 Table 2-2 Table 2-3 Table 2-4 Table 5 Table 6 Table 7 Table 8 Table 9 Table 10 Table 11 Table 12 Table 13 Table 14 Table 15 Table 16 Table 17 Table 1 Table 2 Table 3 Table 4 Table 5 Table 6 Table 7 DC analysis types . . . . . . . . . . . . . . . AC analysis types . . . . . . . . . . . . . . . Time-based analysis types . . . . . . . . . .
Pspug.book Page xx Wednesday, November 11, 1998 1:14 PM Tables Table 1 Table 2 Table 1 Table 1 Table 2 Table 3 Table 4 Table 5 Table 6 Table 7 Table 8 Table 9 Table 10 Table 11 Table 12 Table 1 Table 2 Table 3 Table 4 Table 5 Table 6 Table 7 Table 8 Table 9 Table 10 Table 1 Table 1 Table 1 Table 2 Table 3 Table 1 Table 2 Table 3 Table 4 Table 5 Table 6 Table 1 Table 2 Table 3 Table 4 Table 5 Table 6 xx ABM math function parts . . . . . . . . . . . . . . . . ABM expression parts . . . . . . . . . . . . .
Pspug.book Page xxi Wednesday, November 11, 1998 1:14 PM Tables Table 7 Table 8 Table 9 Table 10 Table 11 Table 12 Table 13 Table 14 Table 15 Examples of output variable formats . . . . . . . . Output variable AC suffixes . . . . . . . . . . . . . Device names for two-terminal device types . . . Terminal IDs by three & four-terminal device type Noise types by device type . . . . . . . . . . . . . . Analog arithmetic functions for trace expressions Output units for trace expressions . . . . . . . . . . .
Pspug.
Pspug.book Page xxiii Wednesday, November 11, 1998 1:14 PM Before you begin Welcome to OrCAD OrCAD® offers a total solution for your core design tasks: schematic- and VHDL-based design entry; FPGA and CPLD design synthesis; digital, analog, and mixed-signal simulation; and printed circuit board layout. What's more, OrCAD's products are a suite of applications built around an engineer's design flow--not just a collection of independently developed point tools.
Pspug.book Page xxiv Wednesday, November 11, 1998 1:14 PM Before you begin OrCAD PSpice overview OrCAD PSpice simulates analog-only circuits. After you prepare a design for simulation, OrCAD Capture generates a circuit file set. The circuit file set, containing the circuit netlist and analysis commands, is read by PSpice for simulation. PSpice formulates these into meaningful graphical plots, which you can mark for display directly from your schematic page using markers.
Pspug.book Page xxv Wednesday, November 11, 1998 1:14 PM How to use this guide How to use this guide This guide is designed so you can quickly find the information you need to use PSpice. This guide assumes that you are familiar with Microsoft Windows (NT or 95), including how to use icons, menus, and dialog boxes. It also assumes you have a basic understanding about how Windows manages applications and files to perform routine tasks, such as starting applications, and opening and saving your work.
Pspug.book Page xxvi Wednesday, November 11, 1998 1:14 PM Before you begin Related documentation Documentation for OrCAD products is available in both printed and online forms. To access an online manual instantly, you can select it from the Help menu in its respective program (for example, access the Capture User’s Guide from the Help menu in Capture). Note The documentation you receive depends on the software configuration you have purchased.
Pspug.book Page xxvii Wednesday, November 11, 1998 1:14 PM Related documentation This online manual... Provides this... OrCAD PSpice Online Reference Manual Reference material for PSpice. Also included: detailed descriptions of the simulation controls and analysis specifications, start-up option definitions, and a list of device types in the analog and digital model libraries. User interface commands are provided to instruct you on each of the screen commands.
Pspug.
Pspug.book Page xxix Wednesday, November 11, 1998 1:14 PM What’s New What’s New New PSpice interface with integrated waveform analysis functionality Release 9 of PSpice includes all To find out more, see Analyzing waveforms on page -319. of Probe’s features and adds to them. Included in one screen are tabbed windows for viewing plots, text windows for viewing output files or other text files, and a simulation status and message window.
Pspug.book Page xxx Wednesday, November 11, 1998 1:14 PM Before you begin To find out more, see Creating and editing models on page -85. New Model Editor interface To find out more, refer to MOSFET devices in the A nalog Devices chapter of the online OrCA D PSpice A /D Reference Manual. EKV version 2.6 MOSFET model The Model Editor (formerly known as Parts) has been improved and modernized for Release 9.
Pspug.book Page 31 Wednesday, November 11, 1998 1:14 PM Part one Simulation primer Part one provides basic information about circuit simulation including examples of common analyses. • Chapter 1, Things you need to know, provides an overview of the circuit simulation process including what PSpice does, descriptions of analysis types, and descriptions of important files.
Pspug.
Pspug.book Page 1 Wednesday, November 11, 1998 1:14 PM Things you need to know 1 Chapter overview This chapter introduces the purpose and function of the OrCAD® PSpice circuit simulator. • What is PSpice? on page 1-2 describes PSpice capabilities. • Analyses you can run with PSpice on page 1-3 introduces the different kinds of basic and advanced analyses that PSpice supports. • Using PSpice with other OrCAD programs on page 1-9 presents the high-level simulation design flow.
Pspug.book Page 2 Wednesday, November 11, 1998 1:14 PM Chapter 1 Things you need to know What is PSpice? OrCAD PSpice is a simulation program that models the behavior of a circuit containing analog devices. Used with OrCAD Capture for design entry, you can think of PSpice as a software-based breadboard of your circuit that you can use to test and refine your design before ever touching a piece of hardware.
Pspug.book Page 3 Wednesday, November 11, 1998 1:14 PM Analyses you can run with PSpice Analyses you can run with PSpice Basic analyses See Chapter 2, Simulation examples, for introductory examples showing how to run each type of analysis. See Part three, Setting Up and Running A nalyses, for a more detailed discussion of each type of analysis and how to set it up. DC sweep & other DC calculations These DC analyses evaluate circuit performance in response to a direct current source.
Pspug.book Page 4 Wednesday, November 11, 1998 1:14 PM Chapter 1 Things you need to know AC sweep and noise These AC analyses evaluate circuit performance in response to a small-signal alternating current source. Table 2 summarizes what PSpice calculates for each AC analysis type. Table 2 AC analysis types For this AC analysis... PSpice computes this... AC sweep Small-signal response of the circuit (linearized around the bias point) when sweeping one or more sources over a range of frequencies.
Pspug.book Page 5 Wednesday, November 11, 1998 1:14 PM Analyses you can run with PSpice Transient and Fourier These time-based analyses evaluate circuit performance in response to time-varying sources. Table 3 summarizes what PSpice calculates for each time-based analysis type. Table 3 Time-based analysis types For this time-based analysis... PSpice computes this... Transient Voltages and currents tracked over time. Fourier DC and Fourier components of the transient analysis results.
Pspug.book Page 6 Wednesday, November 11, 1998 1:14 PM Chapter 1 Things you need to know Advanced multi-run analyses The multi-run analyses—parametric, temperature, Monte Carlo, and sensitivity/worst-case—result in a series of DC sweep, AC sweep, or transient analyses depending on which basic analyses you enabled. Parametric and temperature For parametric and temperature analyses, PSpice steps a circuit value in a sequence that you specify and runs a simulation for each value.
Pspug.book Page 7 Wednesday, November 11, 1998 1:14 PM Analyses you can run with PSpice Monte Carlo and sensitivity/worst-case Monte Carlo and sensitivity/worst-case analyses are statistical. PSpice changes device model parameter values with respect to device and lot tolerances that you specify, and runs a simulation for each value. Table 5 summarizes how PSpice runs each statistical analysis type. Table 5 Statistical analysis types For this statistical analysis... PSpice does this...
Pspug.book Page 8 Wednesday, November 11, 1998 1:14 PM Chapter 1 Things you need to know Analyzing waveforms with PSpice What is waveform analysis? Taken together, simulation and waveform analysis is an iterative process. After analyzing simulation results, you can refine your design and simulation settings and then perform a new simulation and waveform analysis.
Pspug.book Page 9 Wednesday, November 11, 1998 1:14 PM Using PSpice with other OrCAD programs Using PSpice with other OrCAD programs Using Capture to prepare for simulation Capture is a design entry program you need to prepare your circuit for simulation. This means: • placing and connecting part symbols, • defining component values and other attributes, • defining input waveforms, • enabling one or more analyses, and • marking the points in the circuit where you want to see results.
Pspug.book Page 10 Wednesday, November 11, 1998 1:14 PM Chapter 1 Things you need to know What is the Model Editor? The Model Editor is a model extractor that generates model definitions for PSpice to use during simulation. All the Model Editor needs is information about the device found in standard data sheets. As you enter the data sheet information, the Model Editor displays device characteristic curves so you can verify the model-based behavior of the device.
Pspug.book Page 11 Wednesday, November 11, 1998 1:14 PM Files needed for simulation Netlist file The netlist file contains a list of device names, values, and how they are connected with other devices. The name that Capture generates for this file is DESIGN_NAME.NET. Refer to the online OrCA D PSpice Reference Manual for the syntax of the statements in the netlist file and the circuit file. Circuit file The circuit file contains commands describing how to run the simulation.
Pspug.book Page 12 Wednesday, November 11, 1998 1:14 PM Chapter 1 Things you need to know You can create these files using OrCAD programs like the Stimulus Editor and the Model Editor. These programs automate file generation and provide graphical ways to verify the data. You can also use the Model Text view in the Model Editor (or another text editor like Notepad) to enter the data manually. Model library A model library is a file that contains the electrical definition of one or more parts.
Pspug.book Page 13 Wednesday, November 11, 1998 1:14 PM Files needed for simulation Stimulus file A stimulus file contains time-based definitions for analog input waveforms. You can create a stimulus file either: • manually using the Model Text View of the Model Editor (or a standard text editor) to create the definition (a typical file extension is .STM), or • automatically using the Stimulus Editor (which generates a .STL file extension). Note Not all stimulus definitions require a stimulus file.
Pspug.book Page 14 Wednesday, November 11, 1998 1:14 PM Chapter 1 Things you need to know Files that PSpice generates After reading the circuit file, netlist file, model libraries, and any other required inputs, PSpice starts the simulation. As simulation progresses, PSpice saves results to two files—the data file and the PSpice output file. For a description of how to display simulation results, see Part four, V iewing results.
Pspug.book Page 15 Wednesday, November 11, 1998 1:14 PM Simulation examples 2 Chapter overview The examples in this chapter provide an introduction to the methods and tools for creating circuit designs, running simulations, and analyzing simulation results. All analyses are performed on the same example circuit to clearly illustrate analysis setup, simulation, and result-analysis procedures for each analysis type.
Pspug.book Page 16 Wednesday, November 11, 1998 1:14 PM Chapter 2 Simulation examples Example circuit creation This section describes how to use OrCAD Capture to create the simple diode clipper circuit shown in Figure 2. Figure 2 Diode clipper circuit. To create a new PSpice project 1 From the Windows Start menu, choose the OrCAD Release 9 program folder and then the Capture shortcut to start Capture. 2 In the Project Manager, from the File menu, point to New and choose Project.
Pspug.book Page 17 Wednesday, November 11, 1998 1:14 PM Example circuit creation 2 From the Place menu, choose Part to display the Place Part dialog box. 3 Add the library for the parts you need to place: a Click the Add Library button. b Select SOURCE.OLB (from the PSpice library) and click Open. 4 In the Part text box, type VDC. 5 Click OK. 6 Move the pointer to the correct position on the schematic page (see Figure 2) and click to place the first part.
Pspug.book Page 18 Wednesday, November 11, 1998 1:14 PM Chapter 2 Simulation examples To move the text associated with the diodes (or any other object) 1 Click the text to select it, then drag the text to a new location. To place the other parts pre 1 From the Place menu, choose Part to display the Place Part dialog box. 2 Add the library for the parts you need to place: 3 Click the Add Library button. b Select ANALOG.OLB (from the PSpice library) and click Open.
Pspug.book Page 19 Wednesday, November 11, 1998 1:14 PM Example circuit creation To connect the parts 1 From the Place menu, choose Wire to begin wiring parts. The pointer changes to a crosshair. 2 Click the connection point (the very end) of the pin on the off-page connector at the input of the circuit. 3 Click the nearest connection point of the input resistor R1. 4 Connect the other end of R1 to the output capacitor.
Pspug.book Page 20 Wednesday, November 11, 1998 1:14 PM Chapter 2 Simulation examples To assign names (labels) to the off-page connectors Label the off-page connectors as shown in Figure 2 on page 2-16. 1 Double-click the name of an off-page connector to display the Display Properties dialog box. 2 In the Name text box, type the new name. 3 Click OK. 4 Select and relocate the new name as desired.
Pspug.book Page 21 Wednesday, November 11, 1998 1:14 PM Example circuit creation Finding out more about setting up your design About setting up a design for simulation For a checklist of all of the things you need to do to set up your design for simulation, and how to avoid common problems, see Chapter 3, Preparing a design for simulation.
Pspug.book Page 22 Wednesday, November 11, 1998 1:14 PM Chapter 2 Simulation examples Running PSpice When you perform a simulation, PSpice generates an output file (*.OUT). You can set up a simulation profile to run one analysis at a time. To run multiple analyses (for example, both DC sweep and transient analyses), set up a batch simulation. For more information, see Chapter 7, Setting up analyses and starting simulation.
Pspug.book Page 23 Wednesday, November 11, 1998 1:14 PM Running PSpice To simulate the circuit from within Capture 1 From the PSpice menu, choose Run. PSpice simulates the circuit and calculates the bias point information. Note Because waveform data is not calculated during a bias point analysis, you will not see any plots displayed in the Probe window for this simulation. To find out how to view the results of this simulation, see Using the simulation output file below.
Pspug.book Page 24 Wednesday, November 11, 1998 1:14 PM Chapter 2 Simulation examples Using the simulation output file The simulation output file acts as an audit trail of the simulation. This file optionally echoes the contents of the circuit file as well as the results of the bias point calculation. If there are any syntax errors in the netlist declarations or simulation commands, or anomalies while performing the calculation, PSpice writes error or warning messages to the output file.
Pspug.book Page 25 Wednesday, November 11, 1998 1:14 PM Running PSpice PSpice measures the current through a two terminal device into the first terminal and out of the second terminal. For voltage sources, current is measured from the positive terminal to the negative terminal; this is opposite to the positive current flow convention and results in a negative value in the output file. Finding out more about bias point calculations Table 2-1 To find out more about this... See this...
Pspug.book Page 26 Wednesday, November 11, 1998 1:14 PM Chapter 2 Simulation examples DC sweep analysis You can visually verify the DC response of the clipper by performing a DC sweep of the input voltage source and displaying the waveform results in the Probe window in PSpice. This example sets up DC sweep analysis parameters to sweep Vin from -10 to 15 volts in 1 volt increments.
Pspug.book Page 27 Wednesday, November 11, 1998 1:14 PM DC sweep analysis Figure 6 DC sweep analysis settings. 6 Click OK to close the Simulation Settings dialog box. 7 From the File menu, choose Save. 8 From the PSpice menu, choose Run to run the analysis.
Pspug.book Page 28 Wednesday, November 11, 1998 1:14 PM Chapter 2 Simulation examples Displaying DC analysis results Probe windows can appear during or after the simulation is finished. Figure 7 Probe window. To plot voltages at nets In and Mid press I 1 From PSpice’s Trace menu, choose Add Trace. 2 In the Add Traces dialog box, select V(In) and V(Mid). 3 Click OK. To display a trace using a marker press C+M 28 1 From Capture’s PSpice menu, point to Markers and choose Voltage Level.
Pspug.book Page 29 Wednesday, November 11, 1998 1:14 PM DC sweep analysis Figure 8 Clipper circuit with voltage marker on net Out. 3 Right-click and choose End Mode to stop placing markers. 4 From the File menu, choose Save. 5 Switch to PSpice. The V(Out) waveform trace appears, as shown in Figure 9. or Figure 9 Voltage at In, Mid, and Out.
Pspug.book Page 30 Wednesday, November 11, 1998 1:14 PM Chapter 2 Simulation examples This example uses the cursors feature to view the numeric values for two traces and the difference between them by placing a cursor on each trace. To place cursors on V(In) and V(Mid) 1 From PSpice’s Trace menu, point to Cursor and choose Display. Two cursors appear for the first trace defined in the legend below the x-axis—V(In) in this example. The Probe Cursor window also appears.
Pspug.book Page 31 Wednesday, November 11, 1998 1:14 PM DC sweep analysis c To fine-tune the location of the second cursor to 4 volts on the x-axis, drag the crosshairs until the x-axis value of the A2 cursor in the cursor window is approximately 4.0. You can also press V+r and V+l for tighter control. Figure 13 shows the Probe window with both cursors placed. There are also ways to display the difference between two voltages as a trace: • In PSpice, add the trace expression V(In)-V(Mid).
Pspug.book Page 32 Wednesday, November 11, 1998 1:14 PM Chapter 2 Simulation examples Transient analysis This example shows how to run a transient analysis on the clipper circuit. This requires adding a time-domain voltage stimulus as shown in Figure 14. Figure 14 Diode clipper circuit with a voltage stimulus.
Pspug.book Page 33 Wednesday, November 11, 1998 1:14 PM Transient analysis To add a time-domain voltage stimulus 1 From Capture’s PSpice menu, point to Markers and choose Delete All. 2 Select the ground part beneath the VIN source. 3 From the Edit menu, choose Cut. 4 Scroll down (or from the View menu, point to Zoom, then choose Out). 5 Place a VSTIM part (from the PSpice library SOURCESTM.OLB) as shown in Figure 14. 6 From the Edit menu, choose Paste.
Pspug.book Page 34 Wednesday, November 11, 1998 1:14 PM Chapter 2 Simulation examples Figure 15 Stimulus Editor window. press V+@ 7 Click OK. 8 From the File menu, choose Save to save the stimulus information. Click Yes to update the schematic. 9 From the File menu, choose Exit to exit the Stimulus Editor. To set up and run the transient analysis 1 From Capture’s PSpice menu, choose New Simulation Profile. The New Simulation dialog box appears. 2 In the Name text box, type Transient.
Pspug.book Page 35 Wednesday, November 11, 1998 1:14 PM Transient analysis 6 Click OK to close the Simulation Settings dialog box. 7 From the PSpice menu, choose Run to perform the analysis. PSpice uses its own internal time steps for computation. The internal time step is adjusted according to the requirements of the transient analysis as it proceeds. PSpice saves data to the waveform data file for each internal time step. Note The internal time step is different from the Print Step value.
Pspug.book Page 36 Wednesday, November 11, 1998 1:14 PM Chapter 2 Simulation examples Finding out more about transient analysis Table 2-1 To find out more about this... See this... transient analysis for analog designs* Chapter 10, Transient analysis * Includes how to set up time-based stimuli using the Stimulus Editor.
Pspug.book Page 37 Wednesday, November 11, 1998 1:14 PM AC sweep analysis AC sweep analysis The AC sweep analysis in PSpice is a linear (or small signal) frequency domain analysis that can be used to observe the frequency response of any circuit at its bias point. Setting up and running an AC sweep analysis In this example, you will set up the clipper circuit for AC analysis by adding an AC voltage source for a stimulus signal (see Figure 18) and by setting up AC sweep parameters.
Pspug.book Page 38 Wednesday, November 11, 1998 1:14 PM Chapter 2 Simulation examples 3 From the Place menu, choose Part. 4 In the Part text box, type VAC (from the PSpice library SOURCE.OLB) and click OK. 5 Place the AC voltage source on the schematic page, as shown in Figure 17. 6 Double-click the VAC part (0V) to display the Parts spreadsheet. 7 Change the Reference cell to Vin and change the ACMAG cell to 1V. 8 Click Apply to update the changes and then close the spreadsheet.
Pspug.book Page 39 Wednesday, November 11, 1998 1:14 PM AC sweep analysis 5 Click OK to close the Simulation Settings dialog box. 6 From the PSpice menu, choose Run to start the simulation. PSpice performs the AC analysis. To add markers for waveform analysis 1 From Capture’s PSpice menu, point to Markers, point to Advanced, then choose db Magnitude of Voltage. 2 Place one Vdb marker on the Out net, then place another on the Mid net. 3 From the File menu, choose Save to save the design.
Pspug.book Page 40 Wednesday, November 11, 1998 1:14 PM Chapter 2 Simulation examples Figure 20 dB magnitude curves for “gain” at Mid and Out. To display a Bode plot of the output voltage, including phase Note Depending upon where the Vphase marker was placed, the trace name may be different, such as VP(Cout:2), VP(R4:1), or VP(R4:2). For more information on Probe windows and trace expressions, see Chapter 13, Analyzing waveforms.
Pspug.book Page 41 Wednesday, November 11, 1998 1:14 PM AC sweep analysis Figure 21 Bode plot of clipper’s frequency response. Finding out more about AC sweep and noise analysis Table 2-2 To find out more about this... See this...
Pspug.book Page 42 Wednesday, November 11, 1998 1:14 PM Chapter 2 Simulation examples Parametric analysis Note Parametric Analysis is not supported in PSpice Basics. This example shows the effect of varying input resistance on the bandwidth and gain of the clipper circuit by: • Changing the value of R1 to the expression {Rval}. • Placing a PARAM part to declare the parameter Rval. • Setting up and running a parametric analysis to step the value of R1 using Rval.
Pspug.book Page 43 Wednesday, November 11, 1998 1:14 PM Parametric analysis Setting up and running the parametric analysis To change the value of R1 to the expression {Rval} 1 In Capture, open CLIPPER.OPJ. 2 Double-click the value (1k) of part R1 to display the Display Properties dialog box. 3 In the Value text box, replace 1k with {Rval}. 4 Click OK. PSpice interprets text in curly braces as an expression that evaluates to a numerical value.
Pspug.book Page 44 Wednesday, November 11, 1998 1:14 PM Chapter 2 Simulation examples To set up and run a parametric analysis to step the value of R1 using Rval 1 From Capture’s PSpice menu, choose New Simulation Profile. The New Simulation dialog box appears. The root schematic listed is the schematic page associated with the simulation profile you are creating. 2 In the Name text box, type Parametric. 3 From the Inherit From list, select AC Sweep, then click Create.
Pspug.book Page 45 Wednesday, November 11, 1998 1:14 PM Parametric analysis Analyzing waveform families Continuing from the example above, there are 21 analysis runs, each with a different value of R1. After PSpice completes the simulation, the Available Sections dialog box appears, listing all 21 runs and the Rval parameter value for each. You can select one or more runs to display. To display all 21 traces 1 In the Available Sections dialog box, click OK.
Pspug.book Page 46 Wednesday, November 11, 1998 1:14 PM Chapter 2 Simulation examples To compare the last run to the first run press I You can avoid some of the typing for the Trace Expression text box by selecting V(OUT) twice in the trace list and inserting text where appropriate in the resulting Trace Expression. 1 From the Trace menu, choose Add Trace to display the Add Traces dialog box. 2 In the Trace Expression text box, type the following: Vdb(Out)@1 Vdb(Out)@21 3 Click OK.
Pspug.book Page 47 Wednesday, November 11, 1998 1:14 PM Parametric analysis g Click OK. Figure 25 shows the Probe window with cursors placed. Figure 25 Small signal frequency response at 100 and 10 kΩ input resistance. Note that the Y value for cursor 2 in the cursor box is about 17.87. This indicates that when R1 is set to 10 kΩ, the small signal attenuation of the circuit at 100Hz is 17.87dB greater than when R1 is 100Ω.
Pspug.book Page 48 Wednesday, November 11, 1998 1:14 PM Chapter 2 Simulation examples Finding out more about parametric analysis Table 2-3 48 To find out more about this... See this...
Pspug.book Page 49 Wednesday, November 11, 1998 1:14 PM Performance analysis Performance analysis Performance analysis is an advanced feature in PSpice that you can use to compare the characteristics of a family of waveforms. Performance analysis uses the principle of search commands introduced earlier in this chapter to define functions that detect points on each curve in the family.
Pspug.book Page 50 Wednesday, November 11, 1998 1:14 PM Chapter 2 Simulation examples 9 Click the Next> button or the Finish button. A plot of the 3dB bandwidth vs. Rval appears. 10 Change the x-axis to log scale: Double-click the x-axis. a From the Plot menu, choose Axis Settings. b Click the X Axis tab. c Under Scale, choose Log. d Click OK. To plot gain vs.
Pspug.book Page 51 Wednesday, November 11, 1998 1:14 PM Performance analysis Finding out more about performance analysis Table 2-4 To find out more about this... See this...
Pspug.
Pspug.book Page 53 Wednesday, November 11, 1998 1:14 PM Part two Design entry Part two provides information about how to enter circuit designs in OrCAD® Capture that you want to simulate. • Chapter 3, Preparing a design for simulation, outlines the things you need to do to successfully simulate your schematic including troubleshooting tips for the most frequently asked questions.
Pspug.
Pspug.book Page 55 Wednesday, November 11, 1998 1:14 PM Preparing a design for simulation 3 Chapter overview This chapter provides introductory information to help you enter circuit designs that simulate properly. If you want an overview, use the checklist on page 3-56 to guide you to specific topics.
Pspug.book Page 56 Wednesday, November 11, 1998 1:14 PM Chapter 3 Preparing a design for simulation Checklist for simulation setup This section describes what you need to do to set up your circuit for simulation. 1 Find the topic that is of interest in the first column of any of these tables. 2 Go to the referenced section. For those sections that provide overviews, you will find references to more detailed discussions. Typical simulation setup steps For more information on this step... See this...
Pspug.book Page 57 Wednesday, November 11, 1998 1:14 PM Checklist for simulation setup For more information on this step... See this... ✔ Place markers. Using schematic page markers to add traces on page 13-331 How to display results in PSpice by picking design nets. ✔ Limiting waveform data file size on page 13-334 How to limit the data file size. Advanced design entry and simulation setup steps For more information on this step... See this... To find out how to... ✔ Create new models.
Pspug.book Page 58 Wednesday, November 11, 1998 1:14 PM Chapter 3 Preparing a design for simulation When netlisting fails or the simulation does not start If you have problems starting the simulation, there may be problems with the design or with system resources. If there are problems with the design, PSpice displays errors and warnings in the Simulation Output window. You can use the Simulation Output window to get more information quickly about the specific problem.
Pspug.book Page 59 Wednesday, November 11, 1998 1:14 PM Checklist for simulation setup Things to check in your system configuration Table 6 Make sure that... To find out more, see this... ✔ Path to the PSpice programs is correct. ✔ Directory containing your design has write Your operating system manual permission. ✔ Your system has sufficient free memory Your operating system manual and disk space.
Pspug.book Page 60 Wednesday, November 11, 1998 1:14 PM Chapter 3 Preparing a design for simulation Using parts that you can simulate The OrCAD part libraries also include special parts that you can use for simulation only.
Pspug.book Page 61 Wednesday, November 11, 1998 1:14 PM Using parts that you can simulate Vendor-supplied parts The OrCAD libraries provide an extensive selection of manufacturers’ analog parts. Typically, the library name reflects the kind of parts contained in the library and the vendor that provided the models. Example: MOTOR_RF.OLB and MOTOR_RF.LIB contain parts and models, respectively, for Motorola-made RF bipolar transistors.
Pspug.book Page 62 Wednesday, November 11, 1998 1:14 PM Chapter 3 Preparing a design for simulation Notice the following: • There is a generic OP-27 part provided by OrCAD, the OP-27/AD from Analog Devices, Inc., and the OP-27/LT from Linear Technology Corporation. • The Model column for all of these parts contains an asterisk. This indicates that this part is modeled and that you can simulate it.
Pspug.book Page 63 Wednesday, November 11, 1998 1:14 PM Using parts that you can simulate To find parts using the online OrCAD Library List 1 In Windows Explorer, double-click LIBLIST.PDF, located in the directory where PSpice is installed. Acrobat Reader starts and displays the OrCAD Library List. 2 From the Tools menu, choose Find. 3 In the Find What text box, type the generic part name. 4 Enter any other search criteria, and then click Find.
Pspug.book Page 64 Wednesday, November 11, 1998 1:14 PM Chapter 3 Preparing a design for simulation Passive parts The OrCAD libraries supply several basic parts based on the passive device models built into PSpice. These are summarized in the following table.
Pspug.book Page 65 Wednesday, November 11, 1998 1:14 PM Using parts that you can simulate Breakout parts The OrCAD libraries supply passive and semiconductor parts with default model definitions that define a basic set of model parameters. This way, you can easily: • assign device and lot tolerances to model parameters for Monte Carlo and sensitivity/worst-case analyses, • define temperature coefficients, and • define device-specific operating temperatures.
Pspug.book Page 66 Wednesday, November 11, 1998 1:14 PM Chapter 3 Preparing a design for simulation Behavioral parts Behavioral parts allow you to define how a block of circuitry should work without having to define each discrete component. For more information, see Chapter 6, Analog behavioral modeling. 66 Analog behavioral parts These parts use analog behavioral modeling (ABM) to define each part’s behavior as a mathematical expression or lookup table.
Pspug.book Page 67 Wednesday, November 11, 1998 1:14 PM Using global parameters and expressions for values Using global parameters and expressions for values In addition to literal values, you can use global parameters and expressions to represent numeric values in your circuit design. Global parameters A global parameter is like a programming variable that represents a numeric value by name.
Pspug.book Page 68 Wednesday, November 11, 1998 1:14 PM Chapter 3 Preparing a design for simulation To declare a global parameter Note For more information about using the Parts spreadsheet, see the OrCAD Capture User’s Guide. 1 Place a PARAM part in your design. 2 Double-click the PARAM part to display the Parts spreadsheet, then click New.
Pspug.book Page 69 Wednesday, November 11, 1998 1:14 PM Using global parameters and expressions for values Expressions An expression is a mathematical relationship that you can use to define a numeric or boolean (TRUE/FALSE) value. PSpice evaluates the expression to a single value every time: • it reads in a new circuit, and • a parameter value used within an expression changes during an analysis. Example: A parameter that changes with each step of a DC sweep or parametric analysis.
Pspug.book Page 70 Wednesday, November 11, 1998 1:14 PM Chapter 3 Preparing a design for simulation Table 9 Operators in expressions This operator class... Includes this operator...
Pspug.book Page 71 Wednesday, November 11, 1998 1:14 PM Using global parameters and expressions for values Table 10 Functions in arithmetic expressions This function... Means this...
Pspug.book Page 72 Wednesday, November 11, 1998 1:14 PM Chapter 3 Preparing a design for simulation Table 10 Functions in arithmetic expressions (continued) This function... Means this... Note In waveform analysis, this function is D(x). DDT(x) time derivative of x Note In waveform analysis, this function is S(x). SDT(x) time integral of x which is applicable to transient analysis only TABLE(x,x1,y1,...
Pspug.book Page 73 Wednesday, November 11, 1998 1:14 PM Using global parameters and expressions for values Table 11 System variables This variable... Evaluates to this... TEMP Temperature values resulting from a temperature, parametric temperature, or DC temperature sweep analysis. The default temperature, TNOM, is set in the Options dialog box (from the Simulation Settings dialog box, choose the Options tab). TNOM defaults to 27°C.
Pspug.book Page 74 Wednesday, November 11, 1998 1:14 PM Chapter 3 Preparing a design for simulation Defining power supplies For the analog portion of your circuit To find out how to use these parts and specify their properties, see the following: • Setting up a DC stimulus on page 8-218 • Using VSRC or ISRC parts on page 3-78 74 If the analog portion of your circuit requires DC power, then you need to include a DC source in your design. To specify a DC source, use one of the following parts.
Pspug.book Page 75 Wednesday, November 11, 1998 1:14 PM Defining stimuli Defining stimuli To simulate your circuit, you need to connect one or more source parts that describe the input signal that the circuit must respond to. The OrCAD libraries supply several source parts that are described in the tables that follow.
Pspug.book Page 76 Wednesday, November 11, 1998 1:14 PM Chapter 3 Preparing a design for simulation Table 13 If you want this kind of input... Use this part for voltage... piecewise-linear that repeats n times VPWL_N_TIMES or VPWL_F_N_TIMES** frequency-modulated sine wave VSFFM or VSTIM* sine wave VSIN or VSTIM* * VSTIM and ISTIM parts require the Stimulus Editor to define the input signal.
Pspug.book Page 77 Wednesday, November 11, 1998 1:14 PM Defining stimuli If you want to specify multiple stimulus types If you want to run more than one analysis type, including a transient analysis, then you need to use either of the following: • time-based stimulus parts with AC and DC properties • VSRC or ISRC parts Using time-based stimulus parts with AC and DC properties The time-based stimulus parts that you can use to define a transient, DC, and/or AC input signal are listed below.
Pspug.book Page 78 Wednesday, November 11, 1998 1:14 PM Chapter 3 Preparing a design for simulation Using VSRC or ISRC parts The VSRC and ISRC parts have one property for each analysis type: DC, AC, and TRAN. You can set any or all of them using PSpice netlist syntax. When you give them a value, the syntax you need to use is as follows.
Pspug.book Page 79 Wednesday, November 11, 1998 1:14 PM Things to watch for Things to watch for This section includes troubleshooting tips for some of the most common reasons your circuit design may not netlist or simulate. For a roadmap to other commonly encountered problems and solutions, see When netlisting fails or the simulation does not start on page 3-58. Unmodeled parts If you see messages like this in the PSpice Simulation Output window, Warning: Part part_name has no simulation model.
Pspug.book Page 80 Wednesday, November 11, 1998 1:14 PM Chapter 3 Preparing a design for simulation Table 16 To find out more about a particular library, refer to the online Library List or read the header of the model library file itself.
Pspug.book Page 81 Wednesday, November 11, 1998 1:14 PM Things to watch for Check for this if the part in question is custom-built Are there blank (or inappropriate) values for the part’s Implementation and PSPICETEMPLATE properties? If so, load this part into the part editor and set these properties appropriately. One way to approach this is to edit the part that appears in your design. To edit the properties for the part in question 1 In the schematic page editor, select the part.
Pspug.
Pspug.book Page 83 Wednesday, November 11, 1998 1:14 PM Things to watch for The OrCAD libraries include parts that are suitable for both simulation and board layout. The unmodeled pins map into packages but have no electrical significance; PSpice ignores unmodeled pins during simulation. Check for this Are there connections to unmodeled pins? If so, do one of the following: • Remove wires connected to unmodeled pins.
Pspug.book Page 84 Wednesday, November 11, 1998 1:14 PM Chapter 3 Preparing a design for simulation Missing DC path to ground If for selected nets in your circuit you see this message in the PSpice output file, ERROR -- Node node_name is floating. then you may be missing a DC path to ground.
Pspug.book Page 85 Wednesday, November 11, 1998 1:14 PM Creating and editing models 4 Chapter overview This chapter provides information about creating and editing models for parts that you want to simulate. Topics are grouped into four areas introduced later in this overview. If you want to find out quickly which tools to use to complete a given task and how to start, then: 1 Go to the roadmap in Ways to create and edit models on page 4-92. 2 Find the task you want to complete.
Pspug.
Pspug.book Page 87 Wednesday, November 11, 1998 1:14 PM What are models? What are models? A model defines the electrical behavior of a part. On a schematic page, this correspondence is defined by a part’s Implementation property, which is assigned the model name. Depending on the device type that it describes, a model is defined as on of the following: • a model parameter set • a subcircuit netlist Both ways of defining a model are text-based, with specific rules of syntax.
Pspug.book Page 88 Wednesday, November 11, 1998 1:14 PM Chapter 4 Creating and editing models * FIRST ORDER RC STAGE .SUBCKT LIN/STG IN OUT AGND + PARAMS: C1VAL=1 C2VAL=1 R1VAL=1 R2VAL=1 + GAIN=10000 C1 IN N1 {C1VAL} C2 N1 OUT {C2VAL} R1 IN N1 {R1VAL} R2 N1 OUT {R2VAL} EAMP1 OUT AGND VALUE={V(AGND,N1)*GAIN} .ENDS How are models organized? The key concepts behind model organization are as follows: • Model definitions are saved in files called model libraries.
Pspug.book Page 89 Wednesday, November 11, 1998 1:14 PM How are models organized? Model library configuration PSpice searches model libraries for the model names specified by the MODEL implementation for parts in your design. These are the model definitions that PSpice uses to simulate your circuit. For PSpice to know where to look for these model definitions, you must configure the libraries. This means: • Specifying the directory path or paths to the model libraries.
Pspug.book Page 90 Wednesday, November 11, 1998 1:14 PM Chapter 4 Creating and editing models Nested model libraries Besides model and subcircuit definitions, model libraries can also contain references to other model libraries using the PSpice .LIB syntax. When searching model libraries for matches, PSpice also scans these referenced libraries. Example: Suppose you have two custom model libraries, MYDIODES.LIB and MYOPAMPS.LIB, that you want PSpice to search any time you simulate a design.
Pspug.book Page 91 Wednesday, November 11, 1998 1:14 PM Tools to create and edit models Tools to create and edit models There are three tools that you can use to create and edit model definitions. Use the: • • Note Model Editor when you want to: • derive models from data sheet curves provided by manufacturers, or • modify the behavior of a Model Editor-supported model. • edit the PSpice command syntax (text) for .MODEL and .SUBCKT definitions.
Pspug.book Page 92 Wednesday, November 11, 1998 1:14 PM Chapter 4 Creating and editing models Ways to create and edit models This section is a roadmap to other information in this chapter. Find the task that you want to complete, then go to the referenced sections for more information. If you want to... Then do this... To find out more, see this... ➥ Create or edit the model Create or load the part first in the part editor, then edit the model using the Model Editor *.
Pspug.book Page 93 Wednesday, November 11, 1998 1:14 PM Using the Model Editor to edit models Using the Model Editor to edit models The Model Editor converts information that you enter from the device manufacturer’s data sheet into either: • model parameter sets using PSpice .MODEL syntax, or • subcircuit netlists using PSpice .SUBCKT syntax, and saves these definitions to model libraries that PSpice can search when looking for simulation models.
Pspug.book Page 94 Wednesday, November 11, 1998 1:14 PM Chapter 4 Creating and editing models Ways to use the Model Editor You can use the Model Editor five ways: To find out more, see Running the Model Editor alone on page 4-99. • To define a new model, and then automatically create a part. Any new models and parts are automatically available to any design. To find out more, see Running the Model Editor alone on page 4-99. • To define a new model only (no part).
Pspug.book Page 95 Wednesday, November 11, 1998 1:14 PM Using the Model Editor to edit models Model Editor-supported device types Table 17 summarizes the device types supported in the Model Editor. Table 17 Models supported in the Model Editor This part type... Uses this definition form... And this name prefix*... diode .MODEL D bipolar transistor .MODEL Q bipolar transistor, Darlington model .SUBCKT X IGBT .MODEL Z JFET .MODEL J power MOSFET .MODEL M operational amplifier** .
Pspug.book Page 96 Wednesday, November 11, 1998 1:14 PM Chapter 4 Creating and editing models Ways To Characterize Models Testing and verifying models created with the Model Editor Each curve in the Model Editor is defined only by the parameters being adjusted. For the diode, the forward current curve only shows the part of the current equation that is associated with the forward characteristic parameters (such as IS, N, Rs).
Pspug.book Page 97 Wednesday, November 11, 1998 1:14 PM Using the Model Editor to edit models model libraries containing appropriate model and subcircuit definitions. Analyzing the effect of model parameters on device characteristics You can also edit model parameters directly and see how changing their values affects a device characteristic. As you change model parameters, the Model Editor recalculates the behavior of the device characteristics and displays a new curve for each of the affected ones.
Pspug.book Page 98 Wednesday, November 11, 1998 1:14 PM Chapter 4 Creating and editing models To fit the model 1 2 For each device characteristic that you want to set up: a In the Spec Entry frame, click the tab of the device characteristic. b Enter the device information from the data sheet. From the Tools menu, choose Extract Parameters to extract all relevant model parameters for the current specification.
Pspug.book Page 99 Wednesday, November 11, 1998 1:14 PM Using the Model Editor to edit models Running the Model Editor alone Run the Model Editor alone if you want to do any of the following: • create a model and use the model in any design (and automatically create a part), • create a model and have the model definition available to any design (without creating a part), or • examine or verify the characteristics of a given model without using PSpice.
Pspug.book Page 100 Wednesday, November 11, 1998 1:14 PM Chapter 4 Creating and editing models Enabling and disabling automatic part creation Instead of using the OrCAD default part set for new models, you can have the Model Editor use your own set of standard parts. To find out more, see Basing new parts on a custom set of parts on page 5-133. Part creation in the Model Editor is optional. By default, automatic part creation is enabled.
Pspug.book Page 101 Wednesday, November 11, 1998 1:14 PM Using the Model Editor to edit models Running the Model Editor from the schematic page editor If you want to: • test behavior variations on a part, or • refine a model before making it available to all designs, Once you have started the Model Editor , you can proceed with entering data sheet information and model fitting as described in How to fit models on page 4-97. then run the Model Editor from the schematic page editor in Capture.
Pspug.book Page 102 Wednesday, November 11, 1998 1:14 PM Chapter 4 Creating and editing models Starting the Model Editor To start editing an instance model To find out how Capture searches the library, see Changing model library search order on page 4-124. 1 In Capture, select one part on your schematic page. 2 From the Edit menu, choose PSpice Model. The schematic page editor searches the model libraries for the instance model.
Pspug.book Page 103 Wednesday, November 11, 1998 1:14 PM Using the Model Editor to edit models What happens if you don’t save the instance model Before the schematic page editor starts the Model Editor, it does these things: • Makes a copy of the original model and saves it as an instance model in SCHEMATIC_NAME.LIB. • Configures SCHEMATIC_NAME.LIB for design use, if not already done. • Attaches the new instance model name to the Implementation property for the selected part instance.
Pspug.book Page 104 Wednesday, November 11, 1998 1:14 PM Chapter 4 Creating and editing models The Model Editor tutorial In this tutorial, you will model a simple diode device as follows: • Create the schematic for a simple half-wave rectifier. • Run the Model Editor from the schematic editor to create an instance model for the diode in your schematic. Creating the half-wave rectifier design To draw the design press P Figure 30 Design for a half-wave rectifier.
Pspug.book Page 105 Wednesday, November 11, 1998 1:14 PM Using the Model Editor to edit models Using the Model Editor to edit the D1 diode model To create a new model and model library 1 In the Model Editor, from the Model menu, choose New. 2 In the New dialog box, do the following: a In the Model text box, type DbreakX. b From the From Model list, select Diode. c Click OK. 3 From the File menu, choose Save As. 4 In the File name text box, type rectfr.lib to save the library as RECTFR.LIB.
Pspug.book Page 106 Wednesday, November 11, 1998 1:14 PM Chapter 4 Creating and editing models You can modify each model characteristic shown in the Model Spec frame with new values from the data sheets. The Model Editor takes the new information and fits new model parameter values. When updating the entered data, the Model Editor expects either: • device curve data (point pairs), or • single-valued data, depending on the device characteristic.
Pspug.book Page 107 Wednesday, November 11, 1998 1:14 PM Using the Model Editor to edit models To change the values for Junction Capacitance and Reverse Leakage 1 Follow the same steps as for Forward Current, entering the data sheet information listed in Table 1 that corresponds to the current model characteristic. To change the Reverse Breakdown characteristic 1 In the Spec Editing frame, click the Reverse Breakdown tab. This tab requires single-valued data. 2 In the Vz text box, type 7.5.
Pspug.book Page 108 Wednesday, November 11, 1998 1:14 PM Chapter 4 Creating and editing models Figure 32 Assorted device characteristic curves for a diode. Adding curves for more than one temperature By default, the Model Editor computes device curves at 27°C. For any characteristic, you can add curves to the plot at other temperatures. To add curves for Forward Current at a different temperature 1 In the Spec Entry frame, click the Forward Current tab. 2 From the Plot menu, choose Add Trace.
Pspug.book Page 109 Wednesday, November 11, 1998 1:14 PM Using the Model Editor to edit models Figure 33 Forward Current device curve at two temperatures. Completing the model definition You can refine the model definition by: • modifying the entered data as described before, or • editing model parameters directly. You can update individual model parameters by editing them in the Parameters frame of the Model Editor workspace.
Pspug.book Page 110 Wednesday, November 11, 1998 1:14 PM Chapter 4 Creating and editing models Editing model text Caution—If you edit the text of a model that was created by entering data sheet values, you may not be able to edit the model in Normal view again. For any model, you can edit model text in the Model Editor instead of using the Spec Entry and Parameter frames.
Pspug.book Page 111 Wednesday, November 11, 1998 1:14 PM Editing model text tolerances to model parameters for Monte Carlo or sensitivity/worst-case analysis. Editing .SUBCKT definitions For definitions implemented as subcircuit netlists using PSpice .SUBCKT syntax, the model editor displays the subcircuit syntax exactly as it appears in the model library. The Model Editor also includes all of the comments immediately before or after the subcircuit definition.
Pspug.book Page 112 Wednesday, November 11, 1998 1:14 PM Chapter 4 Creating and editing models For more information on instance models, see Reusing instance models on page 4-118. What is an instance model? An instance model is a copy of the part’s original model. The copied model is limited to use in the current design. You can customize the instance model without impacting any other design that uses the original part from the library.
Pspug.book Page 113 Wednesday, November 11, 1998 1:14 PM Editing model text Saving design models When you save your edits, the following is done for you to make sure the instance model is linked to the selected part instances in your design: • The Model Editor saves the model definition to DESIGN_NAME.LIB. • If the library is new, the Model Editor configures DESIGN_NAME.LIB for local use.
Pspug.book Page 114 Wednesday, November 11, 1998 1:14 PM Chapter 4 Creating and editing models Example: editing a Q2N2222 instance model Suppose you have a design named MY.OPJ that contains several instances of a Q2N2222 bipolar transistor. Suppose also that you are interested in the effect of base resistance variation on one specific device: Q6. To do this, you need to do the following: • Define a tolerance (in this example, 5%) on the Rb model parameter. • Set up and run a Monte Carlo analysis.
Pspug.book Page 115 Wednesday, November 11, 1998 1:14 PM Using the Create Subcircuit command Saving the edits and updating the schematic When you choose Save from the File menu, two things happen: • The Model Editor saves the model definition to the model library. • The schematic page editor updates the Implementation property value to Q2N2222-MC for the Q6 part instance. In this example, the default model library is MY.LIB. If MY.
Pspug.book Page 116 Wednesday, November 11, 1998 1:14 PM Chapter 4 Creating and editing models • Configure the DESIGN_NAME.SUB file so PSpice knows where to find it. To create a subcircuit definition for a portion of your design To create a part for the subcircuit 1 In the schematic page editor, move to the level of hierarchy for which you want to create a subcircuit (.SUBCKT) definition. 2 From the Place menu, choose Hierarchical Port. 3 From the File menu, choose Save.
Pspug.book Page 117 Wednesday, November 11, 1998 1:14 PM Changing the model reference to an existing model definition Changing the model reference to an existing model definition Parts are linked to models by the model name assigned to the parts’ Implementation property. You can change this assignment by replacing the Implementation property value with the name of a different model that already exists in the library. You can do this for: • A part instance in your design. • A part in the part library.
Pspug.book Page 118 Wednesday, November 11, 1998 1:14 PM Chapter 4 Creating and editing models 4 From the Options menu, choose Part Properties to display the User Properties dialog box. 5 Select Implementation Type. 6 From the Implementation list, select PSpice Model. 7 In the Implementation text box, type the name of the existing model that you want to use if it is not already listed. 8 Click OK to close the Edit Part dialog box.
Pspug.book Page 119 Wednesday, November 11, 1998 1:14 PM Reusing instance models Making instance models available to all designs If you are refining model behavior specific to your design, and are ready to make it available to any design, then you need to link the model definition to a part and configure it for global use. To make your instance model available to any design 1 Create a part and assign the instance model name to the Implementation property.
Pspug.book Page 120 Wednesday, November 11, 1998 1:14 PM Chapter 4 Creating and editing models Configuring model libraries Although model libraries are usually configured for you, there are things that you sometimes must do yourself.
Pspug.book Page 121 Wednesday, November 11, 1998 1:14 PM Configuring model libraries • Add as Global for global models. Caution—When you use include files instead How PSpice uses model libraries PSpice treats model library and include files differently as follows: PSpice searches libraries for any information it needs to complete the definition of a part or to run a simulation.
Pspug.book Page 122 Wednesday, November 11, 1998 1:14 PM Chapter 4 Creating and editing models Handling duplicate model names If your model libraries contain duplicate model names, PSpice always uses the first model it finds. This means you might need to resequence the search order to make sure PSpice uses the model that you want. See Changing model library search order on page 4-124.
Pspug.book Page 123 Wednesday, November 11, 1998 1:14 PM Configuring model libraries If the model libraries reside in a directory that is not on the library search path, and you use the Browse button in step 3 to select the libraries you want to add, then the schematic editor automatically updates the library search path. Otherwise, you need to add the directory path yourself. See Changing the library search path on page 4-125.
Pspug.book Page 124 Wednesday, November 11, 1998 1:14 PM Chapter 4 Creating and editing models Changing model library search order Two reasons why you might want to change the search order are to: See Handling duplicate model names on page 4-122 for more information. • reduce the search time • avoid using the wrong model when there are model names duplicated across libraries; PSpice always uses the first instance To change the order of libraries 1 2 Caution—Do not edit NOM.LIB.
Pspug.book Page 125 Wednesday, November 11, 1998 1:14 PM Configuring model libraries Changing the library search path For model libraries that are configured without explicit path names, PSpice first searches the directory where the current design resides, then steps down the list of directories specified in the Library Path text box on the Libraries tab of the Simulation Settings dialog box.
Pspug.
Pspug.book Page 127 Wednesday, November 11, 1998 1:14 PM Creating parts for models 5 Chapter overview This chapter provides information about creating parts for model definitions, so you can simulate the model from your design using OrCAD Capture. Topics are grouped into four areas introduced later in this overview. If you want to find out quickly which tools to use to complete a given task and how to start, then: 1 Go to the roadmap in Ways to create parts for models on page 5-129.
Pspug.
Pspug.book Page 129 Wednesday, November 11, 1998 1:14 PM What’s different about parts used for simulation? What’s different about parts used for simulation? A part used for simulation has these special characteristics: • a link to a simulation model • a netlist translation • modeled pins For information on adding simulation models to a model library, see Chapter 4, Creating and editing models. Ways to create parts for models If you want to... Then do this... To find out more, see this...
Pspug.book Page 130 Wednesday, November 11, 1998 1:14 PM Chapter 5 Creating parts for models Preparing your models for part creation If you already have model definitions and want to create parts for them, you should organize the definitions into libraries containing similar device types. To set up a model library for part creation 1 Model libraries typically have a .LIB extension.
Pspug.book Page 131 Wednesday, November 11, 1998 1:14 PM Using the Model Editor to create parts Using the Model Editor to create parts If you want to run the Model Editor and enable automatic creation of parts for any model that you create or change, then run the Model Editor alone. This means any models you create are not tied to the current design or to a part editing session. Note If you open an existing model library, the Model Editor creates parts for only the models that you change or add to it.
Pspug.book Page 132 Wednesday, November 11, 1998 1:14 PM Chapter 5 Creating parts for models Setting up automatic part creation Part creation from the Model Editor is optional. By default, automatic part creation is enabled. However, if you previously disabled part creation, you need to enable it before creating a new model and part. Instead of using the OrCAD default part set, you can use your own set of standard parts. To find out more, see Basing new parts on a custom set of parts on page 5-133.
Pspug.book Page 133 Wednesday, November 11, 1998 1:14 PM Basing new parts on a custom set of parts Basing new parts on a custom set of parts If you are using the the Model Editor to automatically generate parts for model definitions, and you want to base the new parts on a custom graphic standard (rather than the OrCAD default parts), then you can change which underlying parts either application uses by setting up your own set of parts.
Pspug.book Page 134 Wednesday, November 11, 1998 1:14 PM Chapter 5 Creating parts for models This tells the Model Editor to substitute the correct model name. To base new parts on custom parts using the Model Editor 134 1 In the Model Editor, from the Options menu, choose Part Creation Setup, and enable automatic part creation as described in To automatically create parts for new models on page 5-132. 2 In the Base Parts On frame, enter the name of the existing part library (*.
Pspug.book Page 135 Wednesday, November 11, 1998 1:14 PM Editing part graphics Editing part graphics If you created parts using the Model Editor, and you want to make further changes, the following sections explain a few important things to remember when you edit the parts. When changing part graphics, check to see that all pins are on the grid.
Pspug.book Page 136 Wednesday, November 11, 1998 1:14 PM Chapter 5 Creating parts for models 5 After you have finished editing the part, from the File menu, choose Save to save the part to its library. Defining grid spacing Grid spacing for graphics The grid, denoted by evenly spaced grid points, regulates the sizing and positioning of graphic objects and the positioning of pins. The default grid spacing with snap-to-grid enabled is 0.10", and the grid spacing is 0.01".
Pspug.book Page 137 Wednesday, November 11, 1998 1:14 PM Editing part graphics Pins must be placed on the grid at integer multiples of the grid spacing. Because the default grid spacing for the Schematic Page Grid is set at 0.10", OrCAD recommends setting pin spacing in the Part and Symbol Grid at 0.10" intervals from the origin of the part and at least 0.10" from any adjacent pins.
Pspug.book Page 138 Wednesday, November 11, 1998 1:14 PM Chapter 5 Creating parts for models Attaching models to parts If you create parts and want to simulate them, you need to attach model implementations to them. If you created your parts using any of the methods discussed in this chapter, then your part will have a model implementation already attached to it. MODEL The Implementation property defines the name of the model that PSpice must use for simulation.
Pspug.
Pspug.book Page 140 Wednesday, November 11, 1998 1:14 PM Chapter 5 Creating parts for models PSPICETEMPLATE Caution—Creating parts not intended for simulation Some part libraries contain parts designed only for board layout; PSpice cannot simulate these parts. This means they do not have PSPICETEMPLATE properties or that the PSPICETEMPLATE property value is blank. The PSPICETEMPLATE property defines the PSpice syntax for the part’s netlist entry.
Pspug.book Page 141 Wednesday, November 11, 1998 1:14 PM Defining part properties needed for simulation Property names in templates Property names are preceded by a special character as follows: [ @ | ? | ~ | # | & ] The schematic page editor processes the property according to the special character as shown in the following table. Table 4 This syntax...* Is replaced with this... @ Value of . Error if no attribute or if no value assigned.
Pspug.book Page 142 Wednesday, November 11, 1998 1:14 PM Chapter 5 Creating parts for models Caution—Recommended scheme for netlist templates Templates for devices in the part library start with a PSpice device letter, followed by the hierarchical path, and then the reference designator (REFDES) property. OrCAD recommends that you adopt this scheme when defining your own netlist templates. Example: R^@REFDES ...
Pspug.book Page 143 Wednesday, November 11, 1998 1:14 PM Defining part properties needed for simulation PSPICETEMPLATE examples Simple resistor (R) template The R part has: • two pins: 1 and 2 • two required properties: REFDES and VALUE Template R^@REFDES %1 %2 @VALUE Sample translation R_R23 abc def 1k where REFDES equals R23, VALUE equals 1k, and R is connected to nets abc and def.
Pspug.book Page 144 Wednesday, November 11, 1998 1:14 PM Chapter 5 Creating parts for models Parameterized subcircuit call (X) template Suppose you have a subcircuit Z that has: • two pins: a and b • a subcircuit parameter: G, where G defaults to 1000 when no value is supplied To allow the parameter to be changed on the schematic page, treat G as an property in the template.
Pspug.book Page 145 Wednesday, November 11, 1998 1:14 PM Defining part properties needed for simulation Now suppose that the part definition shows four pins: IN+ T- OUT+ IN- OU The number of pins on the part equals the number of nodes in the subcircuit definition. If the correspondence between pin names and nodes is as follows: Table 6 This node name... Corresponds to this pin name...
Pspug.
Pspug.book Page 147 Wednesday, November 11, 1998 1:14 PM Analog behavioral modeling 6 Chapter overview This chapter describes how to use the Analog Behavioral Modeling (ABM) feature of PSpice. This chapter includes the following sections: • Overview of analog behavioral modeling on page 6-148 • The ABM.
Pspug.book Page 148 Wednesday, November 11, 1998 1:14 PM Chapter 6 Analog behavioral modeling Overview of analog behavioral modeling You can use the Analog Behavioral Modeling (ABM) feature of PSpice to make flexible descriptions of electronic components in terms of a transfer function or lookup table. In other words, a mathematical relationship is used to model a circuit segment, so you do not need to design the segment component by component.
Pspug.book Page 149 Wednesday, November 11, 1998 1:14 PM The ABM.OLB part library file The ABM.OLB part library file The part library ABM.OLB contains the ABM components. This library contains two sections. The first section has parts that you can quickly connect to form control system types of circuits. These components have names like SUM, GAIN, LAPLACE, and HIPASS. The second section contains parts that are useful for more traditional controlled source forms of schematic parts.
Pspug.book Page 150 Wednesday, November 11, 1998 1:14 PM Chapter 6 Analog behavioral modeling Placing and specifying ABM parts Place and connect ABM parts the same way you place other parts. After you place an ABM part, you can edit the instance properties to customize the operational behavior of the part. This is equivalent to defining an ABM expression describing how inputs are transformed into outputs. The following sections describe the rules for specifying ABM expressions.
Pspug.book Page 151 Wednesday, November 11, 1998 1:14 PM Placing and specifying ABM parts found, the original fragment is replaced by the fully qualified name of the net or device. For example, suppose we have a hierarchical part U1. Inside the schematic representing U1 we have an ABM expression including the term V(Reference). If “Reference” is the name of a local net, then the fragment written to the netlist will be translated to V(U1_Reference).
Pspug.book Page 152 Wednesday, November 11, 1998 1:14 PM Chapter 6 Analog behavioral modeling ABM part templates For most ABM parts, a single PSpice “E” or “G” device declaration is output to the netlist per part instance. The PSPICETEMPLATE property in these cases is straightforward.
Pspug.book Page 153 Wednesday, November 11, 1998 1:14 PM Control system parts Control system parts Control system parts have single-pin inputs and outputs. The reference for input and output voltages is analog ground (0). An enhancement to PSpice means these components can be connected together with no need for dummy load or input resistors. Table 7 lists the control system parts, grouped by function. Also listed are characteristic properties that may be set.
Pspug.book Page 154 Wednesday, November 11, 1998 1:14 PM Chapter 6 Analog behavioral modeling Table 7 Control system parts (continued) Category Part Description Properties Laplace transform LAPLACE Laplace expression NUM, DENOM Math functions (where ‘x’ is the input) ABS |x| SQRT x1/2 PWR |x|EXP EXP PWRS xEXP EXP LOG ln(x) LOG10 log(x) EXP ex SIN sin(x) COS cos(x) TAN tan(x) ATAN tan-1 (x) ARCTAN tan-1 (x) ABM no inputs, V out EXP1...EXP4 ABM1 1 input, V out EXP1.
Pspug.book Page 155 Wednesday, November 11, 1998 1:14 PM Control system parts Basic components The basic components provide fundamental functions and in many cases, do not require specifying property values. These parts are described below. CONST VALUE constant value The CONST part outputs the voltage specified by the VALUE property. This part provides no inputs and one output. SUM The SUM part evaluates the voltages of the two input sources, adds the two inputs together, then outputs the sum.
Pspug.book Page 156 Wednesday, November 11, 1998 1:14 PM Chapter 6 Analog behavioral modeling Limiters The Limiters can be used to restrict an output to values between a set of specified ranges. These parts are described below. LIMIT HI upper limit value LO lower limit value The LIMIT part constrains the output voltage to a value between an upper limit (set with the HI property) and a lower limit (set with the LO property). This part takes one input and provides one output.
Pspug.book Page 157 Wednesday, November 11, 1998 1:14 PM Control system parts Chebyshev filters The Chebyshev filters allow filtering of the signal based on a set of frequency characteristics. The output of a Chebyshev filter depends upon the analysis being performed. PSpice computes the impulse response of each Chebyshev filter used in a transient analysis during circuit read-in. This may require considerable computing time.
Pspug.book Page 158 Wednesday, November 11, 1998 1:14 PM Chapter 6 Analog behavioral modeling band cutoff of 1.2 kHz. The pass band ripple is 0.1 dB and the minimum stop band attenuation is 50 dB. Assuming that the input to the filter is the voltage at net 10 and output is a voltage between nets 5 and 0, this will produce a PSpice netlist declaration like this: ELOWPASS 5 0 CHEBYSHEV {V(10)} = LP 800 1.2K .
Pspug.book Page 159 Wednesday, November 11, 1998 1:14 PM Control system parts band, respectively. The BANDPASS part provides one input and one output. Figure 37 shows an example of a BANDPASS filter device. This is a band pass filter with the pass band between 1.2 kHz and 2 kHz, and stop bands below 800 Hz and above 3 kHz. The pass band ripple is 0.1 dB and the minimum stop band attenuation is 50 dB. This will produce a PSpice netlist declaration like this: Figure 37 BANDPASS filter part example.
Pspug.book Page 160 Wednesday, November 11, 1998 1:14 PM Chapter 6 Analog behavioral modeling Integrator and differentiator The integrator and differentiator parts are described below. INTEG IC initial condition of the integrator output GAIN gain value The INTEG part implements a simple integrator. A current source/capacitor implementation is used to provide support for setting the initial condition. DIFFER GAIN gain value The DIFFER part implements a simple differentiator.
Pspug.book Page 161 Wednesday, November 11, 1998 1:14 PM Control system parts impose an upper and lower limit on the output. The TABLE part provides one input and one output.
Pspug.book Page 162 Wednesday, November 11, 1998 1:14 PM Chapter 6 Analog behavioral modeling value that can be assigned to the part’s DELAY property for subsequent runs, without otherwise altering the table. The output of the part depends on the analysis being done. For DC and bias point, the output is the zero frequency magnitude times the input voltage.
Pspug.book Page 163 Wednesday, November 11, 1998 1:14 PM Control system parts This part is characterized by the following properties: ROW1 = 0Hz ROW2 = 5kHz ROW3 = 6kHz DELAY = R_I = MAGUNITS = PHASEUNITS = 0 0 -60 0 -5760 -6912 Since R_I, MAGUNITS, and PHASEUNITS are undefined, each table entry is interpreted as containing frequency, magnitude value in dB, and phase values in degrees. Delay defaults to 0.
Pspug.book Page 164 Wednesday, November 11, 1998 1:14 PM Chapter 6 Analog behavioral modeling Laplace transform part The LAPLACE part specifies a Laplace transform which is used to determine an output for each input value. LAPLACE NUM numerator of the Laplace expression DENOM denominator of the Laplace expression The LAPLACE part uses a Laplace transform description. The input to the transform is a voltage.
Pspug.book Page 165 Wednesday, November 11, 1998 1:14 PM Control system parts 159 Hz. There is also a phase shift centered around 159 Hz. In other words, the gain has both a real and an imaginary component. For transient analysis, the output is the convolution of the input waveform with the impulse response of 1/(1+.001·s). The impulse response is a decaying exponential with a time constant of 1 millisecond.
Pspug.book Page 166 Wednesday, November 11, 1998 1:14 PM Chapter 6 Analog behavioral modeling lossy transmission line. R, L, and C are the resistance, inductance, and capacitance of the line per unit length. If R is small, the characteristic impedance of such a line is Z = ((R + j·ω·L)/(j·ω·C))1/2, the delay per unit length is (L C)1/2, and the loss in dB per unit length is 23·R/Z. This could be represented by the device in Figure 42. The parameters R, L, and C can be defined in a .
Pspug.book Page 167 Wednesday, November 11, 1998 1:14 PM Control system parts Math functions The ABM math function parts are shown in Table 1. For each device, the corresponding template is shown, indicating the order in which the inputs are processed, if applicable. Table 1 ABM math function parts For this device... Output is the...
Pspug.book Page 168 Wednesday, November 11, 1998 1:14 PM Chapter 6 Analog behavioral modeling ABM expression parts The expression parts are shown in Table 2. These parts can be customized to perform a variety of functions depending on your requirements. Each of these parts has a set of four expression building block properties of the form: EXPn where n = 1, 2, 3, or 4.
Pspug.book Page 169 Wednesday, November 11, 1998 1:14 PM Control system parts Example one Suppose you want to set an output voltage on net 4 to 5 volts times the square root of the voltage between nets 3 and 2. You could use an ABM2 part (which takes two inputs and provides a voltage output) to define a part like the one shown in Figure 43. In this example of an ABM device, the output voltage is set to 5 volts times the square root of the voltage between net 3 and net 2.
Pspug.book Page 170 Wednesday, November 11, 1998 1:14 PM Chapter 6 Analog behavioral modeling Example three Figure 45 ABM expression part example three. A device, EPWR, computes the instantaneous power by multiplying the voltage across nets 5 and 4 by the current through VSENSE. Sources are controlled by expressions which may contain voltages or currents or both. The ABM2 part (two inputs, current output) in Figure 45 could represent this.
Pspug.book Page 171 Wednesday, November 11, 1998 1:14 PM Control system parts An instantaneous device example: modeling a triode This section provides an example of using various ABM parts to model a triode vacuum tube. The schematic of the triode subcircuit is shown in Figure 47. Figure 47 Triode circuit. Assumptions: In its main operating region, the triode’s current is proportional to the 3/2 power of a linear combination of the grid and anode voltages: ianode = k0*(vg + k1*va)1.
Pspug.book Page 172 Wednesday, November 11, 1998 1:14 PM Chapter 6 Analog behavioral modeling The part would be defined with the following characteristics: EXP1 = V(%IN2,%IN3)+ EXP2 = 0.12*V(%IN1,%IN3) This works for the main operating region but does not model the case in which the current stays 0 when combined grid and anode voltages go negative.
Pspug.book Page 173 Wednesday, November 11, 1998 1:14 PM Control system parts The last major component is an ABM expression component to take an input voltage and convert it into a current. The relevant ABM1/I part property looks like this: EXP1 = 200E-6 * V(%IN) A final step in the model is to add device parasitics. For example, a resistor can be used to give a finite output impedance. Capacitances between the grid, cathode, and anode are also needed.
Pspug.book Page 174 Wednesday, November 11, 1998 1:14 PM Chapter 6 Analog behavioral modeling PSpice-equivalent parts PSpice-equivalent parts respond to a differential input and have double-ended output. These parts reflect the structure of PSpiceE and G devices, thus having two pins for each controlling input and the output in the part. Table 1 summarizes the PSpice-equivalent parts available in the part library.
Pspug.book Page 175 Wednesday, November 11, 1998 1:14 PM PSpice-equivalent parts Each E or G part type in the ABM.OLB part file is defined by a template that provides the specifics of the transfer function. Other properties in the model definition can be edited to customize the transfer function. By default, the template cannot be modified directly choosing Properties from the Edit menu in Capture.
Pspug.
Pspug.book Page 177 Wednesday, November 11, 1998 1:14 PM PSpice-equivalent parts In controlled sources, EXPR may contain constants and parameters as well as voltages, currents, or time. Voltages may be either the voltage at a net, such as V(5), or the voltage across two nets, such as V(4,5). Currents must be the current through a voltage source (V device), for example, I(VSENSE). Voltage sources with a value of 0 are handy for sensing current for use in these expressions.
Pspug.book Page 178 Wednesday, November 11, 1998 1:14 PM Chapter 6 Analog behavioral modeling expression. This is the PSpice internal sweep variable used in transient analyses. For any analysis other than transient, TIME = 0. The relevant property settings for this device are shown below: EXPR = 15ma*SIN(6.28*10kHz*TIME+V(%IN+,%IN-)) EMULT, GMULT, ESUM, and GSUM The EMULT and GMULT parts provide output which is based on the product of two input sources.
Pspug.book Page 179 Wednesday, November 11, 1998 1:14 PM PSpice-equivalent parts Figure 52 GMULT part example. With this device, the output is a current is equal to the ratio of the voltages at input pins 1 and input pins 2.
Pspug.book Page 180 Wednesday, November 11, 1998 1:14 PM Chapter 6 Analog behavioral modeling TABLE EXPR (-15, -15), (15,15) V(%IN+, %IN-) First, EXPR is evaluated, and that value is used to look up an entry in the table. EXPR is a function of the input (current or voltage) and follows the same rules as for VALUE expressions. The table consists of pairs of values, the first of which is an input, and the second of which is the corresponding output. Linear interpolation is performed between entries.
Pspug.book Page 181 Wednesday, November 11, 1998 1:14 PM PSpice-equivalent parts Frequency-domain device models Frequency-domain models (ELAPLACE, GLAPLACE, EFREQ, and GFREQ) are characterized by output that depends on the current input as well as the input history. The relationship is therefore non-instantaneous. For example, the output may be equal to the integral of the input over time. In other words, the response depends upon frequency.
Pspug.book Page 182 Wednesday, November 11, 1998 1:14 PM Chapter 6 Analog behavioral modeling The output of the device depends on the type of analysis being done. For DC and bias point, the output is simply the zero frequency gain times the value of EXPR. The zero frequency gain is the value of XFORM with s = 0. For AC analysis, EXPR is linearized around the bias point (similar to the VALUE parts). The output is then the input times the gain of EXPR times the value of XFORM.
Pspug.book Page 183 Wednesday, November 11, 1998 1:14 PM PSpice-equivalent parts For AC analysis, the gain is found by substituting j·ω for s. This gives a flat response out to a corner frequency of 1000/(2π) = 159 Hz and a roll-off of 6 dB per octave after 159 Hz. There is also a phase shift centered around 159 Hz. In other words, the gain has both a real and an imaginary component.
Pspug.book Page 184 Wednesday, November 11, 1998 1:14 PM Chapter 6 Analog behavioral modeling DELAY group delay increment; defaults to 0 if left blank. R_I table type; if left blank, the frequency table is interpreted in the (input frequency, magnitude, phase) format; if defined with any value (such as YES), the table is interpreted in the (input frequency, real part, imaginary part) format.
Pspug.book Page 185 Wednesday, November 11, 1998 1:14 PM PSpice-equivalent parts Figure 53 shows an EFREQ device used as a low pass filter. The input to the frequency response is the voltage across the input pins. The table describes a low pass filter with a response of 1 (0 dB) for frequencies below 5 kilohertz and a response of .001 (-60 dB) for frequencies above 6 kilohertz. The output is a voltage across the output pins. Figure 53 EFREQ part example.
Pspug.book Page 186 Wednesday, November 11, 1998 1:14 PM Chapter 6 Analog behavioral modeling Cautions and recommendations for simulation and analysis Instantaneous device modeling During AC analysis, nonlinear transfer functions are handled the same way as other nonlinear parts: each function is linearized around the bias point and the resulting small-signal equivalent is used. Consider the voltage multiplier (mixer) shown in Figure 54.
Pspug.book Page 187 Wednesday, November 11, 1998 1:14 PM Cautions and recommendations for simulation and analysis Frequency-domain parts Some caution is in order when moving between frequency and time domains. This section discusses several points that are involved in the implementation of frequency-domain parts. These discussions all involve the transient analysis, since both the DC and AC analyses are straightforward.
Pspug.book Page 188 Wednesday, November 11, 1998 1:14 PM Chapter 6 Analog behavioral modeling transforms do not have such a limit, there is also a limit of 10/RELTOL times the frequency resolution, or 10/(RELTOL·TSTOP). For example, consider the transform: e-0.001·s This is an ideal delay of 1 millisecond and has no frequency cutoff. If TSTOP = 10 milliseconds and RELTOL=.001, then PSpice imposes a frequency cutoff of 10 MHz.
Pspug.book Page 189 Wednesday, November 11, 1998 1:14 PM Cautions and recommendations for simulation and analysis must be applied to both past and future samples of the input in order to properly represent the inverse of the Laplace expression. For example, the expression {S} corresponds to differentiation in the time domain. The impulse response for {S} is an impulse pair separated by an infinitesimal distance in time.
Pspug.book Page 190 Wednesday, November 11, 1998 1:14 PM Chapter 6 Analog behavioral modeling Chebyshev filters All of the considerations given above for Laplace parts also apply to Chebyshev filter parts. However, PSpice also attempts to deal directly with inaccuracies due to sampling by applying Nyquist criteria based on the highest filter cutoff frequency. This is done by checking the value of TMAX. If TMAX is not specified it is assigned a value, or if it is specified, it may be reduced.
Pspug.book Page 191 Wednesday, November 11, 1998 1:14 PM Cautions and recommendations for simulation and analysis Trading off computer resources for accuracy There is a significant trade-off between accuracy and computation time for parts modeled in the frequency domain. The amount of computer time and memory scale approximately inversely to RELTOL. Therefore, if you can use RELTOL=.01 instead of the default .001, you will be ahead. However, this will not adversely affect the impulse response.
Pspug.book Page 192 Wednesday, November 11, 1998 1:14 PM Chapter 6 Analog behavioral modeling Basic controlled sources As with basic SPICE, PSpice has basic controlled sources derived from the standard SPICE E, F, G, and H devices. Table 1 summarizes the linear controlled source types provided in the standard part library. Table 1 Basic controlled sources in ANALOG.
Pspug.book Page 193 Wednesday, November 11, 1998 1:14 PM Part three Setting Up and Running Analyses Part Three describes how to set up and run analyses and provides setup information specific to each analysis type. • Chapter 7, Setting up analyses and starting simulation, explains the procedures general to all analysis types to set up and start the simulation.
Pspug.book Page 194 Wednesday, November 11, 1998 1:14 PM • Chapter 12, Monte Carlo and sensitivity/worst-case analyses, describes how to set up Monte Carlo and sensitivity/worst-case analyses for statistical interpretation of your circuit’s behavior.
Pspug.book Page 195 Wednesday, November 11, 1998 1:14 PM Setting up analyses and starting simulation 7 Chapter overview This chapter provides an overview of setting up analyses and starting simulation that applies to any analysis type. The other chapters in Part three, Setting Up and Running A nalyses provide specific analysis setup information for each analysis type.
Pspug.book Page 196 Wednesday, November 11, 1998 1:14 PM Chapter 7 Setting up analyses and starting simulation Analysis types PSpice supports analyses that can simulate analog-only circuits. Table 2 provides a summary of the available PSpice analyses and the corresponding Analysis type options where the analysis parameters are specified. In Capture, switch to the PSpice view, then from the PSpice menu, choose New Simulation Profile .
Pspug.book Page 197 Wednesday, November 11, 1998 1:14 PM Setting up analyses The waveform analyzer calculates and displays the results of PSpice simulations for swept analyses. The waveform analyzer also generates supplementary analysis information in the form of lists and tables, and saves this in the simulation output file. See Part four, V iewing results, for information about using waveform analysis in PSpice.
Pspug.book Page 198 Wednesday, November 11, 1998 1:14 PM Chapter 7 Setting up analyses and starting simulation 5 Set up any other analyses you want to perform for the circuit by selecting any of the remaining analysis types and options, then complete their setup dialog boxes. Execution order for standard analyses For normal simulations that are run from a simulation profile, or in batch mode, only the particular analysis type that is specified will be executed.
Pspug.book Page 199 Wednesday, November 11, 1998 1:14 PM Setting up analyses Output variables Certain analyses (such as noise, Monte Carlo, sensitivity/ worst-case, DC sensitivity, Fourier, and small-signal DC transfer function) require you to specify output variables for voltages and currents at specific points on the schematic.
Pspug.book Page 200 Wednesday, November 11, 1998 1:14 PM Chapter 7 Setting up analyses and starting simulation schematic page is referred to as Y1.R34 when used in an output variable. A (from line 4) is uniquely distinguished by specifying the full part name (as described above) followed by a colon, and the pin name. For example, the pins on a capacitor with reference designator C31 placed on a top-level page and pin names 1 and 2 would be identified as C31:1 and C31:2, respectively.
Pspug.
Pspug.
Pspug.
Pspug.
Pspug.book Page 205 Wednesday, November 11, 1998 1:14 PM Setting up analyses Table 8 Element definitions for AC analysis specific elements device symbol Meaning Output variable examples (none) magnitude (default) V(V1) I(V1) M magnitude VM(CAP1:1) IM(CAP1:1) DB magnitude in decibels VDB(R1) P phase IP(R1) R real part VR(R1) I imaginary part VI(R1) The INOISE, ONOISE, DB(INOISE), and DB(ONOISE) output variables are predefined for use with noise (AC sweep) analysis.
Pspug.book Page 206 Wednesday, November 11, 1998 1:14 PM Chapter 7 Setting up analyses and starting simulation Starting a simulation After you have used Capture to enter your circuit design and have set up the analyses to be performed, you can start a simulation by choosing Run from the PSpice menu. When you enter and set up your circuit this way, Capture automatically generates the simulation files and starts PSpice. There may be situations, however, when you want to run PSpice outside of Capture.
Pspug.book Page 207 Wednesday, November 11, 1998 1:14 PM Starting a simulation Starting a simulation outside of Capture To start PSpice outside of Capture 1 From the Start menu, point to the OrCAD program group, then choose PSpice. 2 From the File menu, choose Open Simulation. 3 Do one of the following: • Double-click on the simulation profile filename (*.SIM) in the list box. • Enter the simulation profile filename (*.SIM) in the File name text box and click Open.
Pspug.book Page 208 Wednesday, November 11, 1998 1:14 PM Chapter 7 Setting up analyses and starting simulation file. The effect is the same as if you had run each circuit separately and then concatenated all of the outputs. Running simulations with multiple circuit files You can direct PSpice to simulate multiple circuit files using either of the following methods. Method 1 1 From the Start menu, point to the OrCAD program group, then choose PSpice.
Pspug.book Page 209 Wednesday, November 11, 1998 1:14 PM Starting a simulation window. For instance, you can have a waveform file (.DAT), a circuit file (.CIR), and a simulation output file (.OUT) open and displayed in different child windows within this one window.
Pspug.book Page 210 Wednesday, November 11, 1998 1:14 PM Chapter 7 Setting up analyses and starting simulation Figure 55 PSpice simulation window Main window section The top central portion (by default) of the simulation window is the main window section where documents (such as waveforms, circuit description, output information etc.) are displayed within child windows. These windows are tabbed by default. The tabs at the bottom left show the names of the documents that each child window contains.
Pspug.book Page 211 Wednesday, November 11, 1998 1:14 PM Starting a simulation Simulation status window section The lower right portion of the simulation window presents a set of tabbed windows that show detailed status about the simulation. There are three tabbed windows in this section: the Analysis window, the Watch Variable window, and the Devices window. The Analysis window provides a running log of values of simulation variables (parameters such as Temperature, Time Step, and Time).
Pspug.
Pspug.
Pspug.book Page 214 Wednesday, November 11, 1998 1:14 PM Chapter 8 DC analyses DC Sweep Minimum requirements to run a DC sweep analysis Minimum circuit design requirements Table 9 214 DC sweep circuit design requirements Swept variable type Requirement voltage source voltage source with a DC specification (VDC, for example) temperature none current source current source with a DC specification (IDC, for example) model parameter PSpice model (.
Pspug.book Page 215 Wednesday, November 11, 1998 1:14 PM DC Sweep Minimum program setup requirements 1 In Capture, select New Simulation Profile or Edit Simulation Settings from the PSpice menu. (If this is a new simulation, enter the name of the profile and click OK.) The Simulation Settings dialog box appears. 2 Under Analysis type, select DC Sweep. 3 For the Primary Sweep option, enter the necessary parameter values and select the appropriate check boxes to complete the analysis specifications.
Pspug.book Page 216 Wednesday, November 11, 1998 1:14 PM Chapter 8 DC analyses Overview of DC sweep The DC sweep analysis causes a DC sweep to be performed on the circuit. DC sweep allows you to sweep a source (voltage or current), a global parameter, a model parameter, or the temperature through a range of values. The bias point of the circuit is calculated for each value of the sweep.
Pspug.book Page 217 Wednesday, November 11, 1998 1:14 PM DC Sweep The example circuit EXAMPLE.OPJ is provided with the OrCAD program installation. Figure 56 Example schematic EXAMPLE.OPJ. To calculate the DC response of an analog circuit, PSpice removes time from the circuit. This is done by treating all capacitors as open circuits, all inductors as shorts, and using only the DC values of voltage and current sources. In order to solve the circuit equations, PSpice uses an iterative algorithm.
Pspug.book Page 218 Wednesday, November 11, 1998 1:14 PM Chapter 8 DC analyses Setting up a DC stimulus To run a DC sweep or small-signal DC transfer analysis, you need to place and connect one or more independent sources and then set the DC voltage or current level for each source.
Pspug.book Page 219 Wednesday, November 11, 1998 1:14 PM DC Sweep Table 12 Set this attribute... To this value... DC DC_level where DC_level is in volts or amps (units are optional). 5 Click OK twice to exit the dialog boxes. Nested DC sweeps A second sweep variable can be selected after a primary sweep value has been specified in the DC Sweep dialog box. When you specify a secondary sweep variable, it forms the outer loop for the analysis.
Pspug.book Page 220 Wednesday, November 11, 1998 1:14 PM Chapter 8 DC analyses 2 220 Enter the necessary parameter values and select the appropriate check boxes to complete the analysis specifications.
Pspug.book Page 221 Wednesday, November 11, 1998 1:14 PM DC Sweep Curve families for DC sweeps When a nested DC sweep is performed, the entire curve family is displayed. That is, the nested DC sweep is treated as a single data section (or you can think of it as a single PSpice run). For the circuit shown in Figure 57, you can set up a DC sweep analysis with an outer sweep of the voltage source VD and an inner sweep of the voltage source VG as listed in Table 1.
Pspug.book Page 222 Wednesday, November 11, 1998 1:14 PM Chapter 8 DC analyses Figure 58 Device curve family. Figure 59 Operating point determination for each member of the curve family.
Pspug.book Page 223 Wednesday, November 11, 1998 1:14 PM Bias point Bias point Minimum requirements to run a bias point analysis Minimum circuit design requirements None. Minimum program setup requirements 1 Under Analysis type in the Simulation Settings dialog box, select Bias Point. 2 For the General Settings option, enter the necessary parameter values and select the appropriate check boxes to complete the analysis specifications. 3 Click OK to save the simulation profile.
Pspug.
Pspug.book Page 225 Wednesday, November 11, 1998 1:14 PM Small-signal DC transfer Small-signal DC transfer Minimum requirements to run a small-signal DC transfer analysis Minimum circuit design requirements • The circuit should contain an input source, such as VSRC. Minimum program setup requirements 1 Under Analysis type in the Simulation Settings dialog box, select Bias Point. 2 Specify the name of the input source desired.
Pspug.book Page 226 Wednesday, November 11, 1998 1:14 PM Chapter 8 DC analyses Overview of small-signal DC transfer The small-signal DC transfer analysis calculates the small-signal transfer function by transforming the circuit around the bias point and treating it as a linear circuit . The small-signal gain, input resistance, and output resistance are calculated and reported. For N and O devices in the analog interface subcircuits, has a well-defined linear equivalent.
Pspug.book Page 227 Wednesday, November 11, 1998 1:14 PM Small-signal DC transfer 3 Specify the input source name in the Calculate small-signal DC gain (.TF) portion of the Bias Point dialog box. The gain from the input source to the output variable is calculated along with the input and output resistances.
Pspug.book Page 228 Wednesday, November 11, 1998 1:14 PM Chapter 8 DC analyses DC sensitivity Minimum requirements to run a DC sensitivity analysis Minimum circuit design requirements None. Minimum program setup requirements 228 1 In the Bias Point dialog box, select Perform Sensitivity analysis (.SENS). 2 Enter the required value(s) in the Output variable(s) box. 3 Click OK to save the simulation profile. (Be sure you give the new profile an appropriate name under the General tab prior to saving.
Pspug.book Page 229 Wednesday, November 11, 1998 1:14 PM DC sensitivity Overview of DC sensitivity DC sensitivity analysis calculates and reports the sensitivity of one node voltage to each device parameter for the following device types: • resistors • independent voltage and current sources • voltage and current-controlled switches • diodes • bipolar transistors The sensitivity is calculated by linearizing all devices around the bias point.
Pspug.
Pspug.book Page 231 Wednesday, November 11, 1998 1:14 PM AC analyses 9 Chapter overview This chapter describes how to set up AC sweep and noise analyses. • AC sweep analysis on page 9-232 describes how to set up an analysis to calculate the frequency response of your circuit. This section also discusses how to define an AC stimulus and how PSpice treats nonlinear devices in an AC sweep.
Pspug.book Page 232 Wednesday, November 11, 1998 1:14 PM Chapter 9 AC analyses AC sweep analysis Setting up and running an AC sweep The following procedure describes the minimum setup requirements for running an AC sweep analysis. For more detail on any step, go to the pages referenced in the sidebars. To set up and run an AC sweep To find out how, see Setting up an AC stimulus on page 9-233. 1 Place and connect a voltage or current source with an AC input signal.
Pspug.book Page 233 Wednesday, November 11, 1998 1:14 PM AC sweep analysis circuits about their bias point value before PSpice runs the linear (small-signal) analysis. • Because AC sweep analysis is a linear analysis, it only considers the gain and phase response of the circuit; it does not limit voltages or currents. The best way to use AC sweep analysis is to set the source magnitude to one. This way, the measured output equals the gain, relative to the input source, at that output.
Pspug.book Page 234 Wednesday, November 11, 1998 1:14 PM Chapter 9 AC analyses 3 Click in the cell under the appropriate property column to edit its value. Depending on the source symbol that you placed, define the AC specification as follows: Table 4 For VAC or IAC Set this property... To this value... ACMAG AC magnitude in volts (for VAC) or amps (for IAC); units are optional. ACPHASE Optional AC phase in degrees.
Pspug.book Page 235 Wednesday, November 11, 1998 1:14 PM AC sweep analysis Setting up an AC analysis To set up the AC analysis 1 From the PSpice menu, choose New Simulation Profile or Edit Simulation Settings. (If this is a new simulation, enter the name of the profile and click OK.) The Simulation Settings dialog box appears. 2 Choose AC Sweep/Noise in the Analysis type list box. 3 Under Options, select General Settings if it is not already enabled.
Pspug.book Page 236 Wednesday, November 11, 1998 1:14 PM Chapter 9 AC analyses Table 6 If you also want to run a noise analysis, then before clicking OK, complete the Noise Analysis frame in this dialog box as described in Setting up a noise analysis on page 9-243. 236 To sweep frequency... Do this... linearly Under AC Sweep Type, click Linear, and enter the total number of points in the sweep in the Total Points box.
Pspug.book Page 237 Wednesday, November 11, 1998 1:14 PM AC sweep analysis AC sweep setup in example.opj If you look at the example circuit, EXAMPLE.OPJ, provided with your OrCAD programs, you’ll find that its AC analysis is set up as shown in Figure 61. Note The source, V1, is a VSIN source that is normally used for setting up sine wave signals for a transient analysis. It also has an AC property so that you can use it for an AC analysis.
Pspug.book Page 238 Wednesday, November 11, 1998 1:14 PM Chapter 9 AC analyses Note The source, V1, is a VSIN source that is normally used for setting up sine wave signals for a transient analysis. It also has an AC property so that you can use it for an AC analysis. To find out more about VSIN and other source symbols that you can use for AC analysis, see Using time-based stimulus parts with AC and DC properties on page 3-77. Figure 61 AC analysis setup for EXAMPLE.OPJ.
Pspug.book Page 239 Wednesday, November 11, 1998 1:14 PM AC sweep analysis How PSpice treats nonlinear devices An AC Sweep analysis is a linear or small-signal analysis. This means that nonlinear devices must be linearized to run the analysis. What’s required to transform a device into a linear circuit In order to transform a device (such as a transistor amplifier) into a linear circuit, you must do the following: 1 Compute the DC bias point for the circuit.
Pspug.book Page 240 Wednesday, November 11, 1998 1:14 PM Chapter 9 AC analyses Using a DC source Consider the circuit shown here.
Pspug.book Page 241 Wednesday, November 11, 1998 1:14 PM Noise analysis Noise analysis Setting up and running a noise analysis The following procedure describes the minimum setup requirements for running a noise analysis. For more detail on any step, go to the pages referenced in the sidebars. To set up and run an AC sweep 1 Place and connect a voltage or current source with an AC input signal. To find out how, see Setting up an AC stimulus on page 9-233.
Pspug.
Pspug.book Page 243 Wednesday, November 11, 1998 1:14 PM Noise analysis Setting up a noise analysis To set up the noise analysis 1 From the PSpice menu, choose New Simulation Profile or Edit Simulation Settings. (If this is a new simulation, enter the name of the profile and click OK.) The Simulation Settings dialog box appears. 2 Choose AC Sweep/Noise in the Analysis type list box. 3 Under Options, select General Settings if it is not already enabled.
Pspug.book Page 244 Wednesday, November 11, 1998 1:14 PM Chapter 9 AC analyses Table 8 To find out more about valid syntax, see Output variables on page 7-199. In this text box... Type this... Output Voltage A voltage output variable of the form V(node, [node]) where you want the total output noise calculated. I/V Source The name of an independent current or voltage source where you want the equivalent input noise calculated.
Pspug.book Page 245 Wednesday, November 11, 1998 1:14 PM Noise analysis Analyzing Noise in the Probe window You can use these output variable formats to view traces for device noise contributions and total input or output noise at every frequency in the analysis. For a break down of noise output variables by supported device type, see Table 6 on page 13-358. To view this... Use this output variable... Which is represented by this equation*...
Pspug.book Page 246 Wednesday, November 11, 1998 1:14 PM Chapter 9 AC analyses About noise units Table 9 This type of noise output variable... Is reported in these units... Device contribution of the form Nxxx ( v olts ) ⁄ ( Hz ) Total input or output noise of the form V(ONOISE) or V(INOISE) ( v olts ) ⁄ ( Hz ) 2 Example You can run a noise analysis on the circuit shown in Figure 60 on page 9-237. To run a noise analysis on the example: In Capture, open the EXAMPLE.
Pspug.book Page 247 Wednesday, November 11, 1998 1:14 PM Noise analysis Figure 63 shows Probe traces for Q1’s constituent noise sources as well as total nose for the circuit after simulating. Notice that the trace for RMSSUM (at the top of the plot), which is a macro for the trace expression SQRT(NTOT(Q1) + NTOT(Q2) + NTOT(Q3) + ... ), To find out more about PSpice macros, refer to PSpice A/D online Help. exactly matches the total output noise, V(ONOISE), calculated by PSpice.
Pspug.
Pspug.
Pspug.
Pspug.
Pspug.book Page 252 Wednesday, November 11, 1998 1:14 PM Chapter 10 Transient analysis Defining a time-based stimulus Overview of stimulus generation Symbols that generate input signals for your circuit can be divided into two categories: • those whose transient behavior is characterized graphically using the Stimulus Editor • those whose transient behavior is characterized by manually defining their properties within Capture Their symbols are summarized in Table 10.
Pspug.book Page 253 Wednesday, November 11, 1998 1:14 PM The Stimulus Editor utility To use any of these source types, you must place the symbol in your schematic and then define its transient behavior. Each property-characterized stimulus has a distinct set of attributes depending upon the kind of transient behavior it represents. For VPWL_F_xxx, IPWL_F_xxx, and FSTIM, a separate file contains the stimulus specification.
Pspug.book Page 254 Wednesday, November 11, 1998 1:14 PM Chapter 10 Transient analysis Stimulus Editor produces these statements automatically, you will never have to be concerned with their syntax. However, if you are interested in a detailed description of their syntax, see the descriptions of V and I devices in the A nalog Devices chapter of the the online OrCA D PSpice A /D Reference Manual.
Pspug.book Page 255 Wednesday, November 11, 1998 1:14 PM The Stimulus Editor utility When you first start the Stimulus Editor, you may need to adjust the scale settings to fit the trace you are going to add. You can use Axis Settings on the Plot menu or the corresponding toolbar button to change the displayed data, the extent of the scrolling region, and the minimum resolution for each of the axes.
Pspug.book Page 256 Wednesday, November 11, 1998 1:14 PM Chapter 10 Transient analysis Defining stimuli 1 Place stimulus part instances from the symbol set: VSTIM, ISTIM and DIGSTIMn. 2 Click the source instance to select it. 3 From the Edit menu, choose PSpice Stimulus to start the Stimulus Editor. 4 Fill in the transient specification according to the dialogs and prompts. 5 From the File menu, choose Save to save the edits.
Pspug.book Page 257 Wednesday, November 11, 1998 1:14 PM The Stimulus Editor utility 9 Move the cursor to (200ns, 1) and click the left mouse button. This adds the point. Notice that there is automatically a point at (0,0). Ignore it for now and continue to add a couple more points to the right of the current one. 10 Click-right to stop adding points. 11 From the File menu, choose Save. If you make a mistake or want to make any changes, reshape the trace by dragging any of the handles to a new location.
Pspug.book Page 258 Wednesday, November 11, 1998 1:14 PM Chapter 10 Transient analysis 7 8 9 e Give the stimulus the name of Vsin. f Select SIN as the type of stimulus to be created, and click OK. Define the other stimulus properties: a Enter 0 for Offset Value. b Enter {AMP} for Amplitude. The curly braces are required. They indicate that the expression needs to be evaluated at simulation time. c Enter 10k for Frequency and click OK. d From the File menu, choose Save.
Pspug.
Pspug.book Page 260 Wednesday, November 11, 1998 1:14 PM Chapter 10 Transient analysis Editing a stimulus To edit an existing stimulus PWL stimuli are a little different since they are a series of time/value pairs. This provides a fast way to scale a PWL stimulus. 260 1 Start the Stimulus Editor and select Get from the Stimulus menu. 2 Double-click the trace name (at the bottom of the X axis for analog).
Pspug.book Page 261 Wednesday, November 11, 1998 1:14 PM The Stimulus Editor utility Deleting and removing traces To delete a trace from the displayed screen, select the trace name by clicking on its name, then press X. This will only erase the display of the trace, not delete it from your file. The trace is still available by selecting Get from the Stimulus menu. To remove a trace from a file, select Remove from the Stimulus menu. Once a trace is removed, it is no longer retrievable.
Pspug.book Page 262 Wednesday, November 11, 1998 1:14 PM Chapter 10 Transient analysis 4 In the schematic page editor, configure the Stimulus Editor’s output file into your schematic: a From the Pspice menu, choose Edit Simulation Settings. a In the Simulation Settings dialog box, select the Include Files tab. b Enter the file name specified in step 2. c If the stimulus specifications are for local use in the current design, click the Add to design button.
Pspug.book Page 263 Wednesday, November 11, 1998 1:14 PM Transient (time) response b Create or change the part definition, making sure to define the following properties: Implementation stimulus name as defined in the Stimulus Editor See Chapter 5, Creating parts for models, for a description of how to create and edit parts. Transient (time) response The Transient response analysis causes the response of the circuit to be calculated from TIME = 0 to a specified time.
Pspug.book Page 264 Wednesday, November 11, 1998 1:14 PM Chapter 10 Transient analysis During a transient analysis, any or all of the independent sources may have time-varying values. In EXAMPLE.OPJ, the only source which has a time-varying value is V1 (VSIN part) with attributes: VOFF = 0v VAMPL = 0.1v FREQ = 5Meg V1’s value varies as a 5 MHz sine wave with an offset voltage of 0 volts and a peak amplitude of 0.1 volts. In general, more than one source has time-varying values.
Pspug.book Page 265 Wednesday, November 11, 1998 1:14 PM Internal time steps in transient analyses Internal time steps in transient analyses During analog analysis, PSpice maintains an internal time step which is continuously adjusted to maintain accuracy while not performing unnecessary steps. During periods of inactivity, the internal time step is increased. During active regions, it is decreased.
Pspug.book Page 266 Wednesday, November 11, 1998 1:14 PM Chapter 10 Transient analysis Switching circuits in transient analyses Running transient analysis on switching circuits can lead to long run times. PSpice must keep the internal time step short compared to the switching period, but the circuit’s response extends over many switching cycles. This technique is described in: V. Bello, “Computer Program Adds SPICE to Switching-Regulator Analysis,” Electronic Design, March 5, 1981.
Pspug.book Page 267 Wednesday, November 11, 1998 1:14 PM Plotting hysteresis curves * Capture Netlist R_RIN 1 2 50 R_RC1 0 3 50 R_R1 3 5 185 R_R2 5 8 760 R_RC2 0 6 100 R_RE 4 8 260 R_RTH2 7 0 85 C_CLOAD 0 7 5PF V_VEE 8 0 dc -5 V_VIN 1 0 +PWL 0 -8 1MS -1.0V 2MS -1.8V R_RTH1 8 7 125 Q_Q1 3 2 4 QSTD Q_Q2 6 5 4 QSTD Q_Q3 0 6 7 QSTD Q_Q4 0 6 7 QSTD Figure 66 Netlist for Schmitt trigger circuit. The QSTD model is defined as: .MODEL QSTD NPN( is=1e-16 bf=50 br=0.1 rb=50 rc=10 tf=.12ns tr=5ns + cje=.4pF pe=.
Pspug.book Page 268 Wednesday, November 11, 1998 1:14 PM Chapter 10 Transient analysis Figure 67 Hysteresis curve example: Schmitt trigger. Fourier components Note You must do a transient analysis in order to do a Fourier analysis. The sampling interval used during the Fourier transform is equal to the print step specified for the transient analysis. Fourier analysis is enabled through the Output File Options dialog box under the Time Domain (Transient) Analysis type.
Pspug.book Page 269 Wednesday, November 11, 1998 1:14 PM Fourier components portion is assumed to repeat indefinitely. Since V1’s sine wave does indeed repeat every one microsecond, this is sufficient. In general, however, you must make sure that the fundamental Fourier period fits the waveform in the transient analysis.
Pspug.
Pspug.book Page 271 Wednesday, November 11, 1998 1:14 PM Parametric and temperature analysis 11 Chapter overview This chapter describes how to set up parametric and temperature analyses. Parametric and temperature are both simple multi-run analysis types.
Pspug.book Page 272 Wednesday, November 11, 1998 1:14 PM Chapter 11 Parametric and temperature analysis Parametric analysis Minimum requirements to run a parametric analysis Minimum circuit design requirements • Set up the circuit according to the swept variable type as listed in Table 1. • Set up a DC sweep, AC sweep, or transient analysis.
Pspug.book Page 273 Wednesday, November 11, 1998 1:14 PM Parametric analysis 4 Click OK to save the simulation profile. 5 From the PSpice menu, choose Run to start the simulation. Note Do not specify a DC sweep and a parametric analysis for the same variable. Overview of parametric analysis Parametric analysis performs multiple iterations of a specified standard analysis while varying a global parameter, model parameter, component value, or operational temperature.
Pspug.book Page 274 Wednesday, November 11, 1998 1:14 PM Chapter 11 Parametric and temperature analysis RLC filter example This example shows how to perform a parametric sweep and analyze the results with performance analysis. Use performance analysis to derive values from a series of simulator runs and plot these values versus a parameter that varies between the simulator runs. For this example, the derived values are the overshoot and the rise time versus the damping resistance of the filter.
Pspug.book Page 275 Wednesday, November 11, 1998 1:14 PM Parametric analysis I2 = 0a T3 = 10.1ms I3 = 1a Place an instance of a resistor and set its VALUE property to the expression, {R}. To define R as a global parameter, place a PARAM pseudocomponent and use the Property Editor to create a new property R and set its value to 0.5. Place an inductor and set its value to 1H, place a capacitor and set its value to 1, and place an analog ground symbol (0 from SOURCE.OLB).
Pspug.book Page 276 Wednesday, November 11, 1998 1:14 PM Chapter 11 Parametric and temperature analysis Troubleshooting tip More than one PSpice run or data section is required for performance analysis. Because one data value is derived for each waveform in a related set of waveforms, at least two data points are required to produce a trace. Use Eval Goal Function (from the Trace menu) to evaluate a goal function on a single waveform and produce a single data point result.
Pspug.book Page 277 Wednesday, November 11, 1998 1:14 PM Parametric analysis Figure 70 Rise time and overshoot vs. damping resistance.
Pspug.book Page 278 Wednesday, November 11, 1998 1:14 PM Chapter 11 Parametric and temperature analysis Example: frequency response vs. arbitrary parameter This technique for measuring branch capacitances works well in both simple and complex circuits. You can view a plot of the linear response of a circuit at a specific frequency as one of the circuit parameters varies (such as the output of a band pass filter at its center frequency vs. an inductor value).
Pspug.book Page 279 Wednesday, November 11, 1998 1:14 PM Parametric analysis To display the results Use PSpice to display the capacitance calculated at the frequency of interest versus the stepped parameter. 1 Simulate the circuit. 2 Load all AC analysis sections. 3 From the Trace menu, choose Add Trace or click the Add Trace toolbar button. 4 Add the following trace expression: IMG(-I(Vin)/V(1,0))/(2*3.
Pspug.book Page 280 Wednesday, November 11, 1998 1:14 PM Chapter 11 Parametric and temperature analysis The resultant plot is shown in Figure 72. Figure 72 Plot of capacitance versus bias voltage.
Pspug.book Page 281 Wednesday, November 11, 1998 1:14 PM Temperature analysis Temperature analysis Minimum requirements to run a temperature analysis Minimum circuit design requirements None. Minimum program setup requirements 1 In the Simulation Settings dialog box, from the Analysis type list box, select Time Domain (Transient). 2 Under Options, select Temperature Sweep if it is not already enabled. 3 Specify the required parameters for the sweep. 4 Click OK to save the simulation profile.
Pspug.book Page 282 Wednesday, November 11, 1998 1:14 PM Chapter 11 Parametric and temperature analysis Overview of temperature analysis Running multiple analyses for different temperatures can also be achieved using parametric analysis (see Parametric analysis on page 11-272). With parametric analysis, the temperatures can be specified either by list, or by range and increments within the range.
Pspug.
Pspug.book Page 284 Wednesday, November 11, 1998 1:14 PM Chapter 12 Monte Carlo and sensitivity/worst-case analyses Statistical analyses Monte Carlo and sensitivity/worst-case are statistical analyses. This section describes information common to both types of analyses. See Monte Carlo analysis on page 12-289 for information specific to Monte Carlo analyses, and see Worst-case analysis on page 12-306 for information specific to sensitivity/worst-case analyses.
Pspug.
Pspug.book Page 286 Wednesday, November 11, 1998 1:14 PM Chapter 12 Monte Carlo and sensitivity/worst-case analyses Waveform reports For Monte Carlo analyses, there are five variations of the output that you can specify in the Save data from text box on the Monte Carlo dialog box. Options: In excess of about 10 runs, the waveform display can look more like a band than a set of individual waveforms. This can be useful for seeing the typical spread for a particular output variable.
Pspug.book Page 287 Wednesday, November 11, 1998 1:14 PM Statistical analyses Collating functions You can further compress the results of Monte Carlo and worst-case analyses. If you use the collating function, a single number represents each run. (Click the Output File Options button and select a function from the Find list.) A table of deviations per run is reported in the simulation output file. Collating functions are listed in Table 1.
Pspug.book Page 288 Wednesday, November 11, 1998 1:14 PM Chapter 12 Monte Carlo and sensitivity/worst-case analyses Temperature considerations in statistical analyses Refer to Temperature Effects on Monte Carlo A nalysis in the A pplication Notes manual for more information. The statistical analyses perform multiple runs, as does the temperature analysis. Conceptually, the Monte Carlo and worst-case loops are inside the temperature loop.
Pspug.book Page 289 Wednesday, November 11, 1998 1:14 PM Monte Carlo analysis Monte Carlo analysis The Monte Carlo analysis calculates the circuit response to changes in part values by randomly varying all of the model parameters for which a tolerance is specified. This provides statistical data on the impact of a device parameter’s variance. With Monte Carlo analysis, model parameters are given tolerances, and multiple analyses (DC, AC, or transient) are run using these tolerances.
Pspug.book Page 290 Wednesday, November 11, 1998 1:14 PM Chapter 12 Monte Carlo and sensitivity/worst-case analyses runs, saving the DC analysis output from those five runs. Figure 75 Monte Carlo analysis setup for EXAMPLE.DSN. PSpice starts by running all of the analyses enabled in the Simulation Settings dialog box with all parameters set to their nominal values. PSpice offers a facility to generate histograms of data derived from Monte Carlo waveform families through the performance analysis feature.
Pspug.book Page 291 Wednesday, November 11, 1998 1:14 PM Monte Carlo analysis Reading the summary report The summary report generated in this example (see Figure 76) specifies that the waveform generated from V(OUT1, OUT2) should be the subject of the collating function YMAX. In each of the last four runs, the new V(OUT1, OUT2) waveform is compared to the nominal V(OUT1, OUT2) waveform for the first run, calculating the maximum deviation in the Y direction (YMAX collating function).
Pspug.book Page 292 Wednesday, November 11, 1998 1:14 PM Chapter 12 Monte Carlo and sensitivity/worst-case analyses Figure 77 Parameter values for Monte Carlo pass three.
Pspug.book Page 293 Wednesday, November 11, 1998 1:14 PM Monte Carlo analysis Example: Monte Carlo analysis of a pressure sensor This example shows how the performance of a pressure sensor circuit with a pressure-dependent resistor bridge is affected by manufacturing tolerances, using Monte Carlo analysis to explore these effects. Drawing the schematic To begin, construct the bridge as shown in Figure 78. Figure 78 Pressure sensor circuit.
Pspug.book Page 294 Wednesday, November 11, 1998 1:14 PM Chapter 12 Monte Carlo and sensitivity/worst-case analyses S+W • To connect the parts, from the Place menu, choose Wire. • To move values or reference designators, click the value or reference designator to select it, then drag it to the new location. Defining part values Define the part values as shown in Figure 78.
Pspug.book Page 295 Wednesday, November 11, 1998 1:14 PM Monte Carlo analysis 4 Click the Display button. 5 In the Display Format frame, choose the Value Only option to make the DC value (1.35v) visible on the schematic. 6 Click OK, then click Apply to apply the changes you have made to the part. 7 Close the Parts Spreadsheet. Setting up the parameters To complete the value specification for R3, define the global parameters Pcoeff, P, and Pnom.
Pspug.book Page 296 Wednesday, November 11, 1998 1:14 PM Chapter 12 Monte Carlo and sensitivity/worst-case analyses Using resistors with models When PSpice runs a Monte Carlo analysis, it uses tolerance values to determine how to vary model parameters during the simulation. To explore the effects of manufacturing tolerances on the behavior of this circuit, you set device (DEV) and (LOT) tolerances on the model parameters for resistors R1, R2, R3, and R4 in a later step (see page 12-297).
Pspug.book Page 297 Wednesday, November 11, 1998 1:14 PM Monte Carlo analysis Saving the design Before editing the models for the Rbreak resistors, save the schematic. To save the design 1 From Capture’s File menu, choose Save. Defining tolerances for the resistor models This section shows how to assign device (DEV) and lot (LOT) tolerances to the model parameters for resistors R1, R2, R3, and R4 using the model editor.
Pspug.book Page 298 Wednesday, November 11, 1998 1:14 PM Chapter 12 Monte Carlo and sensitivity/worst-case analyses Figure 79 Model definition for RMonte1. PSENSOR.LIB. Capture also automatically configures the library for local use. To have resistors R2 and R4 use the same tolerances as R1 1 In Capture’s schematic page editor, select R2 and R4. 2 From the Edit menu, select Properties. 3 In the R2 row, click in the cell under the Implementation column and type RMonte1.
Pspug.book Page 299 Wednesday, November 11, 1998 1:14 PM Monte Carlo analysis Setting up the analyses This section shows how to define and enable a DC analysis that sweeps the pressure value and a Monte Carlo analysis that runs the DC sweep with each change to the resistance multipliers. To set up the DC sweep 1 In the PSpice menu, choose New Simulation Profile or Edit Simulation Settings. (If this is a new simulation, enter the name of the profile and click OK.
Pspug.book Page 300 Wednesday, November 11, 1998 1:14 PM Chapter 12 Monte Carlo and sensitivity/worst-case analyses Table 3 In this text box... Type this... Parameter name P Start value 0 End value 5.0 Increment 0.1 To set up the Monte Carlo analysis 1 Select the Monte Carlo/Worst Case option. 2 Check Monte Carlo if it is not already selected. 3 In the Number of runs text box, type 10. 4 In the Save data from list box, select All. 5 Type I(Meter) in the Output variable text box.
Pspug.book Page 301 Wednesday, November 11, 1998 1:14 PM Monte Carlo analysis 6 7 Note To display current through the Meter voltage source, do the following: a From Capture’s PSpice menu, point to markers and choose Current into Pin. b Place a current probe on the left-hand pin of the Meter source. Switch to the Probe window to see the family of curves for I(Meter) as a function of P. For more on analyzing Monte Carlo results in PSpice, see the next section on Monte Carlo histograms.
Pspug.book Page 302 Wednesday, November 11, 1998 1:14 PM Chapter 12 Monte Carlo and sensitivity/worst-case analyses bandwidth and the center frequency vary when 1% resistors and 5% capacitors are used in the circuit. Figure 81 Chebyshev filter. Creating models for Monte Carlo analysis To vary the resistors and capacitors in the filter circuit, create models for these parts on which you can set device tolerances for Monte Carlo analysis. The BREAKOUT.OLB library contains generic devices for this purpose.
Pspug.book Page 303 Wednesday, November 11, 1998 1:14 PM Monte Carlo analysis To set up the analysis 1 From PSpice’s Trace menu, choose Performance Analysis. 2 In the Save data from list box, choose All. 3 Click OK. Creating histograms Because the data file can become quite large when running a Monte Carlo analysis, to view just the output of the filter, you place a voltage probe at the output of the filter.
Pspug.book Page 304 Wednesday, November 11, 1998 1:14 PM Chapter 12 Monte Carlo and sensitivity/worst-case analyses 5 Click OK. To display a histogram for the 1 dB bandwidth For information about performance analysis, see RLC filter example on page 11-274. 1 From PSpice’s Plot menu, choose Axis Settings. 2 Select the X Axis tab. 3 In the Processing Options frame, select the Performance Analysis check box. 4 Click OK. The histogram display appears. The Y axis is the percent of samples.
Pspug.book Page 305 Wednesday, November 11, 1998 1:14 PM Monte Carlo analysis If needed, you can turn off the statistical data display as follows: Figure 82 1 dB bandwidth histogram. 1 From the Tools menu, choose Options. The statistics for the histogram are shown along the bottom of the display. The statistics show the number of Monte Carlo runs, the number of divisions or vertical bars that make up the histogram, mean, sigma, minimum, maximum, 10th percentile, median, and 90th percentile.
Pspug.book Page 306 Wednesday, November 11, 1998 1:14 PM Chapter 12 Monte Carlo and sensitivity/worst-case analyses Figure 83 Center frequency histogram. Worst-case analysis This section discusses the analog worst-case analysis feature of PSpice. The information provided in this section explains how to use worst-case analysis properly and with realistic expectations.
Pspug.book Page 307 Wednesday, November 11, 1998 1:14 PM Worst-case analysis Inputs In addition to the circuit description, you need to provide two pieces of information: • the parameter tolerances • a definition of what worst means You can set tolerances on any number of the parameters that characterize a model. The criterion for determining the worst values for the relevant model parameters is defined in the .
Pspug.book Page 308 Wednesday, November 11, 1998 1:14 PM Chapter 12 Monte Carlo and sensitivity/worst-case analyses direction (better or worse) in which the collating function changes with a small increase in each model parameter is recorded. Finally, for the worst-case run, each parameter value is taken as far from its nominal as allowed by its tolerance, in the direction which should cause the collating function to be its worst (given by the HI or LO specification).
Pspug.book Page 309 Wednesday, November 11, 1998 1:14 PM Worst-case analysis Worst-case analysis example The schematic shown in Figure 84 is for an amplifier circuit that is a biased BJT. This circuit is used to demonstrate how a simple worst-case analysis works. It also shows how non-monotonic dependence of the output on a single parameter can adversely affect the worst-case analysis.
Pspug.book Page 310 Wednesday, November 11, 1998 1:14 PM Chapter 12 Monte Carlo and sensitivity/worst-case analyses Only one of these analyses can run in any given simulation. Note The AC and worst-case analysis specifications (.AC and .WC statements) are written so that the worst-case analysis tries to minimize Vm([OUT]) at 100 kHz. The netlist and circuit file in Figure 85 are set up to run either a parametric (.STEP) or worst-case (.WC) analysis of the specified AC analysis.
Pspug.book Page 311 Wednesday, November 11, 1998 1:14 PM Worst-case analysis output is not monotonic with a variable parameter (see Figure 87 and Figure 88) For demonstration, the parametric analysis is run first, generating the curve shown in Figure 87 and Figure 88. This curve, derived using the YatX goal function shown in Figure 86 illustrates the non-monotonic dependence of gain on Rb2. YatX(1, X_value)=y1{1|sfxv(X_value)!1;} Figure 86 YatX Goal Function.
Pspug.book Page 312 Wednesday, November 11, 1998 1:14 PM Chapter 12 Monte Carlo and sensitivity/worst-case analyses Consider a slightly different scenario: Rb2 is set to 720 ohms so that maximizing it is not enough to saturate the BJT, but Rb1 is variable also. The true worst case occurs when Rb2 is maximized and Rb1 is minimized. Checking their individual effects is not sufficient, even if the circuit were simulated four times with each resistor in turn set to its extreme values. The second .
Pspug.book Page 313 Wednesday, November 11, 1998 1:14 PM Worst-case analysis Tips and other useful information VARY BOTH, VARY DEV, and VARY LOT When VARY BOTH is specified in the .WC statement and a model parameter is specified with both DEV and LOT tolerances defined, the worst-case analysis may produce unexpected results. The sensitivity of the collating function is only tested with respect to LOT variations of such a parameter.
Pspug.book Page 314 Wednesday, November 11, 1998 1:14 PM Chapter 12 Monte Carlo and sensitivity/worst-case analyses Gaussian distributions Parameters using Gaussian distributions are changed by 3σ (three times sigma) for the worst-case analysis. YMAX collating function This may result in maximizing or minimizing the output variable value over the entire range of the sweep. This collating function is useful when you know the direction in which the maximum deviation occurs.
Pspug.book Page 315 Wednesday, November 11, 1998 1:14 PM Worst-case analysis Performing worst-case analysis with tight tolerances on the parameters produces sensitivity and worst-case results (in the output file). You can use these to decide how the parameters should be varied to achieve the desired response. You can then make adjustments to the nominal values in the circuit file, and perform the worst-case analysis again for a new set of gradients. Parametric sweeps (.
Pspug.
Pspug.book Page 317 Wednesday, November 11, 1998 1:14 PM Part four Viewing results Part four describes the ways to view simulation results. • Chapter 13, Analyzing waveforms, describes how to perform graphical waveform analysis of simulation results. • Chapter 14, Other output options, describes the special symbols you can place on your schematic to generate additional information to the PSpice output file and PSpice window.
Pspug.
Pspug.book Page 319 Wednesday, November 11, 1998 1:14 PM Analyzing waveforms 13 Chapter overview This chapter describes how to perform graphical waveform analysis of simulation results in PSpice.
Pspug.book Page 320 Wednesday, November 11, 1998 1:14 PM Chapter 13 Analyzing waveforms Overview of waveform analysis You can use the waveform analysis features of PSpice to visually analyze and interactively manipulate the waveform data produced by circuit simulation. PSpice uses high-resolution graphics so you can view the results of a simulation both on the screen and in printed form. On the screen, waveforms appear as plots displayed in Probe windows within the PSpice workspace.
Pspug.book Page 321 Wednesday, November 11, 1998 1:14 PM Overview of waveform analysis Elements of a plot A single plot consists of the analog (lower) area and the digital (upper) area. digital area analog area Figure 91 Analog and digital areas of a plot. You can display multiple plots at a time. If you display only analog waveforms, the entire plot will be an analog area. Likewise, if you display only digital waveforms, the entire plot will be a digital area.
Pspug.book Page 322 Wednesday, November 11, 1998 1:14 PM Chapter 13 Analyzing waveforms Elements of a Probe window A Probe window is a separately managed waveform display area. A Probe window can include multiple analog and digital plots. Figure 92 shows two plots displayed together. From the View menu, choose Toolbar to display orhide the toolbar. Because a Probe window is a window object, you can minimize and maximize windows, or move and scale the windows, within the PSpice workspace.
Pspug.book Page 323 Wednesday, November 11, 1998 1:14 PM Overview of waveform analysis Managing multiple Probe windows You can open any number of Probe windows. Each Probe window is a tab on the worksheet displayed in the middle of the workspace. The same waveform data file can be displayed in more than one Probe window. You can tile the windows to compare data. Only one Probe window is active at any given time, identified by a highlighted title bar or a topmost tab.
Pspug.book Page 324 Wednesday, November 11, 1998 1:14 PM Chapter 13 Analyzing waveforms Setting up waveform analysis Setting up colors You can configure Probe display and print colors in: For information on how to use the available colors and color order in a Probe window, see Configuring trace color schemes on page 13-326. • The configuration file, PSPICE.INI • The Probe Options dialog box Editing display and print colors in the PSPICE.INI file In the PSPICE.
Pspug.book Page 325 Wednesday, November 11, 1998 1:14 PM Setting up waveform analysis • TRACE_1 through TRACE_12 4 If you added or deleted trace number entries, set NUMTRACECOLORS=n to the new number of traces, where n is between 1 and 12. This item represents the number of trace colors displayed on the screen or printed before the color order repeats. 5 Save the file. Table 1 Default waveform viewing colors.
Pspug.book Page 326 Wednesday, November 11, 1998 1:14 PM Chapter 13 Analyzing waveforms Configuring trace color schemes For information on what the default available colors and color order are and how to change them, see Editing display and print colors in the PSPICE.INI file on page 13-324. In the Probe Options dialog box, you can set options for how the available colors and the color order specified in the PSPICE.INI file are used to display the traces in a Probe window.
Pspug.book Page 327 Wednesday, November 11, 1998 1:14 PM Viewing waveforms Viewing waveforms If you are using Capture, you can either view waveforms automatically after you run a simulation, or you can monitor the progress of the simulation as it is running. Setting up waveform display from Capture You can configure the way you want to view the waveforms in PSpice by defining display settings in the Probe Window tab in the Simulation Settings dialog box.
Pspug.book Page 328 Wednesday, November 11, 1998 1:14 PM Chapter 13 Analyzing waveforms Table 3 This setting... Enables this type of waveform display... Display Probe window when profile is opened. Waveforms are displayed only when a .DAT file is opened from within PSpice. Display Probe window... during simulation. Waveforms are displayed as the simulation progresses (“marching waveforms”). Display Probe window... after simulation has completed.
Pspug.book Page 329 Wednesday, November 11, 1998 1:14 PM Viewing waveforms 5 From the PSpice menu, choose Run to start the simulation. One Probe window is displayed in monitor mode. 6 During a multi-run simulation (such as Monte Carlo, parametric, or temperature), PSpice displays only the data for the most recent run in the Probe window. Do one of the following to select the waveforms to be monitored: • From PSpice’s Trace menu, choose Add, and enter one or more trace expressions.
Pspug.book Page 330 Wednesday, November 11, 1998 1:14 PM Chapter 13 Analyzing waveforms waveforms during simulation and wish to reconfigure the x-axis settings (as explained below), you must wait until the simulation run has finished. The following table shows how to enable the functions that change the x-axis domain. Table 4 Enable this function... By doing this... Fast Fourier transforms 1 From the Plot menu, choose Axis Settings. 2 In the Processing Options frame, select Fourier.
Pspug.book Page 331 Wednesday, November 11, 1998 1:14 PM Viewing waveforms 3 Do one of the following: • From the Simulation menu, choose Run to resume the simulation. • From the Simulation menu, choose Stop to stop the simulation. Using schematic page markers to add traces You can place markers on a schematic page to identify the points where you want to see waveform results displayed.
Pspug.
Pspug.book Page 333 Wednesday, November 11, 1998 1:14 PM Viewing waveforms Table 6 Choose this option... To do this... Hide All Hide traces in the waveform analysis display for all markers placed on any page or level of the schematic. Delete All Remove all markers from the schematic and all corresponding traces from the waveform analysis display.
Pspug.book Page 334 Wednesday, November 11, 1998 1:14 PM Chapter 13 Analyzing waveforms Limiting waveform data file size When PSpice performs a simulation, it creates a waveform data file. The size of this file for a transient analysis is roughly equal to: (# transistors)·(# simulation time points)·24 bytes The size for other analysis types is about 2.5 times smaller. For long runs, especially transient runs, this can generate waveform data files that are several megabytes in size.
Pspug.book Page 335 Wednesday, November 11, 1998 1:14 PM Viewing waveforms To limit file size using markers 1 From Capture’s PSpice menu, choose Edit Simulation Settings to display the Simulation Settings dialog box. 2 Click the Data Collection tab. 3 In the Schematic/Circuit Data frame, choose At Markers only and click OK. 4 From the PSpice menu, point to Markers, then choose the marker type you want to place. 5 Point to the wires or pins you wish to mark and click to place the chosen markers.
Pspug.book Page 336 Wednesday, November 11, 1998 1:14 PM Chapter 13 Analyzing waveforms Limiting file size by excluding internal subcircuit data By default, PSpice saves data for all internal nodes and devices in subcircuit models in a design. You can exclude data for internal subcircuit nodes and devices. To limit file size by excluding data for internal subcircuits 1 From PSpice’s Simulation menu, choose Edit Simulation Settings to display the Simulation Settings dialog box.
Pspug.book Page 337 Wednesday, November 11, 1998 1:14 PM Viewing waveforms themselves—these always start at time 0. This delay only suppresses the output for the first part of the simulation. To limit file size by suppressing the first part of transient simulation output 1 From Capture’s PSpice menu, choose Edit Simulation Settings to display the Simulation Settings dialog box. 2 Click the Analysis tab. 3 From the Analysis type list, select the Time Domain (Transient) option.
Pspug.book Page 338 Wednesday, November 11, 1998 1:14 PM Chapter 13 Analyzing waveforms 3 4 If the file has multiple sections of data for the selected analysis type, the Available Sections dialog box appears. Do one of the following: • Click the sections you want to use. • Click the All button to use all sections. Click OK.
Pspug.book Page 339 Wednesday, November 11, 1998 1:14 PM Viewing waveforms one waveform data file loaded in the plot—the full path for the file from which the trace was generated. Also listed is information about the simulation that generated the waveform data file and the number of data points used (Figure 94). Figure 94 Section information message box. Saving simulation results in ASCII format The default waveform data file format is binary.
Pspug.book Page 340 Wednesday, November 11, 1998 1:14 PM Chapter 13 Analyzing waveforms To save simulation results in ASCII format 1 From PSpice’s Simulation menu, choose Edit Profile to display the Simulation Settings dialog box. 2 Click the Data Collection tab. 3 Select Save data in the CSDF format (.CSD). 4 Click OK. PSpice writes simulation results to the waveform data file in ASCII format (as *.CSD instead of *.DAT), following the CSDF convention.
Pspug.book Page 341 Wednesday, November 11, 1998 1:14 PM Analog example Analog example In this section, basic techniques for performing waveform analysis are demonstrated using the analog circuit EXAMPLE.OPJ. The example project EXAMPLE.OPJ is provided with your OrCAD programs. When shipped, EXAMPLE.OPJ is set up with multiple analyses. For this example, the AC sweep, DC sweep, Monte Carlo/worst-case, and small-signal transfer function analyses have been disabled.
Pspug.book Page 342 Wednesday, November 11, 1998 1:14 PM Chapter 13 Analyzing waveforms \PSPICE\SAMPLES\ANASIM\EXAMPLE\ EXAMPLE.OPJ If PSpice is set to show traces for all markers on startup, you will see the V(OUT1) and V(OUT2) traces when the Probe window displays. To clear these traces from the plot, from the Trace menu, choose Delete All Traces. 3 From the PSpice menu, choose Run to start the simulation. PSpice generates a binary waveform data file containing the results of the simulation.
Pspug.book Page 343 Wednesday, November 11, 1998 1:14 PM Analog example Displaying voltages on nets After selected an analysis, voltages on nets and currents into device pins can be displayed in the Probe windows using either schematic markers or output variables (as will be demonstrated in this example). To display the voltages at the OUT1 and OUT2 nets using output variables 1 From the Trace menu, choose Add Trace to display the Add Traces dialog box.
Pspug.book Page 344 Wednesday, November 11, 1998 1:14 PM Chapter 13 Analyzing waveforms User interface features for waveform analysis PSpice provides direct manipulation techniques and shortcuts for analyzing waveform data. These techniques are described below. Shortcut keys Many of the menu commands in PSpice have equivalent keyboard shortcuts. For instance, after placing a selection rectangle in the analog portion of the plot, you can type C+A instead of choosing Area from the View menu.
Pspug.book Page 345 Wednesday, November 11, 1998 1:14 PM User interface features for waveform analysis 2 From the View menu, point to Zoom, then choose Area. PSpice changes the plot to display the region within the selection rectangle.
Pspug.book Page 346 Wednesday, November 11, 1998 1:14 PM Chapter 13 Analyzing waveforms Scrolling traces By default, when a plot is zoomed, standard scroll bars appear to the right or at the bottom of the plot area as necessary. These can be used to pan through the data. You can configure scroll bars so they are always present or are never displayed. To configure scroll bars 1 In PSpice, from the Tools menu, choose Options.
Pspug.book Page 347 Wednesday, November 11, 1998 1:14 PM User interface features for waveform analysis To modify trace expressions 1 Click the trace name to select it (selection is indicated by a color change). 2 From the Edit menu, choose Modify Object. 3 In the Modify Trace dialog box, edit the trace expression just as you would when adding a trace. To modify text and ellipse labels 1 Click the text or ellipse to select it (selection is indicated by a color change).
Pspug.book Page 348 Wednesday, November 11, 1998 1:14 PM Chapter 13 Analyzing waveforms • When adding a trace to a Probe window, you can make the trace display name different from the trace expression: 1 From the Trace menu, choose Add Trace.
Pspug.book Page 349 Wednesday, November 11, 1998 1:14 PM User interface features for waveform analysis 3 Switch to the Probe window where labels are to be added, and from the Edit menu, choose Paste. 4 Click on the new location to place the labels. press C+v To move labels 1 Select one or more (V+click) labels, or select multiple labels by drawing a selection rectangle. Selected labels are highlighted. 2 Move the labels by dragging them to a new location.
Pspug.book Page 350 Wednesday, November 11, 1998 1:14 PM Chapter 13 Analyzing waveforms 4 Save the file. Using cursors When one or more traces are displayed, you can use cursors to display the exact coordinates of two points on the same trace, or points on two different traces. In addition, differences are shown between the corresponding coordinate values for the two cursors.
Pspug.book Page 351 Wednesday, November 11, 1998 1:14 PM User interface features for waveform analysis Moving cursors To move cursors along a trace using menu commands 1 From the Trace menu, point to Cursor, then choose Peak, Trough, Slope, Min, Max, Point, or Search. For more information about the cursor commands, refer to the online Help in PSpice. To move cursors along a trace using the mouse 1 Use the right and left mouse buttons as described in Table 2 below.
Pspug.book Page 352 Wednesday, November 11, 1998 1:14 PM Chapter 13 Analyzing waveforms Table 3 Key combinations for cursor control (continued) Us this key combination... To do this with the cursors... h Move the first cursor to the beginning of the trace. V+h Move the second cursor to the beginning of the trace. e Move the first cursor to the end of the trace. V+e Move the second cursor to the end of the trace.
Pspug.book Page 353 Wednesday, November 11, 1998 1:14 PM User interface features for waveform analysis The mouse buttons are also used to associate each cursor with a different trace by clicking appropriately on either the analog trace symbol in the legend. These are outlined in the pattern corresponding to the associated cursor’s crosshair pattern. Given the example in Figure 97, right-clicking the V(2) symbol will associate cursor 2 with the V(2) waveform. The analog legend now appears as shown below.
Pspug.book Page 354 Wednesday, November 11, 1998 1:14 PM Chapter 13 Analyzing waveforms Tracking simulation messages PSpice provides explanatory messages for errors that occur during simulation with their corresponding waveforms. You can view messages from: • the Simulation Message Summary dialog box, or • the waveform display. Message tracking from the message summary A message summary is available for simulations where diagnostics have been logged to the waveform data file.
Pspug.book Page 355 Wednesday, November 11, 1998 1:14 PM Tracking simulation messages To display waveforms associated with messages 1 In the Simulation Message Summary dialog box, double-click a message. For most message conditions, a Probe window appears that contains the waveforms associated with the simulation condition, along with detailed message text.
Pspug.book Page 356 Wednesday, November 11, 1998 1:14 PM Chapter 13 Analyzing waveforms Message tracking from the waveform Trace segments with associated diagnostics are displayed in the foreground color specified in your PSPICE.INI file. This color is different from those used for standard state transitions. To display explanatory message text 1 Double-click within the tagged region of a trace. Trace expressions Traces are referred to by output variable names.
Pspug.book Page 357 Wednesday, November 11, 1998 1:14 PM Trace expressions trace expression;display name 4 Click OK. Basic output variable form This form is representative of those used for specifying some PSpice analyses.
Pspug.book Page 358 Wednesday, November 11, 1998 1:14 PM Chapter 13 Analyzing waveforms Output variable form for device terminals This form can only be specified for trace expressions. The primary difference between this and the basic form is that the terminal symbol appears before the net or device name specification (whereas the basic form treats this as the pin name within the pin id). [terminal]*[A C suffix]([,name]) Table 5 This placeholder... Means this...
Pspug.
Pspug.book Page 360 Wednesday, November 11, 1998 1:14 PM Chapter 13 Analyzing waveforms Table 6 Output variable formats (continued) Format Meaning V[db](INOISE) total equivalent noise at input source NTOT(ONOISE) sum of all noise contributors in the circuit N< noise type >(< device name >) contribution from noise type of device name to the total output noise* * See Table 11 on page 13-363 for a complete list of noise types by device type.
Pspug.
Pspug.
Pspug.
Pspug.book Page 364 Wednesday, November 11, 1998 1:14 PM Chapter 13 Analyzing waveforms Analog trace expressions Trace expression aliases Analog trace expressions vary from the output variables used in simulation analyses because analog net values can be specified by: [;display name] as opposed to the format used in analyses. With this format, the analog trace expression can be displayed in the analog legend with an optional alias.
Pspug.
Pspug.book Page 366 Wednesday, November 11, 1998 1:14 PM Chapter 13 Analyzing waveforms • MIL and mil are not supported. Example: V(5) and v(5) are equivalent in trace expressions. • With the exception of the m and M scale suffixes, PSpice is not case sensitive; therefore, upper and lower case characters are equivalent. Example: The quantities 2e-3, 2mV, and .002v all have the same numerical value.
Pspug.book Page 367 Wednesday, November 11, 1998 1:14 PM Other output options 14 Chapter overview This chapter describes how to output results in addition to those normally written to the data file or output file. • Viewing analog results in the PSpice window on page 14-368 explains how to monitor the numerical values for voltages or currents on up to three nets in your circuit as the simulation proceeds.
Pspug.book Page 368 Wednesday, November 11, 1998 1:14 PM Chapter 14 Other output options Viewing analog results in the PSpice window Capture provides a special WATCH1 part that lets you monitor voltage values for up to three nets in your schematic as a DC sweep, AC sweep or transient analysis proceeds. Results are displayed in PSpice. To display voltage values in the PSpice window If the results move outside of the specified bounds, PSpice pauses the simulation so that you can investigate the behavior.
Pspug.book Page 369 Wednesday, November 11, 1998 1:14 PM Writing additional results to the PSpice output file Writing additional results to the PSpice output file Capture provides special parts that let you save additional simulation results to the PSpice output file as either line-printer plots or tables. To view the PSpice output file after having run a simulation: 1 From the Simulation menu, choose Examine Output.
Pspug.book Page 370 Wednesday, November 11, 1998 1:14 PM Chapter 14 Other output options If you do not enable a format, PSpice defaults to MAG. 5 6 If you selected the AC analysis type, enable an output format: a Click the property name for one of the following output formats: MAG (magnitude), PHASE, REAL, IMAG (imaginary), or DB. b Type any non-blank value such as Y, YES or 1. c Repeat the previous steps (a) and (b) for as many AC output formats as you want to see plotted.
Pspug.book Page 371 Wednesday, November 11, 1998 1:14 PM Writing additional results to the PSpice output file 3 Click the property name for the analysis type that you want tabulated: DC, AC, or TRAN. 4 In the columns for the analysis type that you want plotted (DC, AC or TRAN), type any non-blank value such as Y, YES or 1. 5 If you selected the AC analysis type, enable an output format.
Pspug.
Pspug.
Pspug.book Page 374 Wednesday, November 11, 1998 1:14 PM Chapter A Setting initial state Save and load bias point If the circuit uses high gain components, or if the circuit’s behavior is nonlinear around the bias point, this feature is not useful. Save Bias Point and Load Bias Point are used to save and restore bias point calculations in successive PSpice simulations.
Pspug.book Page 375 Wednesday, November 11, 1998 1:14 PM Save and load bias point Load bias point Load bias point is a simulation control function that allows you to set the bias point as an initial condition. A common reason for giving PSpice initial conditions is to select one out of two or more stable operating points (set or reset for a flip-flop, for example). To use load bias point 1 Run a simulation using the Save Bias Point option in the Simulation Settings dialog box.
Pspug.book Page 376 Wednesday, November 11, 1998 1:14 PM Chapter A Setting initial state Setpoints Pseudocomponents that specify initial conditions are called setpoints. These apply to the analog portion of your circuit. Figure A-1 Setpoints.
Pspug.book Page 377 Wednesday, November 11, 1998 1:14 PM Setpoints Unlike the IC pseudocomponents, NODESET provides only an initial guess for some net voltages. It does not clamp those nodes to the specified voltages. However, by providing an initial guess, NODESET symbols may be used to break the tie (in a flip-flop, for instance) and make it come up in a desired state. To guess at the bias point, enter the initial guess in the Value text box for the VALUE property.
Pspug.book Page 378 Wednesday, November 11, 1998 1:14 PM Chapter A Setting initial state Setting initial conditions The IC property allows initial conditions to be set on capacitors and inductors. These conditions are applied during all bias point calculations. However, if you select the Skip Initial Transient Solution check box in the Transient Analysis Setup dialog box, the bias point calculation is skipped and the simulation proceeds directly with transient analysis at TIME=0.
Pspug.book Page 379 Wednesday, November 11, 1998 1:14 PM Convergence and “time step too small errors” B Appendix overview This appendix discusses common errors and convergence problems in PSpice.
Pspug.book Page 380 Wednesday, November 11, 1998 1:14 PM Chapter B Convergence and “time step too small errors” Introduction In order to calculate the bias point, DC sweep and transient analysis for analog devices PSpice must solve a set of nonlinear equations which describe the circuit's behavior.
Pspug.book Page 381 Wednesday, November 11, 1998 1:14 PM Introduction has finite precision and finite dynamic range that produce these limits: • Voltages and currents in PSpice are limited to +/-1e10 volts and amps. • Derivatives in PSpice are limited to 1e14. • The arithmetic used in PSpice is double precision and has 15 digits of accuracy. Is there a solution? Yes, for any physically realistic circuit.
Pspug.book Page 382 Wednesday, November 11, 1998 1:14 PM Chapter B Convergence and “time step too small errors” Are the Equations Continuous? The device equations built into PSpice are continuous. The functions available for behavioral modeling are also continuous (there are several functions, such as int(x), which cannot be added because of this). So, for physically realistic circuits the equations can also be continuous.
Pspug.book Page 383 Wednesday, November 11, 1998 1:14 PM Introduction Is the initial approximation close enough? Newton-Raphson is guaranteed to converge only if the analysis is started close to the answer. Also, there is no measurement that can tell how close is close enough. PSpice gets around this by making heavy use of continuity. Each analysis starts from a known solution and uses a variable step size to find the next solution.
Pspug.book Page 384 Wednesday, November 11, 1998 1:14 PM Chapter B Convergence and “time step too small errors” STEPGMIN An alterative algorithm is GMIN stepping. This is not obtained by default, and is enabled by specifying the circuit analysis option STEPGMIN (either using .OPTION STEPGMIN in the netlist, or by making the appropriate choice from the Analysis/Setup/Options menu).
Pspug.book Page 385 Wednesday, November 11, 1998 1:14 PM Bias point and DC sweep Bias point and DC sweep Power supply stepping As previously discussed, PSpice uses a proprietary algorithm which finds a continuous path from zero power supplies levels to 100%. It starts at almost zero (.001%) power supplies levels and works its way back up to the 100% levels. The minimum step size is 1e-6 (.0001%). The first repeating series of the first step starts at zero for all voltages.
Pspug.book Page 386 Wednesday, November 11, 1998 1:14 PM Chapter B Convergence and “time step too small errors” No leakage resistance A third consideration is to avoid situations which could have an ideal current source pushing current into a reverse-biased p-n junction without a shunt resistance. Since p-n junctions in PSpice have (almost) no leakage resistance and would cause the junction's voltage to go beyond 1e10 volts. The model libraries which are part of PSpice follow these guidelines.
Pspug.book Page 387 Wednesday, November 11, 1998 1:14 PM Bias point and DC sweep Behavioral modeling expressions Range limits Voltages and currents in PSpice are limited to the range +/- 1e10. Care must be taken that the output of expressions fall within this range. This is especially important when one is building an electrical analog of a mechanical, hydraulic or other type of system. Source limits Another consideration is that the controlled sources must turn off when the supplies are almost 0 (.
Pspug.book Page 388 Wednesday, November 11, 1998 1:14 PM Chapter B Convergence and “time step too small errors” Example: A first approximation to an opamp that has an open loop gain of 100,000 is: VOPAMP 3, 5 VALUE = {V(in+,in-)*1e5} This has the undesirable property that there is no limit on the output. A better expression is: VOPAMP 3, 5 VALUE = + {LIMIT(V(in+,in-)*1e5,15v,-15v} where the output is limited to +/- 15 volts.
Pspug.book Page 389 Wednesday, November 11, 1998 1:14 PM Transient analysis Skipping the bias point The SKIPBP option for the transient analysis skips the bias point calculation. In this case the transient analysis has no known solution to start from and, therefore, is not assured of converging at the first time point. Because of this, its use is not recommended. It inclusion in PSpice is to maintain compatibility with UC Berkeley SPICE. SKIPBP has the same meaning as UIC in Berkeley SPICE.
Pspug.book Page 390 Wednesday, November 11, 1998 1:14 PM Chapter B Convergence and “time step too small errors” Failure at the first time step If the transient analysis fails at the first time point then usually there is an unreasonably large capacitor or inductor. Usually this is due to a typographical error. Consider the following capacitor: C 1 3, 0 1Ouf “1O” (has the letter O) should have been “10.” This capacitor has a value of one farad, not 10 microfarads.
Pspug.book Page 391 Wednesday, November 11, 1998 1:14 PM Transient analysis Parasitic capacitances It is important that switching times be nonzero. This is assured if devices have parasitic capacitances. The semiconductor model libraries in PSpice have such capacitances. If switches and/or controlled sources are used, then care should be taken to assure that no sections of circuitry can try to switch in zero time.
Pspug.book Page 392 Wednesday, November 11, 1998 1:14 PM Chapter B Convergence and “time step too small errors” resistor should be set to be equal to the inductor's impedance at the frequency at which its Q begins to roll off. Example: A common one millihenry iron core inductor begins to roll off at no less than 100KHz. A good resistor value to use in parallel is then R = 2*π*100e3*.001 = 628 ohms. Below the roll-off frequency the inductor dominates; above it the resistor does.
Pspug.book Page 393 Wednesday, November 11, 1998 1:14 PM Diagnostics Diagnostics If PSpice encounters a convergence problem it inserts into the output file a message that looks like the following. ERROR -- Convergence problem in transient analysis at Time = Time step = 47.69E-15, minimum allowable step size = 7.920E-03 300.0E-15 These voltages failed to converge: V(x2.23) V(x2.25) = = 1230.23 / -68.4137 -1211.94 / 86.6888 These supply currents failed to converge: I(X2.L1) I(X2.L2) = = -36.
Pspug.book Page 394 Wednesday, November 11, 1998 1:14 PM Chapter B Convergence and “time step too small errors” The Last node voltages tried... trailer shows the voltages tried at the last Newton-Raphson iteration. If any of the nodes have unreasonable large values this is a clue that these nodes are related to the problem. “These voltages failed to converge” lists the specific nodes which did not settle onto consistent values. It also shows their values for the last two iterations.
Pspug.book Page 395 Wednesday, November 11, 1998 1:14 PM Index A ABM ABM part templates, 152 ABM.
Pspug.
Pspug.
Pspug.
Pspug.book Page 399 Wednesday, November 11, 1998 1:14 PM Index defined as parameter sets, 87 subcircuits, 87, 115 global vs.
Pspug.
Pspug.
Pspug.book Page 402 Wednesday, November 11, 1998 1:14 PM Index manually configuring, 261 stimulus, adding, 33 AC sweep, 233 DC sweep, 218 for multiple analysis types, 77 transient (analog/mixed-signal), 252 subcircuits, 87 creating .SUBCKT definitions from designs, 91 creating .
Pspug.
Pspug.