Fuzzy Controllers CMOS Implementation

3y ago
14 Views
2 Downloads
576.03 KB
8 Pages
Last View : 1m ago
Last Download : 3m ago
Upload by : Laura Ramon
Transcription

Fuzzy Controllers CMOS ImplementationV. VARSHAVSKY 1, V. MARAKHOVSKY2, I. LEVIN3, N. KRAVCHENKO41Advanced Logic Projects Inc., JAPAN,2The University of Aizu, JAPAN3,4Bar Ilan University, ISRAELAbstract: - The subject of the study is hardware design of fuzzy controllers as CMOS analogdevices on the base of controller descriptions in the view of multi-valued logical functions. Afunctional completeness of summing amplifier with saturation in an arbitrary-valued logic is proventhat gives a theoretical background for analog implementation of fuzzy devices. Compared with thetraditional approach based on explicit fuzzification, fuzzy inference, and defuzzification proceduresanalog fuzzy implementation has the advantages of higher speed, lower power consumption,smaller die area and more. The paper illustrates a design example for real industrial fuzzy controllerand provides SPICE simulation results of its functioning.Key-Words: - Fuzzy Logic, Fuzzy Controller, Multi-Valued Logic Functions, FunctionalCompleteness, Summing Amplifier with Saturation.1 IntroductionWide spread of the fuzzy control and higheffectiveness of its applications in a grateextend is determined by formalizationopportunities of designer “fuzzy” (flexible”)representations about necessary behavior of acontroller. These representations usually areformulated in the view of logical (fuzzy) rulesunder linguistic variables of a type “If A thenB”. The linguistic variables themselves arequality characteristics of input signals of types“warm”, “cool”, “high”, “low”, “fast”, “slow”and so on.As a rule, or at least in a grate part ofapplications, a fuzzy controller is atransformer of input analog signals into ananalog output signal.A linguistic variable is a “subjective”characteristic of an input analog variable andthe input variable transformation is given bymembership functions determining for eachvalue of the input variable the set of weightedvalues corresponding linguistic variables. Thisprocedure is called a fuzzification and itcontains as its composite part the analogdigital transformation.A set of combinations of weighted linguisticvariables corresponds to each valuecombination of input analog variables. On thebase of a fuzzy rules system and of fuzzyinference rules it is possible to receive the setof weighted values of the output linguisticvariable. Using these values, membershipfunctions of the output variable, and one of theseveral known methods of defuzzification it ispossible to form the value of the analog outputvariable. The defuzzification procedure alsoincludes digital-analog transformation.At present the most wide-spread way offuzzy logic control implementation is usingthe programmable fuzzy controllers, which areavailable on the market together with themeans of computer aided programming.However, in spite of the implementationevidence and fuzzy controllers’ accessibilitythis approach to implementation possessessome disadvantages, e.g. such as high cost andlow throughput (that is especially importantwhen fuzzy control in the control contour isused) etc.In this work we are going to show that for asufficient wide set of problems a fuzzycontroller can be implemented as a rathersimple CMOS device that is used as embeddedsystem or IP core. That is the basic idea of oursuggestion?

