A fuzzy logic electronic controller and associated method for setting up memories thereof

Abstract: A fuzzy logic electronic controller whereby predetermined membership functions µ(x) of logic (X) variables are subjected to so-called inference operations configured essentially as IF-THEN rules with at least one front preposition and at least one rear implication, and being of a kind which comprises an input or fuzzyfier section having a plurality of inputs for analog or digital signals, a central control unit or fuzzy controller core placed after said input section and being provided with memories, and an output section or defuzzyfier connected after the central unit to convert the results of the inference operations back to analog or digital signals, comprises: a plurality of fuzzyfiers (10) being disposed in parallel within said input section (3) and each led to a pair of analog and digital inputs (I iA ,I iD ), a plurality of storage modules (7) corresponding in number to said fuzzyfiers (10) and containing data of the front (IF) prepositions only of said rules, a fuzzy controller inference unit (11) active in the central control unit (5) to carry out logic operations based on said inference rules of the fuzzy logic by extracting data from said memories (7) through an interfacing circuit (9), and an additional memory (13) connected between the fuzzy controller inference unit (11) and the defuzzyfier (15) and adapted to contain data pertaining to the rear (THEN) implications only of said inference rules.

Description: This invention relates to a fuzzy logic electronic controller and associated method for setting up memories thereof. More particularly, the invention relates to a fuzzy logic electronic controller whereby predetermined membership functions µ(x) of logic (X) variables are subjected to so-called inference operations configured essentially as IF-THEN rules with at least one front preposition and at least one rear implication, and being of a kind which comprises an input or fuzzyfier section having a plurality of inputs for analog or digital signals, a central control unit or fuzzy controller core placed after said input section and being provided with memories, and an output section or defuzzyfier connected after the central unit to convert the results of the inference operations back to analog or digital signals. The field of application of this invention pertains to the development of artificial intelligence and in particular to electronic data processing means based on a logic of the so-called fuzzy type. Fuzzy logic is winning acceptance as a technique which can provide solutions to a wide range of control problems in connection wherewith conventional techniques, such as those based on boolean logic, have proved unable to achieve acceptable levels of performance for a moderate cost. Until now, however, fuzzy logic applications have suffered limitations from lack of dedicated computation devices. These limitations are brought about especially by that conventional electronic means, based on totally different information handling techniques and concepts, hardly suit effective operation in the fuzzy computation mode. For a better understanding of the invention aspects, the two main methods of representing and modelling reality, i.e. the mathematical model types which can be used to define the terms of a given problem to be solved, ought to be reviewed next. Specifically, these are the methods which are commonly employed to find a solution to problems through electronic computation means. A first method provides a numerical/analytical description of reality, and is widely used for scientific and engineering applications wherever all the terms of a problem to be solved can be effectively located. This method has deeply influenced the architecture of current data processing means, but hardly suits cases where the aspects of a problem are hazy, i.e. difficult to locate, as in applications relating to artificial intelligence, for example. In such circumstances a modelling technique has shown to be more effective which can provide a quantitative/qualitative description of the problem awaiting solution, and it is indeed the fuzzy logic that provides here a body of rules for handling those sets of problems which present themselves in uncertain and imprecise frames as are typical of most human activities. In other words, fuzzy logic provides a method of modelling the "vague" mental processes typical of human reasoning, which processes play, however, a vital role in the very capability of humans to make decisions under conditions of uncertainty. More specifically, fuzzy logic operates on a linguistic description of reality using a particular class of variables, referred to as language variables. The values of such variables may consist, for example, of words or statements for use in modelling a given problem. Further, each variable may be associated syntactically with a set of values being dependent on it and capable of taking different meanings to suit the context in which they are used. Such values are obtained from a primary term which represents the variable, an antonym thereof, and a series of so-called primary term modifiers. Let us assume, by way of example, that the "temperature" name or notion be defined as a language X variable; also, let us pick up, for the primary term of the X variable, the word "cold" and define "hot" for its antonym. To the primary term may also be attached a series of so-called modifiers, such as "not", "very", "less", etc. (i.e., "not cold", "very cold", "less cold", etc.) to complete the set of values of the variable, even if in a non-univocal or uncertain way, but adequate for the purposes of fuzzy logic. Moreover, each value assigned to a language variable is represented by a so-called fuzzy set, that is a stochastic distribution function which ties each value of the variable to a point into the universe of discourse in the 0,1 range. Those functions which identify a fuzzy set in the universe of discourse of a variable are referred to as membership functions µ(x). For example, a value of µ(x)=0 would be indicative that the point x is not member of the fuzzy set identified by the µ function, on the contrary, a value of µ(x)=1 would indicate that x is definitely a member of the fuzzy set. The aggregate of all the fuzzy sets of a language variable is called term set; in addition, appropriate operations to define the rules for fuzzy computation are carried out on the membership functions. Two different types of representations are possible with the membership functions: analytical or vectorial. The former is a function of the universe of discourse and enables so-called mapping of that universe within a 0-1 range of values. The latter is a vectorial sample representation of the membership function which is obtained by splitting the universe of discourse into N segments, and the 0,1 range into L levels. Between the membership functions, logic operations, known as inference operations, may be performed as explained hereinafter. Meanwhile, it matters to observe that the electronic data processing means used to carry out such operations should be a specific architecture dedicated to the body of inference operations that make up the computational model in the fuzzy logic. A fuzzy computation dedicated means may be currently implemented by two different technologies: a so-called hybrid or analog/digital one, and an expressly digital one. The choice of either technologies strongly affects the representation types whereby the membership functions can be formalized. Therefore, with a hybrid technology, membership functions can only be represented in a vectorial way, and the vector components are voltage and/or current values representing so-called levels of truth. The vertical space is then segmented into an L number of levels according to requirements, while the universe of discourse is determined at the designing stage. This technology has been developed by the FLSI (Fuzzy Logic System Institute) headed by Professor Yamakawa, and is described, for instance, in a publication entitled "Intrinsic Fuzzy Electronic Circuits for Sixth Generation Computer", published by M.M. Gupta & T. Yamakawa in 1988. On the other hand, the digital technology allows representation of the membership functions both in vectorial and analytical forms. In the instance of analytical representation, there are two formalization methods of which one consists of providing just some notable points of a function, specifically those where the function changes its gradient. The fuzzy device is delegated to join such points in order for it to proceed properly through the fuzzy computation. An example of that device is provided by a machine from OMRON Corporation designated FP-3000 for which an operation manual entitled "Digital Fuzzy Processor-Controller Series" is available. Among the benefits of this approach is the high precision with which the universe of discourse of the various functions can be segmented both in the horizontal plane and the vertical. But there are some disadvantages as well, originating from the low flexibility afforded in describing the membership functions. For example, in the above case, there can be just four inflection points at most, which necessarely must carry truth values of 0 or 1. The second-mentioned method of formalizing the analytical approach consists of providing the equations that describe the membership function in its domain. In this case, higher flexibility is achieved in defining such functions. However, with either of these analytical methods, the fuzzy computation is carried out by a purely numerical approach, which has very unfavorable effects at computation level. Considering now the digital technology which uses the vectorial representation of the membership functions, it distinguishes itself primarily by that the vertical axis representation of a given level of truth involves of necessity the use of a number of bits dependent on the target degree of accuracy. The advantages of this technology most definitely include extreme computational simplicity in carrying out the computation operations, i.e. the fuzzy inferences. An example of such an embodiment is described in an article "A VLSI Fuzzy Logic Controller with Reconfigurable, Cascadable Architecture" by H. Watanabe on IEEE Journal of Solid-State Circuits, Vol. 25, No. 2, April 1990. An architecture for performing a product operation in place of a MIN operation of the result of an inference operation in an antecedent part and a membership function in a consequent part is disclosed in the earlier European Patent application 92 830 604.2 having the priority date of 27.11.91 and published as EP-A- 0 392 494, wherein a plurality of defuzzyfiers is provided within the input section. Document EP-A- 0 544 629 discloses a separated storage of the front prepositions and of the rear implications of the IF.THEN rule into two different portions of the same memory module of a plurality of memory modules. The present invention relates to a novel controller architecture within the frame of the last-mentioned technology. The underlying technical problem of this invention is to provide a controller architecture which has such constructional and performance features as to enable the fuzzy logic computation problems to be addressed in a significantly shorter time and with less computing operations, thereby to overcome the drawbacks with which prior art solutions are beset. The solutive idea on which the invention stands is one of providing a particular setup for the memory associated with the controller, so that data acquisition and storing can make the computing procedures for the inference operations simpler. This technical problem is solved by a controller as indicated above and defined by the characterizing part of Claim 1. The technical problem is also solved by a method of setting up the controller memories as defined in Claim 8. The features and advantages of a controller according to this invention will become apparent from the following detailed description of an embodiment thereof, given by way of illustration and not of limitation with reference to the accompanying drawings. In the drawings: Figure 1 is a general view showing schematically a controller embodying this invention; Figure 2 is a schematic detail view of the controller shown in Figure 1; Figure 3 is a detail view of the item shown in Figure 2; Figure 4 is a schematic view of a central unit of the controller shown in Figure 1; Figure 5 is a diagramatic view of some storage modules incorporated to the architecture depicted in Figure 1; Figure 6 illustrates diagramatically the data setup in the memories of Figure 5; Figure 7 is a diagramatic view of a further storage module incorporated to the architecture in Figure 1; Figure 8 shows schematically a computation circuit incorporated to the central unit of Figure 4; Figure 9 is a schematic view of a control unit incorporated to the central unit of Figure 4; Figure 10 shows in schematic form a detail of the control unit in Figure 9; Figure 12 is a schematic detail of the controller in Figure 1; Figures 13 and 14 show respective graphics representing logic operations performed, according to the fuzzy logic, on the inventive controller; and Figure 15 is a detail view showing schematically the internal structure of the storage module in Figure 7. With reference to the drawing views, generally and schematically shown at 1 is an electronic controller embodying this invention. This controller 1 is intended for looped operation as a stand-alone machine, and is designed to operate in the fuzzy logic mode. More specifically, this means that the fuzzy controller is a machine receiving input signals related to physical control variables, such as analog or digital signals from sensors, and performing predetermined, fuzzy logic inference operations, to provide output control signals. For that purpose, the controller 1 is provided with a plurality S of analog inputs I 1A ,...,I SA and a like number of digital inputs I 1D ,...,I SD , orderly coupled to the former. Such inputs are adapted to receive signals related to physical control variables, such as analog or digital signals from external sensors. Each generic and i-th input pair, I iA and I iD , are terminated in a corresponding convert device or fuzzyfier 10, shown in Figures 2 and 3, effective to convert an input signal to logic information of the fuzzy type, that is a so-called membership function µ(x). A cluster of n devices 10 in parallel to one another define an input and convertion section 3 of the controller 1 as shown in Figure 2. In a preferred embodiment, this section 3 comprises four fuzzyfiers 10 which allow four control signals, whether analog or digital in nature, to be input at one time. However, section 3 could accommodate a greater number of the fuzzyfiers 10, dependent on the required interfacing with the outside circuitry. The controller 1 further comprises a central unit or fuzzy controller core 5, wherein the fuzzy logic membership functions µ(x) are stored and the fuzzy logic computation is performed. The architecture of controller 1 is completed by a drive output section or defuzzyfier 15, which provides an appropriate interface between the controller 1 and the outside circuitry to drive, for example, an actuator by converting fuzzy information to an analog or digital electric signal. A number T of control outputs O 1D ,O 1A ,...O TD ,O TA are provided in this respect for both digital and analog signals. Also, a value of 1 is preferred for T. It is noteworthy at this point that, when analyzed at a high level, the fuzzy logic is configured as a body of IF-THEN rules applied to the membership functions µ(x) of a logic variable X, such as IF (A is A1) and (B is B1) THEN (C is C1) and (D is D1) where A and B are the input values, A1, B1, C1 and D1 are membership functions µ(x) representing the system knowledge, and C and D are the output values. That part of the rules which comes before THEN is referred to as IF or front part, and that which comes after THEN is referred to as THEN or rear part of the inference rule. Among the applicable inference rules to the membership functions of fuzzy variables, a so-called weight function α can be defined which is indicative of how well the input prepositions (A,B) of the IF part of a rule match the membership functions (A1,B1). In the instance of machines controlling physical quantities, such as those converting physical values from external sensors into fuzzy variables, the computation of weights α would be limited to finding the intercept of the input variable value on the membership functions of a given term set. With reference to the above interference rule, it would be found, for example, that α₁ A =max(min(A,A1)) and α₁ B =max(min(B,B1)). Another particularly indicative weigh function is defined by Ω=min(α i A , α i B ,..) and indicates the overall extent of likeness of the IF part of an inference rule. In order to compress the number of the fuzzy rules, an "or" connective is often used in the IF part of such rules, e.g. to merge two rules into one. This is useful to reduce the memory accesses in carrying out an inference operation. To account for the presence of such connectives of the "or" type in the computational model being discussed, one should take a O i =max(Ω i1 ,Ω i2 ,Ω i3 ,...) operator defined as the maximum of the Ω elements in a i-th rule composed of preposition groups associated with one another by "or" connectives but which do not contain the connectives as such. The O operator is used to modify the membership functions related to the THEN part of the rules, and would enter the picture on application of the MAX-MIN or MAX-DOT inferential methods, both known from pertinent literature and as employed herein in a manner to be explained. The former of these methods acts by cutting off the THEN-part membership functions, whereas the latter method modifies these functions so that they result substantially squeezed from their original form. The choice of such methods is dependent on the type of fuzzy set representation adopted. Turning back to the architecture of controller 1, the inner structure of a generic i-th fuzzyfier 10 will be now described in greater detail. With reference to Figure 3, it may be seen that the analog input I iA belongs to an analog to digital converter 12 adapted to transform an analog signal applied to it into a corresponding punctual value in the universe of discourse of the aggregate membership functions µ(x) of a given fuzzy variable X. Since the architecture of controller 1 was defined with the assumed aim of providing a discrete vectorial representation of the membership functions µ(x), an x₁,...,x N universe of discourse of the variables has been selected which is split into an N=64 number of segments, with each segment that can take a value in the 1,2,...,L range, and L=16 representing a degree of membership between two extremes of truth, 0=false and 1=true. This non-restrictive choice of the values for N and L has been suggested by the need to conciliate conflicting requirements for accurate data representation and computational efficiency both in terms of the number of electronic components and the time taken to carry out an inference operation. The use of a discrete variable representation domain with an N=64=2⁶ number of segments has led to adopting a six-bits A/D converter 12 having its output connected to an input of a multiplexer 14 with two inputs and one output. In the case where the input signal from the outside circuitry is already in the form of a digital signal, the digital input I iD of device 10 would be coincident with the other input of multiplexer 14, having the output connected directly to the input of a decoder block 16. Therefore, irrespective of whether the signal being input to the device 10 is an analog or digital one, the decoder block 16 will receive a digital signal from multiplexer 14 over a six-bits bus w. Block 16 computes the word address of a corresponding memory 7 whereinto α values related to a term set under consideration would be stored. The memory 7 is incorporated to the fuzzy controller core 5 described herein below. The address of generic α value is computed by means of the following formula: Address of α=Base Value+(Input Value)*(Number of µ(x) Present in the Term Set)/Size of Memory Words. The block 16 incorporates circuitry for performing this computation at a high rate, such as an ALU (Arithmetic Logic Unit) or a dedicated logic. The choice will depend essentially on the target performance level. The output of block 16 consists of a series of z connections of the bus type which have their opposite ends run to one of the memories 7 of unit 5. A more detailed schematic of unit 5 is shown in Figure 4 and includes a plurality S of programmable read-only memories 7, e.g. of the PROM, EPROM or RAM type. To each memory corresponds one of the aforesaid fuzzyfiers 10. Each memory 7 is addressed by digital signals presented on the bundle of the z bus leads interconnecting an equal number of inputs of each memory 7 with respective outputs of each corresponding fuzzyfier 10. In the example considered herein, the memories 7 have been selected to have a word length p of thirty two bits, and each memory has thirty two bus outputs h connected directly to respective inputs of an interfacing circuit 9 which has its output coupled, over a bus y, to an inference control unit 11 to be described with specific reference to Figure 9. This unit 11 has k outputs connected to a memory 13 which has, in turn, bus outputs a, b being also the outputs of the fuzzy controller core 5. This memory 13 contains those membership function-related data which appear in the THEN part of the inference rules. It can be already appreciated, therefore, that the stored data are split in a discrete fashion according to whether they relate to the membership functions appearing in the IF or THEN parts of the fuzzy rules. Advantageously, in accordance with the invention, the memories 7 are set up internally in a particular way to contain the IF-part membership functions µ(x) of the fuzzy X variables to be handled by the controller 1 during the fuzzy logic conversion step. With the adoption of a vectorial representation wherein N=64 and L=16, each membership function will occupy 256 memory bits. In order to maximize the parallelism level P of the machine, the global memory is divided into four structurally independent memories 7, each comprising a series U of thirty two bits, where the U value takes into account the amount of membership functions µ(x) present in the aforesaid term set and reflects on the number of the address buses of the storage modules. The overall width of the storage modules is equal to the internal parallelism value P of the machine. The higher the value of P, the greater is the number of elements of the universe of discourse which can be computed in parallel. For the instant architecture, a value of P=128 bits is preferred, which enables parallel operations to be carried out on thirty two elements of the universe of discourse. By having the memory divided into four separate modules 7, the values of the membership functions related to four fuzzy X variables associated with the control inputs can be accessed at one time. The number of the modules is, therefore, a function of the number of external variables with which one can interact. With reference to Figure 5, it can be seen that each storage module 7 has an addressing area 17 wherein the membership functions of the IF parts alone of the fuzzy inference rules are stored. In the interest of a clearer appreciation of the kind of memory setup proposed by the invention, a simple example will be suitably given now with reference to Figure 6. Considering a simple term set including three membership functions µ(x), with a conventional method the information would be stored in by writing sequentially the level of truth for each point of each membership function. The functions would be allocated in contiguous locations. The method of setting up the memory according to the invention operates instead in a clearly different way. The elements of one term set carrying the same i subscript representing the i-th horizontal segment in the 1,....,N universe of discourse, are stored consecutively in the cells 8. The situation is illustrated by a graph in Figure 6 showing plottings of three membership functions µ(x)1, µ(x)2, µ(x)3, and the values of A, B, C and D of these functions at the first and second points of the universe of discourse. With this memory setup, upon the value of a fuzzy variable being identified, all the values of α related to that variable can be accessed through a limited number of accesses to memory 7 which is a function of the number F of membership functions µ(x) in the term set involved as well as of the size of the memory word (in this case thirty two bits). In essence, the number of the accesses is given by an excess value of F/8, where 8 represents the largest number of α values that can be stored with a word of thirty two bits. Further, with this memory setup, all the values of α related to a variable occupy consecutive locations in the memory, and it will be sufficient to increment the address of cells 8 stepwise to read in succession the values of α for any given variable. Let us consider now the method of storing membership functions pertaining to the THEN part of the rules. The data are stored in a different way from the previous case, both on account of the different nature of such data and to promote efficient processing thereof. Whereas in the previous case accessing the α values of each variable at one time was important, what does matter here is that the defuzzyfier 15 must be supplied with data on which to carry out subsequent fuzzy rule computations in an efficient manner. For this purpose, the memory block 13, shown in Figure 7, is provided with an address area 20 containing those data of the membership functions which relate to the THEN-part variables of the rules. As explained further in this description, in order to carry out defuzzyfying operations on the membership functions for the THEN part, little but meaningful information need to be available, namely: the center of gravity Cg for each membership function, and a weight associated with each ϑ value of that membership function. Advantageously, the center of gravity can be found from the ratio of two summations executed in parallel and respectively involving the numerator and denominator terms of the ratio. Stored in each memory word of block 13 are both the numerator and denominator terms, which are associated with the same value of ϑ. Thus, both data can be read with a single memory access. More particularly, a memory word of the block 13 has a number q of bits given by the sum of those used to represent the addend in the numerator plus that in the denominator of the above ratio. In general, the number of bits needed to represent these terms will be a function of the horizontal resolution N (universe of discourse) and vertical resolution L (levels of truth). Assuming that the MAX-MIN inference method is used for the THEN part of the rules, the addend in the numerator would be found from: A i *X gi ; while the corresponding addend in the denominator would be just A i ; where A i is the area of a given output membership function and X gi is the center of gravity of that function. Assuming on the contrary that the MAX-DOT method is used instead, the addend in the numerator would be: ϑ i *A i *X gi ; and that in the denominator: ϑ i *A i ; where ϑ i denotes the weight applied to the i-th membership function, in the THEN part affected by the summations. Using the vertical and horizontal resolution values of L and N suggested above, it is found that: (a) the number N i of bits for the numerator term is = 2*L + 2*N (b) the number D i of bits for the denominator term is = 2*L + N (c) the number q of bits per memory word is = (a) + (b) = 4*L + 3*N and assuming a resolution of ten bits for a universe of discourse N=1024, and four bits with L=16 degrees of truth, the following dimensions are found: (a) = 28 bits; (b) = 18 bits; (c) = 46 bits = q. These values define the size of the data buses, a and b, which connect the outputs of memory 13 to the corresponding inputs of the defuzzyfier 15. Let us find now the dimensions that the memory block 13 should have in order for it to contain all of the data needed. Since a weight value ϑ is associated with each of the terms of the previously mentioned summations, it is to be concluded that the data to be processed can be all obtained by storing, for each membership function, L terms for the numerator and just as many for the denominator. This estimate may be modified by the presence of associated data with a value of ϑ=0 which are of no use to the computation operations. In fact, those terms which associate to zero values of ϑ would be detected by circuitry attached to the controller for generating control signals, and are not even sent to storage. As shown in Figure 15, the memory 13 is divided ideally into contiguous areas 4, each containing the data of a particular membership function. If the initial address of the storage area occupied by the k-th membership function, THEN part, is denoted by IND-k, then the data related to the i-th value of ϑ will be stored at a location IND-k+i. In this way, the memory address can be generated by simply adding an offset amount to the value of ϑ which identifies the upper boundary of the storage area occupied by the membership function concerned by the center of gravity calculation. Lastly, in view of that L-1 different words of the type described above will be needed for each membership function, and that a fuzzy set is associated with each output variable, the overall size of memory 13 can be obtained: (d) Number of Memory Words = (L-1)*(Number of Membership Functions per Fuzzy Set)*(Number of Output Variables). Accordingly, putting the number of variables equal six and the number of fuzzy sets equal twelve per term set, a global memory of 51840 bits is obtained. This memory could be expanded with external modules of the controller 1 to boost its capacity. With reference to Figure 8, the internal structure of the interfacing circuit 9 will be now described in detail, which circuit is to handle and convey information from the memories 7 for the fuzzy controller inference unit 11. This because the information from the read-only memories 7 cannot be passed directly to the computational elements due to the memory dynamic allocation. The circuit 9 is divided into blocks 19, which are identical with one another and equal in number to the memories 7. Since the memory word related to the IF part of the rules can contain no less than 1 and no more than 8 values of α related to the same fuzzy variable X, such values of α will be conveniently processed through a buffer register 22 connected to the corresponding memory 7 by bus h, as well as through a read and write memory 24 of the RAM type, to be accessed via a finite state machine 18 connected after the register 22. The RAM size is dependent on the maximum number of membership functions present in the term set, twelve in this case. A four-bit bus y issues from the RAM 24 and is connected to the input of an AND-OR selector 25 incorporated to the fuzzy controller inference unit 11, as shown in Figures 4, 9 and 10. Unit 11 represents the core of the controller 1, and the value of ϑ for each fuzzy rule is computed within said unit. The AND-OR selector 25 is arranged to compute the value of ϑ for a given inference rule based on known values of α i associated with a function µ(x). In detail, the architecture of selector 25 is as shown in Figure 10 and comprises two symmetrical portions 26, 27 respectively intended for computing prepositions with logic OR and AND operands. This selector 25 is input by the bus y from the memories 24 which contain the values of α for a given rule, and can handle rules having an arbitrarily long number of prepositions (IF part). Dependent on the types of the logic operands contained in a rule, the values of α are forwarded over a multiplexer 29 either into the MIN or the MAX block. The structure of a single MIN or MAX block is depicted in Figure 11 and includes a comparator 31 having a plurality of inputs on which the values of α are received from memoriess 24 and a single bus output j on which either the minimum or maximum of the input values is presented. The comparator 31 output is addressed to a mixer 32 to which the signals applied to the comparator input are also led following appropriate routing. The great simplicity of this computational approach is attributable to that only simple comparison operations are carried out between quantities. This affords considerable savings in computing time as well as in electronic components. Within the selector 25, the provision of some buffer registers 23 makes a local memory available for carrying out feedback computing operations based on the partial results of the previous operations. Each of portions 26 and 27 comprises a feedback loop wherein the output from each MIN or MAX block is re-applied to the block input over a multiplexer 28, a register 23, and a second multiplexer 30. A second feedback loop, which may be viewed as external of the former, takes the multiplexer 28 output back to an input both of the MIN block and the MAX block through a register 23 and two cascaded multiplexers 33 and 21. By providing two feedback loops for each of the MIN and MAX functional blocks, the weight ϑ of a rule can be computed even if it happens to be a complex one, using a strategy which minimizes the processing time. The sequence for the operations and the nature of the weights α are defined within the machine control micro, and become known once the compilation of the fuzzy rules that represent the control program is completed. The various multiplexers provided in the selector 25 are operated by the same control signals, and effective to supply either meaningful or uninfluential data, according to whether the operation to be carried out requests the data stored in the registers. The selector output, and particularly the output from multiplexer 33, carries the value of O associated with a membership function, as found from a suitable combination of several weight α functions in a predetermined sequence order. This value of ϑ is representative of the level of truth associated with a given membership function, IF part, and is stored into the memory 27 connected after the selector 25. Contained in that memory 27 are all the values of ϑ obtained from computing the IF parts of all the rules, which shall be used to modify the membership functions in the THEN part of the rules during the second step of the inference process described herein below. The foregoing description of the inner structure of controller 1 will be now completed with reference to Figure 12, which illustrates in schematic form the defuzzyfier 15. Within the defuzzyfier 15, the membership functions are united in accordance with the computational model of the fuzzy logic, to output the control signals following an appropriate conversion. It therefore becomes necessary to transform the membership functions into punctual representations within their pertinent universe of discourse. For this purpose, a variety of algorithms is often used, of which the so-called center-of-gravity algorithm is the most frequently adopted one. With this method, the controller 1 output is given basically by the center of gravity associated with a function resulting from the fuzzy rules processing. However, in order to get this result, the algorithm should carry out a large number of computations, because the summations that appear in the center of gravity computing formula depend on the horizontal resolution adopted to discretize the universe of discourse. Thus, the implementation of the subject algorithm requires a high level of parallelism at the computation stage to provide a sufficient execution rate. Of course, a reduction of the computational load during this operative stage of fuzzy logic processing is of vital importance if acceptable performance is to be provided by the controller. Within the scope of this invention is, therefore, the use of a different defuzzyfying algorithm which can greatly reduce the computing time and enable the user to modify the membership functions, THEN part, to suit the weights of the inference rules, irrespective of the MAX-MIN or MAX-DOT method being used to find such membership functions. The resulting function from the fuzzy computation is obtained by carrying out a sum of the individual, THEN part, membership functions as modified according to the weight ϑ of the inference rule wherein they appear. Consequently, the center of gravity of the resulting function from the fuzzy computation can also be found from the centers of gravity associated with the individual membership functions which have generated it. These partial centers of gravity are called "centroids", and the computation method just discussed is called the centroid method. Plotted visually on the graphs of Figures 13 and 14 are: on the one side, two membership functions µ1(x) and µ2(x) with respective centroids Cg1 and Cg2, and on the other side, a function µ(x)=µ1(x)+µ2(x) with the center of gravity Cg calculated from the previous centroids. By generalizing this process, the equations for calculating the center of gravity Cg can be defined dependent on whether the MIN-MAX or MAX-DOT inference method is used to find the membership functions, THEN part, concerning a given value of ϑ. With the Max-Min method: Cg = Σ i A i *X gi / Σ i A i where i varies between 1 and n, and where: A i is the area of a given output membership function; Xgi is the center of gravity of said function; and n is the number of functions, THEN part, involved in the summation. With the Max-Dot method, on the other hand: Cg = Σ i ϑ i A i *X gi /Σ i i A i where i varies between 1 and n and ϑ i is found from the weights associated with the various membership functions, THEN part, related to the output in question. Since the above equations are formally identical, they can be reduced to a more general expression: Cg = Σ i Num i /Σ i Den i where i varies between 1 and n, and where Num and Den generally indicate the terms which appear in the numerator and the denominator of the formulae. It can be appreciated at once, however, that all these summations would be extended to the number of fuzzy sets involved in the center of gravity computation. This number is surely much smaller than the number of points which make up the discrete universe of discourse. In addition, not all of the fuzzy sets in the term set would enter the computation, but only those which contribute to the summation, that is those associated with a weight O other than zero. In summary, the calculation algorithm proposed herein affords a significant reduction in the number of the operations required to find the center of gravity, and Figure 12 shows the architecture of the block 15 which implements the algorithm. Indicated at 34 and 35 are two adder blocks, with the former being intended for computing the terms in the numerator, and the latter for the summation of the denominator terms. The one 34 of said blocks is input data over bus "a" from memory 13, and outputs to "a+t" buses connected to a divider 36. The t increment of the number of output bits is available for the user to fix the maximum number of fuzzy sets in a term set. Likewise, the other block 35 is input data over bus "b" from memory 13, and has "b+t" outputs connected to the input side of the divider 36 which is to divide the two summations through to obtain the center of gravity Cg. The output side of said divider 36 has a number of bits equal to the difference (a-b) of the number of bits in the numerator minus that in the denominator of the summation. After the divider 36, a multiplexer 37 conveys the signal to a digital/analog converter 38 to also obtain an analog signal for the output O 1A . The defuzzyfier 15 thus provides an adequate interface between the controller 1 and the outside circuitry, since it would be impossible to drive an actuator directly through fuzzy logic information, on account of that the apparatus would be unable to interpret such information. The controller architecture according to the invention solves the technical problem and distinguishes itself from known solutions by its ability to simplify much of the computational work involved in inference operations. More specifically, a major innovative aspect of the controller according to this invention is that, in the memories incorporated thereto, the membership functions of the IF and THEN parts of the inference rules are differently contained and represented. In addition, the unique setup of the memories removes restrictions on the form that the membership functions can take.

