


































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



































Star-Hspice Manual, Release 1997.2 11-
Optimization, the automatic generation of model parameters and component values from a given set of electrical specifications or measured data, is available in Star-Hspice. With a user-defined optimization program and a known circuit topology, Star-Hspice automatically selects the design components and model parameters to meet DC, AC, and transient electrical specifications. Star-Hspice optimization is the result of more than ten years of research in both the optimizing algorithms and user interface. The optimizing function is integrated into the core of Star-Hspice, resulting in optimum efficiency. The circuit result targets are part of the .MEASURE command structure, and the parameters to be optimized are Star-Hspice-defined parameter functions. A .MODEL statement sets up the optimization. The most powerful feature of the Star-Hspice approach is its incremental optimization technique. Incremental optimization allows you to solve the DC parameters first, then the AC parameters, and finally the transient parameters. A set of optimizer measurement functions not only makes the task of transistor optimization easy, but significantly improves cell and whole circuit optimization. This chapter covers the following topics: n Performing Optimization n Understanding the Statements Syntax n Examining Optimization Examples n Performing Timing Analysis
Performing Optimization Optimizing Performance
11-2 Star-Hspice Manual, Release 1997.
To perform optimization, create an input netlist file specifying: n Minimum and maximum parameter and component limits n The variable parameters and components n An initial estimate of the selected parameter and component values n The circuit performance goals or model-versus-data error function Given the input netlist file, optimization specifications, component limits, and initial guess, the optimizer reiterates the circuit simulation until the target electrical specification is met or an optimized solution is found. For improved optimization and simulation time and to increase the likelihood of a convergent solution, the initial estimate of the component values should produce a circuit with specifications near those of the original target. This reduces the number of times the optimizer reselects component values and resimulates the circuit.
The length of time to complete an optimization is a function of the number of iterations allowed, the relative input tolerance, the output tolerance, and the gradient tolerance. The default values are satisfactory for most applications. Generally, 10 to 30 iterations are sufficient to get accurate optimizations.
Set the simulator with tighter convergence options than normal for optimization. The following options are suggested: For DC MOS model optimizations: absmos=1e- relmos=1e- relv=1e- For DC JFET, BJT, and diode model optimizations:
Understanding the Statements Syntax Optimizing Performance
11-4 Star-Hspice Manual, Release 1997.
Several Star-Hspice statements are required for optimization. n .MODEL modname OPT ... n .PARAM parameter=OPTxxx (init, min, max) n A .DC, .AC, or .TRAN analysis statement with MODEL=modname, OPTIMIZE=OPTxxx, and RESULTS=measurename n .MEASURE measurename ... <GOAL = | < | > val> – note that a space is required on either side of the relational operator =, <, or > The .PARAM statement lets you specify initial, lower, and upper bound values. The types of .MEASURE statements available for optimization are described in Chapter 4, Specifying Simulation Output. Output statements .PRINT, .PLOT, and .GRAPH must be associated with the analysis statements .DC, .AC, or .TRAN. An analysis statement with the keyword OPTIMIZE is used for optimization only. To generate output for the optimized circuit, another analysis statement (.DC, .AC, or .TRAN) must be specified, along with the output statements. The proper specification order is:
Optimizing Performance Understanding the Statements Syntax
Star-Hspice Manual, Release 1997.2 11-
The syntax is: .DC <DATA=filename> SWEEP OPTIMIZE=OPTxxx RESULTS=ierr ...
Optimizing Performance Understanding the Statements Syntax
Star-Hspice Manual, Release 1997.2 11-
For each optimization within a data file, specify a .MODEL statement to allow for more than one optimization per simulation run to be executed. The optimization .MODEL statement defines the convergence criteria, number of iterations, and derivative methods. The syntax is: .MODEL mname OPT <parameter=val ...> You can specify the following OPT parameters in the .MODEL statement: mname model name. Elements refer to the model by this name. CENDIF represents the point at which more accurate derivatives are required. When the gradient of the RESULTS functions are less than CENDIF, the more time-consuming derivative methods are used. Values of 0.1 to 0.01 are suitable for most applications. If too large a value is used, the optimizer requires more CPU time. If too small a value is used, it might not find as accurate an answer. Default=1.0e-9. CLOSE the initial estimate of how close the parameter initial value estimates are to the final solution. CLOSE multiplies the changes in the new parameter estimates. A large value for CLOSE causes the optimizer to take large steps toward the solution and a small value causes the optimizer to take smaller steps toward the solution. CLOSE should range from 0.01 for very close parameter estimates to 10 for rough initial guesses. Default=1.0. If CLOSE is greater than 100, the steepest descent part of the Levenburg-Marquardt algorithm dominates. For CLOSE less than 1, the Gauss-Newton method dominates. For further details, see L. Spruiell, “Optimization Error Surfaces,” Meta-Software Journal, Vol. 1, No. 4, December
Understanding the Statements Syntax Optimizing Performance
11-8 Star-Hspice Manual, Release 1997.
CUT modifies CLOSE, depending on how successful the iterations toward the solution become. If the last iteration was successful, descent toward the solution CLOSE is decreased by CUT. If the last iteration was not a successful descent to the solution, CLOSE is increased by CUT squared. CUT drives CLOSE up or down depending on the relative success in finding the solution. The CUT value must be greater than 1. Default = 2.0. DIFSIZ determines the increment change in a parameter value for gradient calculations ( ∆ x = DIFSIZ ⋅ max(x, 0.1 ) ). If delta is specified in a .PARAM statement, then ∆ x = delta. Default = 1e-3. GRAD represents a possible convergence when the gradient of the RESULTS function is less than GRAD. Values of 1e-6 to 1e- 5 are suitable for most applications. If too large a value is used, the optimizer could stop before the best solution is found. Too small a value requires more iterations. Default=1.0e-6. ITROPT sets the maximum number of iterations. Typically no more than 20-40 iterations are needed to find a solution. Too many iterations can imply the values for RELIN, GRAD, or RELOUT are too small. Default=20. LEVEL selects the optimizing algorithm to use. Currently, the only option is LEVEL=1, a modified Levenburg-Marquardt algorithm. MAX sets the upper limit on CLOSE. Values greater than 100 are recommended. Default=6000. PARMIN allows better control of incremental parameter changes during error calculations. This produces more control over the trade-off between simulation time and optimization result accuracy. Star-Hspice calculates parameter increments using the relationship: ∆ par_val = DIFSIZ ⋅ MAX( par_val , PARMIN)
Examining Optimization Examples Optimizing Performance
11-10 Star-Hspice Manual, Release 1997.
This section provides examples of the following types of Star-Hspice optimizations: n MOS Level 3 Model DC Optimization n MOS Level 13 Model DC Optimization n RC Network Optimization n CMOS Tristate Buffer Optimization n BJT S-Parameters Optimization n BJT Model DC Optimization n GaAsFET Model DC Optimization n MOS Op-amp Optimization
This example shows an optimization of I-V data to a Level 3 MOS model. The data consists of gate curves ( ids versus vgs ) and drain curves ( ids versus vds ). The Level 3 parameters VTO, GAMMA, UO, VMAX, THETA, and KAPPA are optimized. After optimization, the model is compared separately to the data for the gate and drain curves. The option POST generates AvanWaves files for comparing the model to the data.
Level 3 Model DC Optimization Input Netlist File $level 3 mosfet optimization $..tighten the simulator convergence properties .OPTION nomod post=2 newtol relmos=1e-5 absmos=1e- .MODEL optmod OPT itropt=
Circuit Input vds 30 0 vds vgs 20 0 vgs vbs 40 0 vbs m1 30 20 0 40 nch w=50u l=4u $.. $..process skew parameters for this data
Optimizing Performance Examining Optimization Examples
Star-Hspice Manual, Release 1997.2 11-
.PARAM xwn=-0.3u xln=-0.1u toxn=196.6 rshn= $..the model and initial guess .MODEL nch NMOS level=
Optimized Parameters
Optimization Sweeps .DC DATA=all optimize=opt1 results=comp1 model=optmod .MEAS DC comp1 ERR1 par(ids) i(m1) minval=1e-04 ignor=1e-
DC Sweeps .DC DATA=gate .DC DATA=drain
Print Sweeps .PRINT DC vds=par(vds) vgs=par(vgs) im=i(m1) id=par(ids) .PRINT DC vds=par(vds) vgs=par(vgs) im=i(m1) id=par(ids)
DC Sweep Data $..data .PARAM vds=0 vgs=0 vbs=0 ids=
Optimizing Performance Examining Optimization Examples
Star-Hspice Manual, Release 1997.2 11-
absolute value of par(ids), or by minval=10e-6, whichever is larger. Using minval keeps low current data from dominating the error. n The remaining .DC and .PRINT statements are for printback after optimization. You can be place them anywhere in the netlist input file because they will be correctly assigned when the file is parsed. n The “.PARAM VDS=0 VGS=0 VBS=0 IDS=0” statements simply declare these data column names as parameters. The .DATA statements give data for IDS versus VDS, VGS, VBS. The selection of data should match the choice of model parameters to optimize. To optimize GAMMA, data with back bias must be provided (VBS= -2 in this case). To optimize KAPPA, the saturation region must have data. In this example, the data set “all” contain: gate curves: vds=0.1 vbs=0,-2 vgs=1 to 5 in steps 0. drain curves: vbs=0 vgs=2,3,4,5 vds=0.25 to 5 in steps 0. The results are shown in Figure 11-1:.
Examining Optimization Examples Optimizing Performance
11-14 Star-Hspice Manual, Release 1997.
Figure 11-1: Level 3 MOSFET Optimization
This example shows an optimization of I-V data to a Level 13 MOS model. The data consists of gate curves ( ids versus vgs ) and drain curves ( ids versus vds ). This example demonstrates two-stage optimization. The Level 13 parameters vfb0, k1, muz, x2m, and u00 are optimized to the gate data. Then the Level 13 parameters MUS, X3MS, U1, and the impact ionization parameter ALPHA are optimized to the drain data. After optimization, the model is compared to the data. The option POST generates AvanWaves files for comparing the model to the data. The results are shown in Figure 11-2:.
Examining Optimization Examples Optimizing Performance
11-16 Star-Hspice Manual, Release 1997.
Optimization Sweeps .DC DATA=gate optimize=opt1 results=comp1 model=optmod .MEAS DC comp1 ERR1 par(ids) i(m1) minval=1e-04 ignor=1e- .DC DATA=drain optimize=opt2 results=comp2 model=optmod .MEAS DC comp2 ERR1 par(ids) i(m1) minval=1e-04 ignor=1e-
DC Data Sweeps .DC DATA=gate .DC DATA=drain
Print Sweeps .PRINT DC vds=par(vds) vgs=par(vgs) im=i(m1) id=par(ids) .PRINT DC vds=par(vds) vgs=par(vgs) im=i(m1) id=par(ids)
DC Sweep Data $..data .PARAM vds=0 vgs=0 vbs=0 ids= .DATA gate vds vgs vbs ids 1.000000e-01 1.000000e+00 0.000000e+00 1.655500e- 1.000000e-01 5.000000e+00 -2.000000e+00 3.149500e- .ENDDATA .DATA drain vds vgs vbs ids 2.500000e-01 2.000000e+00 0.000000e+00 2.809000e- 5.000000e+00 5.000000e+00 0.000000e+00 4.861000e- .ENDDATA .END
Optimizing Performance Examining Optimization Examples
Star-Hspice Manual, Release 1997.2 11-
Figure 11-2: Level 13 MOSFET Optimization
Following is an example of optimizing the power dissipation and time constant of an RC network. The circuit is a parallel resistor and capacitor. The following design targets are specified. n 1 s time constant n 50 mW rms power dissipation through the resistor The Star-Hspice strategy is as follows: n .MEASURE statement RC1 calculates RC time constant (GOAL of. V corresponds to 1 s time constant e−rc^ ). n .MEASURE statement RC2 calculates the rms power where the GOAL is 50 mW. n OPTrc identifies RX and CX as optimization parameters and sets their starting, minimum, and maximum values.
Optimizing Performance Examining Optimization Examples
Star-Hspice Manual, Release 1997.2 11-
Residual Sum of Squares
The residual sum of squares is a measure of the total error. The smaller this value is, the more accurate the optimization results are.
residual sum of squares =
where E is the error function and ne is the number of error functions.
Norm of the Gradient
The norm of the gradient is another measure of the total error. The smaller this value is, the more accurate the optimization results are. The gradient G is found by
and norm of the gradient =
where P is the parameter and np is the number of parameters to be optimized.
E (^) i 2
i = 1
ne
G (^) j E (^) i ⋅( ∆ E (^) i ⁄∆ P (^) j ) i = 1
ne
2 G (^) j 2
i = 1
np
Examining Optimization Examples Optimizing Performance
11-20 Star-Hspice Manual, Release 1997.
Marquardt Scaling Parameter
This parameter is used in the Levenberg-Marquardt algorithm to find the actual solution of the optimizing parameters. The search direction is a combination of the Steepest Descent method and the Gauss-Newton method. The Steepest Descent method is used initially to approach the solution because it is fast, and then the Gauss-Newton method is used to find the solution. During this process, the Marquardt Scaling Parameter becomes very small, but starts to increase again if the solution starts to deviate. If this happens, the optimizer chooses between the two methods to work toward the solution again. If the optimal solution is not attained, an error message is printed and a large Marquardt Scaling Parameter value is printed.
Number of Function Evaluations
This is the number of analyses (for example, finite difference or central difference) that were needed to find a minimum of the function.
Number of Iterations
This is the number of iterations needed to find the optimized or actual solution.
Optimized Parameters OPTRC