Está en la página 1de 38

DC Simulation

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

Examples (ADS only)


There are two examples that describe how to set up and run a DC simulation: Simulating a BJT on page 1-3 shows how to calculate a single-point DC bias of a BJT. Sweeping Parameters on page 1-5 shows how to sweep one or more circuit parameters over a range of values during a 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

Figure 1-1. Setup for s Single-Point DC Bias Simulation

Examples (ADS only)

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

Examples (ADS only)

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.

Figure 1-2. Example Setup for a Swept DC Simulation

Examples (ADS only)

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

Examples (ADS only)

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:

Examples (ADS only)

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.

Effect of DC Simulator on Other Simulations


A single-point DC bias simulation automatically precedes every transient, harmonic balance, and bias-dependent linear simulation. This provides starting points for those simulations. In the case of an AC simulation, it determines linearized models for the nonlinear components and for harmonic balance it determines an initial estimate. If the bias simulation fails or is incorrect in some way (because of, for example, incorrect nodal connections), the harmonic balance or bias-dependent linear simulations will fail or show incorrect results.

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.

Saving Annotation Data in RFDE


DC Analysis in RF Design Environment is the only analysis type that can output DC data for annotation to the schematic. The output (saved in a PSF le) contains node voltages, device currents, and device operating point data. To save data, choose the DC Analysis setup form, click Save Voltages and Currents to enable the option, and select the Device Operating Point Level (Brief or Detailed). After running a simulation, you can annotate the schematic with the saved data. In the Analog Design Environment window, click Results > Annotate and select the desired option(s). Sometimes, components from the analogLib library may not display operating point data. This happens when the ADSsim and Spectre simulators do not share the same operating point parameter names. To display the missing annotations automatically, you must update the component instances in the Schematic window: 1. Select Edit > Component Display, then select the particular analogLib component. 2. In the Edit Component form, set Select Label to parameter.
1-10 DC Simulation Controller

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.

Setting up a Sweep in ADS


Setting up the sweep portion of the simulation consists of three basic parts: Identifying the parameter you want to sweep Selecting the sweep type and setting the associated characteristics Optionally, specifying a sweep plan To shorten simulation time in any parameter sweep, select a start point where convergence is easy, and vary the parameter gradually. To help select a start point, if you nd that convergence is easier at one end of a sweep and harder at the other, use the easy end as the start of the sweep. Varying the parameter gradually yields better estimates for the next simulation, and achieves convergence more rapidly than if the parameter is changed abruptly. Simulator parameter names, as they appear in netlists and ADS schematics, are in parentheses. Table 1-1. ADS DC Simulation Sweep Options
Sweep Parameter to sweep (SweepVar) The name of any dened parameter to be swept.

Parameter sweepThe sweep type and parameters.

DC Simulation Controller

1-11

DC Simulation

Table 1-1. ADS DC Simulation Sweep Options (continued)


Sweep Type Single point Enables simulation at a specic value for the parameter. Specify the desired value in (Pt) the Parameter eld. Linear Enables sweeping a range of values based on a linear increment. Click Start/Stop to set start and stop values for the sweep, or Center/Span to set the center value and a span of the sweep. Enables sweeping a range of values based on a logarithmic increment. Click Start/Stop to set start and stop values for the sweep, or Center/Span to set the center value and a span of the sweep. Select the Start/Stop option to sweep based on start, stop, step-size and number of points. Step-size is Pts./decade for a Log sweep. Start (Start)the start point of a sweep Stop (Stop)the stop point of a sweep Step-size (Step)the increments at which the sweep is conducted Num. of pts. (Lin)the number of points over which sweep is conducted Select the Center/Span option to sweep based on center and span, points per decade and number of points. Pts./decade is Step-size for a Linear sweep. Center (Center)the center point of a sweep Span (Span)the span of a sweep Pts./decade (Dec)number of points per decade Num. of pts. (Lin)the number of points over which sweep is conducted

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.

Setting up a Sweep in RFDE


Setting up the sweep portion of the simulation consists of three basic parts: Enabling the Parameter Sweep Specifying the parameter type Specifying a sweep plan To shorten simulation time in any parameter sweep, select a start point where convergence is easy, and vary the parameter gradually. To help select a start point, if you nd that convergence is easier at one end of a sweep and harder at the other, use the easy end as the start of the sweep. Varying the parameter gradually yields better

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.

