**4.3. Optimization of a differential amplifier**

For the analysis of Simulated Annealing options and the influence over the automatic sizing procedure of analog basic blocks, we will explore different configurations of temperature schedule, state generation function and reannealing for global optimization and further local optimization. Due to the random nature of some parameters of SA, an statistic analysis is needed to understand the search behavior. We performed 1000 optimization runs for each temperature schedule function described before: Boltzman, Exponential and Fast. The state generation function was kept fixed as *gBoltz*(*X*) (Eq. 2). Each execution started with a different seed for the random number generator function. The same parameters were used for the three functions, including the same random number vector for a fair comparison. A MATLAB script was implemented and the native SA method (simulannealbnd) was used as the main bound constrained optimization function.

Fig. 6 shows a graph comparing the 3 temperature schedules, considering only the optimum solutions obtained in relation to the optimization time. It is possible to notice the very attractive results for Boltzman, which achieved 400 optimum solutions (over a set of 1000 executions) in about 25 seconds of execution time. After this time, the number of optimal solutions does not grow considerably, saturating in 430 at 37 seconds. The same saturation behavior happens with Exponential and Fast temperature schedules, but with a very lower

Simulated Annealing to Improve Analog Integrated Circuit Design: Trade-Off s and Implementation Issues 273

Optimal Results versus Execution Time

0 5 10 15 20 25 30 35 40

Time (s)

**Figure 6.** Optimal results versus execution time for the global optimization of a differential amplifier,

In order to improve the results obtained by global optimization with Simulated Annealing, we apply a local optimization algorithm over the previous set of solutions generated by SA with the three temperature schedule functions. We choose the interior point algorithm [18], which is suitable for linear and non-linear convex design spaces. We suppose that the design space region near the solution provided by the global optimization and evolving the global optimum solution is convex and can be explored by this method. The algorithm was implemented by using the MATLAB native function fmincon. The results can be seen in Tab. 4 . It is clear the improvement obtained by the local optimization. The mean final cost of the 1000 executions for the three temperature schedules are close to the known global optimum of −1.960306. The total execution time (including global followed by local execution times) was increased by

number of optimal solutions and at early execution time.

TBoltz TExp TFast

0

considering 3 different temperature schedule functions.

about 50%, but it is still in a reasonable value, near 20 seconds.

*4.3.2. Global followed by local optimization*

50

100

150

200

250

Optimal Results

300

350

400

450

### *4.3.1. Global optimization*

Table 2 shows the mean of the optimal cost function found after 1000 executions of the optimization procedure for each temperature schedule function. The Boltzman schedule achieved the best values, with a mean final cost *f* ∗ *<sup>c</sup>* of −1.960306, right near the optimal global solution of −1.9623. It means that most of the solutions provided by the procedure with Boltzman are near the global optimum. Exponential and Fast temperature schedules demonstrate worst results in terms of cost. Boltzman result was obtained at expense of a higher execution time and total number of iterators.



The free variables *W* and *L* found by the three temperature schedule functions are shown in Tab. 3. Again, Boltzman demonstrates the best results, with the mean values near the optimal solution. Fast schedule presents the worst results in this configuration.


**Table 3.** Mean *W* and *L* values achieved by global optimization procedure of the differential amplifier after 1000 runs for each different temperature schedule function.

Fig. 6 shows a graph comparing the 3 temperature schedules, considering only the optimum solutions obtained in relation to the optimization time. It is possible to notice the very attractive results for Boltzman, which achieved 400 optimum solutions (over a set of 1000 executions) in about 25 seconds of execution time. After this time, the number of optimal solutions does not grow considerably, saturating in 430 at 37 seconds. The same saturation behavior happens with Exponential and Fast temperature schedules, but with a very lower number of optimal solutions and at early execution time.

**Figure 6.** Optimal results versus execution time for the global optimization of a differential amplifier, considering 3 different temperature schedule functions.

#### *4.3.2. Global followed by local optimization*

12 Will-be-set-by-IN-TECH

For the analysis of Simulated Annealing options and the influence over the automatic sizing procedure of analog basic blocks, we will explore different configurations of temperature schedule, state generation function and reannealing for global optimization and further local optimization. Due to the random nature of some parameters of SA, an statistic analysis is needed to understand the search behavior. We performed 1000 optimization runs for each temperature schedule function described before: Boltzman, Exponential and Fast. The state generation function was kept fixed as *gBoltz*(*X*) (Eq. 2). Each execution started with a different seed for the random number generator function. The same parameters were used for the three functions, including the same random number vector for a fair comparison. A MATLAB script was implemented and the native SA method (simulannealbnd) was used as the main bound

Table 2 shows the mean of the optimal cost function found after 1000 executions of the optimization procedure for each temperature schedule function. The Boltzman schedule

global solution of −1.9623. It means that most of the solutions provided by the procedure with Boltzman are near the global optimum. Exponential and Fast temperature schedules demonstrate worst results in terms of cost. Boltzman result was obtained at expense of a

> Boltzman -1.960306 16.32 1777.44 Exponential -1.834720 9.57 1043.89 Fast -1.579269 12.99 1416.36

**Table 2.** Mean values of differential amplifier global optimization procedure for different temperature

The free variables *W* and *L* found by the three temperature schedule functions are shown in Tab. 3. Again, Boltzman demonstrates the best results, with the mean values near the optimal

Temperature schedule *W* (*μm*) *L* (*μm*)

