Method and apparatus for regulating membership functions and fuzzy inference system

Abstract: Automatic regulation of a membership function in a fuzzy inference system, or more in particular a system for membership function regulation for maintaining a constraint is disclosed. The position, style and the like of a membership function clearly indicated by the user are set from an input device (105) as a constraint for regulation. A regulation device (108) fetches a fuzzy rule and a membership function for initialization from a memory device (104) and effects inference with a teacher data. When the error of inference is large, a parameter of the membership function is regulated for retrial. The parameter is changed to such an extent as to meet the constraint. As a result, a regulation conforming to the user prediction is made possible and the regulation time shortened while maintaining the geometric features of a membership function or the correlationship between membership functions.

Description: The present invention relates to a method and an apparatus for regulating membership functions and a fuzzy inference system, or more in particular to an automatic regulation function of membership functions utilizing the user knowledge about the style of a membership function. In recent years, fuzzy inference has been increasingly applied to real systems. Fuzzy inference is a method by which a subjective ambiguous or linguistic knowledge of experts against an object system of inference are expressed by a fuzzy rule and membership functions, and an output value is inferred from the particular knowledge and an input value (generally, measurable) to the object system. For more detailed information on fuzzy inference, see "Fuzzy Control" by Michio Sugano, published from Nikkan Kogyo Shimbun-Sha. The feature of fuzzy inference lies in that a human sensory or linguistic knowledge such as "if an input value is large, an output value is decreased" is capable of being expressed as a fuzzy rule of "if-then" form as shown below, "if" an input value is large, "then" an output is decreased. In spite of the easy rule description of fuzzy inference, this regulation often requires a period of time as long as two or three years, thus posing the bottleneck to the system construction. In order to obviate this problem, means has so far been suggested for regulating membership functions automatically as described below. In "Fuzzy Control System of Artifical Neural Network Type" disclosed by JP-A-2-292602, membership functions are automatically regulated by use of a neural network as shown in Fig.3. Specifically, a membership function for the condition section is set in a neuron section 304, and that for the conclusion section in a neuron section 306 in advance, so that an input value of a teacher data is applied from a condition variable input section 301 for conducting fuzzy inference. An error operating section 309 determines an error between an output value of inference result and a teacher data output value, and the synapse load (303-1 to 303-2n) inputted to the neuron section and the synapse load (307-1 to 307-m) outputted from the neuron section 306 are regulated repeatedly in such a manner as to minimize the error. A change in the synapse load of the membership function neuron 304 for the condition section corresponds to enlargement/compression along abscissa or lateral movement of the membership function for the condition section. Also, a change in the synapse load of the membership function neuron 306 for the conclusion section is in correspondence with lateral movement of the membership function for the conclusion section along abscissa. As will be seen from these cases, the conventional method of automatic regulation of membership functions is solely based on minimizing the error between a teacher data and an inference result. The problem of the above-mentioned prior art systems is that the teacher data providing a reference for regulation is nothing but an input-output data and contains no information specifying the style and position of a membership directly. The style (such as a triangle or the like) of an initialized membership function, on the other hand, in spite of the fact that it reflects the empirical knowledge of the user, serves merely as an initial data and fails to predict or limit the degree of enlargement/compression or lateral movement along abscissa by regulation. As explained above, the conventional methods of regulating the membership function is incapable of expressly setting the knowledge and demand of the user on the specification of a membership function and regulating while limiting the position and style thereof, thereby leading to the following problems: First, automatic regulation often results in the regulation to an inappropriate membership function departing considerably from the user intuition or prediction. In such a case, the membership function is required to be manually re-regulated, thus making automatic regulation meaningless. Further, if a teacher data is insufficient or unilaterial, a satisfactory result is given for the teacher data but not for the other data in what is called the "overfitting" phenomenon. Consider F and G shown in Fig.4 as membership functions for a proposition "Temperature is approximately 20°C" (F is assumed to be an ideal membership function). F and G are quite different in grade for above 20°C but has the same grade for temperatures below 20°C. As a result, if a teacher data for only below 20°C is given, the use of F or G as a membeship function leads to exactly the same result of inference. Since a data for above 20°C is also inputted actually, however, the inference result using a membership function G contains a considerable error. In such a case, if a condition like "lateral symmetry" could be designated for a membership function, there would be no problem. Since it is impossible to state such a constraint in the conventional methods of automatic regulation, however, the membership function may approach G but not F. Also, all membership functions are regulated simultaneously according to the prior art. As a result, the anticedent and conclusion sections of the fuzzy rule contain many variables (subject names described later), and there exist many propositions for each variable. In this way, a system using a multiplicity of membership functions requires correlated regulation, thus taking a long time for regulation. An object of the present invention is to provide a method and an apparatus for automatic regulation of membership functions which overcomes the above-mentioned problems of the prior art and is capable of accurate regulation within a short time. Another object of the present invention is to provide a fuzzy inference system comprising automatic regulation means for regulating membership functions using teacher data accumulated on-line. The above and other objects, features and advantages will be made apparent by the detailed description below. In the method, apparatus for automatically regulating membership functions according to the present invention as set out in claims 1 and 16 respectively the knowledge and demand of the user are set as a constraint on regulation, and membership functions are regulated while maintaining the particular constraint. The knowledge and demand of the user relating to the membership functions providing the basis of the method and of the apparatus according to present invention will be explained. To state the conclusion first, as far as the qualitative expression (called the proposition) required for description of an object system by fuzzy inference is known, the user never fails to possess a certain degree of knowledge and demand relating to the position and style of a corresponding membership function. An example of such knowledge is on a geometic feature of a membership function. Assume, for example, that three propositions defined relating to the modeling of "temperature" include "temperature is low", "temperature is medium" and "temperature is high", for instance, it is natural that the membership function "temperature is low" be higher in grade, the lower the temperature, and vice versa. As to the proposition "temperature is high", on the other hand, grade should be increased or decreased with temperature. Also, the proposition "temperature is medium" is indicative of the fact that temperature should not be too high or too low. When graphically indicated in a rectangular coordinate system, a membership function must reasonably form a convex pattern. Further, the graph is preferably laterally symmetric because an excessively high or low temperature is not desirable to the same degree. A study relating to relative positions of membership functions is reported. An arrangement of membership functions including "temperature is low", "temperature is medium" and "temperature is high" in the ascending order of temperature conforms to intuition. If the interpolating ability which is one of the features of the fuzzy inference is to be displayed, adjacent membership functions between "temperature is low" and "temperature is medium" and between "temperature is medium" and "temperature is high" are required to be set in such a manner as to have a superimposed portion. Further, there may also be a knowledge about the absolute position of a membership function. When the proposition is "temperature is approximately 20 °C", for example, the grade should be maximum when the membership function is "convex". Further, if the proposition "temperature is approximately 10 °C" is also used, the value at the extreme left end of the membership function "temperature is approximately 20 °C" is allowably considered to be limited in a range between 10 °C and 20 °C. As described above, in an embodiment of the present invention a geometric feature of a membership function is provided by the user knowledge, the value of a specified parameter of a given membership function, the correlation between membership functions and the like are descdribed as constraints, an arrangement is made enabling the user to designate the order of priority of a plurality of constraints and selection of membership functions requiring regulation (no regulation), and that an initialized membership function is regulated with a teacher data as an input while maintaining the constraints set as above. A method of regulating the membership function according to an embodiment of the present invention can introduce a satisfactory membership function meeting the user knowledge by designating the user knowledge relating to the geometric feature or absolute position or magnitude of a membership function as a constraint. In addition, it is possible to designate a membership function not regulated and a parameter or the order of priority of constraints, thereby remarkably reducing the regulation time length. A fuzzy inference system according to an embodiment of the present invention is characterized by comprising a function of automatic regulation of a membership function with a constraint settable and the possibility of regulating a membership function while controlling by a constraint using the teacher data (measurement data) accumulated on-line during the system operation. As a consequence, the regulation accuracy can be improved by repeating the learning with on-line data. In addition, the possibility of regulation while limiting the membership function and parameter by constraints permits safe regulation within a range intended and predicted by the user. As a result, on-line regulation is made possible during system operation, thereby considerably reducing the manpower (a long time has so far been required for collecting the teacher data and regulating the membership function) and the length of time required for system construction and rise. In the drawings: Fig.1 shows functional blocks of a membership regulation apparatus according to a first embodiment of te present invention; Fig.2 shows a system configuration with a hardware shown in Fig.1; Fig.3 shows a conventional configuration of an apparatus for regulating the membership function; Fig.4 shows styles of two partially similar membership functions for explaining the problems of the prior art; Figs.5 to 11 are diagrams for explaining a configuration and operation of the first embodiment, in which: Fig.5 shows an example of teacher data, Fig.6 shows a form of fuzzy rule storage, Fig.7A to 7D show an illustrative description of the relationships between a membership function pattern and a parameter, Fig.8 show the contents of a table storing constraints, Fig.9A to 9D show a membership function table for initialization and storing parameters, Figs. 10A and 10B show flowcharts showing steps of regulating the membership function, and Fig. 11A and 11B show display screens used for preparing constraints on the screen; and Fig. 12 is a diagram of functional blocks for a fuzzy inference system according to a second embodiment of the present invention. An embodiment of the present invention will be explained in detail with reference to the drawings. A first embodiment of a membership function regulation apparatus according to the present invention is shown in Fig. 1. A membership function automatic regulation apparatus 109 comprises teacher data input means 101 for inputting a teacher data including an input value and an output value for processing an inference object, teacher data memory means 102, inference knowledge input means 103 for inputting a fuzzy rule and an initial data of membership functions, inference knowledge memory means 104, constraint input means 105 for inputting constraints for regulation, constraint conversion means 106 for converting constraints input into a usable form, constraint memory means 107, receiving and inferring an input value of the teacher data, an inference knowledge and constraints and correcting a membership function in such a manner as to minimize the difference between the inference result and a teacher data output value. As shown in Fig. 2, the membership function regulation apparatus 109 according to this embodiment makes up a computer system comprising hardware including a central processing unit 201, a memory unit 202, a mouse 203, a keyboard 204 and a display unit 205. The memory unit 202 includes an area (not shown) for storing an operation program for the central processing unit 201 and storage areas functioning as teacher data memory means 102, inference knowlege storage means 104 and constraints storage means 107, respectively. The central processing unit 201 realizes the functions of constraint conversion means 107 and membership function regulation means 108 by executing a program stored in the memory unit 202. Input units such as the mouse 203 and the keyboard 204, together with the input control means (not shown) for the central processing unit 201, realize the functions of the teacher data input means 101, the inference knowledge input means 103 and the constraints input means 105. Though not shown, the teacher data and the like may alternatively be taken in from an external memory unit or transferred from another device through a bus line. The display unit 205 functions as constraints input means 105 and output means for displaying a membership function pattern during regulation at the same time. Explanation will be made about the operation of a membership function regulation system according to the present embodiment configured as mentioned above. The user first inputs a teacher data and a fuzzy rule. The teacher data and the fuzzy rule must be known as a prerequisite, and these data are fixed during the regulation of a membership function. Fig.5 shows an example of such a teacher data including a data set having two inputs (temperature and pressure) and one output (control amount). The first teacher data has a control amount of -2 (scale) as an output value against an input value of 30 (°C) in temperature and 1.2 (Pa) in pressure. This teacher data is configured of an input value and a desirable output value in the presence of an object process for inference. A data shown in Fig. 6 is inputted as a fuzzy rule from the inference knowledge input means 103 and is stored in the inference knowledge memory means 104. The first rule in the drawing is indicative of "If temperature and pressure are both high, decrease the control amount" Now, explanation will be made about a method of initialization of a membership function and inputting a constraint. Four representative style patternsas shown by Figs. 7A to 7D of a membership function include (a) decremental type (Fig. 7A), (b) incremental type (Fig. 7B), (c) triangular type, and (d) trapezoidal type (Fig. 7D). The decremental-type membership function Fa has two points (a point where grade begins to decrease from 1, and a point where grade becomes zero) characterizing the style thereof. They are indicated, from left to right, as the first parameter and the second parameter sequentially, and are designated as pl(Fa) and p2(Fa) respectively. A similar designation and expression are used also for the parameters of incremental, triangular and trapezoidal types as shown in Figs. 7B to 7D of the same drawing. Assume that the user has the knowledge (demand) that a membership function should be set with patterns of decremental, incremental, triangular and trapezoidal types, respectively for the four propositions "temperature is low", "temperature is high", "temperature is medium" and "temperature is substantially medium". In this case, the following inputs are applied from the constraints input means 105: Decremental type (temperature is low) (1) Incremental type (temperature is high) (2) Triangular type (temperature is medium) (3) Trapezoidal type (temperature is substantially medium) (4) Further, assume that in the triangular type of "temperature is medium", it is desired to make regulation in such a manner as to fix the first parameter to 10 to 20, the second parameter to 20, with the membership function of "temperature is medium" in laterally symmetric triangular form. The following inputs are applied: p1 (temperature is medium) ≦ a (5) p2 (temperature is medium) = b (6) p3 (temperature is medium) = 2 x p2 (temperature is medium) - p1 (temperature is medium) (7) where a = 10 and b = 20. Although this represents constraints in a single membership function, there are also constraints covering a plurality of membership functions. In such a case, too, a constraint may be inputted in a similar form using a parameter. When it is desired to regulate the membership functions in such a manner that "temperature is low" is partially overlaid on "temperature is substantially medium", and "temperature is substantially medium" on "temperature is high", for instance, the following inputs are applied: p1 (temperature is substantially medium) ≦ p2 (temperature is low) (8) p2 (temperature is substantially medium) ≦ p1 temperature is high) (9) Also, when it is desired to regulate "temperature is high" into linear symmetry with "temperature is low" around the ordinate of the value C, the following inputs are applied: p1 (temperature is high) = 2C - p2 (tempeature is low) (10) 2 (temperature is high) = 2C - p1 (temperature is low) (11) where C = 20 in this example. In the above-mentioned constraints (1) to (11), p2 (temperature is medium) = 20 indicates that the second parameter of "temperature is medium" is fixed to 20 in value and not regulated thereafter. Such a parameter as this will hereinafter be called an "unregulatable parameter". Also, from (7), (10) and (11), the third parameter of "temperature is medium" and the first and second parameters of "temperature is high" are determined automatically in dependence on the values of the other parameters. These parameters, therefore, will hereinafter be called "subordinate parameters". The third parameter of "temperature is medium", in particular, is dependent on the parameters in the same "temperature is medium", and therefore such a subordinate paraemter as this will be called a "self-subordinate parameter". The remaining parameters, the values of which can be freely set within the range of designated conditions, will be called "independent parameters". The above-mentioned constraints (1) to (11) are given intentionally by the user. Actually, however, input of systematic constraints is also required for automatic regulation of a membership function. Specifically, a range of value which a subject (such as "temperature") may assume (subject range) is designated. This is essential for the subject of the conclusion section to evaluate the error magnitude relatively. If neither a constraint nor a subject range is designated, a guide indicating the degree of a value required is completely lost in automatic generation of a parameter. For this reason, a subject range is inputted from the constraint input means 105 and stored in the constraints memory means 107. The constraints (1) to (11) inputted from the constraints input means 105 are applied to the constraints conversion means 106, where the parameter attributes "unregulatable", "independent", "subordinate" and "self-subordinate" are detected. Further, these constraints are converted into a form usable with the membership function regulation means 108, and are stored in the memory means 107 as a constraints table shown in Fig.8. The constraints (1) to (11) in Fig.8, which are inputted in such a primitive expression as given directly in parameter values, are stored substantially in the form of input. The constraints conversion means 106 checks also the subordinative relations between membership functions on the basis of the constraints. In Fig.8, a numeral is assigned to each membership function in the column "subordination level". These numerals indicate the degree to which individual membership functions are subordinate to other membership functions. "Temperature is low" lacks a constraint equation and is not subordinate to other membership functions. The subordination level of this parameter, therefore, is determined as zero. "Temperature is medium" contains a constraint equation, but the constraint is closed in "temperature is medium". Therefore, the subordination level of this parameter is also determined as zero. "Temperature is high" cannot be determined before "temperature is low", and therefore the subordination level thereof is decided to be one. In similar fashion, "temperature is substantially medium" is not determinable unless "temperature is low" and "temperature is high" are determined, and therefore the subordination level of this parameter is determined as two. This subordination level provides information required in the regulation stage of membership functions described later. In the above-mentioned input example, the geometric pattern of a membership function is contained in a constraint. As an alternataive, the geometric pattern may be inputted together with a data on the membership function initially inputted from the inference knowledge input means 13. The contents of the membership function table shown in Fig. 9B or Fig. 9D are initialized against the membership functions for "temperature is low" or "temperature is medium" that can be graphically displayed as shown in Fig. 9A. In this case, the input of the constraints (1) to (3) are of course omitted. In the case where a membership function is initialized, the constraints may be inputted in an expression different from the one described above. In view of the fact that the second parameter for "temperature is medium" in Fig. 9A is set to the value "20" as desired from the beginning, for example, The name of a membership function may be inputted as an argument in place of the constraint (6) as shown below. CONST(p2(temperature is medium)) (6') The membership function by initial input applied from the inference knowledge input means 13 is stored in the inference knowledge memory means 104 in the form of a membership function table. The contents stored in the table are parameter values and names of geometric patterns of membership functions for propositions. In the case shown in Fig. 9B of the drawing, the first parameter value 5 and the second parameter value 15 are inputted and stored together with the geometric pattern name "decremental type" for "temperature is low", and the first parameter value 15, the second parameter value 20 and the third parameter value 30 together with "triangle" for "temperature is medium". In the case where regulation of four membership functions corresponding to the four propositions shown in Fig. 7A-7D is required, it follows that there exist undefined parameters if inputs are limited to those shown in Fig. 9B. Membership functions not regulated (or not desirably regulated) are required to be defined by the user in advance. Membership functions to be regulated, however, may contain undefined parameters. A subordinate parameter need not be initialized, as it is changed even if initialized by the user. Therefore, the parameters not regulated are checked to see whether they have been initialized or not, and if not, the user is urged to set a parameter value. If a parameter to be regulated is initialized, on the other hand, the particular parameter is checked to see whether it meets the constraints. Those parameters not meeting the constraints are corrected in such a manner as to match with other constraints. When the parameter to be regulated is not initialized, a parameter is generated in such a manner as to meet the constraints. These proceses are peformed as a preparation for regulation in the membership function regulation means 108 described later. The membership function regulation means 108 is supplied with inputs as required for the membership function table, and to the extent that all the teacher data, fuzzy rules and constraints are prepared, automatically regulates the membership functions in accordance with the flow of steps shown in Fig.10A and 10B. First, step 401 of Fig. 10A applies inputs including a regulation stop error and the number of regulation stops or other boundary values (reference values) required for deciding an end of regulation. Then step 402 collects only independent parameters, that is, parameters to be regulated from the constraints table and prepares a regulation parameter table as shown in Fig. 9C. As far as the user has initialized parameters, parameter values are taken out from a membership function table as shown in Fig.9B in the inference knowledge memory means 104 and sets them in the regulation parameter table. Next, step 403 corrects the contents of the membership function table into such a state shown in Fig. 9D as meets the constraints and permits execution of fuzzy inference by use of a constraints table and a regulation parameter table. The processing of step 403 is broken down as shown in Fig. 10B. This process will be explained with reference to the contents in the constraints table of Fig. 8 and the regulation parameter table of Fig. 9C. Parameter values are set and constraints checked for each membership function in the ascending order of subordination level as described above. By so doing, a parameter requiring reference when using a constraint is prevented from remaining undefined. First, the subordination level i is set to zero in accordance with step 411. According to the constraints table shown in Fig. 8, the membership functions associated with the subordination level of zero are "temperature is low" and "temperature is medium". Step 412 recovers "temperature is low". "Temperature is low" includes two independent parameters, and corresponding parameter values are known to be (5, 15) from the regulation parameter table of Fig. 9C. These values are ones copied from the membership function table at step 402. In step 417, however, the values of the regulation parameter table are unconditionally set in the membership function table. As a result, all the parameters for "temperature is low" are determined provisionally, and the matching of parameters is checked at step 419. In the process, the constraints shown below are also checked in order to maintain the matching between parameters in addition to the constraints indicated by the user. Minimum value in subject range ≦ Second parameter < Third parameter < Fourth parameter ≦ Maximum value of subject range (12) In this case, the range of the subject "temperature" is from 0 to 50. Also, parameters up to the second parameter are involved for "temperature is low" which is of decremental type. Parameters for "temperature is low" lack a constraint equation, and the values thereof satisfy also the constraint equation (12). Therefore, the constraint check of step 419 is cleared. Next, in the case of "temperature is medium" representing another subordination level of zero, step 416 determines the second parameter as 20, and step 417 the first parameter as 15 (a value in the regulation parameter table). Then, step 418 determines a self-subordinate third parameter as shown below from the constraint equation (7) and sets it in the membership function table. p3(temperature is medium) = p2(temperature is medium) x 2 - p1(temperature is medium) = 20 x 2 - 15 = 25 The matching check is naturally satisfied for all the parameters thus set for "temperature is medium". Now, departing from the membershp functions of subordination level zero, step 415 increments the subordination level to 1, and step 412 recovers "temperature is high". The two subordinate parameters for "temperature is high" are determined using the constraint equation and the parameter values for "temperature is low" that have already been subjected to a matching check. The matching is satisfied also in this case. p1(temperature is high) = 20 x 2 - p2(temperature is low) = 20 x 2 - 15 = 25 p2(temperature is high) = 20 x 2 - p1(temperature is low) = 20 x 2 - 5 = 35 Finally, parameters are set for "temperature is substantially medium" representing the subordination level of 2. "Temperature is substantially medium" includes four independent parameters, and the values of the regulation parameter table of Fig. 9C are all undefined. Step 417 determines the range of parameter values from the constraints and parameter values before and after them, and generates random numbers in the particular range. The first parameter is defined as shown below from the above-mentioned constraints. 0 = Minimum value in "temperature" range ≦ p1(temperature is substantially medium) ≦ p2(temperature is low) = 15 A value between 0 and 15 is thus generated by a random number or the like. Assuming that 10 is generated, the second parameter is given as 10 = p1(temperature is substantially medium) < p2 (temperature is substantially medium) ≦ Maximum value in "temperature" range = 50 A value between 10 and 50 is thus generated. The third parameter is determined in similar manner. As regards the fourth parameter, a value is determined in the range defined by Max{p2(temperature is substantially medium)}, p1(temperature is high)} ∼ Maximum value in "temperature" range = 50 taking the constraint equation into consideration. Parameters for "temperature is substantially medium" can thus be determined in a manner to satisfy the matching. A parameter value thus determined is set in the membership function table and the regulation parameter table. In the above-mentioned case, the matching check of step 419 succeeds after a single trial. But a matching check may fail. In such a case, step 421 corrects the independent parameter values by the same technique as step 417 mentioned above. The correction of a subordinate parameter value is based on that of a related independent parameter to satisfy the matching requirement. Assuming that the "temperature" range is set between 0 and 30, for example, the second parameter value 35 for "temperature is high", which exceeds the particular range, is required to be reduced below 30. Since the value depends on the first parameter for "temperature is low", however, step 422 changes the first parameter for "temperature is low" in such a manner as to maintain the matching of "temperature is high". A method of such a change consists in generating the first parameter in the form of a random number in a range not disturbing the matching of "temperature is low", determining the second parameter for "temperature is high" in accordance with the contraint equation, and checking the matching of "temperature is high". In the process, the first parameter for "temperature is low" is generated not indefinitely but according to a conditional equation, i.e., the constraint equation (11) in the case under consideration. In other words, in view of the fact that the factor of p1(temperature is low) in p2(temperature is high) = 20 x 2 - p1(temperature s low) is -1, p1(temperature is low) is increased if p2(temperature is high) is to be decreased. Thus, a value larger than the present p1(temperature is low) is generated to check the matching of "temperature is high". When an independent parameter value has been corrected, parameter values in the regulation parameter table as well as those in the membership function table are changed. The foregoing is a detailed description of step 403, in which a membershp function table in such a state as to satisfy the constraints and enable the execution of the fuzzy inference and a regulation parameter table coinciding with the contents of the membership function table are generated from the constraints and the membership function initialized by the user. As will be seen from the foregoing description, according to the present embodiment, a parameter for a membership function to be regulated need not necessarily be initialized by the user. Also, a membership function of which all the parameters are unregulatable is not changed in the operation of step 403. Next, step 404 prepares as many new regulation parameter tables as the elements (i.e., independent parameters) of a regulation parameter on the basis of an original regulation parameter table. The i-th new regulation parameter table is copied from the original regulation parameter table with only the i-th parameter left undefined according to the same process as in step 403. All the regulation parameter tables generated at step 404 are in a state satisfying the matching requirement. Step 405 develops a membership function table by use of a constraints table for each regulation parameter table. A fuzzy inference is then executed from the membership function table, the fuzzy rules as shown in Fig.6 stored in the inference knowledge memory means 104 and the teacher data as shown in Fig.5 stored in the teacher data memory means 102, so that a square error sum of an output value of the inference result and that of the teacher data. is determined. Step 406 Step 406 adds the contents of all the membership function tables by element, and taking an average for each element, prepares a new membership function table G. Step 407 generates a regulation parameter table R in the direction opposite to W around G on the assumption that W designates a regulation parameter table with the largest square error sum in step 405. More specifically, R = 2G + W is calculated to determine R for each element. Since the matching requirement is not necessarily met by R, however, the matching of R is checked by a technique similar to step 403. If the matching requirement fails to be met, R is made to approach to G until the matching requirement is satisfied. In the final case where the matching requirement fails to be met even when R is made G, the values of independent parameters are automatically corrected in the same manner as in step 403. A square error sum is calculated for a membership function table R meeting a new matching requirement, and W having a maximum square error sum is removed from the regulation parameter tables. The operation of steps 406 to 407 is repeated to reduce the square error sum while meeting a predetermined constraint. Various probability techniques including Boltzmann machine are known in addition to Simplex method described above as a method for searching for an optimum parameter for a membership function. According to the present embodiment, a membership function can be automatically regulated with the user knowledge and demand relating to the specification of a membership function as a constraint, thereby making it possible to define a membership function with high accuracy while shortening the regulation time. In the above explanation, a parameter value is determined in such a manner as to meet all the constraints in step 413 of Fig. 10B. If many complex constraints are designated, however, it takes a long time to search for a parameter value meeting the constraints, often resulting in a failure to find a parameter meeting such constraints. In view of this, an order of priority of constraints is also inputted together with the constraints to attach an order of priority to the particular constraints, and parameters are regulated in such a way as to meet the constraints in the descending order of priority. If required, search for a parameter is facilitated by ignoring constraints low in priority. Although constraints are inputted in the form of a function equation using a parameter according to the above-mentioned embodiment, a macro expression using a name of membership function may alternatively be inputted as shown in (12) to (16) below without expressly indicating a parameter. The constraint (6'), for example, designates only the second parameter for "temperature is medium" not to be regulated. If it is desired to make regulation in a manner not to regulate any parameters, however, the following description shall be made: CONST(temperature is medium) (13) The constraint (7) representing a laterally symmetric style is expressed as |temperature is medium| = 1 : 1 (14) This indicates that the lengths of an incremental section and a decremental section of triangular type are one to one in ratio. The constraints (8) and (9) indicating the superposition of membership functions are expressed as Range (temperature is low) ≦ Range (temperature is substantially medium) (15) Range (temperature is substantially medium) ≦ Range (temperature is high) (16) where "Range (temperature is low)" represents a section where the grade of the membership function "temperature is low" is larger than zero. The constraints (10) and (11) indicating a symmetric relation between two membership functions are given as (temperature is llow|temperature is high)20 (17) As understood from comparison between (6) to (11) and (13) to (17), the contents are understood and input is made easier by inputting a constraint in macro form using only a name of membership function. Even when the constraints are inputted in the macro form of (13) to (17), the constraints are converted into a function equation with parameter values specified in (6) to (11) by the constraint conversion means 16 and are stored in the constraint memory means 107 shown in Fig. 8. The constraint conversion means 106 holds many conversion rules including "When a membership function of decremental type is superimposed at a position to the left of a trapezoidal type, the second parameter of a decremental-type membership function is not less than the first parameter type but not more than the fourth parameter of trapezoidal type". As a result, it is possible to convert constraints like (15) not using any parameter into those using a parameter like (8) by conversion rules and geometric patterns of a membership function obtained with reference to the contstraint table or the membership function table. Next, a method of inputting a constraint will be explained. A pointing device like a mouse may be used as input means together with a keyboard. Figs. 11A and 11B show an example of screens for preparing constraints. Constraint input control means 105-1 applies information for constraint display and input to a display unit 205 and waits for input from a mouse 203 and a keyboard 204. A membership function list 501 with "temperature" as a subject name providing a variable of an inference object is displayed on the screen of Fig. 11A. In the "on/off" column, "ON" marked on the button indicates a regulation requirement, and "OFF" no requirement of regulation. When this button is picked by a mouse, the ON/OFF relation is reversed. When "temperature is substantially medium" is changed to "OFF", for instance, "tempeature is substantially medium" is stored as a proposition requiring no regulation at the constraint memory means 107, and four parameter attributes of "temperature is substantially medium" are changed to "unregulatable" in the constraint table of Fig. 8. The column "ratio", on the other hand, indicates the ratio of length between parameters. When the ratio for "temperature is medium" is set to 1:1, for instance, the column "ratio" of "temperature is medium" is picked and "1:1" is inputted by way of the keyboard 204. The ratio thus inputted is expressed in macro form at the constraint input control means 105-2 and is converted into a primitive constraint (7) by the constraint conversion means 106. In order to prepare a constraint covernig a plurality of membership functions in macro expression, an operation command 502 is displayed in Fig. 11A. For setting a constraint (15), RANGE(temperature is low) ≦ RANGE(temperature is substantially medium) for example, "low" is picked at 501, "area connection ≦" at 502, and "substantially medium" at 501. This series of operations enables the constraint input control means 15-1 to prepare constraints in macro expression and store in the constraint memory means 107. The constraints thus set are displayed on the screen as a list 503. The contents displayed in the list 503 are an example of constraints covering a plurality of membership functions. When a constraint is to be deleted, a column of a condition to be deleted is picked, followed by picking "delete constraint" of the operation command 502. In the process, a primitive constraint associated with a macro constraint to be deleted is deleted before the macro constraint. Fig. 11B shows a screen for preparing a constraint relating to parameters for individual membership functions. An example of "temperature is medium" is displayed. This screen is stored in hierarchal configuration with the membership function list of Fig. 11A and is capable of being displayed by picking "medium" at 501, and "indicate in detail" of the operating command 502. The screen of Fig. 11B graphically displays a membership function to be regulated in a membership function display area 511. Symbol ○ is attached to an independent parameter, ▵ to a subordinate parameter, and X to an unregulatable parameter. These parameter symbols permit mouse pick. A point associated with the second parameter of "temperature is medium" is marked with X indicating "unregulatable". If it is desired to change this to "regulatable", symbol X is picked, and also "regulate" is picked from a regulation designation command 512 displayed on the same screen. In response to this mouse operation, the constraint input control means 105-2 changes the second parameter of "temperature is medium" to "independent". As regards a parameter constraint list 513 for setting and displaying the present value and upper and lower limits of each parameter, a column to be set in is picked by mouse and a related value is inputted by way of the keyboard. In this way, a membership function is displayed graphically and a pointing device like a mouse is used to display a constraint in an easy-to-understand manner while inputting it in simple fashion. Although the foregoing description deals with geometric patterns of membership functions including decremental, incremental, triangular and trapezoidal types, the same principle can of course be applied with equal effect to other patterns such as bell type. Now, another embodiment of the present invention will be explained. Fig. 12 shows a configuration of a fuzzy inference system comprising automatic regulation means for membership functions according to the present invention. A fuzzy inference system 605 comprises an ordinary fuzzy inference device including data input means 601 for fetching a process input data, inference knowledge memory means 602 for storing a fuzzy inference knowledge (fuzzy rules, membership functions) representing a qualitative model of an object process, fuzzy inference execution means 603 for executing a fuzzy inference, and data output means 604 for producing an inference result of the fuzzy inference system as a process output. The fuzzy inference system further comprises teacher data memory means 606 for storing a teacher data (based on observation values) having a set of input and output values of an object process, membership function automatic regulation means 607, and a supervisor 608 for monitoring the output of the fuzzy inference system. The membership function automatic regulation means 606 has stored therein constraints used for regulating the membership functions stored in the inference knowledge memory means 602. These constraints were described with reference to the first embodiment above. In Fig. 12, the solid lines indicate a flow of data, and the dotted lines that of control signals. A hardware configuration of this fuzzy inference system includes a computer system, input-output means and process input-output units similar to the first embodiment described above. The fuzzy inference system 605 effects a fuzzy inference at the fuzzy inference execution means 603 by use of a process data inputted to the data input means 601 and the inference knowledge of the inference knowledge memory means 602. The result of inference may be directly used as a process output value. In this embodiment, however, a reasonability check is effected by the superviser 608 to check whether the inference result meets a predicted level. This level (reference) is set in advance on the basis of an observation data and user knowledge of the process. If determined as reasonable, the particular inference result makes up an output value of the process. In the case where an inference result is decided to be inappropriate, however, the supervisor 608 determines a process output value by use of another prediction means. The present embodiment includes output operation means 609 based on a recursion model as prediction means. The supervisor 608 produces an output value of the output operation means 609 as a process output data on the one hand, and stores a set of data including the particular output value and a process input data associated with the particular time point in the teacher data memory means 606 as a teacher data on the other hand. As a result, a process input-output data associated with the decision that an inference result of the fuzzy inference execution means 603 is inappropriate is accumulated on-line as a teacher data. At the time when the teacher data thus accumulated reaches a predetermined amount, the membership functions in the present system are regulated in the manner mentioned below. First, the supervisor 608 supplies a control signal to the data input means 601 and the data output means 604, thereby switching the input data destination to the teacher data memory means 606 and the inference result destination to the membership function automatic regulation means 607. The teacher data (input value) of the teacher data memory means 606 is inputted to the data input means to effect inference at the fuzzy inference execution means 603. The inference result is applied from the data output means 604 to the membership function automatic regulation means 66. The regulation means 607 compares the inference result with the teacher data (output value). If the error exceeds a reference value, the parameter value of the membership function is corrected in accordance with a predetermined constraint, thereby repeating regulations. A specific method of regulation is similar to the one mentioned with reference to the first embodiment. Prediction may be effected by the output operation means in parallel to the regulation. At the end of regulation, the membership function automatic regulation means 607 supplies a control signal to the data input means 601 and the data output means 604. Thus the input data destination is switched to the process input data and the inference result destination to the supervisor 608, thereby restoring an ordinary on-line operation. According to a fuzzy inference system of the present embodiment, when regulation of the fuzzy inference means is insufficient depending on the process behaviour, related process input-output values are accumulated as a teacher data to permit repeated regulation by membership function regulation means, thereby making possible a regulation with a high learning effect and accuracy. In addition, since the regulation is executed according to constraints based on the user knowledge, there is no danger of the regulation proceeding in an unexpected direction. It is also possible to limit the operation to partial regulation, thereby realizing a simple and efficient regulation. The result is a regulation executable safely in a short time length, thus permiting on-line regulation. Also, an off-line regulation in which the inference operation of the system is suspended during the regulating operation is of course possible. As a consequence, the time and manpower required for system construction and regulation are saved to a consdirable extent.