Temperature Component Parameter

Model Parameter Sweep Plan

Choose one sweep range:


Start-Stop Sets the Start and Stop values of the sweep Start - The start point of the sweep Stop - The stop point of the sweep Sets the Center value and a Span of the sweep. Center - The center point of a sweep Span - The span of a sweep

Center-Span

Choose one sweep type:


Linear Enables sweeping a range of values based on a linear increment. Set the increment with Step Size or Number of Steps. Use Additional Points to add specic values. Step Size - The increments at which the sweep is conducted Number of Steps - The number of points over which sweep is conducted Enables sweeping a range of values based on a logarithmic increment. Set the increment with Points Per Decade or Number of Steps. Use Additional Points to add specic values. Points Per Decade - The number of points per decade. Number of Steps - The number of points over which sweep is conducted

Logarithmic

DC Simulation Controller

1-13

DC Simulation

Table 1-2. RFDE DC Simulation Parameter Sweep


Points Only Enables simulation at specic values for the parameter. Enter values in the Specic Points eld with a space between each one.

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.

Dening Simulation Parameters


Dening the simulation parameters consists of four basic parts: Specifying the maximum change in node voltage allowed per iteration, the number of iterations, and the desired convergence algorithm Specifying the desired level of detail in the simulation status summary Specifying the amount of device operating-point information to save Optionally, choosing to save all solutions to the dataset Simulator parameter names, as they appear in netlists and ADS schematics, are in parentheses. Table 1-3. DC Simulation Parameter Options
Parameters Convergence Max. Delta V (MaxDeltaV) Max. Iterations (MaxIters) Mode (ConvMode) Auto sequence (0) Maximum change in node voltage per iteration. If no value is specied, the default value is four times the thermal voltage, or approximately 0.1 V. Maximum number of iterations to be performed. The simulation will iterate until it converges, an error occurs, or this limit is reached. Offers a choice of one of the following convergence algorithms:, Default. Use this rst. It converges the circuit by cycling through the algorithms in the following order: - Hybrid solver - Forward/reverse source sweeping - Pseudo transient - Rshunt sweeping - Newton-Raphson

1-14

DC Simulation Controller

Table 1-3. DC Simulation Parameter Options (continued)


Quick Uses results from initial tests to help predict which combinations of convergence convergence test parameters should be tested. This mode starts by applying the (1) Newton-Raphson algorithm for several values of Max. delta V. If one or more of the Newton-Raphson attempts converges, the value of Max. delta V that yields the fastest convergence is used in the remaining tests. If none of the Newton-Raphson attempts converges, the remaining tests are performed over several values of Max. delta V. Following a Newton-Raphson attempt, Quick convergence test tries Forward source-level sweep, and, if needed, Reverse source-load sweep, followed by Rshunt sweep, a hybrid solver and pseudo transient analysis. Quick convergence test produces a time-ranked list of the convergence modes tried. Tries several combinations of convergence parameters to produce a time-ranked Robust convergence test list of convergence modes. (2) 1. It rst applies the Newton-Raphson algorithm for several values of Max. delta V. 2. Next, it tries Forward source-level sweep, again at various values of Max. delta V. 3. Then it tries Rshunt sweep, followed by Reverse source-level sweep and hybrid solver, each at several values of Max. delta V. 4. Finally, it tries pseudo transient analysis. Use only if Quick convergence and Hybrid solver fail. This method may be too slow for large circuits. Newton-Raphson Iterative process that terminates when sum of currents into each node equals (3) zero at each node, and the node voltages converge. Less robust for medium and large circuits. Forward source-level sweep (4) Rshunt sweep (5) Sets all DC sources to zero and then sweeps them to their full values. If the forward source-level sweep fails with an out of bounds error, Reverse source-level sweep is tried before Rshunt sweep. Robust for large circuits or circuits with complicated continuation paths and limit points. Inserts a 1e-6-ohm resistor from each node to ground and then sweeps this value to innity. This convergence mode is usually slower than Forward source-level sweep. Helps convergence when circuits matrix has small/zero diagonals when this resistor is not added during iterations. A different starting resistor value can be used by specifying ArcMinValue.

DC Simulation Controller

1-15

DC Simulation

Table 1-3. DC Simulation Parameter Options (continued)


