Fuzzy inference apparatus

Abstract: The fuzzy inference apparatus is provided to effect the tuning operation of the fuzzy inference with the use of the descent steps from the input/output data to be obtained from the specialists, the inputs of the users, and to automatically produce the desired fuzzy inference rules not by the trial and error, whereby the optimum inference rule can be obtained by the descent steps, and the specialists' knowledge and know-how can be easily amounted on the appliances as the inference rules.

Description: BACKGROUND OF THE INVENTION The present invention generally relates to a tuning technique of a fuzzy inference apparatus, and is adapted to automatically produce the inference rules of a fuzzy inference apparatus for satisfying the specification of the desires. Generally, the fuzzy inference operation is adapted to carry out by computers the knowledge the human beings have obtained from the conventional experiences with the use of the inference rules in such complicated control object as the mathematical model cannot describe. Fig. 15 shows the conventional fuzzy inferences. In the fuzzy inferences, the relation between the input information to be obtained from the control observation value input portion 101 such as control deviation e and its variation factor Δe, and the operation amount u to be outputted from the control operation amount output portion 103 is described as if --- then ... rule. The following inference rule is prepared by plurality in a fuzzy inference rule memory portion 104 as the inference rules. IF e is Zero (ZO) and Δe is Positive Small (PS) Then u is Negative Small (NS). Here the portion of the if --- is referred to as an antecedent part, and the portion of the then ... is referred to as a consequent part. The Zero, Positive Small, Negative Small and so on are labels showing the membership function of the input and the output to be used in the description of the inference rules. The membership functions are accommodated in the membership function memory portion 105. Fig. 16 shows one example of the membership function. The membership function is to be a symmetrical triangle. NB (Negative Big), NS (Negative small), ZO (approximately zero), PS (Positive small), PB (Positive Big) and so on are provided as the membership functions often used. A fuzzy inference step to be processed in the fuzzy inference computing portion 102 will be described hereinafter. Suppose that such n inference rules as described hereinafter are accommodated in a fuzzy inference rule memory portion 104. R 1 : IF e is ZO and Δe is PS THEN u is NS R 2 : IF e is ZO and Δe is PB THEN u is PB . . . R n : IF e is NB and Δe is ZO THEN u is NB where R i (i=1,2, ... n) is an inference rule. A method of obtaining the membership value µi of the antecedent part of the inference rule R i with respect to the input information e, Δe will be described with a first rule R 1 by way of example. The µzo (e), µps (Δe) show the membership values of the input information e, Δe with respect to the membership functions ZO, PS of the front item proposition. Suppose that the eo, Δeo have been inputted from the control observation value input portion 101 of Fig. 15, and the membership value µ 1 of the rule R 1 is µ1 = µzo(eo)Λµps (Δeo) where Λ means a minimum operation. The membership function ω1 of the conclusion of the consequent part of the inference rule R 1 is obtained as follows with the use of the membership value µns (u) of the membership function NS of the rear item proposition. ω1 = µ1Λµns(u) As the inference rule R i is plural in number, the membership function connected with the membership function of all the conclusions is as follows. u T = ω1Vω2Vω3V.....Vωn wherein V shows the max operation. As the actual control operation amount uo is a real number although the membership function u T is the membership function of the conclusion showing the control operation amount, the membership function u T is required to be converted into the real value. A center of gravity shown hereinafter is adopted as the converting method. The control operation amount uo is as follows. uo = (∫u·µ T du) / (∫µ T du) It is outputted into the control operation amount output portion 103 of Fig. 15. But in such construction as described hereinabove, it is difficult to effect the optimum construction of the inference rules and the membership functions because of such reasons as described hereinafter. The inference rules of the fuzzy inferences and the membership functions have to be decided so as to satisfy the control specification and the input/output relation to be desired. But a technique of automatically determining the inference rules and the membership functions is not established. Conventionally the fuzzy inference rules are designed by the experiments through the trial and error and the interviews with respect to the specialists. Therefore, the fuzzy inferences have problems in that longer time is required to be designed and the optimum design is hard to effect. In such construction as described hereinabove, there are problems in that the inference rules and the membership functions are fixed so that they cannot follow the variations in the dynamic characteristics of the control object caused by the variations in the control object value and the functions of learning the likes, sensitivities and so on of the users cannot be realized. Adaptation of fuzzy rules is known in the prior art, e.g. from European Patent Application EP 0 382 490 A2, which discloses a system and method to adjust membership functions by horizontal translation. European Patent Application EP 0 383 628 A2 discloses a membership function unit including a membership function setting section for adjusting the shape of membership functions. These prior art systems are limited in their performance due to the complexity of the fuzzy inference processing. SUMMARY OF THE INVENTION Accordingly, an essential object of the present invention is to provide a fuzzy inference apparatus which is provided to effect the tuning (adjusting) operation of the fuzzy inference with the use of the descent method from the input/output data to be obtained from the specialists, the inputs of the users, and so on. A fuzzy inference apparatus is provided as defined in independent claims 1 and 2. According to the above described construction, the automatic tuning operation of the membership functions of the fuzzy inference can be effected. Concretely, with the use of the descent method which is a type of nonlinear programming, the inference error which is the difference between the input/output data to be obtained from the specialists and the output of fuzzy inferences and the membership functions as to minimize the objective functions determined by the users. BRIEF DESCRIPTION OF THE DRAWINGS These an other objects and features of the present invention will become apparent from the following description taken in conjunction with the preferred embodiment thereof with reference to the accompanying drawings, in which; Fig. 1 is a block diagram of a fuzzy inference apparatus in a first embodiment of the invention; Fig. 2 is a flow chart showing the operation of the embodiment; Fig. 3 is a construction view of a membership function; Fig. 4 is a movement illustrating chart of a descent steps; Fig. 5 is a block diagram of a fuzzy inference apparatus in a second embodiment of the invention; Fig. 6 is a flow chart showing the operation of the embodiment; Fig. 7 is a block diagram of a fuzzy inference apparatus in a third embodiment of the invention; Fig. 8 is a flow chart showing an operation of the embodiment; Fig. 9 is a block diagram of a fuzzy inference apparatus in a fourth embodiment of the invention; Fig. 10 is a flow chart showing an operation of the embodiment; Fig. 11 is a block diagram of a fuzzy inference apparatus in a fifth embodiment of the invention; Fig. 12 is a block diagram of a fuzzy inference apparatus in a sixth embodiment of the invention; Fig. 13 is a flow chart showing the operation of the embodiment; Fig. 14 is an illustrating chart of an objective function; Fig. 15 is a block diagram of the conventional fuzzy inference apparatus, and Fig. 16 is a construction chart of a membership function. DETAILED DESCRIPTION OF THE INVENTION Before the description of the present invention proceeds, it is to be noted that like parts are designated by like reference numerals throughout the accompanying drawings. Referring now to the drawings, there is shown in Fig. 1, a block diagram of a fuzzy inference apparatus according to a first embodiment of the invention, which includes an inference rule memory portion 1 with the inference rules of the fuzzy inference being memorized in it, a membership function memory portion 2 with the geometric data of the membership functions of the antecedent part to be used in the fuzzy inference rules, and the function formula of the consequent part being memorized, a fuzzy inference computing portion 3 for effecting the inference computing operation for the fuzzy inference, a control object 4, a descent steps computing portion 5 for effecting the computing operation by the descent method from the input/output data to be obtained from the specialists and the output of the fuzzy inference so as to obtain the directions of the tuning, a membership function adjusting portion 6 for renewing the parameters to be accommodated in the membership function memory portion 2 in accordance with the computation results of the descent method computing portion 5, and an error computing portion for computing the inference error between the output of fuzzy inference and the input/output data. A fuzzy inference apparatus of an embodiment constructed as described hereinabove will be described hereinafter in its operation. Conventionally the fuzzy inference rules and the membership functions are designed by the interviews with specialists or the experiments by the trial and error. Therefore, the fuzzy inference requires the longer time in the designing of inference rules, with a problem that the optimum design is hard to effect. In the present invention, the tuning (adjusting) of the fuzzy inference is automatically effected from the input/output data to be obtained from the specialists. Concretely, from input/output data gathered from specialists, the membership functions in fuzzy inference rules are automatically tuned by means of a descent method so as to minimize the inference error, which is the difference between the input/out data and the output of fuzzy reasoning, the descent method is a kind of nonlinear programming. The detailed operation in the present embodiment will be described with the use of the flowchart of Fig. 2 with the control system having two-input and one-output as an example. (step a1) An initial setting of the inference rules and the input/output data number p are effected by the membership function adjusting portion 6. The inference rule memory portion 1 has the following inference rules accommodated therein. R 1 : IF x1 = A11 and x2 = A12 THEN y = f1 (x1, x2) R 2 : IF x1 = A21 and x2 = A22 THEN y = f2 (x1, x2) .............................. .............................. R i : IF x1 = Ai1 and x2 = Ai2 THEN y = fi (x1, x2) R n : IF x1 = An1 and x2 = An2 THEN y = fn (x1, x2) wherein i is an inference rule number, n is a total number of inference rules, Aij (i = 1, .., n, j = 1,2) is a membership function of the antecedent part, fi (x1, x2) is a linear function of the consequent part. The membership function Aij is assumed to be a isosceles triangle type as shown in Fig. 3, with the central value thereof being aij, and the width thereof being bij. Also, the linear function of the consequent part is fi (x1, x2) = pi · x1 + qi . x2 + ri (i=1, ...,n) The parameters for tuning are aij, bij, pi, qi, ri. They are referred to as tuning parameters and are accommodated in the order of the inference rules in the membership function memory portion 2. Although the membership function is assumed to be an isosceles triangle type in the present embodiment, the similar effect may be obtained if it is different in shape. Also, the consequent part may be a nonlinear function or a membership function or a real number only (fi = ri), instead of linear function when the real number is employed as the consequent part, the speed of inference and tuning is improved. An initial value of the central value aij of the membership function Aij of the antecedent part is set so that the domain of the input variable may be equally divided. An initial value of the width bij is made larger than the interval between the central values of the neighboring membership functions, and is set so that the respective membership functions may overlap one another. The coefficients pi, qi, ri of the linear functions of the consequent part are initiated at 0. Also, the input/output data number p is initiated at 1. (step a2) The input/output data (x1p, x2p, yp r ) to be obtained from the specialist are loaded. The (x1p, x2p) are inputted into the fuzzy inference computing portion 3, and the yp r is inputted into the descent steps computing portion 5 and the error computing portion 7. (step a3) The fuzzy inference is effected in the fuzzy inference computing portion 3 with the (x1p, x2p) being provided as inputs. The computing operation to be expressed in the following formulas is effected in the fuzzy inference computing portion 3 so as to decide the operating amount yp with respect to the control object 4. µi = Ai1 (x1p) · Ai2 (x2p) wherein µi is the membership value of the inference rule R i . (step a4) At the step a4, in the descent steps computing portion 5, the tuning directions of the tuning parameters aij, bij, pi, qi, ri are computed from the output of fuzzy inference yp · obtained at the step a3 and the yp r inputted at the step a2. The objective function of the following formula is considered to be minimized as the target of the tuning of the membership functions. E = 1 2 (yp · - yp r ) 2 The formula shows the difference between the output of fuzzy inference yp · and the data yp r obtained from the specialist, namely, the inference error. In the present invention, the membership function so that the inference error E can become minimum is automatically produced. In order to minimize the objective function E which is the inference error, the steepest descent method which is one of techniques in the descent method is used in the present embodiment. In the steepest descent method, the tuning parameters are renewed in accordance with the differential value of the objective function. A differential value ∂E/∂ri on the tuning parameter ri of the objective function E is taken into consideration. Fig. 4 shows an objective function E with the axis of abscissas as ri. The differential value ∂E(ri')/∂ri means the gradient of the objective function in the ri' point as shown in Fig. 4. Fig. 4 (a) shows when the ∂E(ri')/∂ri is positive. Fig. 4 (b) shows when the ∂E(ri')/∂ri is negative. Here the objective function E is reduced when the tuning parameter ri is moved slightly in the direction opposite to the sign of the ∂E(ri')/∂ri as shown in an arrow of Fig. 4(a). Similarly, effect the micro-amount adjustment of the tuning parameter in the direction opposite to the sign of the ∂E(ri')/∂ri even when the ∂E(ri')/∂ri of Fig. 4 (b) is negative, and the objective function E is reduced. Namely, adjust the tuning parameter ri in the direction opposite to the sign of the differential amount ∂E/∂ri, and the objective function E is reduced. By the repetition of it, the objective function E is converged into a minimum value. With the use of the nature, the tuning of each parameter is effected. At the step a4, the gradient values are computed in the descent steps computing portion 5, and, at the step a5, the parameters aij, bij, pi, qi, ri are tuned in accordance with the gradient values using this algorithm. Here ∂E/∂ri is obtained. From the (5), (7), (8) formulas, the numerical computing operation is effected from the (9) formula so as to obtain the value of ∂E/∂ri. Similarly, by the computing operation of ∂E/∂aij, ∂E/∂bij, ∂E/∂pi, ∂E/∂qi, ∂E/∂ri, the adjusting direction for reducing the objective function is counted. The computing operation of these ∂E/∂ai, ∂E/∂bi, ∂E/∂pi, ∂E/∂qi, ∂E/∂ri is effected in the descent steps computing portion 5. (step a5) In the membership function adjusting portion 6, the tuning parameters aij, bij, pi, qi, ri which are accommodated in the membership function memory portion 2 are renewed with the use of ∂E/∂aij, ∂E/∂bij, ∂E/∂pi, ∂E/∂qi, ∂E/∂ri obtained in step a4. The renewing operation is effected by the following formula. aij ← aij - Ka· ∂E ∂aij bij ← bij - Kb· ∂E ∂bij pi ← qi - Kp· ∂E ∂pi qi ← qi - Kq· ∂E ∂qi ri ← ri - Kr· ∂E ∂ri (i=1. ..., n, j=1, 2) wherein Ka, Kb, Kp, Kq, Kr are constants. (step a6), (step a7) At the step a6, the input/output data number p is compared with the total number N of the input/output data. When the input/output data number p is smaller than the total number N of the input/output data, the value of p is increased by 1, in the step a7, returns to the step a2 so as to repeat from the step a2 to the step a7 till the data number p becomes equal to the total mumber N of the input/output data. If the input/output data number p is equal to the total number N of the input/output data, the step advances to the step a8. (step a8) At the error computing portion 7, the inference error D and its variation amount ΔD are computed. The inference error D is computed with the use of the following formula. The variation amount ΔD is counted by the following formula. ΔD = D(t) - D(t-1) wherein the t shows the number of iteration of the tuning, the ΔD is the difference between the inference error at the previous tuning time and the present inference error. (step a9) At the error computing portion 7, the variation amount ΔD of the inference error is compared with the given threshold value T. If the variation amount ΔD is larger than the given threshold value T, the step moves to a step a10, the input/output data number p are set at 1 so as to repeat from the step a2 to the step a8. If the variation amount ΔD is smaller than the given threshold value T, the inference error has converged, and the error computing portion 7 stops the operations of the descent method computing portion 5, the membership function adjusting portion 6 to complete the tuning operation. At the completion time of the tuning operation, the knowledge of the specialist is expressed by the inference rules in the inference rule memory portion 1 and the membership function memory portion 2. According to the present embodiment, the optimum inference rules can be obtained by the descent method from the input/output data to be gathered from the specialist. Therefore, the knowledge, the know-how of the specialists may be easily mounted on the appliance by the use of the inference rules obtained. In the embodiment, the steepest descent method is used as the descent method of the descent method computing portion 5. Newton method, a conjugate gradient method, Powell method and so on may be used. Although the completion judgment of the tuning is effected by the value of the inference error in the error computing portion 7, a technique of giving the number of iteration of the tuning in advance before the tuning start may be used. A second embodiment of the invention will be described hereinafter. The block diagram of the fuzzy inference apparatus of a second embodiment will be shown in Fig. 5. In Fig. 5, reference numeral 1 is an inference rule memory portion with the fuzzy inference rules being memorized in it, reference numeral 3 is a fuzzy inference computing portion for effecting the inference computing operation of the fuzzy inference, reference numeral 7 is an error computing portion for computing the inference error from the output of fuzzy inference and the input/output data, which are similar in construction to that of Fig. 1. The construction difference between Fig. 5 and Fig. 1 is that Fig. 5 has an antecedent part parameter memory portion 8 for accommodating the parameters showing the geometry of the membership functions of the antecedent part, a consequent part real number memory portion 9 for accommodating the real values of the consequent part, an antecedent part descent steps computing portion 10 for obtaining the tuning directions of the membership functions of the antecedent part by the descent method from the input/output data and the output of fuzzy inference, an antecedent part parameter adjusting portion 11 for renewing the membership functions of the antecedent part in accordance with the operation results of the antecedent part descent steps computing portion 10, a consequent part descent steps computing portion 12 for obtaining the tuning directions of the real values of the consequent part by the computing operation of the descent method from the input/output data obtained from the specialists, and a consequent part real number adjusting portion 13 for renewing the real numbers of the consequent part in accordance with the computing results of the consequent part descent steps computing portion 12. A fuzzy inference apparatus in a second embodiment constructed hereinabove will be described hereinafter in its operation. The present invention is provided to automatically tune the membership functions of the antecedent part of the fuzzy inference rules and the real numbers of the consequent part from input/output data to be obtained from the specialists. The detailed operation of the present embodiment will be described hereinafter with the use of the flow chart of Fig. 6 with the control system of the two-input one-output as an example. (step b1) By the antecedent part parameter adjusting portion 11 and the consequent part real number adjusting portion 13, the parameters of the membership functions of the antecedent part and the real number of the consequent part are initially set. At this time, the initial setting operation of the input/output data number p will be also effected. The following inference rules are accommodated in the inference rule memory portion 1. R 1 : IF x1 = A11 and x2 = A12 THEN y = w1 R 2 : IF x1 = A21 and x2 = A22 THEN y = w2 .................... .................... R 2 : IF x1 = An1 and x2 = An2 THEN y = wn wherein i is an inference rule number, n is a total number of inference rules, Aij (i=1, ...,n j=1, 2) is a membership function of the antecedent part, wi (i=1, ..., n) is a real number of the consequent part. The membership function in the antecedent part is an isosceles triangle which is similar to that in a first embodiment, with the central value aij thereof and the value of the width bij thereof being accommodated, in the order of the inference rules, in the antecedent part parameter memory portion 8. The initial central value aij of the membership function Aij in the antecedent part is set so as to equally divide the domain of the input variable. An initial value of the width bij is set to become larger than the interval between the central values of the neighboring membership functions so as to set so that the membership functions may overlap one another. The real number wi of the consequent part is accommodated, in the order of the inference rules, in the consequent part real number memory portion 9, with the value thereof being initiated at 0. (step b2) The input/output data (x1p, x2p, yp r ) to be obtained from the specialists are inputted. The (x1p, x2p) is inputted into the fuzzy inference computing portion 3, and the yp r is inputted into an error computing portion 7, the antecedent part descent steps computing portion 10, and the consequent part descent steps computing portion 12. (step b3) By the use of the (x1p, x2p) inputted at the step b2, the fuzzy inference is effected by the fuzzy inference computing portion 3. The fuzzy inference computing portion 3 effects the computing operation shown by the following formula so as to decide the operation amount yp · with respect to the control object. µi = Ai1 (x1p) · Ai2 (x2p) wherein µi is a membership value of the inference rule R i . (step b4) From the output of fuzzy inference yp · obtained at the step b3 and yp r inputted at the step b2, the tuning direction ∂E/∂wi of the real number wi in the consequent part is obtained by the steepest descent method in the consequent part descent steps computing portion 12 as in the first embodiment. E is an objective function of the (8) formula. The computing method is similar to the first embodiment. (step b5) At a step b5, with the use of the ∂E/∂wi computed at the step b4, the tuning parameter wi accommodated in the consequent part real number memory portion 9 is renewed by the consequent part real number adjusting portion 13. The renewing operation is effected in accordance with the following formula. wi(t+1) ← wi (t) - Kw · ∂E ∂wi (i=1, ..., n) wherein Kw is a constant. (step b6) Fuzzy inference is effected again with a similar procedure to that of the step b3. (step b7) From the output of fuzzy inference yp · obtained at the step b6 and the yp r inputted at the step b2, the tuning direction (∂E/∂aij, ∂E/∂bij) of the parameters for aij, bij in the antecedent part is computed. (step b8) With the use of the (∂E/∂aij, ∂E/∂bij) computed at the step b7 by the antecedent part descent steps computing portion 10, the tuning parameters aij, bij accommodated in the antecedent part parameter memory portion 8 are renewed. The renewing operation is effected in accordance with the following formula. aij ← aij - Ka · ∂E ∂aij bij ← bij - Kb · ∂E ∂bij (i=1, ..., n j=1, 2) where, Ka, Kb are constant. (step b9) The input/output data number p is compared with the total number of the input/output data. If the input/output data number p is smaller than the total number N of the input/output data, the step goes to a step b10 to increase the value of the p by one, and returns to the step b2 and repeats from the step b2 to the step b8 till the data numeral p becomes equal to the total number N of the input/output data. If the input/output data number p is equal to the total number N of the input/output data, the step moves to a step b11. (step b11) The inference error D and its variation amount ΔD are computed by the error computing portion 7. The inference error D and its variation amount ΔD are computed with the use of the (15), (16) formulas as in the first embodiment. (step b12) By the error computing portion 7, the variation amount ΔD of the inference error is compared with the given threshold value T. If the variation amount ΔD is larger than the given threshold value T, the step moves to the step b13 so as to initiate the input/output data number p at 1, and repeats from the step b2 to the step b11. If the variation amount ΔD is smaller than the given threshold value T, the tuning is completed with the tuning being converged. At the tuning completion, the inference rules with the knowledge of the specialists being loaded in it are constructed in the inference rule memory portion 1 and membership function memory portion 2. According to the present embodiment, the optimum inference rules can be obtained, by the descent method, from the input/output data to be obtained from the specialists. As the consequent part of the inference rule is real numbers, the number of the tuning parameters is less, and the automatic tuning higher at speed than in the first embodiment can be effected. Thus, by the use of the present invention, the knowledge and know-how of the specialists can be easily mounted on the appliance as the inference rules. In the second embodiment, the geometry of the membership functions in the antecedent part is made a triangle type, and may be made the other in shape. Although the descent method used by the antecedent part descent steps computing portion 10 and the consequent part descent steps computing portion 12 is the steepest descent method, it may be Newton method, a conjugate gradient method, Powell method, or the like. In the present embodiment, the membership functions in the antecedent part and the real numbers in the consequent part can be tuned at the same time, but one of them can be used. A third embodiment of the invention will be described. Fig. 7 shows a block diagram of the fuzzy inference apparatus of a third invention. Referring now to Fig. 7, reference numeral 1 is an inference rule memory portion with the fuzzy inference rules being memorized in it, reference numeral 2 is a membership function memory portion with the membership functions to be used in the fuzzy inference rules and the function formula in the consequent part being accommodated in it, reference numeral 3 is a fuzzy inference computing portion for effecting the inference computing operation of the fuzzy inference, reference numeral 4 is a control object, reference numeral 5 is a descent steps computing portion for obtaining the direction of the tuning through the computing operation by the descent method, reference numeral 6 is a membership function adjusting portion for renewing the membership functions in accordance with the computation results of the descent steps computing portion 5. The above description is similar in construction to Fig. 1. The difference between Fig. 7 and Fig. 1 is in that Fig. 7 has a controller 20 for outputting the operation amount for the control object 4 from the difference between the input and the observation value, a differential computing portion 21 for differentiating the input variables, and an operation amount adding portion 22 for adding the output of the controller 20 and the output of the fuzzy inference rule computing portion 3. A third embodiment constructed as described hereinabove will be described hereinafter in its operation. Conventionally in a control object where the nonlinear property, interference and so on as shown in, for example, a multiple indirect manipulator cannot be neglected, it is difficult to follow the changes in the target value only by the normal feedback control. In order to solve such problem, a feed forward control is proposed. But in order to design the control system using the feed forward, an inverse dynamic model of the control object is required to be completely known, thus resulting in difficult designing operation. The present invention automatically obtains the inverse dynamic model of the control object in the form of the fuzzy inference rule so as to effect the optimum feed forward controlling operation. The present embodiment will be described hereinafter in detail with a control system of one-input one-output as an example. The controller 20 is to have only a proportional computing operation in the present embodiment. In the controller 20 with a target value being r(t), an observation value from a control object being h(t), such a computing operation as described in the following formula will be described. e(t) = r(t) - h(t) u1 (t) = k·e(t) wherein u1 is an operation amount of a control object 4, t is time, k is a proportional constant. The observation value h is as follows. h = G(u1 + u2) where G is the transfer function of the control object. Here the u2 is a feed forward amount. The adding operation of the u1 and the u2 is effected in the operation amount adding portion 22. A portion of effecting the feed forward computing operation surrounded by dotted lines of Fig. 7 is similar in construction to the first embodiment. Accordingly, the portion within the dotted lines, if certain input/output data are given, constructs the fuzzy inference rules which satisfy the input/output relation sufficiently. In the embodiment, the input/output data are set as follows. Input data: target value r and its differential amount dr/dt Output data: operation amount (u1) with respect to a control object When the target value r and the differential amount dr/dt are inputted by the setting operation like this, the inference rules for outputting the operation amount u1 are obtained. The input/output relation of inference rules is reverse to the control object for outputting the observation amount when the operation amount u1 is inputted, and the inference rules to be produced is an inverse dynamic model of the control object. The differential amount dr/dt of a target value r which is one of the input data is obtained by the differential computing portion 21. The different point from the first embodiment in the construction within the dotted lines is in that the error computing portion does not exist. In the first embodiment, the error computing portion computes the variation amount of the inference error so as to decide the completion of the tuning from the value. The present invention is an adaptive control where it is normally caused to follow the changes of the control object. Therefore, as the tuning is normally required, the completion decision is not required. The algorithm of the tuning is shown as in Fig. 8. The step c1 through step c5 are the same as the step a1, step a5 in Fig. 2. The difference between them is that there is no completion decision and branching by the data number in the step a6 and its subsequent in Fig. 2. In the present embodiment, the repetition is effected from the step c1 to the step c5. By the present embodiment, the inverse dynamic model of the control object is automatically obtained. For some time from the tuning start time, the membership function of the antecedent part and the linear function of the consequent part to be accommodated in the membership function memory portion 2 are not converged into the optimum values, with the value near the initial value being outputted to u2. Accordingly, the control object is controlled mainly by the controller 20. The variation of the control object causing by the change of the target value cannot be followed. As time passes, the tuning of the fuzzy inference advances to learn the inverse dynamic model of the control object. The variation of the control object may be also followed sufficiently. According to the present embodiment, the adaptive control may be effected with respect to the changes in the target value, even in the difficult control object where the control object has the nonlinear characteristics and the interferences cannot be neglected, by the use of the fuzzy inference in the feed forward control and by the use of the descent method in the tuning thereof. In the third embodiment, the controller 20 has a proportional control only, with the other controller such as PID control and so on being used. Although the differential computing portion 21 is to output one order differentiation only of the input value, it may output together with the differential value of a high order. The construction of a portion where the automatic tuning operation is effected is made similar to that of the first embodiment, the construction of the second embodiment may be used in the portion. In this case, the consequent part of the inference rules becomes real numbers, thus realizing the merit of the second embodiment where the tuning becomes higher at speed. A fourth embodiment of the invention will be described hereinafter. Referring now to the drawings, there is shown in Fig. 9, a block diagram of a fuzzy inference apparatus according to a fourth embodiment, which includes an inference rule memory portion 1 with the inference rules of the fuzzy inference being memorized in it, a membership function memory portion 2 with the geometric data of the membership functions of the antecedent part to be used in the fuzzy inference, and the function formula of the consequent part being memorized in it, a fuzzy inference computing portion 3 for effecting the computing operation of the fuzzy inference, a descent steps computing portion 5 for obtaining the direction of the tuning by the descent method computing operation from the input/output data to be obtained from the specialists and the output of fuzzy inferences so as to obtain the direction of the tuning, a membership function adjusting portion 6 for renewing the membership functions in accordance with the computing results of the descent steps computing portion 5, and an error computing portion for computing the inference errors from the the fuzzy output of fuzzy inferences and the input/output data. The above description is similar to the construction of Fig. 1. The difference from the construction of Fig. 1 is in that Fig. 9 has the output of fuzzy inference displaying portion 31 for displaying the output of the fuzzy inference computed by the fuzzy inference computing portion 3 and the user input portion 32 for inputting the likes of the user with respect to the output of fuzzy inferences. A fuzzy inference apparatus in an embodiment constructed as described hereinabove will be described hereinafter in its operation. In order to realize an appliance where the likes and sensitivities of the individual users are learned and the controls suitable for the likes of the users are effected as it is used more, the control algorithem must be changed gradually with the inputs of the users. In the present invention, by the loading of the user inputs, the fuzzy inference rules are gradually tuned so as to realize the controls which are suitable for the likes and sensitivities of the users. This is an adaptive fuzzy control which is adapted to learn the likes of the users with real time. In order to describe more concretely the operation of the present embodiment, the inference of the washing time in a washing machine will be described by way of example. In an fully automatic washing machine and so on, the washing time is decided by changes in the transmission factor of the washing water to be detected by an optical sensor and its saturation time. The relation will be described as the following fuzzy inference rules if the washing time, the changes in the transmission factor of the washing water, the saturation time in the transmission factor of the washing water are shown respectively as y, x1, x2. R 1 : IF x1 = A11 and x2 = A12 THEN y = f1 (x1, x2) R 2 : IF x1 = A21 and x2 = A22 THEN y = f2 (x1, x2) ......................... ......................... R n : IF x1 = An1 and x2 = An2 THEN y = fn (x1, x2) In the present embodiment, these inference rules are gradually changed in accordance with the likes of the users. The operation of the present embodiment will be described with the flow chart of Fig. 10. (step d1) The initial setting operation of the fuzzy inference rules, the membership functions of the antecedent part, the linear functions of the consequent part are accommodated in the inference rule memory portion 1 and the membership function memory portion 2. In the washing machine, the standard inference rules are kept set before shipment, so that the proper washing time may be obtained even in the inference rule only. This is because the washing operation may be effected sufficiently even in the condition where the learning is not effected. In the construction of the initial inference rules, the first embodiment of the invention may be used and the experiments by the trial and error, and the interviews to the specialists may be used as before. (step d2) At the start of the washing operation, the input data are loaded into the fuzzy inference computing portion 3. The changes x1 and the saturation time x2 in the transmission factor of the washing water to be detected by the optical sensor of the washing machine are inputted into the fuzzy inference computing opeation 3. (step d3) In the fuzzy inference computing operation 3, the fuzzy inference operation is effected using the changes x1, the saturation time x2 in the transmission factor of the washing water so as to obtain the washing time y · . The operation procedure of the fuzzy inference is the same as the step a3 in the first embodiment. (step d4) The washing time y · which is the output of fuzzy inference is displayed for the user by the output of fuzzy inference display portion 31. The user inputs the correction amount from the user input portion 32 in accordance with one's likes with respect to the washing time y · which is the output of fuzzy inference. For example, when considerably dirty clothes are washed, the washing time is displayed as 10 minutes by the fuzzy inference. When the user considers it better to wash them longer than the value, the user inputs the difference between the desired washing time and the displayed washing time into the user input portion 32 so as to set it into the longer washing time. The user input portion 32 outputs the correction amount y'. Unless the user adds the change with respect to the displayed output of fuzzy inference, the correction amount y' is 0. (step d5) The descent steps computing portion 5 makes sure whether or not the correction amount y', which is the output from the user input portion 32 is 0. If the correction amount y' is 0, it is considered that the output of fuzzy inferences express the user's desire. Therefore, the step moves to step d2 without tuning of the inference rule so as to wait for the sensor input when next washing starts. If the correction amount is not 0, the step moves into the step d6. (steps d6, d7) In the descent method computing portion 5, the correction amount y' is added to the output of fuzzy inference y · into y r . The correction amount y r and the input data x1, x2 are assumed into one input/output data, and the tuning operation of the membership function is effected by the descent method. The computation of the tuning is the same as the steps a4, a5 in the first embodiment. After the renewing of the membership function, the step returns into the step d2 so as to wait for the sensor input at the next washing starting time. According to the present embodiment, the results of the fuzzy inference is shown for the user by the output of fuzzy inference display portion 31. The user's desire with respect to the result is inputted from the user input portion 32 so as to change the membership function of the fuzzy inference with the use of the descent method. An appliance which is capable of controlling operation in accordance with the user's desire may be realized if it is used more. The other appliance may be used although the description is effected by way of washing machine in the embodiment. Although the construction of a portion for effecting the automatic tuning operation is made similar to that of the first embodiment, the construction of the second embodiment may be used in this portion. In this case, the consequent part of the inference rule becomes a real number, and the merits of the second embodiment where the tuning becomes higher at speed, and so on may be also realized. A fifth embodiment of the invention will be described. The block diagram of the fuzzy inference apparatus of the fifth embodiment will be shown in Fig. 11. There is shown in Fig. 11, the block diagram of a fuzzy inference apparatus according to the fifth invention, which includes an inference rule memory portion 1 with the inference rules of the fuzzy inference being memorized in it, a membership function memory portion 2 with the geometric data of the membership functions of the antecedent part to be used in the fuzzy inference, and the function formula of the consequent part being memorized in it, a fuzzy inference computing portion 3 for effecting the computing operation for the fuzzy inference, a descent steps computing portion for obtaining the direction of the tuning by the descent method from the input/output data to be obtained from the specialists and the output of fuzzy inferences, a membership function adjusting portion 6 for renewing the membership functions in accordance with the computation results of the descent steps computing portion 5, and an error computing portion 7 for computing the inference error from the fuzzy output of fuzzy inferences and the input/output data. The above description is similar to the construction of Fig. 1. The difference in the construction of Fig. 1 and Fig. 11 is in that Fig. 11 has an inference rule retrieving portion 41 for retrieving the inference rule memory portion 1 and the membership function memory portion 2 so as to obtain the inference rule larger in the adaptation range, and an inference rule display portion 42 for displaying the inference rules obtained by the inference rule retrieving portion 31. A fuzzy inference apparatus in an embodiment constructed as described hereinabove will be described hereinafter in its operation. In the fifth embodiment, the construction of the membership function of the fuzzy inference is automatically effected and the knowledge of the specialists can be obtained as the inference rules. When the noises are included very much in the input/output data to be obtained from the specialists, the tuning may be advanced in an unexpected direction. Also, when tuning is conducted so as to minimize the inference error for input/output data given previously, the inference error for new data not given at the tuning time may become large. In order to avoid such condition, the designer and the user have to grasp, check the inference rules and the membership functions constructed automatically. In order to solve these problems, the inference rule obtained by the automatic tuning will be displayed. In order to efficiently check the inference rules, the inference rule whose adaptation range is wide will be displayed first. The operation procedure of the automatic tuning is similar to the flow chart of Fig. 2 in the first embodiment. The different portion is in that the inference rule is displayed after the tuning completion. The inference rule retrieving portion 41 retrieves the membership function memory portion 2, after the tuning completion, so as to effect the operation of the following formula. (i=1, ...,n) wherein Si shows the width of the adaptation range of the inference rule R i . The inference rule R i , the geometry of the membership functions, and the parameters of the function formula of the consequent part are sent to the inference rule displaying portion 42 in the size order of Si. The inference rule display portion 42 is composed of CRT and its control apparatus so as to display the inference rule sent from the inference rule relieving portion 41, the information such as membership function and so on. According to the present embodiment, the fuzzy rule obtained by the descent method may be displayed in the order of width of the adaptation range. Therefore, the user can grasp the inference rule obtained by the automatic tuning operation, thus allowing the advancing condition of the tuning and the inference rule to be checked. Although the CRT is used as the inference rule displaying portion 42 in the embodiment, light emitting diode, liquid crystal display and so on may be used. Also, although the construction of the portion for effecting the automatic tuning operation is made similar to that of the first embodiment, the construction of the second embodiment may be used in this portion. In this case, the consequent part of the inference rule becomes real numbers, the tuning becomes higher speed, and so on, realizing the merits of the second embodiment. A sixth embodiment of the invention will be described. Fig. 12 shows the block diagram of the fuzzy inference apparatus of the sixth embodiment. In Fig. 12, reference numeral 1 is an inference rule memory portion with the inference rules of the fuzzy inference being stored in it, reference numeral 2 is a membership function memory portion with a membership function of the antecedent part to be used in the inference rules and the function formula of the consequent part being accommodated in it, reference numeral 3 is a fuzzy inference computing portion for effecting the computing operation of the fuzzy inference, reference numeral 4 is a control object, reference numeral 6 is a membership function adjusting portion for renewing the membership functions in accordance with the computing results of the descent steps computing portion 5', which are similar in construction to Fig. 1. The difference in construction between Fig. 1 and Fig. 12 is in that Fig. 12 has an evaluation value computing portion 51 for computing the evaluation value from the observation value h from the control object, an input signal generating portion 52 for generating the step shaped input signal, and a descent steps computing portion 5' for computing the descent steps from the observation value h of the control object 4 so as to obtain the direction of the tuning. The fuzzy inference apparatus in a sixth embodiment constructed as described hereinabove will be described hereinafter in its operation. Conventionally the construction of the fuzzy inference rules and the designing of the membership function are effected by the technique through the interviews with specialists and the accumulation of the trial and error of experiments. Therefore, the fuzzy inference has problems in that long period are required to describe inference rules, and the optimum designing is hard to effect. The present invention is to effect the automatic tuning (adjusting) of the fuzzy inference so as to make optimum the objective functions the designer optionally sets. Unlike the first embodiment, the present embodiment does not need the input/output data from the specialists. With the control system of two-input one-output as an example, the detailed operation procedure in the present embodiment will be described with the use of the flow chart of Fig. 13. (step f1) In the present embodiment, the inference rule memory portion 1, the membership function memory portion 2, the fuzzy inference operation portion 3 are similar in construction to those in the first embodiment. The inference rules and the membership functions are similar in construction. At the step f1, the initialization of the membership functions is also effected as at the (step a1) of the first embodiment. (step f2) Such step function as described in Fig. 14 (a) is inputted into the fuzzy inference computing portion 3 by the input signal generating portion 52. R in the drawing is a control target value. (step f3) The fuzzy inference is effected as in the (step a3) of the first embodiment. (step f4) The objective function E in the automatic tuning is set as follows so as to compute the value thereof by the objective function operation portion 51. E = ∫ (h(t) - R) 2 dt wherein R is a target value, t is time. Fig. 14 (b) shows a response of the output h(t) with respect to the step input with the horizontal axis being time. The E of the above described formula shows the area of the oblique line portion of Fig. 11 (b), is called integral of squared error (ISE). ISE is a kind of performance index of transient response. The value of ISE becomes larger when the response is slow and the steady state error exists. Accordingly, when the ISE is small in value, the desirable control is effected. In the present embodiment, the automatic tuning is effected so as to minimum the E with the use of the descent method with the objective function E being provided as the ISE. Although the objective function is made ISE in the present embodiment, the other index such as ITAE (integral of time-multiplied absolute value of error), rise time, overshoot amount and so on may be used. In order to effect the tuning for minimizing the objective function, the steepest descent method which is one technique among the descent methods in the present invention is used. In the steepest descent method, the tuning parameter is renewed in accordance with the differential value of the objective function. As in the first embodiment, the differential value of the objective function by the tuning parameter is computed. Now the differential value of the differential function by the ri is obtained. At the step f4, the following computing operation is effected so as to obtain the above described ∂E/∂ri by the descent method computing portion 5. wherein T is sample time. The computing operation is repeated till the h(t) is converged by the following step f5, and the ∂E/∂ri is obtained. Likewise, the computing operations of the other ∂E/∂aij, ∂E/∂bij, ∂E/∂pi, ∂E/∂qi are also effected in the descent method computing portion 5. (step f5) The evaluation value computing portion 5 decides whether or not the output h(t) from the control object is converged on the target value. The deciding operation is effected by the following conditional formula. |h(t) - R| <0.05 * R Unless the condition is satisfied, the step f3 is restored. (step f6) As in the step a5 in the first embodiment, from the computed ∂E/∂aij, ∂E/∂bij, ∂E/∂pi, ∂E/∂qi, ∂E/∂ri, the tuning parameters aij, bij, pi, qi, ri, which are accommodated in the membership function memory portion 2 are renewed with the use of the membership function adjusting portion 6. (step f7) By the evaluation value computing portion 51, the evaluation value E is obtained in accordance with the (26) formula. (step f8) By the evaluation value computing portion 51, the E is compared with the given threshold value T E . When the evaluation value E is larger than the threshold value T E , it is judged that the sufficient tuning is not effected yet. The step returns to a step f2 so as to repeat the steps f2 through f7. When the evaluation value E has become smaller than the threshold value T E , it is judged that the fuzzy inference rules possesed sufficiently good control property has been obtained, then stop the operations of the descent steps computing portion 5' and the membership function adjusting portion 6. According to the present embodiment, the fuzzy inference rules which are provided to make optimum the ISE can be automatically produced by the descent method. Accordingly, such appliance controlling operation as to automatically make the objective function optimum can be effected. In this embodiment, the other geometry of membership functions can be used although the geometry of the membership functions of the antecedent part is made triangle in type. Although the descent method used by the descent steps computing portion 5' is the steepest descent method, the Newton method, the conjugate gradient method, the Powell method and so on may be used. As is clear from the foregoing description, according to the arrangement of the present invention, the optimum inference rule can be obtained by the descent method. Therefore, the specialists' knowledge and how-how can be easily mounted on the appliances as the inference rules.

Claims: A fuzzy inference apparatus comprising: a fuzzy inference computing portion (3) which is provided to effect a fuzzy inference from control input values and observation values from a control object (4) so as to output an operation amount (y p *) with respect to the control object (4); an inference rule memory portion (1) with inference rules to be used in the fuzzy inference being stored in it; a membership function memory portion (2) for storing geometric data of membership functions of antecedent parts and parameters of linear functions of consequent parts to be used in the inference rules; a descent steps computing portion (5) which is provided to effect a computing operation by a descent method from the input/output data to be given in advance and the output of fuzzy inferences to be obtained from the fuzzy inference computing portion (3); a membership function adjusting portion (6) for varying at least one of the membership functions of the antecedent parts and/or the functions of the consequent parts in accordance with the outputs of the descent steps computing portion (5); and an error computing portion (7) which is provided to compute the inference error from the input/output data and the outputs of the fuzzy inference to be obtained from the fuzzy inference computing portion (3) and to stop the operations of the descent steps computing portion (5) and the membership function adjusting portion (6) when the inference error or the change of inference error fulfill a given condition; wherein said fuzzy inference computing portion effects said fuzzy inference by the steps of computing for each said inference rule the membership value of said antecedent part of said inference rule as the product of the values of said membership functions of said antecedent part of said inference rule for said control input values and said observation values; computing for each said inference rule the weighted consequent value as the product of said membership value of said antecedent part of said inference rule and the value of said linear function of said consequent part of said inference rule for said control input values and said observation values; computing said operation amount as the sum over all said inference rules of said weighted consequent values divided by the sum over all said inference rules of said membership values. A fuzzy inference apparatus comprising: a fuzzy inference computing portion (3) which is provided to effect a fuzzy inference from control input values and observation values from a control object (4) so as to output an operation amount (y p *) with respect to the control object (4); an inference rule memory portion (1) with inference rules to be used in the fuzzy inference being stored in it; an antecedent part parameter memory portion (8) with parameters showing the geometry of membership functions of an antecedent part to be used in the inference rules being stored in it; a consequent part real number memory portion (9) with the real numbers of a consequent part to be used in the inference rules being memorized in it; an antecedent part descent steps computing portion (10) for effecting a descent method computing operation with respect to the parameters showing the geometry of the membership functions of the antecedent part from the input/output data and the output of fuzzy inferences to be obtained from the fuzzy inference computing portion (3); an antecedent part parameter adjusting portion (11) for varying the parameters showing the geometry of the membership functions accommodated in the antecedent part parameter memory portion (8) in accordance with the outputs of the antecedent part descent steps computing portion (10); a consequent part descent steps computing portion (12) for effecting the descent method computing operation with respect to the real numbers of the consequent part from the input/output data given in advance and the outputs of fuzzy inferences to be obtained from the fuzzy inference computing portion (3); a consequent part real number adjusting portion (13) for varying the real numbers of the consequent part accommodated in the consequent part real number memory portion (9) in accordance with the outputs of the consequent part descent steps computing portion (12); and an error computing portion (7) for computing the inference errors from the input/output data and the outputs of fuzzy inferences to be obtained from the fuzzy inference computing portion (3) and stopping the operations of the antecedent part descent steps computing portion (10), the antecedent part parameter adjusting portion (11), the consequent part descent steps computing portion (12) and the consequent part real number adjusting portion (13) when the inference error or the change of inference error fulfill a given condition ; wherein said fuzzy inference computing portion effects said fuzzy inference by the steps of computing for each said inference rule the membership value of said antecedent part of said inference rule as the product of the values of said membership functions of said antecedent part of said inference rule for said control input values and said observation values; computing for each said inference rule the weighted consequent value as the product of said membership value of said antecedent part of said inference rule and the value of said real number of said consequent part of said inference rule; computing said operation amount as the sum over all said inference rules of said weighted consequent values divided by the sum over all said inference rules of said membership values. A fuzzy inference apparatus comprising: a feedback PID controller (20) for outputting an operation amount into a control object (4) from control input values and observation values from the control object (4); a differential computing portion (21) for obtaining the differential amount of the control input values; a feed-forward fuzzy controller (3) for effecting a fuzzy inference from the control input values and the outputs of the differential computing portion (21) and outputting the operation amount into the control object (4); an inference rule memory portion (1) with inference rules to be used in the fuzzy inference being stored in it; a membership function memory portion (2) with geometric data of membership functions of an antecedent part to be used in the inference rules and the functions of a consequent part being stored in it; an operation amount adding portion (22) for adding the outputs of the feedback PID controller (20) and the outputs of the feed-forward fuzzy controller (3) and outputting this sum to the control object (4); a descent steps computing portion (5) for effecting the computing operation by the descent method from the outputs of the feedback PID controller (20) and the inference outputs to be obtained from the feed-forward fuzzy controller (3); and a membership function adjusting portion (6) for varying at least one of the membership functions of the antecedent part accommodated in the membership function memory portion (2) and the functions of the consequent part in accordance with the outputs of the descent steps computing portion (5). An apparatus as claimed in claim 1, further comprising a user input portion (32) for inputting the user's likes with respect to the output of the fuzzy inference computing portion (3), wherein the fuzzy inference computing portion (3) once effects the fuzzy inference, whereupon the user input portion (32) is used for inputting correction data of the output results so as to correct the membership functions based on the input correction data, the descent steps computing portion (5) is provided for effecting the computing operation by the descent method from the output of fuzzy inferences to be obtained from the fuzzy inference computing portion and the outputs of the user input portion (32), and the error computing portion (7) is provided for computing the inference errors from the outputs of the user input portion (32) and the outputs of fuzzy inferences to be obtained from the fuzzy inference computing portion (3) and stopping the operations of the descent steps computing portion (5) and the membership function adjusting portion (6) when the inference error or the change of inference error fulfill a given condition. An apparatus as claimed in claim 1, further comprising an inference rule displaying portion (42) for retrieving the inference rule memory portion (1) and the membership function memory portion (2) so as to display the inference rules and to judge whether or not the membership functions are suitable. An apparatus as claimed in claim 1, comprising, instead of the error computing portion (7), an evaluation value computing portion (51) for obtaining the evaluation values showing the good control property from the observation values of the control object (4) and stopping the operations of the descent steps computing portion (5') and the membership function adjusting portion (6) when the evaluation value has been made better than a given value.

Inventors: HAYASHI ISAO, NOMURA HIROYOSHI, WAKAMI NOBORU, HAYASHI, ISAO, NOMURA, HIROYOSHI, WAKAMI, NOBORU
Applicants: MATSUSHITA ELECTRIC IND CO LTD, MATSUSHITA ELECTRIC INDUSTRIAL CO., LTD.
Application year: 1991
Main classification: G06F9
IPC codes: G05B13, G06N7, G06F9