Full text
FASY: A Fuzzy-logic based tool for Analog SYnthesis A.Torralba, Member, IEEE, J.Ch´ avez and L.G.Franquelo, Member, IEEE March 1995 Abstract A CAD tool for analog circuit synthesis is presented. This tool, called FASY, uses fuzzy–logic based reasoning to select one topology among a fixed set of alternatives. For the selected topology, a two–phase optimizer sizesallelementsto satisfy theperformance constrainsminimizinga cost function. InFASY, the decisionrulesusedinthetopology selectionprocess areintroducedbyanexpert designeror automatically generated by means of a learning process that uses the optimizer mentioned above. The capability of learning topology selection rules by experience, is unique in FASY. Practical examples demonstrate the tool abilityof this tool to learn topology selectionrulesand to synthesizeanalogcellswith different circuit topologies. 1
1 Introduction Although a great deal of effort has been recently devoted to the development of CAD tools for the automatic design of integrated circuits, most of this effort has been directed to digital design. The design of the analog part of a circuit is still a time–consuming task. This is due to the complex relations that exist between design parameters and circuit performances [1]. Thetypical startingpointofananalogdesign, isacircuit topologyandasetofparametersobtainedfrom thedesigner’sexperience. Then, severalsimulationsandredesigns arecarried outuntilanacceptablecircuit is achieved. This redesign process is a very time–consuming task. In addition, a designer’s experience is required to interpret the results obtained from the simulation and to modify the design parameters in the proper direction. This process has been of practical use while the design of analog cells has been restricted to a reduced number of experts. The increasing demand of application–specific ICs (ASICs) that are entirely or partly analogic, makes necessary the development of CAD tools, which can aid in decreasing the design time, allowing non–experts to design complex analog circuits. Circuit designcan beconsideredasatwo–stepprocess: thedesignerfirstselectsacircuit topologyamong a set of fixed alternatives and then optimizesthe values of circuit parametersto meet a set of specifications. Existing CAD toolshave been mainly focused on the parameter optimizationphase. Early optimization tools used a step–by–stepprocedure previously determined by an expert designer [3]–[4]. The final design may be considered as a starting point for manual parameter adjustment. The following tools converted the optimizationprocess to a minimization problem by the formulation of a cost function. Different techniques have been used to minimize the cost function. An early review of these techniques can be found in [5]. Some recent tools will now briefly be reviewed. TheOPASYNsystem[6]usesthesteepestdescendentmethod. Duetothegreedy natureofthealgorithm, it will normally find a local minimum, so that several trials withrandomly generated startingpointswill be required toassure agood design. The method offeasible directions isusedin DELIGHT.SPICE [7]–[8]. It uses an enhanced version of the simulation program SPICE, to compute circuit performances and sensitivities 2
that are employed during the optimization process. OAC [9] has a two–phase optimizer: during the first phase, a simple optimizationprocedure is applied toan analytical model of the circuit. The second phase is based on the Levenbarg–Marquardt optimizationmethod, and SPICE is used tocompute the costfunction. In [10] NPSOL, a software package for sequential quadratic programming is used. Statistical techniques, such as simulated annealing, can avoid being trapped in a local minimum, so that a solution close to the global minimumwill be found atthe expense ofa high computationalcost [11]–[12]. More recent work can be found in [13]–[16]. The topology selection process usually relies on a designer’s experience. This is a type of knowledge which is very difficult tocapture, as itis entirely qualitativeand even changes from onedesigner to another. Existing tools dealing with the topology selection process, use artificial intelligence techniques. In [17] a rule–based system synthesizesoperational amplifiers from easier components. OPASYN [6] uses heuristic rules to select one among a fixed set of alternatives. BLADES [18] uses a divide and conquer strategy, partitioning the circuit design in smaller taskswhich are solved by subcircuit design modules. OASYS [19] and An Com [20] are frameworks for analog circuit synthesis that rely on a hierarchical representation of circuits. In each hierarchical level, a two–steptopologyselection and translation process is carried out. Fuzzy–logicbasedsystemshave beenspecially proposed todeal with“uncertain” informationand have proved to be very efficient in capturing human expertise [21]–[22]. This makes them good candidates toaid in circuit design. The application of fuzzy logic to the design of ICs has begun to produce excellent results [14],[23]. This paper presents FASY, a design system for analog circuits that uses fuzzy logic in the topology selection process. Afterwards, a two–phase optimizer sizes all the components of the selected topology to minimizeauser–definedcostfunction. Now,FASYiscapableofsynthesizingavarietyofCMOSoperational amplifiers. The paper is organized as follows. Section II describes the general architecture of FASY. The topology selection process is detailed in Section III. Section IV describes the device–sizing optimizer used in FASY and presents some practical designs. Finally, Section V presents some concluding remarks and advances 3
future research. 2 System architecture The block diagram of FASY is shown in figure 1. Two data flows are pointed out in this figure. In the top–down flow (called design flow), FASY acts as a design tool for analog cells. In the bottom-up flow (called learning flow), the topology selection rules are learnt from the experience gained with the optimizer of FASY. In a design with FASY, performance specifications are defined by the designer. Table I shows an example of the specification set for operational amplifiers. The topology selection module uses fuzzy decision rules to select the circuit topologies that best accommodate the set of performance specifications. Selected topologies are displayed along with a grade from 0 to 100, indicating their relative suitability to performance specifications. The designer chooses one of them or allows FASY to choose the highest rated topology. Then, the selected topologyis given to the circuit parameteroptimizer. If the final design is accepted, itisstored inthe FASYdata base. The experience gained withthesesuccessful designscan beused to modify the topologydecision rules. This process is called learning rules process and can be automatically made by means of a backpropagation method that will be later described. 3 Topology selection The process of choosing one topology among a set of fixed circuit topologies is called design style selection [24]. This process directly follows the standard manual design. Designers typically look for a proven technology that is capable of meeting performance specifications. Only in the case that none of the topologies can meetthem, the designer startsthe much more difficult task of designing a new topology. In the topology selection process, FASY uses a rule based system based on fuzzy logic. Since its introduction in the sixtiesby L.A.Zadeh [25], fuzzylogic hasbeen appliedtodifferent engineering fields, such as decision–making, control ofindustrial processes,patternrecognition andclassification[21]–[22],[26]. Fuzzy logic has been specially proposed todeal with “uncertain” information and provides an effective means of 4
capturing the approximate inexact nature of human reasoning. Fuzzy logic variables are defined by means of “non–precise” linguistic terms, such as x is large or very large The process of extracting conclusions from a set of fuzzy antecedents is called fuzzy inference. Fuzzy inference is based on a set of decision rules whose antecedents and consequents are linguistic terms. IF a large gain and a small area is required THEN the suitability of topology1 is large The fuzzy system used in FASY comprises four principal components: A fuzzification interface that converts input data into suitablelinguistic valueswhich may be viewed as fuzzy sets. Fuzzy sets can be seen as a generalization of binary logic, where the binary values are substitutedbya measure oftruthfulness(membership grade) bymeans ofa number in therange [0,1]. FASY employs triangular shaped membership functions to define the linguistic terms of the input variables and singletons to define the linguistic terms of the output variable (figure 3). A knowledge base thatcontains the definition of linguistic terms and a set offuzzy rules which are in theformofifthenrules. A fuzzycontrol rule, such as if( x is A i and y is B i )then( z is C i )isimplemented by a fuzzy implication R i which is defined as follows: R i =[ A i and B i ] ! C i The decision–making logic which employs fuzzy implicationand the rules of inference in fuzzy logic to obtain a fuzzy output. Fuzzy implication in FASY uses the product operation rule. The connective 5
and is implemented by means of the algebraic product. Fuzzy rules are combined by means of the sentence connective also which is implemented in FASY by meansof the algebraic addition. With this selection of parameters of the fuzzy system, an expression for rule i implication is given by: C 0 i =( Y antecedents A i ( x i )) C i = i C i ( 1 ) Figure 4 depicts a graphic interpretation ofthe inference process. A defuzzification interface which yields a nonfuzzy action from the inferred fuzzy output. Defuzzification is carried out through the centroid method, which generates the center of gravity of the membership function of the output set. As the membership functions which define the linguistic terms of the output variable are singletons, the center of gravity of the inferred fuzzy set can be obtained by means of the following expression: y = P m 1 i w i P m 1 i ( 2 ) TheknowledgebaseinFASYcanbedirectlyobtainedfromanexpertdesignerorautomaticallygenerated from the experience gained with earlier designs using the parameter optimizer thatwill be described in the followingsection. TableIIresumesasetofdecisionrulesenteredbyahumanexpertwhenalargeactivearea is allowed. Following these rules, the three basic topologies are adequate when small dc gains and small unity gain frequencies are specified. For small and medium dc gains, the Basic Two Stage (BTS) op.amp. is preferred, while the Folded Cascode OTA op.amp. dominates in the case of large gains and frequencies. Note that these rules are defined using the natural language used by expert designers. Using the rules given and the inference process described above the decision surfaces of figure 5 a are obtained. These figures indicate the relative suitability of each topology to performance specifications, and are used in the topologydecision process. Membership functions offigure 6 have been used toobtain thesurfaces offigure 5. This example has been deliberately made simple sothat the results can be represented assimple decision surfaces. FASY takes into accounts dc gain, bandwidth, active area, load, and also power consumption in 6
the topology decision process. Sometimes the topology decision rules cannot be acquired due to the lack of experience (e.g., in the case of new technology) or due to the existence of conflicting specifications. In those cases, FASY is able to automatically generate the decision rules by means ofneuro–fuzzy techniques. The automatic rules generation process carries out the following steps. The specifications space is clustered in an adequate number of cells, each one representing a set of user specifications. In the case of only two specifications, it leads to rectangular bi–dimensional cells. In the case of n specifications, it leads to n –dimensional cells. For each cell and each possible topology, an optimization process is carried–out using theFASYoptimizer. The final value ofthe costfunction isconsidered asa figure ofmeritoftherelated topologywiththissetofuserspecifications. Itisconvenienttorepeattheoptimizationprocessseveraltimes, starting with randomly generated initial values of the system variables to obtain a result independent of the optimization procedure. Our experience indicates that only five trials give good enough results. Using this method, the decision surfaces of figure 5 b have been obtained. When compared with the decision surfaces of figure 5 a some interesting conclusionscan be drawn. The general behaviour of thesefigures are similar, indicating that the experienced designer had a good qualitative feel for topology selection. There is a difference, whereas figure 5 a represents the approximate reasoning of a human expert, figure 5 b has been obtained as a consequence of an optimization process, and represents precise knowledge of circuit behaviour. Each surface in figure 5 b was built from the results obtained with 100 designs. Technology files were taken from a commercial 1.5 m CMOS process. It took approximately six hours on a 96 MIPs workstationtoobtain the decision surfaces of figure 5 b . Whereas it seems to be a time–consuming task, this process only needs to be carried out once for a given technology. These surfaces can be stored as fuzzy decision rules by means of a learning process based on the backpropagation algorithm, first introduced in [27] for a class of neural networks, and later adapted for fuzzysystems. Ashortdescriptionofthelearningprocessfollows(amoredetaileddescriptioncanbefound elsewhere, e.g. in [29], [28]). 1. Initiate the parameters a ij ;b ij and w j (figure 3). In the absence of any “a priori” knowledge, they can 7
be randomly chosen. 2. Choose an input–outputpair ( x , y d ) from the list to be learnt. x is the input vector and y d the desired output. 3. Compute intermediate values j and the output y corresponding to the input vector x (forward process). 4. Update parameters according to the following equations (backward process): w j = w [ y d ; y ] j (3) a ij = a [ y d ; y ] @y @a ij (4) b ij = b [ y d ; y ] @y @b ij (5) 5. Return to step 2 until E rror = 1 2 X lear ning points ( y d ; y ) 2 < ( 6 ) The derivatives @y=@a ij and @y=@b ij can be obtained using the chain rule. w , a and b are learning rate parameters. Storing decision surfaces as fuzzy rules exhibits someadvantages over a tabular representation. First of all, only a few decision rules are required for surface representation, saving memory. Secondly, fuzzy logic is a structured way for knowledge representation and can be used by expert designers in future designs, and also in the evaluation of new incoming technologies. Finally, storing decision surfaces as fuzzy rules, allows the system to inherit some properties of fuzzy systems such as generalization, that is, the ability to obtain good responseswhen faced with new problems. After thelearning process, the decision surfaces do notsignificantly differ from thesurfaces offigure 5 b . Figure 7showsthedecision surfacesobtained withthe proposed method in the case of a small active area (figure 6 a ) and in the case of a large active area (figure 6 b ). Comparing these figures it can be observed the evolution of the decision surfaces when the specified active area changes. 8
As knowledge is represented by means of the exact shape of a set of membership functions and fuzzy rules, changing from one technologytoanother, only requires replacing them witha new setof membership functions and fuzzy rules, maintaining the structure of the decision making process. NotethatthetechniqueusedinFASYforthetopologyselectionofoperationalamplifierscanalsobeused for other analog cells, and in the selection step of each level of a hierarchical design tool, such as OASYS. As an example, figure 8 shows the decision surfaces obtained with the proposed method for the selection among two topologies of CMOS current mirrors (figure 9), a frequent decision for an analog designer. In this example, decision is made depending on the specified output resistance ( R o ) and the output voltage V MIN . Other factors, such as active area and are also taken into account in the selection process. Once again, note that the surfaces in figure 8 have been obtained as a consequence of an optimization process, and represents precise knowledge of the circuits behavior. These surfaces are stored as fuzzy rules in the data base of FASY and table III shows some examples of the selection carried out by FASY. Using fuzzy logic for topology selection, and the ability to learn decision rules in an automaticway, are characteristics of FASY that are believed to be unique when it is compared with other existing analogCAD tools. 4 Design Optimization The optimizationphaseisaimed atobtainingthesize ofcircuit devices which minimizesa cost function, which depends on user specifications. In FASY the objective function defined in [9] has been selected. f obj = 1 2 N esp X i = 1 f 2 i (7) f i = W i s Err 2 i + 1 W 2 i + Sign i Err i ! (8) Err i = P i ( ~x ) P esp i ; 1 (9) 9
Optimization (Phase I) Specifications Circuit Models Learning Module Data-Base Rules Device and Selection Circuit Topology Fuzzy-based User Selection Optimization (Phase II) Final design User Acceptation Design Experience N Y SPICE Design Flow Learning Flow Figure 1: Block diagram of FASY. 16
a) b) I c) I II Figure 2: Basic op.amp. topologies: a) Basic Two Stage (BTS) op.amp., b) Output Transconductance Amplifier (OTA) and c) Folded Cascode OTA. 17
bij wj Antecedent i Rule j Rule j Consequent aij Figure 3: Membership functions ( ). 18
O O O R1 R2 R3 Membership functions: Scalar inputs : x1 y1 PROD Centroid Defuzzification MEDIUMSMALL LARGE SMALL MEDIUM LARGE Antecedents Consequents Inputs: X1,X2 Output: Y R3 If X1 is MEDIUM and X2 is MEDIUM then Y is MEDIUM 1 2 3 w1 w2 w3 x1 x2Input Vector R2 If X1 is SMALL and X2 is SMALL then Y is LARGE Output y Rules: R1 If X1 is LARGE and X2 is LARGE then Y is SMALL ADD Figure 4: Inference process in FASY. 19
20 30 40 50 60 70 80 90 100 12345678910 0 50 100 AV GB 20 30 40 50 60 70 80 90 100 12345678910 30 40 50 60 70 80 90 AV GB a) BTS b) 20 30 40 50 60 70 80 90 100 12345678910 0 10 20 30 40 50 60 70 80 90 AV GB 20 30 40 50 60 70 80 90 100 12345678910 10 20 30 40 50 60 70 80 90 AV GB a) OTA b) 20 30 40 50 60 70 80 90 100 12345678910 30 40 50 60 70 80 90 AV GB 20 30 40 50 60 70 80 90 100 12345678910 30 40 50 60 70 80 90 AV GB a) Folded Cascode OTA b) Figure 5: Decision surfaces: a) Obtained from a human expert. b) Obtained from the optimizationprocess. 20
VL L M S VS Figure 6: Membership functions used to obtain figure 5. 21
a) b) Figure 7: Superimposed decision surfaces (op.amps). a) Specified active area < 5000 m 2. b) Specified area < 10000 m 2. 22
100% 80% 60% 40% 20% Vmin 0.5 0.4 0.3 0.2 Ro 10000 5500 1000 Simple Cascode Figure 8: Superimposed decision surfaces (current mirrors). (Active area < 5000 m 2, output current I o = 10 A ). 23
a) Simple b) Cascode Figure 9: Basic CMOS current mirrors 24
0 20000 40000 60000 80000 100000 Number of iterations. 0 5 10 Cost Function Mean Values a) 0 5000 10000 15000 20000 25000 30000 35000 Number of attempted movements. 0 5 10 Cost Function Mean Values b) Figure 10: Evolution of the objective function: a) Simulated annealing, b) Proposed method. 25