Reverse source-level sweep (6) Rarely used, but available for those few cases where it is necessary. Reverse source-level sweep is the same as Forward source-level sweep, except that the former is started in the reverse direction. Use Reverse source-level sweep when Forward source-level sweep returns an out of bounds error. This error indicates that there is a negative resistance in the circuit when all the DC sources are zero. This is a rare situation but occurs with ideal models of oscillators (such as those described by the van der Pol equation). Uses portions of various algorithms to converge fast. When Auto sequence is selected, this algorithm is used as the rst algorithm. Combines Newton iteration with Source stepping and Gmin relaxation methods if needed. - Source stepping: Starts DC sources from zero then sweeps up to their full values. - Gmin relaxation: Inserts a 1 M ohm resistor from each node to ground and then sweeps this value to innity. - Newton iteration: Starts with internal determined voltages. Converges faster for small semiconductor circuits. Could converge to undesired or wrong solutions Pseudo transient (8) Variant of the source stepping algorithm. Instead of the original circuit, a transient simulation on a pseudo circuit is performed. As the transition from the zero solution to the nal solution is of no interest in this analysis, the truncation error is ignored and timestep is taken as large as possible. This method shows a consistently good convergence property for large integrated circuits. Limits the maximum size of the arc-length step during arc-length continuation. In the arc-length continuation, the arc-length is increased in steps. The step size is calculated automatically for each problem. However if the ArcMaxStep is specied and is nonzero, it will dene an upper-limit for the size of the arc-length step. The default is 0 which means there is no upper limit for the ArcMaxStep. (In ADS, display and set this parameter directly on the schematic.)

Hybrid solver (7)

Arc Max Step (ArcMaxStep)

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

Table 1-3. DC Simulation Parameter Options (continued)


Arc Max Value (ArcMaxValue) Set relative to ArcMinValue. ArcMaxValue determines the allowed upper limit of 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. ArcMaxValue species an upper bound for p such that if during the arc-length continuation, p becomes greater than ArcMaxValue, the simulation is considered to have failed to converge. The default is pmax+ 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.) Controls the maximum number of continuation steps (default is 100). (In ADS, display and set this parameter directly on the schematic.) Controls the minimum size of the arc-length step (default is 1e-5). (In ADS, display and set this parameter directly on the schematic.) Sets the type of limiting done on the changes of nodes at each iteration. (In ADS, display and set this parameter directly on the schematic.) Limits the changes at the nonlinear nodes with a log function at each iteration when the changes exceed the internally determined value. Performs limiting on the changes at each iteration for the nonlinear components.

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

Table 1-3. DC Simulation Parameter Options (continued)


Status level (StatusLevel) Prints information about the simulation in the Status/Summary part of the Message Window. - 0 reports little or no information, depending on the simulation engine. - 1 and 2 yield more detail. - Use 3 and 4 sparingly since they increase process size and simulation times considerably. The type of information printed may include the sum of the current errors at each circuit node, whether convergence is achieved, resource usage, and where the dataset is saved. The amount and type of information depends on the status level value and the type of simulation. Device operating point level (DevOpPtLevel) (in ADS) (For RFDE see Saving Annotation Data in RFDE on page 1-10.)Options 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 (None) Brief (Brief) Detailed (Detailed) Output solutions Output solutions at all steps (OutputAllSolns) Optimization Compute Sensitivities Using Finite Difference (UseFiniteDiff) Perform sensitivity analysis optimization using Finite Difference approximation method. This requires N+1 circuit simulations, where N is the number of optimization variables. (In ADS, display and set this parameter directly on the schematic.) Instructs the simulator to save all solutions in the dataset. When the simulator is required to use points between steps in order to converge, the resulting information is stored and can subsequently be used for more detailed analysis. No information is saved. Saves device currents, power, and some linearized device parameters. Saves the DC operating point values which include the devices currents, power, voltages, and linearized device parameters.

1-18

DC Simulation Controller

Table 1-3. DC Simulation Parameter Options (continued)


Other Check this box to enable access to hidden parameters. The text eld is enabled to allow assigning values to the parameters. The format is Other=HiddenParameter1=value HiddenParameter2=value... Hidden parameters are used typically when troubleshooting convergence problems. (In ADS, display and set parameter directly on the schematic.)

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

nd a mode that converges.