Claims: A membership function automatic regulation method for executing fuzzy inference by using teacher data including a set of input and output values of an object of inference, an inference rule and a membership function, and for effecting regulation in such a manner that the result of inference approaches the teacher data, wherein a constraint of said membership function is set, and the definition data of said membership function is changed while holding the constraint during the regulation. A method of membership function regulation according to Claim 1, wherein said constraint is a data for designating whether regulation is required for each membership function. A method of membership function regulation according to Claim 1 or 2, wherein said constraint designates a geometric style of said membership function and/or a geometric correlationship between a plurality of membership functions. A method of membership function regulation according to Claim 3, wherein when there are a plurality of constraints, the order of priority among said constraints can be designated. A method of membership function regulation according to Claim 3, wherein a constraint specifying a geometric style is a parameter designating a predetermined position for each predetermined pattern of the geometric style. A method of membership function regulation according to Claim 3, wherein a constraint specifying a geometric correlationship is a data designating at least selected one of the superposition, symmetry and sequence of membership functions. A method of membership function regulation according to Claim 5, wherein a membership function is defined by setting the value of said parameter. A method of membership function regulation according to Claim 7, wherein a membership function is regulated by changing the value of said parameter on the basis of a conditional equation representing said constraint with said parameter. A method of membership function regulation according to Claim 8, wherein said parameter includes an independent parameter inputted with data and a subordinate parameter generated according to said independent parameter and said conditional equation. A method of membership function regulation according to Claim 8, comprising means inputted with a macro instruction with a membership function name as an argument for converting said macro instruction into a conditional equation based on said parameter. A method of automatic membership function regulation for executing fuzzy inference according to claim 1, by use of a teacher data having a set of input and output values of an object of inference, an inference rule and a membership function and effecting the regulation in such a manner that the inference result approaches the teacher data, wherein a geometric style of a membership function represented by the correlationship between parameters indicating the type of a geometric pattern and a predetermined position of said pattern is set as a constraint, and when the result of inference based on the membership function already set exceeds a predetermined error, the value of said membership function associated with said parameter is changed and regulated while maintaining said constraint. A membership function automatic regulation apparatus comprising a computer system including an input-output unit (203, 204, 205), said apparatus further comprising input means (601) for teacher data including a set of input and output values of an object process of inference, memory means (602) for storing an inference rule, an initialized membership function and a constraint for regulating said membership function, inference execution means (603) receiving said teacher data for executing fuzzy inference with said inference rule and said membership function, and membership function automatic regulation means (607) for comparing the result of inference (output) of said inference execution means with an output value of said teacher data and regulating the membership function in accordance with said constraint in such a manner as to minimize the error if said error exceeds a reference value. An apparatus for membership function regulation according to Claim 12, further comprising means for setting while displaying on the screen a geometric style of a membership function to be regulated and a parameter for a predetermined position of said geometric style. An apparatus for membership function regulation according to Claim 12, further comprising display means for displaying a membership function table including names of membership functions and geometric patterns and/or a constraint table based on a conditional equation, and display control means for setting and displaying the contents of each table by input from input means and pointing. An apparatus for membership function regulation according to Claim 12, wherein the error of the inference result based on a membership function that has been regulated is repeatedly regulated to such an extent as to decrease below a predetermined value. A membership function automatic regulation apparatus according to claim 12, said apparatus comprising a computer system including a central processing unit (201), a memory unit (202) and an input-output unit (203, 204, 205), wherein: said memory unit includes a storage area for each of teacher data memory means (102) for storing a teacher data having a set of input and output values on an object process of inference, inference knowledge memory means (104) for storing an inference rule and a membership function, and constraint memory means (107) for storing a constraint indicated by a parameter representing the type of a geometric pattern and a predetermined position of said pattern for controlling the regulation of a membership function, said central processing unit (201) includes the functions of pretreatment means for initializing the membership function in accordance with said constraint, fuzzy inference means supplied with an input value of said teacher data for executing fuzzy inference according to said inference rule and said membership function, and membership function automatic regulation means (108) for comparing the inference output result of said fuzzy inference means with an output value of said teacher data and, when the error exceeds a predetermined value, changing the value of said parameter corresponding to said membership function on the basis of said constraint, and said input-output unit includes display means capable of setting while displaying on the screen said constraint and said membership function. A fuzzy inference system comprising means for automatically regulating a membership function according to claim 16, said system comprising: fuzzy inference means (601) for fetching an input data on an object process and effecting fuzzy inference of a process prediction on the basis of a membership function and an inference rule stored, another prediction means (608) for processing a process prediction from said input data without fuzzy inference, output data switching means (604) for producing a fuzzy inference result when said inference result meets a predetermined level, and the prediction result of said another prediction means when said inference result fails to meet said predetermined level, and teacher data memory means (606) for accumulating the prediction result and a process input data as of the particular time point as a set of input data when the prediction result of said another prediction means is outputted; said system further comprising constraint memory means (606) for storing a constraint for maintaining the style of said membership function under regulation, and membership function automatic regulation means (607) for regulating a data on said membership function in accordance with said constraint in such a manner as to minimize the error between the inference result of said fuzzy inference means and said teacher data when the input of said fuzzy inference is switched from said process data to said teacher data by the input data switching means (601).

Inventors: NAKANO TOSHIHIKO, OMORI KATSUMI, NAKANO, TOSHIHIKO, OMORI, KATSUMI, NAKANO, TOSHIHIKO, TENJIN APATO B305, OMORI, KATSUMI, CHISHINRYO B207
Applicants: HITACHI LTD, HITACHI, LTD.
Application year: 1992
Main classification: G06F9
IPC codes: G06N5, G06N7, G06N3