Documentation‎ > ‎

Goals for optimizations and statistical analysis

Mason’s optimizers seek to minimize the “Figure of Merit”, as described in the optimizers section.

Goals are defined by an equation, which can use the calculated complex S-Parameter values (S_1_1, S_2_1, etc) which are complex values.  Care should be taken to use the goals evaluate to real numbers, so use the "real", "imag", "abs", or "arg" functions as is appropriate.  muParser is used to parse the goals, therefore any functions or operators that are valid in (this version of) muParser can be used.  Additionally, any of the variables can be used in the goal (for example, penalize line lengths for getting too wide).  Finally, "gd" can be appended to the S-Parameter to calculate group delay (e.g., "S_2_1gd * 1e9" will evaluate to the S_2_1 group delay in nanoseconds).

In addition to an equation, goals require a minimum, a maximum, and a weight. If the equation evaluates within the stated minimum and maximum, nothing is added to the Figure of Merit (i.e., no penalty is assigned to the design). The weight allows the user to ensure particular objectives are met- for example, meeting the insertion loss requirements may be more important than meeting the filter rejection requirements.

It is possible to use the frequency variable in the calculation of the Figure of Merit. In this case, the penalty is proportional to the number of frequencies considered- since the 3dB point of a filter is only evaluated at a single frequency in the example below, the weighting must be higher to compete with the parameters over multiple frequencies.

Goals can have a set associated with them.

Frequency Control

Goals can have "freq_start" and a "freq_stop" parameter associated with them, indicating the bounds the goal is evaluated for.  If "freq_start" is zero, then the bounds are from the lowest frequency simulated to "freq_stop".  Less intuitively, if "freq_stop" is zero, then the bounds are from "freq_start" to the highest frequency simulated.  If both are zero (default), then the goal is evaluated over all simulation frequencies.
`In TinyCAD, the freq_start or freq_stop parameter is added to the attributes of the goal.`

Turning Goals Temporarily Off

In TinyCAD, goals (and specific optimizer steps) can be turned off by clicking on the "Show?" field for that goal (or optimization step).