A fuzzy controller is a deterministic device,for which one and only one value of the outputanalog variable corresponds to each valuecombination of the input analog variables. Itmeans that the fuzzy controller should realizean analog function Y f ( x1 , x 2 ,., x n ) 1.There are two important questions:1. How to transit from standard specificationof a fuzzy logic function to the specification ofcorresponding analog function?2. How to transit from an analog on of a fuzzy logic function tocorresponding CMOS implementation?First of all, let us address to membershipfunctions. In most cases [1 – 3], membershipfunctions have a triangle or trapeze view (seefig.1).representation of the output linguistic variableon chosen value combinations of multi-valuedinput variables.In [4 – 6] we have shown that the analogthreshold function having the fallowing viewn if ω j x j k kj 1 n ny( X ) ω j x j if k ω j x j -k (1)j 1 j 1 n kif ω j x j k j 1conforms together with constants afunctionally complete system in the (2k 1)valued logic. This function can beimplemented on the base of summingamplifier with saturation [5].α1A BCDEFGTFigure 1. Types of membership functions.In fig.1 linguistic points A and B are “cold”,C – “fresh”, D and E – “worm”, F and G –“hot”. These points determine the connectionof the linguistic variables with values of theanalog variable T (in our case T istemperature). Relatively these points andsimilar points for other input variables we cancompose a table of fuzzy rules connectingvalue combinations of input linguisticvariables with values of the output linguisticvariable.On the base of membership functions wecan put into accordance to the input and outputlinguistic variables a set of integer numberssplitting by appropriate way all diapason ofchanging of corresponding analog variables.Then the table of fuzzy rules will to determineby obvious way the function of multi-valuedlogic, values of which define the digit1We shall notice that in suppressing majority ofpublications on fuzzy controllers this function isgiven as a response surface and practically withoutexception this surface has a piece-linear view.2 Summing Amplifier as a MultiValued Logical ElementSumming amplifier’s behavior, accurate to themembers of the infinitesimal order that isdetermined by the amplifier’s gain factor indisconnected condition (fig.2), is described asfollows:n RVVif 0 (V j dd ) dd Vdd22j 1 R j n VRVVout dd 0 (V j dd ) in other cases (2)2 2 j 1 R jn VRVif dd 0 (V j dd ) 022 j 1 R jwhere Vdd – the supply voltage, V j – thevoltage on jth input, R j – the resistance of jthinput, R0 – the feedback resistance, and Vdd/2– the midpoint of the supply voltage.nDependence of Vout onR0 Rj 1j (V j Vdd) is2shown in fig.3,a.Let us split the source voltage Vdd on m 2k 1 voltage levels. Then replacing the inputvoltages V j by m-valued logical variables

xj 2 V j Vdd k and the output voltage VoutVddby m-valued variable y and designatingR0 / R j ω j the system (2) can be representedas (1). Graphical view of (1) is shown infig.3,b.Figure 2. Summing amplifier: generalstructure (a); CMOS implementation usingsymmetrical invertors (b).arbitrary-valued logic, if any function of thislogic can be represented as superposition ofbasic operations.There are some known functionallycompleted sets of functions. It is clear, that forproving functional completeness of some newfunction it is sufficient to show that thefunctions of the known functionally completedset can be represented as superposition of theconsidered function. One of functionallycompleted functions in m-valued logic is theWebb’s function [7]:w( x, y ) [max( x, y ) 1]mod m .(3)Therefore,forprovingfunctionalcompleteness of threshold operation in multivalued logic it is sufficient to show how theWebb’s function can be represented throughthis operation.First, let us represent the functionmax( x1 , x 2 ) by threshold functions. To do thislet us consider the function f a ( x ) diagram,such as af a ( x ) max( x, a ) xVouta)Vddifa xifx a.(4)This function diagram is shown in fig.4,a.ya)kfa (x)Vdd / 2 Vdd / 2nj 1b)R0 R(V j jVdd)2ak-kx-kn ω xjjj 1 kk kFigure 3. Summing amplifier’s behavior:within voltage coordinates (a); within multivalued variables coordinates (b).Later on, we will call the functionalelement, whose behavior is determined by thesystem (1), a multi-valued threshold element.In the simplest case when ω j 1, j 1, 2, 3 , wewill call it the majority element and designateas maj ( x1 , x 2 , x3 ) .The basic operation (or set of basicoperations) is called functionally completed inakykyb)ak-kx-k-maj(x,-a,-k)aFigure 4. Diagrams of f a (x ) (a) and maj ( x, a , k ) (b) functions.The maj ( x, a, k ) function diagram isshown in fig.4,b. Actually, as far as x ax a k k and maj( x, a, k ) k . Notethat for all x values,f a ( x ) maj ( x, a, k ) a kas it follows from fig.4, hencef a ( x ) maj[maj ( x, a, k ), a, k ] .(5)Taking into consideration that maj ( a, b, c) maj ( a , b, c ) , it follows from (5) thatmax( x1 , x 2 ) maj(maj( x1 , x 2 , k ), x 2 , k ) . (6)