Claims: A fuzzy logic electronic controller (1) whereby predetermined membership functions µ(x) of logic (X) variables are subjected to inference operations configured as IF-THEN rules with at least one front preposition and at least one rear implication, and said controller (1) comprising an input or fuzzyfier section (3) having a plurality of inputs for analog and digital signals, a central control unit (5) or fuzzy controller core placed after said input section and being provided with memories, and an output section or defuzzyfier (15) connected after the central unit (5) to convert the results of the inference operations back to analog or digital signals, said controller being characterized in that it comprises: a plurality of fuzzyfiers (10) being disposed in parallel within said input section (3) and each led to a pair of analog and digital inputs (I iA ,I iD ), a plurality of storage modules (7) provided within said central control unit (5) corresponding in number to said fuzzyfiers (10) and containing data of the front (IF) prepositions only of said IF-THEN rules, a fuzzy controller inference unit (11) active in the central control unit (5) to carry out logic operations based on said inference rules of the fuzzy logic by extracting data from said memories (7) through an interface circuit (9), and an additional memory (13) connected between the fuzzy controller inference unit (11) and the defuzzyfier (15) and adapted to contain data pertaining to the rear (THEN) implications only of said inference rules. A controller according to Claim 1, characterized in that each fuzzyfier (10) comprises: an analog to digital converter (12) after an analog input (I iA ), a two-input, one-output multiplexer (14) receiving, on the one end, a signal from a digital input (IiD), and on the other end, an output signal from the converter (12), and a decoder block adapted to compute the address of a memory word of a corresponding module in said plurality of storage modules (7). A controller according to Claim 1, characterized in that said interface circuit (9) comprises identical blocks (19) corresponding in number to the storage modules (7) and containing a buffer register (22) in cascade connection between inputs and outputs, a finite state machine (18), and a read and write memory (24). A controller according to Claim 1, characterized in that said fuzzy controller inference unit (11) comprises an AND-OR selector (25) composed of two symmetrical portions (26,27) intended for computing logic prepositions having AND and OR operands, and a read/write memory (27) connected after the selector. A controller according to Claim 4, characterized in that each of said portions (26,27) of the selector (25) is structured with a pair of feedback loops, with each loop being based on a comparator (MIN, MAX) block, at least one pair of multiplexers (28,30,33,21), and a register (23) connected between said multiplexers. A controller according to Claim 1, characterized in that said defuzzyfier (15) comprises: a pair of adder blocks (34,35) arranged in parallel and respectively receiving input data from said additional memory (13), a divider (36) connected to the respective outputs of each adder, and a one-input, two-output multiplexer (37) for conveying the output signal from the divider to a digital/analog converter (38). A controller according to claim 1, characterized in that said storage modules (7) and said additional memory are of the read-only type. A method of setting up the memories of a fuzzy logic electronic controller as disclosed in claim 1 whereby predetermined membership functions µ(x) with a vectorial representation of logic (X) variables are subjected to inference operations configured as IF-THEN rules with at least one front preposition and at least one rear implication, characterized in that some of said memories (7) are set up as a plurality of storage modules structurally independent, wherein only the data of the front (IF) prepositions of said IF-THEN rules are stored, and another memory, different from some of said memories is set up as an additional memory within a single block (13) containing data pertaining only to the rear (THEN) implications of said inference IF-THEN rules. A method according to Claim 8, characterized in that the discrete values (α) of the membership functions µ(x), at a predetermined logic (X) variable, are stored at consecutive locations in said storage modules (7). A method according to Claim 8, characterized in that each memory word in said block (13) is composed of two discrete data (N i ,D i ) indicating the terms for calculating the center of gravity of a corresponding membership function.

Inventors: PAGNI ANDREA, POLUZZI RINALDO, RIZZOTTO GIANGUIDO, PAGNI, ANDREA, POLUZZI, RINALDO, RIZZOTTO, GIANGUIDO
Applicants: SGS THOMSON MICROELECTRONICS, SGS-THOMSON MICROELECTRONICS S.R.L.
Application year: 1992
Main classification: G06F7
IPC codes: G06G7, G06F9, G06N7, G05B13