This paper investigates an evolutionarybased designing system for automated sizing of analog integrated circuits (ICs). Two evolutionary algorithms, genetic algorithm and PSO (Parswal particle swarm optimization) algorithm, are proposed to design analog ICs with practical userdefined specifications. On the basis of the combination of HSPICE and MATLAB, the system links circuit performances, evaluated through specific electrical simulation, to the optimization system in the MATLAB environment, for the selected topology. The system has been tested by typical and hardtodesign cases, such as complex analog blocks with stringent design requirements. The results show that the design specifications are closely met. Comparisons with available methods like genetic algorithms show that the proposed algorithm offers important advantages in terms of optimization quality and robustness. Moreover, the algorithm is shown to be efficient.
Today, with the development of VLSI technology in order to integrate digital and analogue circuits as a complete system on a chip, the issue of optimal electronic circuits design, due to its abundant advantages, in contrast with manual design is very important. In this regard, because of their design complexity and difficulty, analogue circuits have attracted greater attention in optimization. In general,the analogue circuits design is undertaken in two stages. The first stage is related to the selection of the circuit structure so that it would have the necessary abilities to fulfill our expectations from the circuit. The second stage, which is often more timeconsuming, is the optimization of the circuit parameters, for example, the size of the transistors and the value of the elements, so that it could satisfy output parameters, for example, consuming power and gain. Moreover, issues, depending on the nature of the main function and limitations (e.g., whether the fitness function is convex or not, limits are linear), can be solved by KKT (KarushKuhnTucker) condition theories, Lagrange coefficients, nonlinear/linear complementary problem (NLCP/LCP), and nonaffine/affine variational inequality (NAVI/AVI). However, due to its complexity, being timeconsuming and casedependent, there was a need for newer and more comprehensive solutions. For these reasons and in order to respond to these problems, the use of evolutionary optimization methods, such as genetic algorithm, particle swarm optimization, ant colony, and harmonic search algorithm, was proposed.
All these methods obey the following issues:
Vector
The selection depends on the conditions of the problem and the application. Our circuits follow the same equation for optimization. Then, they are optimized by evolutionary algorithms. In the past, genetic algorithms were applied in order to optimize analogue circuits, but here we try to optimize analogue circuits by genetic algorithms, PSO algorithm and after that a new structure is introduced in order to make use of both of the algorithms simultaneously and in combination with an appropriate fitness function. Nowadays, with the development of electronic circuits due to the need to optimize and speed limits there will be more. Evolutionary algorithms are implemented by means of MATLAB. The fitness function and the limitations are examined by HSPICE, simulation software, and there is a link between the two mentioned software programs for analyzing and optimization. The technology we applied is based on stimulation and it is done as follows: first, the parameters related to the evolutionary algorithms are produced by MATLAB, and they are sent to the circuit simulator HSPICE for optimization and examination. After simulation, these parameters are sent back to MATLAB again so that they are examined by the evolutionary algorithm and then they are optimized. These stages are repeated until we reach the stop point of the algorithm. In Section
The traditional design of analogue circuits [
On the other hand, the function must be written in the closed form, and this may cause the loss of precision and speed. If it could be written in the closed form, this is for one circuit and it is not generalizable.
One of the major limitations in the design of analog circuits is the limited number of parameters that can be investigated. It may be more important when circuit designers want to design circuits with more and more complexity and higher performances and limitations. In many ways a penalty function is used to satisfy these constraints. In these methods, the constrained optimization problem is transformed into an unconstrained one by minimizing the following function [
The results of these methods are depending on the penalty coefficients and may not be very ideal to the designers. The values of penalty coefficients should have logical values because when they have illogical value, the results will produce infeasible solutions. For finding good solution, the designer usually needs to change penalty coefficients for many times.
Researchers now try to find the ability to handle largescale and multiobject design problems. Most of the available methods can deal with about 10–20 variables simultaneously, but analog circuits have many unknown variables.
An appropriate location must be selected as the starting point. These stages are shown in Figure
An overview of circuit evaluation process starting with byte coded representation with fitness score.
In recent years, however, evolutionary algorithms have received lots of attention; see, for instance, [
Ioana Saracut presents an optimization tool for the design of analog circuits with a topology, able to select the best set of passive components values and active devices form within welldefined sets of available values and options. Unlike most of the existing circuit optimization tools, it can search within discrete sets of possible solutions, such as the standard series of values available commercially for passive components and lists of active devices given by the designer [
Xuesong Yan says that a major bottleneck in the evolutionary design of electronic circuits is the problem of scale. This refers to the very fast growth of the number of gates, used in the target circuit, as the number of inputs of the evolved logic function increases. This results in a huge search space that is difficult to explore even with evolutionary techniques. Another related obstacle is the time required to calculate the fitness value of a circuit. Use of the traditional genetic algorithm for electronic circuit optimization design is being trapped easily into a local optimum and the convergence speed is slow. They use PSO algorithm to overcome the shortcomings of GA. By analyzing the testing results of four optimization Benchmarks, they reach the following conclusion: in the optimization speed, the PSO algorithm is more efficient than the GA [
Fakhfakh et al. [
In order to accommodate a larger design space with a higher number of variables, we may use techniques such as neural networks [
These algorithms make use of Darwin’s natural selection principles in order to predict or adapt the pattern. Genetic algorithms are often good options for prediction techniques based on randomness. It is briefly stated that genetic algorithm (GA) is a programming technique which uses genetic evolution as a problemsolving pattern. In GA, each unknown parameter is called a gene and the vector of parameters is called chromosome [
Genetic algorithm flowchart.
Fitness calculation flowchart.
The PSO algorithm is a very important optimization algorithm which is inspired by the group movement of birds (and other animals which live in groups). The response of each particle is stated as the location of a particle which has a velocity to approach the location of its food.
Each particle generally adjusts its velocity toward its food by means of its own location history, the location history of birds in its specific vicinity, the location history of all the birds in search of the food, and the predetermined inertia. The movement of each particle depends on four factors: (1) the present situation of the particle, (2) the best situation the particle has ever had (
The simultaneous application of the evolutionary algorithms can be a way to cover the deficiencies of each algorithm and develop the analysis result. This application can be done in different ways; for instance, a combination of genetic algorithm and PSO is used here. These stages are shown in Figure
PSO algorithm flowchart.
Circuit parameters are the parameters of the optimization problem and make the chromosomes include the transistors size (length and width) and the amount of compensation capacitor. Four key features of the circuit whose optimized values are more influential in the circuit performance are considered as the fitness functions including DC gain (AV), pw (consuming power), bandwidth, and SR (Slew rate). Our objective is to obtain the appropriate values for circuit parameters maximizing values related to dc gain, bandwidth, GB (Gain Bandwidth), and SR and minimizing consuming power simultaneously.
The implementation of the evolutionary algorithms is done in MATLAB and the calculations of the functions are done by HSPICE. In fact, in this part fitness function is calculated and the inputs applied in evolutionary algorithms are provided. The calculation of the functions for parents and children population which is a step of evolutionary algorithms is done as follows.
First variables are read from MATLAB and they are written in the input file of HSPICE (.sp). Then, HSPICE is run, and finally the values of the fitness function are read from the output file of HSPICE (.lis) and they are sent to MATLAB. The first circuit has 900 input parameters and 4 fitness functions (eight transistors and a capacitor
Here we use the three fitness functions and compare the responses obtained and then the best fitness function is introduced. The applied fitness functions are
These functions have been tested in algorithms and the results are listed in the tables for each section separately. In these functions
Several steps are considered in this section. First, the GA and PSO are selected for optimization. The next step is to design a procedure to link them. HSPICE is selected for simulation of electronic circuits and MATLAB is selected for implementation of evolutionary algorithms. The first step was optimization by GA. At each step, the GA is implemented and will attempt to run HSPICE. HSPICE primary inputs are defined in a GA as the starting point. HSPICE processes the input values and generates the output. HSPICE outputs are considered as MATLAB inputs and MATLAB reoptimized the results. The optimization is determined by the parameters specified in the program code. For example, the starting point of the analysis of an analog circuit is obtained manually. After the first step, a series of analysis again is considered as HSPICE input. These steps also were taken for PSO.
The most important decision part is choosing a new technique to optimize the circuits. Each of these methods has already been used separately, but each has its own advantages and disadvantages. Here we decided to adopt an approach that combines the advantages of the methods. In other words, the disadvantage of this method is covered by benefits on the other methods. For example, the GA has more accuracy and less speed and PSO has more speed and less accuracy in convergence. So the proper use of these two methods can provide the best results.Selected fitness function is a milestone in this project. Fitness functions that have been used are given in (
Simultaneous PSO and genetic algorithm flow chart.
When genetic and PSO algorithms are used simultaneously, the population of each swarm is 100 and the number of the swarms is 50. In this state, algorithm precision is
Using various technologies enables us to display the advantages of each method by the software separately and then is considered to be the best choice. If we want to use new technologies in this way it is not needed to make fundamental changes in the program.
A twostage opamp is shown in Figure
Twostage amplifier.
For both circuits in Figures
GB value in each stage that PSO algorithm coefficients are swept.
The main problem after algorithm selection is selecting fitness function. Fitness function mentioned in (
The results of fitness function stimulation in the sum format and 0.6
Specification  Constraint  GA  PSO  PSO 
GA + PSO 

DC gain  5000 




GB (MHz)  5  8.2  25.7  15.98  67.5 

10  1.44  20.7  18.67  56.4 
POWER (mw)  2  0.997  1.17  12  2.02 
FOM 
1.25  59  1609.6  45.5  1315.4 
The results of fitness function stimulation in the sum format and 0.18
Specification  Constraint  GA  PSO  PSO 
GA + PSO 

DC gain  5000 




GB (MHz)  5  6.28  11.8  12.93  62.9 

10  1.41  13  18.5  19.4 
POWER (mw)  2  1.41  1.16  13  1.15 
FOM 
1.25  48.9  715.4  16.1  1011.6 
The results of fitness function stimulation in the multiply format and 0.6
Specification  Constraint  GA  PSO  PSO 
GA + PSO 

DC gain  5000 




GB (MHz)  5  6.3  15.3  12.93  62.9 

10  1.2  16.6  18.5  19.4 
POWER (mw)  2  1.44  1.162  13  1.15 
FOM 
1.25  52.5  767.1  16.1  1011.6 
The results of fitness function stimulation in the multiply format and 0.18
Specification  Constraint  GA  PSO  PSO 
GA + PSO 

DC gain  5000 




GB (MHz)  5  8.18  17.3  15.98  67.5 

10  1.45  20.2  18.67  56.4 
POWER (mw)  2  0.997  1.165  12  2.02 
FOM 
1.25  47.5  1304  45.5  1315.4 
When only PSO algorithm is used and fitness function is in sum format, FOM responses of 0.18
When PSO algorithm coefficients are swept, FOM responses obtained from 0.18
SR value in each stage that PSO algorithm coefficients are swapped.
PW value in each stage that PSO algorithm coefficients are swapped.
When genetic and PSO algorithms are used simultaneously FOM responses of 0.18
GB value in one stage, when PSO algorithm coefficients are selected by genetic algorithm.
SR value in one stage, when PSO algorithm coefficients are selected by genetic algorithm.
Gain value in one stage, when PSO algorithm coefficients are selected by genetic algorithm.
PW value in one stage, when PSO algorithm coefficients are selected by genetic algorithm.
In 0.6
In 0.18
Obviously, when fitness function coefficients are swapped, the response has variation, but when evolutionary algorithms are used in a shared manner, better results are obtained but they are timeconsuming.
A folded cascade amplifier is shown in Figure
Folded cascade opamp.
Here, also fitness function (
The results of fitness function stimulation in the sum format and 0.6
Specification  Constraint  GA  PSO  PSO 
GA + PSO 

DC gain  5000 




GB (MHz)  10  42.11  14  9.924  18.8 

10  10.09  9.732  44.56  10.4 
POWER (mw)  50  27.9  60.77  31.6  27.23 
FOM 
1 




The results of fitness function stimulation in the sum format and 0.18
Specification  Constraint  GA  PSO  PSO 
GA + PSO 

DC gain  5000 




GB (MHz)  10  41.06  62.74  10.37  99.24 

10  10.17  17.06  83.81  44.82 
POWER (mw)  50  26.34  13.43  89.26  31.23 
FOM 
1 




The results of fitness function stimulation in the multiply format and 0.6
Specification  Constraint  GA  PSO  PSO 
GA + PSO 

DC gain  5000 




GB (MHz)  10  40.88  17.7  9.924  18.8 

10  9.73  12.92  44.56  10.4 
POWER (mw)  50  25.42  13.66  31.6  27.23 
FOM 
1 




The results of fitness function stimulation in the multiply format and 0.18
Specification  Constraint  GA  PSO  PSO 
GA + PSO 

DC gain  5000 




GB (MHz)  10  41.0  60.24  10.37  99.24 

10  10.1  18.1  83.81  44.82 
POWER (mw)  50  26.3  25.6  89.26  31.23 
FOM 
1 




SR value in each stage that PSO algorithm coefficients are swapped.
PW value in each stage that PSO algorithm coefficients are swapped.
GB value in one stage, when PSO algorithm coefficients are selected by genetic algorithm.
SR value in one stage, when PSO algorithm coefficients are selected by genetic algorithm.
AV value in one stage, when PSO algorithm coefficients are selected by genetic algorithm.
PW value in one stage, when PSO algorithm coefficients are selected by genetic algorithm.
In the first stage, if we compare 0.6
When only PSO algorithm is used and fitness function is in sum format, FOM responses of 0.18
In 0.6
As it is clear from the figures, when PSO and genetic algorithms are applied simultaneously, the results are approximately convergent after 7 stages which indicate the appropriate selection of fitness function, but when
Using a combination of genetic algorithms and PSO simultaneously gives us the best results compared with using these algorithms separately.
This method is a new look to design and optimize analog electronic circuits that enables users by taking advantage of software to design hardware and reduce the design complexity.
The circuit design has been performed by SPICE simulator. This paper investigated two methods of evolutionary algorithms, namely, genetic algorithm (GA) and PSO algorithm and their combination in order to optimize analogue circuits.
It was shown that combination of both algorithms has better results. Coefficients are based on GA and parameters are optimized by PSO algorithm. The reason for this choice is that the PSO algorithm can converge faster than GA because the number of its operators is less than that of GA. The application of a combination of these two algorithms has the following advantages.
More precision in search space and not being trapped in the local minimum.
Satisfaction of the designer’s desire specifications and its limitations.
Being appropriate for circuits with lots of elements.
Using this method can meet the designer’s specifications for highly constrained problems.
It can be suitable for largescale problems.
Evolutionary algorithm includes a wide class of algorithms inspired from nature and function (such as harmonic search algorithm, ant colony, worms, greedy, and gravity). More diverse set of algorithms can be used for further research in order to select the appropriate method for the design of analog circuits is proposed. Other interesting aspects of this work are (1) the use of real time methods and considering the delay effects [
The authors declare that there is no conflict of interests regarding the publication of this paper.
The research leading to these results has received funding from the PolishNorwegian Research Programme operated by the National Centre for Research and 24 Development under the Norwegian Financial Mechanism 2009–2014 in the frame of Project Contract no. PolNor/200957/47/2013.