a)yb)k-1yk-1x1-kc)yxϕ 1 ( x ) maj ( x,1,0)d)k-1yx1-kk-1x1-kϕ 2 ( x ) maj ( x,1 k , k igure 6. Fuzzy device structure.1-k( x 1) mod mXanalogFuzzifierNow let us consider the function ( x 1) mod mrepresentation by threshold functions. Tomake it clear let us turn to the sequence ofpictures fig.5.ϕ 3 ( x ) k maj (ϕ 2 ( x ), k ,0)Figure 5. Implementation of( x 1) mod m function.From fig.5 it is easy to see that( x 1) mod m ϕ 1 ( x ) 2ϕ 3 ( x )and obviously, this function can beimplemented on threshold elements too.Hence, the functional completeness of thesumming amplifier in arbitrary-valued logic isshown.It is naturally that the proof procedure offunctional completeness does not giveinformation about methods of effectivesynthesis. The methods of synthesizingcircuits in the proposed base are to bedeveloped in future. However, as it will beshown below, for a number of real circuits theproposed base allows designing simple andefficient circuits.3 Fuzzy Devices as Multi-Valuedand Analog CircuitsConventional implementation of fuzzy devicesusually has the structure shown in fig.6.Analog variables X {x1 , x 2 ,., x n } go thefuzzy device input. Fuzzifier converts a set ofanalog variables x j into that of weightedlinguistic (digital) variables A {a1 , a 2 ,., a n } .Fuzzy Inference block based on the fuzzyrules generates a set of weighted linguisticvariables values B {b1 , b2 ,., bk } .Defuzzifier converts a set of weightedlinguistic (digital) variables B {b1 , b2 ,., bk }into a set of output analog variablesY { y1 , y 2 ,., y k } .As a rule, fuzzifier and defuzzifier areimplemented as AD and DA (analog-digitaland digital-analog) converters, i.e. byhardware implementation. Fuzzy inference isusually implemented as microprocessorsoftware.On the other hand, there is the set of outputanalog variables, which values unambiguouslycorresponds to each set of input analogvariable values; hence a fuzzy device could bespecified as a functional analog of signalconverterY ( X ) { y1 ( X ), y 2 ( X ),., y k ( X )}and its output Y determines a system of ndimensional surfaces. In cases of sufficientsimple membership functions (in knownpublications such functions are in majority),for fuzzy controller implementations as analogdevices it is sufficient to provide a piecewiselinear connection between a couples of pointscalculated as adjacent values of a multi-valuedlogic function.Let m 2k 1 linguistic variable aj valuescorrespond to analog variable xj. Then basingon fuzzy rules system, we can specify asystem of m-valued logic functions, asfollows:B ( a1 , a 2 ,.a n ) {b1 ( A), b2 ( A),., bk ( A)} . (7)Note that most publications describing fuzzycontrollers contain the tables, specifying fuzzycontrollers’ behavior as (7).Let us consider an example. This example istaken from [9]: “Design of a Rule-BasedFuzzy Controller for the Pitch Axis of anUnmanned Research Vehicle”.

The fuzzy control rules for the considereddevice depend on the error valueand changing of errore ref outputold e new e. Fuzzifier brings sevence sampling periodlevels for each of input linguistic variables(NB – negative big; NM – negative middle;NS – negative small; ZO – zero; PS – positivesmall; PM – positive middle; PB – positivebig). The output has the same sevengradations. The corresponding 49 fuzzy rulesare represented in Table 1.Table 1Table of Fuzzy Rules.Vout Vdd Vin corresponds to it in the spaceof summing amplifiers’ output voltages. ThusCMOS circuit containing 12 transistors and 5resistors, which implements our function, isshown in fig.8.Output321-6-5 -4-3 -2e-ce-11-123456-2-3Figure 7. Graphical representation of thefunction specified by table MNBNBNBNMNSZOPSPBNBNBNBNBNMNSZOLet us split evenly the source voltage (e.g.3.5V) onto seven logical levels correspondingto linguistic levels. Then table 2 will representtable 1 as the function of seven-valued logic.The Seven-Valued Function. Table -2-3-303210-1-2-3133210-1-22333210-133333210Figure 8. CMOS implementation of the fuzzycontroller specified by table 2.4 Example of a Fuzzy ControllerHardware ImplementationLet us consider a demo procedure of a realfuzzy controller design as an analog hardwaredevice. The description of the controller istaken from [9]. It provides controlling of a carseat and able to perform subtle attitude controlwithout giving an unpleasant feeling topassengers.The initial fuzzy controller specification isshown in table 3.Table of specification. Table 3VIt is seen from table 2 that the function issymmetric with respect to “North-West –South-East” diagonal and depends on e ce .This kind of dependence is shown in fig.7.It apparently follows from comparison offig.3 and fig.7 that in order to reproduce thefunction specified by table 2 it is sufficient tohave one two-input summing amplifier andone inverter.Note that inversion of logic variables lyingwithin k k interval is the operation ofdiametric negation x x ; the PSPSPSZRPSPMPMPLZRPMPMPMPLThis table has three input variables: X – angleof steering wheel rotation, dX derivativefrom X, and V – car velocity. Let linguisticvalues of the variables correspond to thevoltages completely located in the interval 0–3.5V as it is shown in table 4.

VCorrespondence linguisticvariable values to voltages.XZR 0dXZR 0VOutputTable 4RM 1.75VRL 3.5VZR 0PM (3.5/3)VPL (7/3)VPVL 3.5VZR 0PS (3.5/3)VPM (7/3)VPL 3.5VPL 3.5VLet us split evenly the voltage interval 0 –3.5V onto 7 logical levels, designate theselevels with integer numbers from -3 to 3, andtransform table 3 into table 5 substitutinglinguistic values of the variable withcorresponding logical values.Multi-valued logical function F. Table 31113For value combinations of the inputvariables, which are absent in the table 5 (i.e.,for situations which are not defined by fuzzyrules), values of the output function can besupplementary defined up to any acceptedvalues.Now let us present the table 5 in the formof decomposition:if dX 3( ZR) then F F1 ( X ,V ) elseF F1 ( X ,V ) This decomposition provides piece-linearapproximation of F on the interval of dXchanging from -3 to 3 and when dX 3,F F2 ( X , V ) . Definitions of the residualfunctions F1 (θ ,V ) and F2 (θ ,V ) are given infig.9 and fig.10 3-3-3-3-3-3-3-1-3-3-3-3-3-1-1-3 -3-3 -3-3 -3-3 -1-1 -1-1 11 1-3-3-3-3-113-3-1330002 . 03 -1-3-3-3-3-3-3-3-3-3-3-3-3-3-1-3-3-3-1-3-1-1F3 00030000003000-3 -3 -3 -3-3 -3 -3 -1-3 -3 -1 -1-3 -1 -1 1-1 -1 1 1-1 1 1 11 1 1 1 F2000333300033330003333 -3-3-3-1-1-11-3-3-31133-3 -3-3 -1-1 -11 33 33 33 3Figure 10. Description of the residualfunction F2 ( X , V ) .As it is seen from fig.9, F1 ( X ,V ) can besupplementary defined up to a symmetricalfunction with respect to its arguments andreduced to the function of one variable( X V ) with the graph shown in fig.11.3F1 ( X V )211-3-2-1023(X V ) / 2-13 dX( F2 ( X ,V ) F1 ( X ,V )).6VXF1-3-3 -3-3 -1-1 -1-1 11 11 11 1Figure 9. Description of the residualfunction F1 ( X , V ) .-2-3Figure 11. The function F1 ( X V ) .This function has two zones of changing thevalues and can be implemented on threeamplifiers. Reallyβ1 S (6 X 6 V 3),β 2 S (6 X 6 V 15),F1 S ( 13 β 1 13 β 2 1),where S is a function implemented by onesumming amplifier.From fig.10 it is possible to see that theresidual function F2 ( X ,V ) can be presented asa sum of the same symmetrical functionF1 ( X ,V ) and 23 of the correcting functionF3 ( X , V ) :F2 ( X ,V ) F1 ( X ,V ) 23 F3 ( X ,V ) .

Let us split the matrix of the correctingfunction F3 ( X , V ) on two sub-matrixes:F3F4F50000000 0000000 00000000000000 0000000 00000000000000 0000000 0000000 .0 0 33333 0 033333 00 0 00 000 0 00 333 0 00 00 0 0 00 0 03330 0 00 333 0 00 00 0 0 00 0 03330 0 00 333 0 00 00 0 0 00 0 0333It is obvious that F3 F4 F5 . The functionF4 can be defined in the form of the rule 1:If ( X 0) & (V 1) then F4 3 else F4 0 .As it is not difficult to check that this rule canbe implemented on five summing amplifiers:β 3 ( X ) S (6 X 3),β 4 ( X ) S ( 6 X 3),β 5 (V ) S ( 6V 9),γ 1 ( X ,Y ) S [ 12 ( β 3 ( X ) β 4 ( X ) β 5 (V ) 9)] ,F4 ( X ,V ) S [γ 1 ( X ,V ) 3] .The function F5 is determined by thefollowing rule 2:If ( X 1) & (V 1) then F5 3 else F5 0 ,which can be implemented using foursumming amplifiers:β 6 ( X ) S ( 6 X 3) ,β 7 (V ) S (6V 3) ,γ 2 ( X ,V ) S [ 12 ( β 6 ( X ) 3) 12 ( β 7 (V ) 3)],F5 ( X ,V ) S [γ 2 ( X ,V ) 12 ( β 7 (V ) 3)] .This implementation provides piecewise-linearcoupling the function F5 with the function F4by the coordinate X on the interval 0,1 .The output amplifiers of the circuitsimplementing the function F4 and F5 can becombined to get the implementation of thefunction F3 :The implementation of the rule 3 can has aview:β 8 S [ 12 ( dX 3)], β 8 S ( β 8 ) ,γ 3 ( X ,V ) S ( β 8 F3 ( X ,Y )),γ 4 ( X ,V ) S ( β 8 F3 ( X , Y )),S [ (γ 3 ( X ,V ) γ 4 ( X ,V ) F3 ( X ,V ))] .23This implementation demands five summingamplifiers and its output amplifier can becombined with the output amplifier of the F1implementation to produce the output signal ofthe controller:F F1 ( X V ) S [ 23 (γ 3 ( X ,V ) γ 4 ( X ,V ) F3 ( X ,V ))] S [ 13 ( β 1 β 2 3) 23 (γ 3 ( X ,V ) γ 4 ( X ,V ) F3 ( X ,V ))].The final controller implementation circuit isshown in fig.12.X0VS (γ 1 ( X ,V ) 3 γ 2 ( X ,V ) ( β 8 (V ) 3)) S (γ 1 ( X ,V ) γ 2 ( X ,V ) 12 β 8 (V ) 23 ).Now we are able to present the controlleroutput value in the form:F F1 ( X V ) (rule 3)where rule 3 isif dX 3 then 23 F3 ( X,V ) else ( dX -3) 0.β1S2β2S3β86610dX1/21/20S41β8S5 PWR-11S7-X111γ4S6 β5S13β663061PWRF3 ( X ,V ) F4 ( X ,V ) F5 ( X ,V ) 12S1661S1461β7S121/21/23/21/2S15 γ1/211/2γ1S16111/21/2F320Figure 12. The controller implementation.In this implementation the elements S7 andS8 are used for inverting signs of thearguments X and V.Functioning of the controller has beenchecked with SPICE simulation (MSIM 8).MOSIS BSIM3v3.1, 7 level models of 0.4µm

transistors has been used. The source voltagein the experiments was 3.5V.Results of SPICE simulation of the circuit infig.12 are represented in fig.13. In this figurethe response surfaces in the coordinates X, Vare shown for the cases dX 0V (fig.13,a) anddX 3.5V (fig.13,b).synthesizing circuits in the offered base.Though the given examples show possiblehigh efficiency and effectiveness of theimplementation offered this is true only inregard to specific examples, chosen in specialway.Techniques of synthesizing fuzzy devices inthe offered base and the problems ofimplementability under the conditions of realproduction should be resolved on further workstages.References:Figure 13. The response surfaces for the casesdX 0V (a) and dX 3.5V (b).SPICE simulation results confirm logicalcorrectness of the controller behavior.5 ConclusionsIn the above examples of cont

Fuzzy Controllers CMOS Implementation V. VARSHAVSKY 1, V. MARAKHOVSKY2, I. LEVIN3, N. KRAVCHENKO4 1 Advanced Logic Projects Inc., JAPAN, 2 The University of Aizu, JAPAN 3,4 Bar Ilan University, ISRAEL Abstract: - The subject of the study is hardware design of fuzzy controllers as CMOS analog devices on the base of controller descriptions in the view of multi-valued logical functions.

Related Documents:

ing fuzzy sets, fuzzy logic, and fuzzy inference. Fuzzy rules play a key role in representing expert control/modeling knowledge and experience and in linking the input variables of fuzzy controllers/models to output variable (or variables). Two major types of fuzzy rules exist, namely, Mamdani fuzzy rules and Takagi-Sugeno (TS, for short) fuzzy .

fuzzy controller that uses an adaptive neuro-fuzzy inference system. Fuzzy Inference system (FIS) is a popular computing framework and is based on the concept of fuzzy set theories, fuzzy if and then rules, and fuzzy reasoning. 1.2 LITERATURE REVIEW: Implementation of fuzzy logic technology for the development of sophisticated

Different types of fuzzy sets [17] are defined in order to clear the vagueness of the existing problems. D.Dubois and H.Prade has defined fuzzy number as a fuzzy subset of real line [8]. In literature, many type of fuzzy numbers like triangular fuzzy number, trapezoidal fuzzy number, pentagonal fuzzy number,

Fuzzy Logic IJCAI2018 Tutorial 1. Crisp set vs. Fuzzy set A traditional crisp set A fuzzy set 2. . A possible fuzzy set short 10. Example II : Fuzzy set 0 1 5ft 11ins 7 ft height . Fuzzy logic begins by borrowing notions from crisp logic, just as

of fuzzy numbers are triangular and trapezoidal. Fuzzy numbers have a better capability of handling vagueness than the classical fuzzy set. Making use of the concept of fuzzy numbers, Chen and Hwang [9] developed fuzzy Technique for Order of Preference by Similarity to Ideal Solution (TOPSIS) based on trapezoidal fuzzy numbers.

ii. Fuzzy rule base: in the rule base, the if-then rules are fuzzy rules. iii. Fuzzy inference engine: produces a map of the fuzzy set in the space entering the fuzzy set and in the space leaving the fuzzy set, according to the rules if-then. iv. Defuzzification: making something nonfuzzy [Xia et al., 2007] (Figure 5). PROPOSED METHOD

2D Membership functions : Binary fuzzy relations (Binary) fuzzy relations are fuzzy sets A B which map each element in A B to a membership grade between 0 and 1 (both inclusive). Note that a membership function of a binary fuzzy relation can be depicted with a 3D plot. (, )xy P Important: Binary fuzzy relations are fuzzy sets with two dimensional

PHP MySQL vs. Unity Introduction When using the Unity game engine, there are methods to connect your game to a MySQL database over the internet. The easiest way is to use JavaScript and PHP, especially for people with a more artistic approach because it is better to have a more basic approach to coding, instead of wasting a lot of time learning some strange programming language. But, - yes .