Using Nominal Optimization
This topic describes using nominal optimization with ADS Ptolemy. Nominal optimization, also called performance optimization, uses iterative simulation to achieve user-specified goals by automatically varying specific simulation design parameter values over user-specified ranges. For example, you could optimize the gain of a carrier recovery loop to achieve a desired lock time and residual loop error or you could optimize a fixed-point bit-width parameter in a DSP design. This capability generally works the same way as in Analog/RF Network simulators. Details regarding nominal optimization are provided in Performing Nominal Optimization.
This topic discusses a DSP example on optimizing bit-width and describe information on signal processing parameter types to be aware of when performing optimization with ADS Ptolemy.
Optimizing Various Parameter Types
To optimize a real, integer, or fixed-point parameter type, the procedure is similar to standard nominal optimization.
To optimize complex, precision, array, string, or filename parameter types, you must use a VAR component to define the optimizable variable. You then embed a variable from the VAR in the string of the component parameter value. This is because the simulator only sweeps numbers and these parameter types are strings that are interpreted by the simulator.
To reference an optimized variable for parameter types that use strings, the variable is defined in a VAR (Variables and equations) component with Standard entry mode and Optimization/Statistic Setup enabled. Once defined, this variable can be used as a component parameter. If you type this variable on the schematic, it must be enclosed in quotes " "; if you enter this variable in the component dialog box, quotes are automatically added.
An example of optimizing a filename is the case of ten files, myfile1.dat through myfile10.dat, each containing filter coefficients. You might want to conduct an optimization based on a range of these files.
 | Note Earlier versions of Advanced Design System (1.0 and 1.1) required the use of sprintf and strcat functions to reference strings. While no longer needed for complex, precision, or array types, designs built with these functions will still work. |
Optimizing Input and Output Bit Width
This example shows how to set up a simple fixed-point bit-width parameter optimization. We will build a simple design as shown in the following figure. To help you set up this design, copy the project file dspopt_prj from the examples/Tutorial directory, and modify the design simpleopt2 as described in this section.

Optimizing Input and Output Precision of a GainSyn Component
The value of the input and output precision of GainSyn in component G1 is optimized to achieve a dc data value of 0.2 in the sample stored in the numeric sink. The goal is to represent the gain with the minimum number of bits possible.
The value of 0.2 cannot be exactly represented with only one or two fractional bits (bits to the right of the decimal point). Without optimization, too many bits (such as 16) might be used. While the number 0.2 would be represented very accurately, the extra bits could be wasteful in the final implementation.
By studying this example, you can learn the procedure you would use to solve real-world design problems, such as optimizing the bit width of an FIR filter.
The design consists of:
- A fixed constant output (ConstFix) source component (from the Numeric Sources library), with the Level parameter set to 1.0.
- A GainSyn component, with Gain=0.2 and GainPrecision="W.D".
- A NumericSink, with default values accepted.
- A DataFlow controller, with default values accepted, except set DefaultNumericStop to 0.0.
- A VAR component, set up as described in the following paragraphs.
- An Optim controller, set up as described in the section Setting Optimization Job Parameters. Use the default values, except set MaxIters = 30. The default optimizer type is the Random optimizer.
- A Goal component, for the expression mag(N1-0.2).
Set Up the VAR Component
To set up the VAR component, first see the following figure.

VAR Component Parameters
Double-click the VAR symbol in your schematic to display its dialog box. The following describes each parameter that must be set so the VAR component matches what is shown in the previous figure.
- Enter W= 2. W is the number of bits to the left of the decimal point, including the sign bit.
- Enter D=1. D is the number of bits to the right of the decimal point. 1 is our nominal value before optimization. This should be your best estimate for the nominal value.
 | Note The W and D labels are user-defined variable names. |
- Choose the Tune/Opt/Stat/DOE Setup button.
- From the Optimization Status dropdown menu, select Enabled.
- From the Type dropdown menu, select Discrete.
- In the Minimum Value field, enter 1.
- In the Maximum Value field, enter 16.
- In the Step Value field, enter 1.
 | Note Steps 5 through 8 tell the program to optimize using only the discrete values of 1 through 16 in steps of 1. |
- Click OK to return to the main Variables and Equations dialog box.
- When done, click OK.
Note that the Weight parameter weighs the importance of one goal to the other goal(s). Generally, the first goal may be more important, for example when it meets a performance specification such as frequency response. The second goal (in this example, bit width) is weighted less. Because the error function of the first goal is small compared to the second, the Weight of the first goal is set to 1e9.
Completing the Optimization
You are now ready to complete the optimization. The remainder of the procedure for completing and running the optimization for parameter types (such as precision or string) are the same as for any optimization. To review these procedures, refer to Specifying Component Parameters for Optimization.