Académique Documents
Professionnel Documents
Culture Documents
September 2004
Notice
The information contained in this document is subject to change without notice. Agilent Technologies makes no warranty of any kind with regard to this material, including, but not limited to, the implied warranties of merchantability and tness for a particular purpose. Agilent Technologies shall not be liable for errors contained herein or for incidental or consequential damages in connection with the furnishing, performance, or use of this material. Warranty A copy of the specic warranty terms that apply to this software product is available upon request from your Agilent Technologies representative. Restricted Rights Legend Use, duplication or disclosure by the U. S. Government is subject to restrictions as set forth in subparagraph (c) (1) (ii) of the Rights in Technical Data and Computer Software clause at DFARS 252.227-7013 for DoD agencies, and subparagraphs (c) (1) and (c) (2) of the Commercial Computer Software Restricted Rights clause at FAR 52.227-19 for other agencies. Agilent Technologies 395 Page Mill Road Palo Alto, CA 94304 U.S.A. Copyright 1998-2004, Agilent Technologies. All Rights Reserved. Acknowledgments Mentor Graphics is a trademark of Mentor Graphics Corporation in the U.S. and other countries. Microsoft, Windows, MS Windows, Windows NT, and MS-DOS are U.S. registered trademarks of Microsoft Corporation. Pentium is a U.S. registered trademark of Intel Corporation. PostScript and Acrobat are trademarks of Adobe Systems Incorporated. UNIX is a registered trademark of the Open Group. Java is a U.S. trademark of Sun Microsystems, Inc.
ii
Contents
1 DC Simulation Performing a DC Simulation ..................................................................................... Examples (ADS only) ............................................................................................... Simulating a BJT ................................................................................................ Sweeping Parameters ........................................................................................ DC Simulation Description........................................................................................ Simulation Assumptions ..................................................................................... Effect of DC Simulator on Other Simulations ..................................................... DC Simulation Controller .......................................................................................... Saving Annotation Data in RFDE ....................................................................... Setting up a Sweep in ADS ................................................................................ Setting up a Sweep in RFDE.............................................................................. Dening Simulation Parameters ......................................................................... Setting the Convergence Mode on the Schematic (ADS only) ........................... Troubleshooting a Simulation.................................................................................... Circuit Does Not Behave as Expected ............................................................... Simulation Time ................................................................................................. Type of Circuit..................................................................................................... When the Simulator Fails to Converge ............................................................... When Resulting I-V Curves are Not as Expected .............................................. Eliminating DC Open-Circuit Errors.................................................................... Topology Check Failures .................................................................................... Adjusting Tolerance Parameters......................................................................... Index 1-2 1-3 1-3 1-5 1-8 1-8 1-9 1-10 1-10 1-11 1-12 1-14 1-20 1-21 1-21 1-21 1-22 1-22 1-26 1-27 1-28 1-31
iii
iv
Chapter 1: DC Simulation
The DC Simulation controller, calculates the DC operating characteristics of a design under test (DUT). Fundamental to all RF/Analog simulations, DC analysis is used on all RF/Analog designs. It performs a topology check and an analysis of the DC operating point, including the circuits power consumption. The simulator computes the response of a circuit to a particular stimulus by formulating a system of circuit equations and then solving them numerically. The DC simulation accomplishes this analysis as follows: Solves a system of nonlinear ordinary differential equations (ODEs) Solves for an equilibrium point All time-derivatives are constant (zero) System of nonlinear algebraic equations You can also set up the DC simulation to sweep one or more parameters, enabling you to perform tasks such as verifying model parameters by comparing the simulated DC transfer characteristics (I-V curves) of the model with actual measurements. In the Advanced Design System environment, the DC Simulation component is available in the Simulation-DC palette. In the Analog Design Environment, the DC Simulation is one of the analysis choices for the ADSsim simulator. Refer to the following topics for details on DC simulation: Performing a DC Simulation on page 1-2 has the minimum setup requirements for a DC simulation. Examples (ADS only) on page 1-3 contains detailed DC simulation setups, one for calculating a single DC point and another that sweeps variables to generate a set of IV curves. DC Simulation Description on page 1-8 is a brief explanation of the DC simulation process. DC Simulation Controller on page 1-10 provides details on the tabs and elds in the DC simulation controller. Troubleshooting a Simulation on page 1-21 offers suggestions on how to improve a simulation.
1-1
DC Simulation
Performing a DC Simulation
Start by creating your design, then add current probes and identify the nodes from which you want to collect data For a successful analysis: Add the DC simulation component to the schematic. If you do not edit the simulation component default settings, values will be calculated for the current probes and nodes that you have applied to the circuit, based on the settings of the other components in the schematic. To sweep over a range, such as varying input voltage or changing a resistor value, double-click the simulation component and select the sweep tab. Enter the name of the parameter to sweep. Select the sweep type and enter the range. For details about each eld, click Help from the open dialog box.
1-2
Performing a DC Simulation
Simulating a BJT
Figure 1-1 illustrates the setup for a DC simulation of a BJT. This simulation calculates a single DC operating point.
Note
This design, DC1.dsn, is in the Examples directory under Tutorial/SimModels_prj. The results are in DC1.dds
1-3
DC Simulation
To perform a single-point DC simulation: 1. From the Sources-Freq Domain palette, select V_DC. Place the DC voltage source on the schematic to provide collector voltage and modify the voltage as needed.
Note
Ensure that sources are connected either by wires or by means of a named connection (Insert > Node Name). 2. From the Sources-Freq Domain palette, select I_DC. Place the source on the schematic to provide base current and modify the current as needed. 3. From the Probe Components palette, select I_Probe. Place this current probe in an appropriate location in the circuit. 4. From the Simulation-DC palette, select and place the DC simulation component on the schematic and edit the parameters and options as needed. 5. Click OK to accept changes and close the dialog box. 6. Simulate. When the simulation is nished, you can immediately exercise the following DC simulation options: For a direct representation of currents and voltages at all nodes on the schematic, choose Simulate > Annotate DC Solution. For the details of the device alone, choose Simulate > Detailed Device Operating Point or Brief Device Operating Point, then click the device when the crosshairs appear. Choose Simulate > Clear DC Annotation to remove the annotation. 7. In the Data Display, the data from the simulation is presented as a list of DC current and voltages:
1-4
Sweeping Parameters
By performing a DC swept bias or a swept variable simulation, you can check the operating point of the circuit against a swept parameter such as temperature or bias supply voltage. The resulting data can be plotted to resemble the appearance of a curve tracer. Figure 1-2 illustrates a setup for performing an idealized, swept DC bias simulation of a MOSFET. Vdd and Vgg are swept across a range of voltages. The result is a family of curves representing drain current versus drain voltage, for varying values of gate voltage.
Note
This design, DC2.dsn, is in the Examples directory under Tutorial/SimModels_prj. The results are in DC2.dds.
1-5
DC Simulation
This example uses a referenced model. The parameter cells refers to the extraction parameter known as binning and reects the electrical characteristics of this particular model. The number of cells has been referenced in a VarEqn component. To perform an idealized, swept DC bias simulation: 1. From the Sources-Freq Domain palette, select V_DC. Place this V_DC component (SRC1) between the base of the device and ground. Edit this component and dene Vdc = Vgg1, rather than a numerical value. 2. Place another V_DC component (SRC2) between the drain of the device and ground. Open this component and dene Vdc = Vdd1, rather than a numerical value. This makes it possible to sweep these values. Any swept parameter must be initialized by means of an equation, as will be demonstrated later. 3. From the Probe Components palette, select I_Probe. Place the probe between the drain and SRC2, and rename it if you like (in this case, it has been called Probe1). 4. Edit the DC component by selecting the Sweep tab and modifying the sweep parameters as follows: Parameter to sweep = Vdd1 (This appears as SweepVar on the schematic if the display for this parameter is turned on.)
Note Variables entered in this eld will appear in quotes on the schematic. If you enter a variable directly on the schematic (in this case, as the right-hand side of the SweepVar statement of the DC component), you must surround the variable with double quotes. This applies to the other user-dened variables shown in subsequent steps.
Note
Start = 0 Stop = 6 Step = 0.1 5. Click OK to accept changes and close the dialog box.
1-6
6. Choose Simulation-DC palette, select PSWP (ParamSweep). Place this component on the schematic and edit it as follows: On the Sweep tab: Parameter to sweep = Vgg1 Start = 2 Stop = 3 Step = 0.25 On the Simulations tab: Simulation 1 = DC1 (This appears as SimInstanceName[1] on the schematic if the display for this parameter is turned on.) 7. Click OK to accept changes and close the dialog box. 8. Choose Data Items palette, select Var eqn (Variables and equations). Place this component on the schematic and enter the following equations:
Vdd1 = 4 Vgg1 = 2.5
9. Click OK to accept changes and close the dialog box. 10. Simulate. When the simulation is nished, plot probe current (Probe1.i). The resulting family of curves representing drain current versus drain voltage, for varying values of gate voltage, is shown next:
1-7
DC Simulation
DC Simulation Description
The DC controller provides for both single-point and swept simulations. Swept variables can be related to voltage or current source values, or to other component parameter values. By performing a DC swept bias or a swept variable simulation, you can check the operating point of the circuit against a swept parameter such as temperature or bias supply voltage. Use the DC controller to: Verify the proper DC operating characteristics of the design under test. Determine the power consumption of your circuit. Verify model parameters by comparing the DC transfer characteristics (I-V curves) of the model with actual measurements. Display voltages and currents after a simulation. Provide data for DC back-annotation. The DC simulation technique relies on an iterative process of mathematical convergence toward a solution. It uses a system of nonlinear ordinary differential equations (ODEs) to solve for an equilibrium point in the linear/nonlinear algebraic equations that describe a circuit based on the assumptions described below. If a sweep is performed, the convergence test is performed at the rst point in the sweep and the remainder of the sweep is disabled.
Simulation Assumptions
DC voltages and currents are considered signals of zero frequency. The simulator uses this concept when performing a DC simulation, and the following conditions apply: Independent sources are constant valued. Linear elements are replaced by their (real) conductances at zero frequency. Capacitors, microstrip gaps, AC coupled lines, and similar items are treated as open circuits. Inductors, conductive discontinuities, and similar items are virtual short circuits. Time-derivatives are constant (zero).
1-8
DC Simulation Description
Transmission lines are replaced by DC conductance values calculated from their length, cross-sectional area, and conductivity. Scattering parameter (S-parameter) les must include zero frequency data to operate properly at DC (this is also required for harmonic balance analysis). Otherwise, the simulator extrapolates each S-parameter for the zero-frequency case, and uses the real part as the DC response. The simulator has built-in safeguards against nodes that are DC-isolated (that have no DC path to ground), as well as against DC source-inductor loops. Nevertheless, try to avoid these conditions. To improve the convergence process during swept DC bias simulation, the simulator uses the results from the previous bias point as an initial guess for the next bias point. The results of the swept DC bias simulation are saved in a binary form in a temporary le. This le is used to postprocess selected measurements. Because this le contains all of the results, new measurements can be specied and displayed without the need for a subsequent simulation.
DC Simulation Description
1-9
DC Simulation
DC Simulation Controller
The DC Simulation controller enables you to dene the following aspects of the simulation: SweepSweep type and associated characteristics ParametersParameters related to convergence, status level for summary information, device operating-point levels, and sensitivities. It also provides an option to output solutions at all steps. OutputIn ADS, selectively save simulation data to a dataset. For details, refer to the topic Selectively Saving and Controlling Simulation Data in the chapter Simulation Basics in the Using Circuit Simulators documentation. In RFDE, use Outputs > Save Options in the Analog Design Environment window. Display (in ADS)Control the visibility of simulation parameters on the Schematic. For details, refer to the topic Displaying Simulation Parameters on the Schematic in the chapter Simulation Basics in the Using Circuit Simulators documentation.
3. In the Parameter Labels area, choose Apply To library, and operating point. 4. For the parameter names set to none, select parameters you want to display, and click OK.
Save Voltages and Currents Saves node voltages device currents, and device operating point for annotation to the schematic. Default setting is disabled.
Device operating point levelOptions to save device operating-point information for most active devices and some linear devices in the circuit to the dataset. In ADS, if this simulation performs more than one DC analysis (from multiple DC controllers), the device operating point data for all DC analyses will be saved, not just the last one. Default setting is None. None Brief Detailed No information is saved. Saves device currents, power, and some linearized device parameters. Saves the operating point values which include the devices currents, power, voltages, and linearized device parameters.
DC Simulation Controller
1-11
DC Simulation
Log
Start/Stop
Center/Span
Note: Changes to any of the Start, Stop, etc. elds causes the remaining elds to be recalculated automatically. Use sweep plan (SweepPlan) Enables use of an existing sweep plan component (SweepPlan). Select this option and enter the name of the plan or select it from the drop-down list.
1-12
DC Simulation Controller
estimates for the next simulation, and achieves convergence more rapidly than if the parameter is changed abruptly. Table 1-2. RFDE DC Simulation Parameter Sweep
Parameter Sweep Parameter Type Design Variable Click Select to choose a variable name from the Select Design Variable form. The list contains variables set up in the Editing Design Variables form. You can also type in a name in the Variable Name eld. However, the variable must exist in the design for a successful simulation. temp is automatically selected because it is a reserved variable name. Click Select and choose a component from the schematic. In the Select Component Parameter form, select the parameter to be swept, then click OK. You can also type in the names in the Component Name and Parameter Name elds. However, the component and parameter must exist in the design for a successful simulation. Type in the name of a dened model and the name of the model parameter to be swept.
Center-Span
Logarithmic
DC Simulation Controller
1-13
DC Simulation
Additional Points When sweep type is Linear or Logarithmic, click this option to enter specic values to include in the sweep range. Enter values with a space between each one.
1-14
DC Simulation Controller
DC Simulation Controller
1-15
DC Simulation
Arc Level Max Step Limits the maximum arc-length step size for source-level continuation. The (ArcLevelMaxStep) default is 0 which means there is no limit for the ArcLevelMaxStep. (In ADS, display and set this parameter directly on the schematic.) Arc Min Value (ArcMinValue) Set relative to ArcMaxValue. ArcMinValue determines the lower limit that is allowed for the continuation parameter p during the simulation. In the arc-length continuation, p can trace a complicated manifold and its value can vary non-monotonically. ArcMinValue species a lower bound for p such that if during the arc-length continuation, p becomes smaller than ArcMinValue, the simulation is considered to have failed to converge. The default is pmin- delta, where delta is pmax- pmin, pmin is the lower end of the parameter sweep, and pmax is the upper end of the parameter sweep. (In ADS, display and set this parameter directly on the schematic.)
1-16
DC Simulation Controller
Max Step Ratio (MaxStepRatio) Max Shrinkage (MaxShrinkage) Limiting Mode (LimitingMode) Global Element Compression Global Device-based Limiting
Dynamic Element Limits the changes at the nonlinear nodes with a log function at each iteration Compression when the changes exceed the internally determined value. Dynamic Vector Compression Global Vector Compression Global Vector Scaling No Limiting Limits the changes of all nodes with a log function at each iteration when the changes exceed the internally determined value. Limits the changes of all nodes with a log function at each iteration when the changes exceed the internally determined value. Scales the changes of the node at each iteration with internally determined scale factor. No limiting will be done on the changes of all the nodes at each iteration.
Levels (in ADS) Annotation (in RFDE) Enables you to set the level of detail in the simulation status report.
DC Simulation Controller
1-17
DC Simulation
1-18
DC Simulation Controller
The convergence choice selected here applies only to this DC simulation. You can also choose from these same convergence algorithms using the Options component, which will then be applicable to all analyses performed for this design. (ADS only) You can specify the convergence mode on the schematic itself by displaying the
ConvMode parameter and setting it equal to the numerical equivalent of the desired convergence mode. For details, see the discussion following this table.
Several of the convergence modes use the Newton-Raphson algorithm. Newton-Raphson is an iterative process that terminates when Kirchoffs Current Law (whereby the sum of the currents into each node equals zero) is satised at each node, and the node voltages converge. Use Robust convergence test only when either Quick convergence test or Hybrid solver fails to
DC Simulation Controller
1-19
DC Simulation
1-20
DC Simulation Controller
Troubleshooting a Simulation
This section presents suggestions for using this simulator and improving the accuracy of results. Start with the following checklist to locate and x problems. For details about specic problems, see the sections that follow. Turn on Topology checker in Options component Turn on Issue warnings (GiveAllWarnings) and increase Maximum number of warnings (MaxWarnings) in Options component Read all error and warning messages from Simulation/SynthesisMessages and make corrections accordingly Read all status information from Status/Summary windows, including all pages (select Show Complete Status Message under Window tab) and make corrections accordingly Check component and model parameter values and units, especially small series resistor values in model parameters Make sure circuit topology is correct Examine netlist.log for obvious error Set Status Level to 4 in DC simulation controller Examine each iteration RHS_NORM value patterns Try different values for Max. Delta V.
Simulation Time
Simulation time is affected by the type of circuit, as well as by the number of the fundamental frequencies and their orders. It is also affected by the convergence criteria, which can be set in the Options component.
Troubleshooting a Simulation
1-21
DC Simulation
Type of Circuit
It is possible to simulate both linear and nonlinear circuits. However, when analyzing nonlinear circuits, it is important to keep in mind the following points: The system can simulate ampliers, lters, frequency multipliers, mixers, detectors, and oscillators that have lumped and distributed components. These components can be ideal or measured. Except for circuit envelope and transient simulations, the simulator uses sinusoidal waveforms. Therefore, simulation times will be shorter for circuits whose waveforms more closely resemble a sinusoid. Circuits whose waveforms are not smooth require more simulation time. The more nonlinear a circuit is, the longer the simulation time, because the waveforms are not sinusoidal.
1-22
Troubleshooting a Simulation
Troubleshooting a Simulation
1-23
DC Simulation
Circuit does not converge because model parameter Imax is too small Symptom RHS_NORM oscillates between/among iterations. Reason The diodes p-n junction in this circuit conducts more than 1 Amp. The default values of Imax for nonlinear semiconductor devices are around 1 Amp. It is possible that all devices p-n junction currents in a circuit do not exceed Imax after the circuit converges but have problems converging during the iteration process because of the small Imax. Remedy Increase nonlinear device model parameter Imax to 1e3. For BSIM3 the model parameter is Ijth. Circuit does not converge using ideal SDD equations Symptom RHS_NORM stays small in Newton iterations but can not converge. Reason When the diode voltage approaches its nal solution, -1 volt, the reverse biased p-n junctions conductance is around 1e-30 siemens which is in series with an 11 ohms (0.0909 siemens) Rs. The matrix becomes ill conditioned because of the 16-digit precision limitation. The diode current at -1 volt is -2.741e-15 A. Remedy Add leakage resistor across the p-n junction (the built-in p-n junction model uses a 1e12 Ohms leakage resistor). Circuit is unstable or has multiple solutions Place Nodeset elements with the estimated voltages at the problem nodes, make sure the resistance of the Nodeset element is at least 100 times smaller then the node impedance.
1-24
Troubleshooting a Simulation
RHS_NORM stays small but circuit does not converge Relax convergence tolerances. Circuit seems near convergence but Max. Iterations exceeded and simulation switches to source stepping Increase Max. Iterations (default 250). Circuit does not converge in the rst 250 iterations, simulation switches to source stepping. Reduce Max. Iterations to 50 to skip 200 out of 250 iterations that did not converge anyway.
Convergence Tips
Use sweep control: Sweep a particular source or a set of source values. Reduce the step size when circuit does not converge or skip over that point by using multiple sweep plans. Set Write Final Solution under DC Solutions tab in Options to save the nal results. Set Use Initial Guess under DC Solutions tab in Options for DC initial guess. Use transient analysis: Ramp up all dc sources and continue time domain analysis until circuit reaches a steady state. Set Write Final Solution under DC Solutions tab in Options to save the nal results. Set Use Initial Guess under DC Solutions tab in Options for DC initial guess.
Troubleshooting a Simulation
1-25
DC Simulation
1-26
Troubleshooting a Simulation
Errors found by the topology checker almost always lead to DC simulation failures, so turning off the topology checker is not recommended.
Troubleshooting a Simulation
1-27
DC Simulation
1-28
Troubleshooting a Simulation
Port/Pin Mismatches
To check for mismatches between ports and named pins on an underlying schematic, use the Check Representation feature. Choose Tools > Check Representation, then select Port/Pin mismatches. In a circuit without a topology problem, the simulator reports the following: Unconnected pins: 0 Port/Pin mismatches: 0 Where a wire is missing between two pins, for example, the components and the disconnected pins will be highlighted in red on the schematic, and a message such as the following will appear, indicating the coordinates of the connectors: Unconnected pins: 2 I_DC SRC1, pin 2 (2.500,0.125) BJT_NPN BJT1, pin 2 (3.250,0.375) To clear the highlighting, choose View > Clear Highlighting.
Note
No Solution Found
If the DC simulation cannot nd a solution, then the simulator will attempt to do source stepping. The simulator sets all DC sources to zero and attempts to achieve convergence at a lower level. Starting from this solution point, the simulator will try to converge at the original level by repeatedly solving the circuit at incrementally increasing source levels. At each point where convergence is achieved, the level is increased by steps to the desired level, using the results of each simulation as the initial guess for the next. Normally, the circuit response follows the DC source values in a smooth curve up to the desired value. Very rarely, circuits can exhibit a bizarre behavior resulting in a circuit response that diverges as the source values are increased. The simulator tolerates a certain amount of this behavior; however, if the circuit response diverges beyond specic boundaries, the simulator will give up.
Troubleshooting a Simulation
1-29
DC Simulation
Increasing Iterations
Occasionally the DC simulation cannot converge on a solution within a given number of iterations. To increase the number of iterations: 1. In the DC Simulation dialog box, select the Parameters tab. 2. Set Max. Iterations to a value high enough to allow convergence.
Impossible Circuits
A circuit can fail to have a unique solution, as in the case of impossible circuitssuch as circuits with two DC current sources (or, perhaps, current-mirror circuits) in series. The simulator attempts to analyze these circuits by adding a large resistor in parallel with every node in the circuit. If the DC simulation then succeeds, the resistor value is increased as high as possible (up to 1 Tohm). This allows the DC simulation to proceed, and usually to succeed. However, the offending circuit node or nodes often cause problems with a subsequent harmonic balance simulation, because the harmonic balance simulator does not add these resistors. It is best to nd the problem node and add a DC path to ground (such as a large resistor). If virtual resistors were added to each node during DC simulation but the simulation still failed, look for circuit problems such as loops of inductors and voltage sources.
1-30
Troubleshooting a Simulation
in
where in rel abs
rel
in
+ abs
= Current in each branch connected to the node = Current relative tolerance = Current absolute tolerance
The default value for Current relative tolerance is 10-6 (0.0001 percent), and the default value for Current absolute tolerance is 10-12 (1 pA). For many problems, these tolerances are much tighter than they need to be. (The default value of Current relative tolerance in Berkeley SPICE 3e1 is 10-3.) Relaxing these tolerances not only allows problem circuits to be solved, but it also allows them to be solved in less time.
Troubleshooting a Simulation
1-31
DC Simulation
The default value for both Voltage relative tolerance and Voltage absolute tolerance is 10-6. Like Current absolute tolerance and Current relative tolerance, these tolerances can be loosened to help with simulation convergence and speed. For information on the Output tab (used for dening an Output Plan, refer to the section Selectively Saving and Controlling Simulation Data in the chapter Simulation Basics in the Using Circuit Simulators documentation.
1-32
Troubleshooting a Simulation
Index
A
absolute tolerance, 1-31
S
simulation parameters dc simulation, 1-10 simulation time effects of convergence criteria on, 1-21 effects of frequencies and orders on, 1-21
B
binning dened, 1-6
C
convergence DC simulations, 1-22 current tolerances, 1-31
T
tolerance parameters, 1-31 and dc simulation, 1-31 topology checks failures, 1-28 troubleshooting DC simulations, 1-21
D
DC Simulation component, 1-1 DC simulations about, 1-8 and other simulations, 1-9 convergence, 1-31 convergence failures, 1-22 eliminating open-circuit errors, 1-27 impossible circuits, 1-30 performing, 1-2 problems with I-V curves, 1-26 single-point simulation, 1-3 tolerance parameters, 1-31 troubleshooting, 1-21 using Options component to set tolerance parameters, 1-31 dc simulations simulation parameters, 1-10
V
voltage tolerances, 1-31
K
KCL (Kirchoff s Current Law), 1-22
O
Options component setting tolerance parameters, 1-31
P
ports pin mismatches, 1-29
R
relative tolerance, 1-31
Index-1
Index-2