previous | back | home | next
CACD Group
updated 2000.03.30
Author Janez Puhan

The optimize command

Introduction

A new command named optimize has been added. It realises an optimisation loop in Spice Opus. When we run particular optimisation method on a given circuit with optimize command, a general optimisation loop is performed and it is always the same. Its algorithm is as follows:
do
   if number of iterations > max break
   change parameter values
   verify explicit constraints and correct parameter values if necessary
   execute all analysis commands (analysis 0, analysis 1, ..., analysis N)
   number of iterations = number of iterations + 1
   if not implicit constraint 0 or not implicit constraint 1 or ...
       or not implicit constraint M continue
   calculate the cost function
while termination criteria not satisfied

Number of iterations is checked in every iteration. This way the user has some kind of control over the optimisation algorithm and an infinitive optimisation loop (in case of no convergence) is avoided. The optimisation method, which was chosen, is hidden in the way of changing parameter values. If one parameter violate its explicit constraint, its value is corrected to the explicit border. More analyses lines can be defined with optimize analysis commands. They are performed in order and produce necessary results for verifying implicit constraints and evaluating the cost function. If at least one implicit constraint is violated, than algorithm continues with next iteration. Otherwise the cost function is calculated and terminating criteria decides whether the loop will continue or stop.

The optimize command is placed on top of Nutmeg by its function. In fact it just prepares commands in Nutmeg language and executes them in an appropriate order, what leads to optimising process. But on the other hand optimize command is written as an additional Nutmeg command and can be used as one.

The optimize command also generates special group of data (plot). It is named optimizex, where x repesents a plot number. It contains a vector called parameter with final parameter values, a vector called cost with values of the cost function in each iteration, and vectors with parameter values in each iteration.

When the optimize command finishes and finds some optimal parameter values, which are better than initial values, the initial parameter values are changed to optimal ones. That way we can proceed with the next optimize command (maybe with some other method) on the same circuit from the best known point as initial guess.

If the initial_guess option is set (equal or greater than 1), the above is not true. In this case the initial parameter values are set to the values where parameter space was not searched yet. This way many dimensional parameter spaces can be searched by successive optimisation processes. The value of initial_guess option gives the weight factor of the point with the greatest value of the cost function. The weight factor of the point with the smallest value is always 1.

previous | back | home | next