DC Simulation Controller

1-19

DC Simulation

Setting the Convergence Mode on the Schematic (ADS only)


You can display, and then edit, the convergence mode directly on the schematic enabling you to easily change the mode and resimulate. To enable onscreen editing of the convergence mode: 1. From the DC Simulation controller dialog box, select the Display tab. 2. Select the ConvMode parameter and click OK. 3. Using the onscreen editor, set the desired initial convergence mode using the numerical equivalents shown in Table 1-4. Table 1-4. Numeric Equivalents for Convergence Mode
Convergence Mode Auto sequence Quick convergence test Robust convergence test Newton-Raphson sweep Forward source-level sweep Rshunt sweep Reverse source-level sweep Hybrid solver Pseudo transient Numerical Equivalent 0 1 2 3 4 5 6 7 8

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.

Circuit Does Not Behave as Expected


In the case of unusual circuit behavior, try any or all of the following: Check that the circuit is biased correctly. Move the point at which the signal is applied through the circuit. Break the circuit into sections and verify the performance of each section.

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.

When the Simulator Fails to Converge


The DC operating point of active devices such as transistors and diodes must be determined before a high-frequency simulation can be performed. Consequently, a DC simulation is performed as the rst step of any nonlinear simulation. Ideally, convergence occurs when, at each node, the voltage change between iterations is zero, and the sum of the currents at each node is zero (Kirchoffs Current Law). In practice, less-exact solutions are acceptable; the Options component enables you to set the level of tolerance. When the simulator cannot reach a solution within a given tolerance, after a given number of numerical iterations, it is said to have failed to converge. There is no one specic solution for solving convergence problems, but the following suggestions may provide assistance.

1-22

Troubleshooting a Simulation

Typical Convergence Problems


Circuit converges/diverges slowly Symptom RHS_NORM diverges or converges very slowly. Reason This circuit contains system library models, some of their internal voltages can be articially high. The improvement at each Newton iteration (limited by some function of Max Delta V and its default value, (~0.1 volt) based on the semiconductor device characteristics) is too small for this type of circuit. Remedy Increase Max. Delta V to 1e9 Circuit converges to undesired/wrong solutions Symptom The hybrid solver algorithm begins Newton iterations with some internally determined voltages that converge to an undesired but mathematically correct solution. Remedy Set Max. Delta V to 0.02 or several times the thermal voltage. Setting Max. Delta V triggers the hybrid solver to use zero volt as the initial guess for the Newton iterations and results in the desired solutions. Set Max. Delta V = 0.02 to get the desired solutions.

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

When Resulting I-V Curves are Not as Expected


If your DC I-V curves appear different than expected, this is probably due to one or more of the following reasons: Your independent swept parameters are swapped on the grid display. For example, if SRC1 sweeps a transistor gate voltage and SRC2 sweeps a drain voltage, and if the current is displayed with SRC1 (gate voltage) on the x-axis, these traces will not look like typical DC I-V traces. Exchange the order of the swept variables SRC1 and SRC2 on the grid. You are sweeping one source with large variations and another with small variations. For example, say that you are sweeping the base current and the collector voltage of a transistor by connecting a DC current source at the base and a DC voltage source at the collector. Furthermore, say that you are using SRC1 to sweep the base current and SRC2 to sweep the collector voltage. A DC bias-current sweep typically involves very small incrementson the order of microamperes, for example. Inside the program, the SRC1 sweep always occurs inside the SRC2 sweep, so the net effect is that the base current is swept faster. Because of the small increments in the current sweep, proceeding from one current value to the next may not change the circuit state (operating point) in the simulator. This causes the program to converge to the same solution as the previous current value, resulting in jagged I-V curves. You are measuring the DC current in the wrong direction. By default, positive current through a two-terminal element, such as a resistor or ammeter, is measured as owing from pin 1 to pin 2. To measure current in the opposite direction, you can edit the schematic by changing the elements orientation, or specify the current at a different pin, or change the orientation of the current probe.

1-26

Troubleshooting a Simulation

Eliminating DC Open-Circuit Errors