Boltzman 8.07 20.57 Exponential 11.47 23.00 Fast 34.46 26.32

Optimum value 8.00 20.00

**Table 3.** Mean *W* and *L* values achieved by global optimization procedure of the differential amplifier

solution. Fast schedule presents the worst results in this configuration.

after 1000 runs for each different temperature schedule function.

*<sup>c</sup>* of −1.960306, right near the optimal

*<sup>c</sup>* Execution time (*s*) Iterations

**4.3. Optimization of a differential amplifier**

achieved the best values, with a mean final cost *f* ∗

higher execution time and total number of iterators.

Temperature schedule *f* ∗

constrained optimization function.

schedule functions after 1000 executions.

*4.3.1. Global optimization*

In order to improve the results obtained by global optimization with Simulated Annealing, we apply a local optimization algorithm over the previous set of solutions generated by SA with the three temperature schedule functions. We choose the interior point algorithm [18], which is suitable for linear and non-linear convex design spaces. We suppose that the design space region near the solution provided by the global optimization and evolving the global optimum solution is convex and can be explored by this method. The algorithm was implemented by using the MATLAB native function fmincon. The results can be seen in Tab. 4 . It is clear the improvement obtained by the local optimization. The mean final cost of the 1000 executions for the three temperature schedules are close to the known global optimum of −1.960306. The total execution time (including global followed by local execution times) was increased by about 50%, but it is still in a reasonable value, near 20 seconds.


In terms of the number of optimal solutions found over the 1000 executions, the local search also demonstrate an improvement. Fig. 7 shows the results obtained, in which we can see that, for Boltzman schedule, almost 90% of the final solutions are optimal, an improvement of more than 50% over the global optimization. The same occurs for the other temperature

Simulated Annealing to Improve Analog Integrated Circuit Design: Trade-Off s and Implementation Issues 275

We can observe the improvement in the number of optimal solutions with local search in Fig. 8, which presents the frequency histogram of the resulting final cost provided by global search (Fig. 8(a)) and global search followed by local search (Fig. 8(b)) for the 3 different temperature schedules. Besides the increase in the number of optimal solutions found, the inclusion of local search after global search also approximated the remaining non-optimal solutions in the

For the analysis of the influence of reannealing in the optimization process, we performed some experiments executing Simulated Annealing with reannealing intervals of 200, 450, 700 and 950 iterations. Again, 1000 executions were done in order to guarantee a statistical

Fig. 9 shows the relation between the number of optimal solutions found by Boltzman schedule function versus the execution time for reannealing intervals from 200 to infinite (*i.e.*, no reannealing). Reannealing interval affects the number of optimal solutions in this case. As the interval decrease, the number of optimal solutions decrease too. The best configuration is with no reannealing, demonstrating that it is not interesting to use reannealing with *TBoltz*. It happens because the temperature decreases slowly at the beginning of the annealing process. With the reannealing, the temperature increases for higher values before the search in the

When the temperature schedule function is modified to Exponential, the behavior is opposite. As the reannealing interval decreases, more optimal solutions are found. Fig. 10 shows the relation between optimal solutions found and execution time for this temperature schedule

The same occurs for the Fast temperature schedule function, shown in Fig. 11. As the reannealing interval diminishes, the number of optimal solutions increases. This behavior is maintained for ever small intervals. A high improvement in the number of optimal solutions is obtained for reannealing intervals in the order of 100 iterations, as shown in Fig. 12. As the temperature decreases very fast, the reannealing allows to avoid local minima. Thus, it increases the chances of finding the correct path to the optimum solution. Also, we can observe the existence of an optimum value for the reannealing interval which returns the

The variation of the state generation function is also a factor that can change the convergence of the Simulated Annealing algorithm. Two of these functions are analyzed here: Boltzman and Fast. The combinations of temperature schedule function and state generation function produce distinct results for the synthesis of the differential amplifier. Fig. 13 shows

analysis for the three temperature schedule functions described before.

design space reaches a path trending to the optimal solution.

schedules.

configuration.

direction to the best known value.

*4.3.3. Global optimization with reannealing*

maximum number of optimal solutions.

*4.3.4. Analysis of state generation function*

**Table 4.** Mean values of differential amplifier after local optimization over the results obtained by global optimization shown in Tab. 2.

The mean values found for the free variables after the local search are shown in Tab. 5 . Comparing to the previous values provided by the global optimization, it is possible to note the great improvement of the Exponential temperature schedule, whose mean *W* and *L* approached very near to the global optimum.


**Table 5.** Mean *W* and *L* values achieved by local optimization procedure of the differential amplifier over the results obtained by global optimization shown in tab. 3.

**Figure 7.** Optimal results versus execution time for the global optimization of a differential amplifier, considering 3 different temperature schedule functions - global and local.

In terms of the number of optimal solutions found over the 1000 executions, the local search also demonstrate an improvement. Fig. 7 shows the results obtained, in which we can see that, for Boltzman schedule, almost 90% of the final solutions are optimal, an improvement of more than 50% over the global optimization. The same occurs for the other temperature schedules.

We can observe the improvement in the number of optimal solutions with local search in Fig. 8, which presents the frequency histogram of the resulting final cost provided by global search (Fig. 8(a)) and global search followed by local search (Fig. 8(b)) for the 3 different temperature schedules. Besides the increase in the number of optimal solutions found, the inclusion of local search after global search also approximated the remaining non-optimal solutions in the direction to the best known value.