If the DC circuit simulation is to succeed, all circuit nodes must have a DC path to ground. This eliminates nodes that oat at an undened DC voltage value and allows the DC simulation to nd the bias point of all nodes in the circuit. This error is commonly caused by two capacitors in series. To eliminate this error, insert a large resistor (10 Mohm is a good value) from the offending node to ground. This will add a DC path to ground without affecting the circuits performance. It is possible to create a circuit containing short-circuited DC loops that cannot be handled by the DC simulation. For instance, if two ideal inductors are connected in parallel, they create a DC short-circuit loop. The DC current in this loop is undened; it can have any value without affecting the circuit solution. To eliminate this error, add a small DC resistance (say, 0.001 ohm) in series within the loop. Or, if the loop is made up of ideal inductors, simply change the ideal inductors to lossy inductors with a small amount of loss. Finally, as a last resort, turn off the topology checker. In the Options component, make sure Perform topology check is not selected. This will turn off all topology checking, and simulations will proceed directly to the DC simulation stage. This will speed up simulations slightly, and may be helpful in rare cases where it is certain that the DC simulation will succeed despite the topology.
Note

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

Topology Check Failures


In general, a topology check is performed before a simulation is run. The topology check nds common circuit errors that would lead to more serious errors later in the simulation and reports these in the Simulation/Synthesis Messages window. The check veries the existence of the following conditions: At least two components are connected to each node. There is a DC path from every node to ground. There are no loops of DC shorts (for example, inductors) or voltage or current sources. The topology checker is not able to check these conditions through transformers or transmission lines.

Checking Nodes and Pins


If the topology check fails, the offending nodes are highlighted in the Simulation/Synthesis Messages window. Choose Simulate > Highlight Node to identify these nodes.

Unconnected Wire Errors


In the case of a circuit with a wire that is missing, a message such as the following can appear in the Simulation/Synthesis Messages window during a simulation: Warning detected by HPEESOFSIM during DC analysis DC1. Circuit as given has no unique solution. A virtual resistance of 1 TOhms was added to each node. In the case of unconnected wires or pins, choose Tools > Check Representation > Open connections and click OK. All unconnected wires and components are highlighted, making them easily visible on the screen. Connect these to the correct circuit node.

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

Always ensure that there is no duplication of port numbers.

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.

Highly Nonlinear Circuits


Occasionally the default DC simulation algorithm fails in the case of highly nonlinear circuits. Select from the different convergence algorithms under the Parameters tab to nd the one that works the best. If the DC simulation still fails, try adjusting tolerance parameters, described next. Otherwise, the only recourse is to attempt to modify the circuit so that nonlinearities have less of an impact on the DC simulation.

1-30

Troubleshooting a Simulation

Adjusting Tolerance Parameters


Several tolerance parameters can be changed so that simulations are more likely to converge, although at the cost of a somewhat less accurate result. These parameters include: Current relative tolerance Voltage relative tolerance Current absolute tolerance Voltage absolute tolerance To change any of these parameters, edit them in an Options component. The tolerance parameters are described next. The equations that are used to check convergence apply to all analysis types, not just DC.

Current Relative Tolerance, Current Absolute Tolerance


These tolerances are used to satisfy Kirchoff s Current Law (KCL) in solving for the currents at each node in the circuit. The simulator attempts to nd a solution that satises KCL, so that the sum of the currents entering (or leaving) all circuit nodes is zero. At each iteration, it uses Current relative tolerance and Current absolute tolerance as a tolerance for the node currents. For convergence to be achieved, the currents must satisfy the following at each circuit node:

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

Voltage relative tolerance, Voltage absolute tolerance


Once Kirchoff s law is satised for all nodes, the simulator checks for unique solutions by calculating all node voltages. Sometimes, large changes in node voltages cause very little change in node currents. For instance, if two S-parameter blocks (that is, any 2-port, such as an amplier or lter, for which there are measured S-parameters) are cascaded, and the reference node between the two components is not grounded, then the differential voltage between the two S-parameter blocks can have any value at all without changing the currents. The circuit then has multiple possible solutions. To nd the correct solution for all node voltages, the simulator will use the Voltage relative tolerance and Voltage absolute tolerance parameters in a manner similar to the way it uses Current absolute tolerance and Current relative tolerance. For convergence, the following relationship must be satised for every node voltage in the circuit: Vn rel Vn + abs where Vn Vn rel abs = Change in the node voltage solution from the previous iteration = Node voltage found in this iteration of the solution = Voltage relative tolerance = Voltage absolute tolerance

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

También podría gustarte