NEURAL NETWORK/FUZZY CONVERSION DEVICE

Abstract: The present invention relates to a conversion device which converts data expressed as a neural network representation to a relationship of fuzzy variables having the same dynamic content, or which converts data expressed as a relationship of fuzzy variables to a neural network representation with the same dynamic content. An aspect of the present invention is to have a neural network learn the input-output relationship which occurs when a fuzzy logic scheme is used exclusively or to have a fuzzy logic system learn the input-output relationship which occurs when a neural network is used exclusively.

Description: DESCRIPTION NEURAL NETWORK/FUZZY CONVERSION DEVICE FIELD OF THE INVENTION The present invention relates to a conversion apparatus which converts data expressed as a neural network representa¬ tion to a relationship of fuzzy variables having the same dynamic content, or which converts data expressed as a relationship of fuzzy variables to a neural network represen¬ tation with the same dynamic content. This invention also relates to an apparatus that optimizes evaluation functions by searching at high speed for a combination of data which will minimize a previously defined evaluation function. DESCRIPTION OF THE PRIOR ART In a neural network, it iε known to employ a learning algorithm known as back propagation to automatically obtain a relationship which exists between input and output. Back propagation is well known in the art. In a system using fuzzy logic, a non-linear relationship can easily be expressed in terms of IF-THEN rules, and meiαbership functions which are comprehensible to humans. Examples of fuzzy algorithms are also well known in the art. However, several drawbacks are inherent in neural networks and fuzzy logic schemes individually. For example, when a neural network is used exclusively, a long time is required for learning, and sometimes learning is not completed. Furthermore, when a neural network is used exclusively, it is difficult for a human to intuitively understand what method (or rules) are being applied to derive the output which is the result of the learning. On the other hand, when a fuzzy logic scheme is used exclusively, there is no inherent learning algorithm available, like back propagation. Thus, a great deal of trial and error time is required to fine-tune the parameters of the fuzzy rules and membership functions to arrive at a desired output with requisite precision. Furthermore, the exclusive use of a fuzzy logic scheme limits the capability for expressing non¬ linear functions. To overcome such inherent drawbacks, attention has focused on combining neural networks and fuzzy logic schemes, since the strengths of one scheme have been found to compensate for the drawbacks of the other. An example of an existing neural network fuzzy conversion device using both a neural network and fuzzy logic is described in the published paper by S. Horikawa, T. Furuhashi, S. Okuma and Y. Uchikawa entitled "A Learning Fuzzy Controller Using a Neural Network" published in Volume 27, No. 2 of the S.I.C.E. (Society of Instrumentation and Control Engineering) 1991, the subject matter of which is incorporated herein by reference. This device features both a fuzzy calculation device and a neural network which performs the same calcula¬ tions. Learning is accomplished by means of back p opagation. However, the above neural network-fuzzy conversion device employs both a fuzzy calculation scheme and a neural network which performs the same calculations. As a result, that device's ability to express non-linear functions is only as good as that of the fuzzy logic scheme. This problem is compounded by the limitation that fuzzy logic is less capable of expressing non-linear functions than a neural network alone. Further drawbacks reside with those devices that are used for optimizing data. One optimization algorithm, known as the DS (Downhill Simplex) Method, employs an automatic search for a combination of data which will reduce a previously defined evaluation function. However, when the DS Method is used, within the data space to be searched, the result of the search does not always yield the combination of data which will minimize the evaluation function, ( i.e., in a data area with given boundaries, it cannot always find that combination of data which will minimize the evaluation function) . Another optimization algorithm, known as the GA (Genetic Algorithm) Method, is capable of finding, within the data area to be searched, the combination of data which will minimize the evaluation function. However, the time required to locate the optimal combination of data is considerably longer than that required by the DS Method. SUMMARY OF THE INVENTION In view of the foregoing, it should be apparent that there still exists a need in the art for an apparatus that provides for a conversion of data expressed as a neural network representation to a relationship of fuzzy variables having the same dynamic content, or which can convert data expressed as a relationship of fuzzy variables to a neural network ^ representation with the same dynamic content. The fuzzy/neural conversion apparatus of the invention includes a neural network device that calculates the output of the neural network at the time data is inputted into the network, and a learning device for the network by which the neural network learns when it operates exclusively. A fuzzy inference device calculates the output of the fuzzy inference device at the time the same data are inputted into the fuzzy logic device. An input data generator determines ε set of data samples to be inputted to both the neural network device and the fuzzy logic device. A setting device is used to set initial conditions for both the neural network and the fuzzy logic devices, which sets initial values for parameters and defines initial structures. A calculation device determines values which represent the accuracy of the approximation between the outputs of the neural network and the fuzzy logic devices, h neural network-to-fuzzy conversion device determines (or adjusts) the parameters of the fuzzy logic device when the data representation is converted from a neural network form, to a fuzzy logic form. A fuzzy-to-neural network conversion device calculates (or adjusts) the parameters of the neural network when the data representation is converted from a fuzzy logic form to a neural network form. With this configuration, the knowledge obtained by human foresight can be reflected in an approximate manner in the fuzzy logic device, and the fuzzy representation can be converted to a neural network representation. As a result, the time required by the neural network for learning is reduced, and the learning can definitely be completed. Furthermore, once the data has been converted to a neural network representation, fuzzy rules and parameters of membership functions can then be fine-tuned automatically by learning. Finally, because a normally structured neural network can be used, the apparatus is able to represent non¬ linear functions more effectively than is possible when fuzzy logic alone is used. The present invention has the same ability to express non-linear functions as a neural network used by itself. Once learning has been completed, the neural network representation can be converted into a representation using fuzzy logic. Thus, the product of the neural network's- learning can be converted to fuzzy rules and membership func¬ tions, which are easier than the neural network output for human beings to understand intuitively. In light of the foregoing, one object of the present invention is to provide a neural network apparatus that learns the input-output relationship which occurs when a fuzzy logic scheme is Used exclusively. Another object is to provide a fuzzy logic apparatus that learns the input-output relationship which occurs when a neural network is used exclusively. Another object of the invention is to provide an apparatus which facilitates conversion between neural and fuzzy forms by randomly choosing the starting point for a search using the DS method, and then repeatedly implementing the DS Method. This device implements an optimization procedure called the Iterated Downhill Simplex Method (IDS) . In this apparatus, the initial values of a data series are set as the starting point of a search. A device performs the DS procedure by searching for the combination of data which will minimize an evaluation function. The search commences from a given set of data and continues according to the DS Method. A device is also included that calculates an evaluation value for an evaluation function of the data series. A judgment device then determines whether the DS procedure, used to search for the optimal combination of data, should be performed again or concluded. The effects which can be achieved through the structure described above are: (1) that a combination of data can be found in the data space to be searched which will minimize the evaluative function, and (2) that the time required to search for the optimal combination of data is shorter than that required by the GA Method. These and other objects, advantages and features of the invention will be more clearly understood by reference to the following detailed description of the invention, provided in connection with the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS Figure 1 is a block diagram of the configuration of the invention in the preferred embodiment; Figure 2(a) and 2(b) are flow charts that show the order of operations used in the preferred embodiment? Figure 3(a) shows the structure of the data for parameters PNNi, P Ni and 5N t for the neural network memory device; Figure 3(b) shows the boundary points of fuzzy sets for each input variable; Figure 4 shows the structure of the data for parameter FZi and FZt for the fuzzy logic scheme; Figure 5 shows the calculation of the output Ni from input Xi in a neural network device; Figure 6 shows the calculation of the output Z fro input X in a fuzzy logic device; Figures 7(a) and 7(b) respectively shows how the input space of the neural network in Figure 5 and the fuzzy representation in Figure 6 are partitioned; Figures 8(a) , 8(b) , 8(c) , 8(d) and 8(e) are diagrams useful in explaining operation of the instant invention; Figure 9 is a hardware block diagram of the device for optimizing the combination of data; Figure 10 is a flow chart showing the order of operations for performing the IDS steps in the apparatus shown in Figure 9; Figure 11 is a chart showing the arrangement of data for a data series and evaluation values for the IDS of Figure 9; and Figure 12 is a graph showing the concepts underlying the DS method. DETAILED DESCRIPTION OF THE INVENTION Referring now to the drawings wherein like parts are designated by like reference numerals. Figure 1 shows the configuration of the apparatus of the invention in the preferred embodiment, and Figures 2(a) and 2(b) are flowcharts showing the processing sequence used in 'the preferred embodiment. The operations shown in the flowcharts may be implemented by computer hardware and/or software and can be applied to numerous environments such as control systems, image processing, sensory sensing, etc. As shown in Figure 1, the apparatus comprises a computer 150 which contains three devices: a neural network processor (NN Processor) 160, a fuzzy logic processor 170 and a conversion device 180. The computer 150 receives inputs from various input devices 190 (devices 4, 5, 12 and 14). The neural network processor 160 includes a neural network learning device (NN learning device) 2 and a neural network memory device (NN memory device) 1 which together evaluate the neural network algorithms. These devices use algorithms which permit the relationship between input and output to be learned automatically from the input and output data. One example of such a learning algorithm .for the neural network is back propagation, which is well known in the art. The fuzzy inference device 3 performs fuzzy algorithms, which are algorithms that are constructed using the knowledge of human beings expressed in IF-THEN rules and membership functions. More particularly, the neural network memory device 1 in conjunction with the learning device 2, calculates the output (YNNi) of the neural network processor 160 at the time learning data 12 are input into the neural network. A learning device 2 is provided for the neural network to learn the neural network solution when the neural network is used exclusively. The apparatus further includes a fuzzy logic processor 170 which includes a fuzzy inference device 3 that calculates an output (YFZi) at the time fuzzy data 14 are input into the fuzzy processor 170. An input generator 4 is provided which determines a set of data samples (Xi) to be inputted to both the neural network processor 160 and the fuzzy logic processor 170. A device 5 for setting initial conditions for the neural network processor 160 is provided? that device can set initial values for parameters and define initial struc¬ tures. The device to set conditions 5 may be a memory, or a software file or a keyboard. Device 5 provides to the computer, from the number of neurons in the medial layer of the neural network, the initial value of the number of membership functions which the fuzzy logic scheme will require for each input variable in order to have the same dynamic character as the neural network representation. These initial parameters (PNNi:initial parameters of the neural network, and PFZi:initial parameters of the fuzzy system) are pre-set by the operator based on his knowledge of the problem to be solved, and the structure of the given system. Some parameters can be determined automatically as set forth below. The parameters will change during conversion. The calculation device 6 determines values which evaluate the accuracy of the approximation between the outputs of the neural network 160 and the fuzzy logic device 170. The detailed steps showing the evaluation determination performed by calculation device 6 are shown in Fig. 2(b). The calculation device 6 calculates an evaluation value E. In doing so, device 6 applies an evaluation function to each possible output when a given set of data are input to the neural network and the fuzzy logic scheme in order to gauge the conformity between the dynamic character of the neural network representation and that of the fuzzy logic scheme. A neural network-to-fuzzy conversion device 8 determines (or adjusts) the parameters of the fuzzy logic device when the data representation is converted from a neural network scheme to a fuzzy logic scheme. The neural network-to-fuzzy conversion device 8 dynamically changes the number of membership functions based on the value of the evaluation function and the number of learning cycles (the number of times learning is corrected) . This occurs during the determination (or adjustment) of the parameters of the fuzzy logic scheme which is performed during the conversion from the neural network to the fuzzy logic scheme. Further details concerning the operations of the neural network to fuzzy converter 8 are illustrated in Fig. 2(b) below as steps 270-28S to increase the number of membership functions, to increase the resolution of the decision space and to thus increase the accuracy of the fuzzy solution. A fuzzy- o-neural network conversion device 7 is as provided which determines (or adjusts) the parameters of the neural network when the data representation is converted from a fuzzy logic scheme to a neural network scheme. Although the present system 100 may be implemented by discrete hardware devices for each of the block circuits 1, 2, 3, 6, 7, 8, the preferred way of implementing the invention is by a suitable programmed computer 150. The flowcharts shown in Figs. 2(a) and 2(b) show the steps performed by a programmed computer when implementing the Fig. 1 apparatus and when converting data representations from a fuzzy logic scheme to a neural network scheme, and vice versa. Neural networks can be represented in many forms, including networks with multiple neuronal layers. Multiple layered networks include input neurons, and output neurons and a layer of medial or "hidden" neurons. Referring first to Fig. 2(a), after the start at step 200, if data is to be converted from a fuzzy logic form to a neural network form as determined at step 202, then computer 150 sets a flag value equal to "1" at step 204. The initial parameters of the fuzzy inference device 3 PF∑ are then read into the device to set conditions 5 as the structure of the fuzzy logic scheme at step 206. The structure of the data for parameter PFZ is shown in Figure 4. That data principally consists of input parameters provided by the operator which include the number - II - of input data and number of input membership functions. The output parameters, in turn, include the number of output data and the number of output membership functions. A one- dimensional arrangement of premises and conclusions (IF-THEN rules) is also provided which includes normalized constants for input membership functions and for the inputs n . The conclusions include coordinate values for output singletons and for outputs. At step 208, in the device to set conditions 5, the initial parameters of the neural network memory device 1 PNN are determined by the following formula, based upon the parameters PFZi of the fuzzy inference device 3: P*l - n i pe 2 = 2 pe 3 = n Q w ^*i # w ^j k ( 2-dimensional arrangemsnt): set at a random number approximating 0 where pe^ equals the number ofneurons in the input layer, n- j _ is the number of inputs into the fuzzy system, pe 2 is the number of neurons in the intermediate layer, β 3 is the number of neurons in the output layer, n 0 is the number of outputs of the fuzzy system, w 1 j is the weight of neurons from neuron number i in the input layer to neuron number j in the medial layer for i = 1, 2, ... , pβi + 1 and j = 1, 2..., pβ 2 * and W 2 -^ is the weight of neurons from neuron number j in the medial layer to neuron number k in output layer for j = l, 2,..., pe + 1 and k = 1, 2 , . . . , pe 3 , and ^j, W 2 j k are set at a random number approximating 0. The structure of the data for parameters PN for th -e neural network memory device 1 is shown in Figure 3(a). The section on the scheme used to determine the structure of the neural network and the fuzzy logic representation as discussed below provides the details of the scheme by which the number of neurons pe 2 in the medial layer of the neural network is determined. Next, the parameters PN which have been determined for the neural network memory device 1 are set in that device at step 210. The number of times learning is performed N is set to its initial value by clearing N to 0 at step 212. Then, the number of data i is set to its initial value by clearing i to 0 at step 238. Also at step 238, the number of learning cycles N is incremented. The number of data i is incremented at step 240. At step 242, the input generator 4 determines the input data Xi: Xi = il, Xi2, ..., i , where i = 1, 2, ... , n; where is the number of inputs. The procedure to generate a set of data samples consists of the following two steps: In the first step, the boundary points of fuzzy sets for each input variable are determined. The boundary points include the smallest and largest points for each fuzzy set whose membership values are 1, as well as, the points whose membership values are 0.5. These two cases are depicted in Figures 3(b) . Second, the intersections of all the boundary points for all the input variables are collected. Hence, the i-th input data set X , can be obtained as x i = x li> x 2i' x 3i • • • i χ mi where i = 1 , 2 , . . . , N, Xj i is the i-th boundary point for the j -th input variable and m is the number of inputs . N is the total number of samples which is determined by N = ni x n2 x . . .x n m , where ni is the number of boundary points for the i-th input variable. At steps 244 and 252, the input data i are set in the neural network memory device 1 and the fuzzy inference device 3. The number of intermediate nodes is iteratively incremented from a small integer (e.g. 1) up to the following upper bound value: N max » Pl + p 2 + ... + p m# where i is the number of fuzzy set segments for this i-th input variable and m is the number of inputs. The number of segments is determined by the "edges" of fuzzy sets as depicted in Figure 3 (b) . The number of intermediate nodes is thus bounded as: m 1 < h < g , i=l where N^ is the total number of intermediate nodes and h represents hidden nodes, p is the number of fuzzy set segments for the i-th input value and m is the number of inputs. At steps 246 and 254, the neural network memory device l calculates the neural network memory result Y ^, and the fuzzy inference device 3 calculates the fuzzy infer¬ ence result FZi- The methods of calculating output data N and FZi om input data Xi where there occurs a dual input and a single output are shown below and are also illustrated in Figures 5 and 6. Figure 5 shows the order for a neural network, while Figure 6 shows a fuzzy representatio . The fuzzy inference result YFZi - s first calculated by evaluating the sum of the outputs for the medial layer of neurons (j) corresponding to input data (i) such that h « Σ _ *kj Xik + w 3 j k=l where X j _ k is equal to the i-th input data for input number k (where k = 1, 2, ..., m) and kj is the weight of neurons from neuron No. k in the input layer to neuron No. j in the medial layer and f(ε) = 1/{1 + e ~ε } where ε represents a dummy variable for the squashing function which converts real numbers into real values between 0 and 1. The .medial layer value is then used to evaluate the neural network result Y N fa Y calculating the output layer result and the neural layer result: YNN " 2/l w w 2 * 11 * h niii ++ ww2 ":3l j - 1 The fuzzy inference result YFZi is calculated by first determining the weight Vl±j ς_ of Sj^ which is the coordinate value of the output singleton corresponding to the membership function for the output 1 no. j and output 2 no. k. Wij k = Min{ ) α 1 (χ ij ), ι 2 (x ik )} where Xi^ = input data for input k no. i (k=l,2, ... ,m) and μ k (Xik) is the membership function value for input data for input k no. i. The fuzzy output value is then determined for the example shown in Fig. 6 as: YFZ- At step 248, the result YNNi is stored in the neural network memory device 1 , and YFZ ^- s stored in the fuzzy inference device 3. At step 250, the iteration value i is compared to n, so that if i is less than n, steps 240, 242, 244, 246, 248, 252 and 254 are repeated, so that the neural network memory result Y Ni and the fuzzy inference result YFZ are calculated n times for each of input data X^ through X n . If i is greater than or equal to n, as determined at step 250, the process proceeds to step 256 in Figure 2(b) . Referring now in detail to Figure 2(b), at step 256, the output data YFZi and YNNi re entered into the device to calculate evaluation values 6. Evaluation value E is then obtained by the designated calculation evaluation device 6. The square error between the neural network memory result YNN and the fuzzy inference result Y Zi is used as the 2 evaluation value E, i.e., ( Y - YFZ ) = E * τhe object of further processing is to correct the parameters P Ni of the neural network memory device 1 until E approaches 0. The calculation for E described above is: n m _ B - ∑I ∑ (YNN ir - YFZ ir ) i=l r=l m = pe 3 = n 0 : number of data output If the flag is equal to 1, as determined by step 258, then the calculated evaluation value Σ is compared to permitued value ENN at step 260. Otherwise, evaluation value E is compared to permitted value EFZ at step 270. The permitted values for ENN and EFZ dif er since the final conditions for fuzzy and neural networks may be inherently different. If the current evaluation value E at step 260 is less than or equal to the permitted evaluation value ENN which was previously set, the processing will end at step 236 since the parameters of the neural network device have been connected to match the fuzzy device. If E is greater than ENN, then at step 262, the remainder is tested to determine if it is zero when the current number of learning cycles N is divided by the number of learning cycles NJJN which modifies the number of neurons in the medial layer of the neural network. N j ^ jj represents the number of learning cycles and N represents the current cycle. The only way to determine if system has reached the maximum value, is when the remainder is not the predetermined number. The cycle is repeated until the minimum error is achieved at step 260. If at Step 262, the remainder is zero when N is divided by NJJJJ, then at step 268, the number of neurons in the medial layer p e2 will be incremented by 1 in the parameters PNNi of the neural network to ultimately reduce the error and thus increase the accuracy of the approximation of the neural network. The new parameters of the neural network memory device 1 are called PNN-t. The structure of the data arrangement in the new parameter set PNNt is shown in Figure 3(a). At step 266, the new parameters P N-t of the neural network memory device 1 representing the structure of the neural network are set in the memory device 1. The process of calculating Ni and Y Zi n times and comparing Ξ to ENN is repeated as described previously. At step 262, if the remainder is not zero when N is divided by NN , then at step 264 the weights of the neural network will be modified in the parameters NNi of tiαe neural network memory device 1, and the new parameters of the neural network memory device 1 will be called P Nt. τhe weights of the neural network memory device 1 are modified by a sample learning algorithm or by a combination of optimized algorithms. An example of a combination of optimized algorithms, called a simplex scheme, is shown in the published paper "Simplex Method for Function Minimization" by J.A. Nelder and R. Mead published in The Computer Journal Vol. 7, 1967 pp. 308-313. At step 266, the new parameters PNNt of tlle neural network memory device 1 representing the structure of the neural network are set in the memory device 1. The process of calculating NNi and YFZi n times and comparing E to ENN is repeated. The flow charts shown in Figs. 2(a) and 2(b) also show the steps for converting data representations from a neural network scheme to a fuzzy logic scheme. Specifically, after the start at step 200, if data is to be converted from a neural network to a fuzzy scheme, as determined first by step 202, and then by step 214, then at step 216 the flag is set equal to 2. The initial parameters of the neural network memory device 1 PNNi are read into the device to set conditions 5 and are set in the neural network learning device 2 at step 218. The structure of. the data arrangement for parameters N s shown in Figure 3(a). The parameter data is set prior to operation in unit 5 by the operator. The parameters include the number of neurons in the input, medial and output layers, and the weights for the input and medial layers. At step 220, in the device to set conditions 5, the initial parameters for the fuzzy inference device 3 PFZi are determined from parameters PNNi a ^ t * le me ory device accord¬ ing to the following formula: ni = Pel M^i * Pe2 + 1 i*o = Pe3 MF 0 - (MFi) i where MFi is the number of input membership functions (MFS) in PFZi, MF o is the number of output FS; l ? is the normalized content for MF number k associated with input j, « S 1 lf i 2 ,...ini is the coordinate values of singletons for conclusions in output i with respect to membership functions number il for input 1, number i2 for input 2, number ini for input ini, and ij and S i i t i2,...ini : are previously set at user's discretion. The structure of the data arrangement for parameters FZ of the fuzzy inference device 3 is shown in Figure 4. The discussion below provides the details of how the number of input membership functions MFi is determined in the fuzzy scheme. The parameters PFZi which have been determined for the fuzzy inference device 3 are set into that device at step 222. At step 212, the number of learning cycles N is initialized by clearing N to 0. The number of data i is then initialized by clearing i to 0 at step 238. Also at step 238, the number of learning cycles N is incremented. At step 240, the number of data i is incremented. At step 242, the input data Xi are determined by the input generator 4 as follows: Xi - xil, Xi2, ..., xi where i = 1, 2, ..., n, and is the number of inputs. The input data Xi are set into the neural network memory device 1, which provides the data for learning device 2, and the fuzzy inference device 3 at steps 244 and 252. Next, the neural network memory device 1 and neural network learning device 2 calculate the solution provided from the learning calculations from the neural network nodes YNN , and the fuzzy inference device 3 calculates the result of the fuzzy inference operations Y Zi ^ steps 246 and 254. The steps for calculating the fuzzy and neural network solutions were previously described above. At step 256 (Fig. 2(b)) output data FZi nd YN i are entered into the device to calculate evaluation values 6, and evaluation value E is obtained by the designated calculation device 6 in the manner described previously. The flag is then tested at step 258. Since a neural network to fuzzy conversion is desired, the flag is set not equal to 1. The evaluation value E is thereby compared to the permitted evaluation value j-z at step 270. If the current evaluation value E is less than or equal to the permitted evaluation value EFZ which was set previously, as determined by step 270, and at step 284 the number of membership functions MFi for each input in parameters PFZi of the fuzzy inference device 3 is also equal to 1,- then processing will end at step 236. However, if the current evaluation value E is less than or equal to the permitted evaluation value EFZ, and at step 284, the number of membership functions MFi for each input in parameters PFZ of tilβ fuzz Y inference device 3 is- not equal to 1, then at step 286 the current parameters PFZ of the fuzzy inference device 3 are stored in the neural network-to-fuzzy conversion device 8 and the new parameters of the fuzzy inference device 3 are called PFZt. The number of membership functions MF for βacil input in the parameters PFZi °f " t ^ ιe f uzz Y inference device 3 is decremented at step - 21 - 288. The structure of the data arrangement for the new parameters PFZt is shown in Figure 4. If learning is completed after corrections have been made to the number of membership functions MFi for each input, as determined by step 280, then at step 282 the parameters PFZi for tlιe fuzz Y inference device 3, which were stored at the time that the value MFi was obtained, will be set in the fuzzy inference device 3 and processing then will come to an end at step 236 (Figure 2(a)). If learning is not completed at the time a corrected value F ^ s obtained in the parameters PFZ of the fuzzy inference device 3 for the number of membership functions for each input, then the conversion is not complete since the fuzzy equivalent to an incomplete or non-convergent neural solution is represented. Accordingly, at step 276, new parameters PFZt arβ set in the fuzzy inference device 3. The process of calculating YNN and YFZi n times and E, and comparing E to EFZ is repeated for a neural network when learning is completed. If the current evaluation value E is greater than the permitted evaluation value EFZ which was previously set as determined by step 270, and the remainder is zero when the current number of learning cycles N is divided by the number of learning cycles NFZ as determined by step 272, then the number of membership functions MF for each input in the parameters PFZi of the fuzzy inference device 3 is incremented by one at step 278, and step 280 is performed. Steps 280, 2S2 and 276 are then processed in the same manner described above. If the current evaluation value E is greater than the permitted evaluation value EFZ which was set previously as - 7 ? - determined by step 270, and the remainder is not zero when the current number of learning cycles N is divided by the number of learning cycles NFZ, as determined by step 272, then in order to make the evaluation value E approach 0, the normalized constants for the membership functions for each input are modified, as are the coordinate values of the singleton for each output. This occurs within the parameters for the fuzzy inference device 3 at increment t at step 274. The new parameters are stored as PFZ f The normalized constants for the membership functions for each input to the fuzzy inference device 3 and the coordinate values of the singleton for each output are modified by a combination of optimized algorithms which are described in detail in Figs. 9-12. The flow charts shown in Figs. 2(a) and 2(b) also show the steps performed when neural network learning is performed independently. After the start at step 200, if data is not to be converted from a fuzzy scheme to a neural network, as determined by step 202, and if data is not to be converted from a neural network to the fuzzy scheme, as determined by step 214, then whether neural network learning is to be performed independently is determined by step 224. If neural network learning is not to be performed independently then the process immediately ends at step 236. If neural network learning is to be performed independently, then processing proceeds to step 228. At step 228, the independent learning parameters PNN^ of the neural network memory device 1 representing the structure of the neural network are read into the device for setting conditions 5 as the structure of the neural network. Those learning parameters are either pre-chosen by the operator or are precalculated by the computer 150 and pre- stored in memory 5. The parameters are effectively given fixed values which represent the actual structure of an existing neural network that will not change and that are represented by fuzzy logic. The parameters also are set in the neural network learning device 2. The arrangement of the data for parameters PNN& of the neural network memory device 1 is shown in Figure 3(a). For the neural network scheme to learn independently, the neural network learning data (input-output data) must be acquired at step 230. At step 232, the neural network learns independently via the neural network learning device 2 using the neural network learning data in a scheme such as back propagation which was described in the Horikawa et al. paper "A Learning Fuzzy Controller Using a Neural Network" incorporated herein by reference. When the neural network device 2 has completed independent learning, the parameters PNN]_ of the neural network learning device 2, after learning, are read in as the structure of the neural network and set in the neural network memory device 1 at step 234. Processing then ends at step 236. In this section, the scheme used to calculate the number of neurons which will be required in the medial layer to create a neural network with the same dynamic character as the fuzzy representation from the number of membership func¬ tions which exist for each fuzzy input variable is explained. The scheme used to calculate the number of input variables which will be required to create a fuzzy representation with the same dynamic character as the neural network from the number of neurons in the medial layer of a neural network is also explained. To calculate the outputs of a neural network and a fuzzy representation, we can treat them as a common entity partition for the input space, and assign the outputs to the partitions. Figure 7 shows how the input space of the neural network in Figure 5 and the fuzzy representation in Figure 6 are partitioned. The following description outlines the scheme used to calculate the outputs of the neural network and the fuzzy representation. The output of the neural network is calculated by performing the following process. First, the input space is partitioned according to the weight of the neurons in the medial layer, as shown in graph (a) of Figure 7. Specifically in Fig. 5 the weight of nodes L are determined by three inputs Xii, Xi 2 and a bias. For each input, there are three separate weights W llf w 21 and w 1 In a two- dimensional case, the linear combination of nodes is always expressed as a linear solution so that the output partition values are a linear combination. In a three dimensional case, the partition would be represented in a plane. Second, a value of 0 or 1 is assigned to each class of partition according to a function of the outputs of the medial layer of neurons. In a very broad sense, for the outputs of the medial neurons, a clustering effect of the input space is seen at 0 or 1. Finally, the neurons in the output layer are used to calculate the output values, according to weights assigned to each class value. The output of the fuzzy logic scheme is calculated by performing the following process: first, the input space is partitioned according to the membership functions of the premises, as shown in Figure 7(b). In this case, the partition of the input space assumes the form of a lattice orthogonal to the input axis of the input space which follows the general outline of partitioning illustrated in Fig. 3(b). As part of this process, the goodness of fit is calculated for the membership function associated with each premise. This calculation allows us to assign a value of 0 or 1 to each class of the partition. In a broad sense, the goodness of fit to the membership function for each premise shows the effect of clustering the input space at 0 or 1. Next, a rule is used to assign a value to each singleton conclusion in each class. Finally, the goodness of fit of each singleton is considered to be its weight, and the average is found for the weights of the values assigned to all the singletons (the values assigned to all the classes) . This average is used as the value of the outputs. The following section discuss'es how the structure of the fuzzy logic scheme is determined when the data is con¬ verted from a neural network scheme to a fuzzy representa¬ tion, and how the structure of the neural network is determined when the data is converted from a fuzzy representation to a neural network. In our example of a fuzzy structure, the membership functions associated with the premises for each input are all identical. In the examples shown in Figures 8(a) and 8(b) , both the neural network and the fuzzy representation have dual inputs and a single output, and the number of neurons p e in the medial layer of the neural network is 2. The structure of the fuzzy logic scheme is determined when the data representation is converted from a neural network scheme to a fuzzy logic scheme by performing the fol¬ lowing process. First, the initial value for the number of membership functions F to be associated with the fuzzy premises is set according to the number of neurons p β2 in the medial layer of the neural network. In this case, if the neurons in the medial layer intersect virtually orthogonally with a single input axis in the input space, as shown in Figure 8(a) , the value of MFi caιx be determined by the following formula : MFi = p β 2 + 1 - The initial value for Fi ^- s *ii e maximum value for the number of functions which will be required to go from a neural network to a fuzzy representation when the input space in the neural network is divided orthogonally to the input axis of the space. However, there are many cases in which the number of membership functions actually required for the fuzzy premises is not the same as the initial value MF . For example, in the case illustrated in Figure 8(b), the number of membership functions associated with the fuzzy premises is less than expected, and the fuzzy processing must be shortened. In the case illustrated in Figure 8(c). however, the number of member¬ ship functions associated with the fuzzy premises is greater than expected, and we are faced with the problem of how to produce a fuzzy inference with acceptable accuracy. To address these problems, the number of membership functions associated with the fuzzy premises is modified dur¬ ing fuzzy learning, by virture of the system illustrated in FIGS. 2(a) and 2(b) so that the optimal number of membership functions is determined. If the fuzzy learning is completed with the number of membership functions associated with fuzzy premises at its initial value, the number of membership functions is reduced at step 276 (Fig. 2(b)) and the fuzzy learning is performed repeatedly. If the fuzzy learning is not completed, or if the value for MF goes to 1 at step 284, the fuzzy learning comes to a halt at step 236 (Fig. 2(a)). The set of fuzzy parameters at the moment when the number of membership func¬ ti o ns associated with fuzzy premises has reached its lowest value is taken as the result of fuzzy learning 2 82 . If the fuzzy learning is not completed with the number of membership functions associated with fuzzy premises at its initial value, the number of membership functions is increased at step 278 and the fuzzy learning is performed repeatedly. The fuzzy learning ceases when it has been completed. The set of fuzzy parameters at the moment when the number of membership functions associated with fuzzy premises has reached its lowest value is taken as the result of fuzzy learning as described above at 282. Since the above scheme initially sets the number of membership functions MFi associated with fuzzy premises according to the number of neurons e 2 in the medial layer of the neural network, learning can be initiated with this number of membership functions. A value is thus determined, which to a certain extent, takes into consideration the complexity of clusterings in the input space, in many cases, the above scheme requires fewer learning cycles than one which initiates learning with the number of membership functions to be associated with the fuzzy premises at a value (for example, 2) which has been set previously. It is, of course, equally possible to determine the optimal number of membership functions by initiating learning from a value which has been previously set. The structure of the neural network is determined when the data representation is converted from a fuzzy scheme to a neural network scheme by performing the following process. A s can be seen in Figure 7, the divisions of input s p ace in the neural network are expressed in linear form. Thus, it is generally true that a neural network can express the clustering in the input space better than a fuzzy repre¬ sentation can, as can be seen in Figure 8(c). The number of neurons pe 2 in the medial layer of the neural network is set at its minimum unit, 2. The initial value of 2 for the number of medial layer neurons represents virtually the low¬ est possible level which this value can take. The optimal value for the number of neurons in the medial layer of the neural network is determined by starting with this minimum value and increasing it according to the process explained below. If the neural network learning is completed with the number of neurons in the medial layer of the neural network at its initial value, the set of parameters of the neural network at that moment is used as the result of neural network learning. If the neural network learning is not completed with the number of neurons in the medial layer of the neural network at its initial value, the number of neurons is increased and the neural network learning is performed repeatedly. The neural network learning ceases when it has been completed. The set of neural network parameters for the number of neurons in the medial layer at that moment is used as the result of learning. Examples of how to use the invention and its effects are described below. To convert the data representation from a fuzzy logic scheme to a neural network scheme, a human being first catalogues fuzzy knowledge in a rough way as rules and membership functions. Next, the fuzzy representation is converted to a neural network representation. Finally, the neural network learns independently using the neural network learning data (input-output data). As a result, the neural network can be initialized using fuzzy knowledge crudely entered by a human being. Thus, less time is required for the independent learning of the neural network, and learning can be conclusively finished. Furthermore, in independent learning capabilities of the neural network, the details of the input-output relationship of the system can be obtained from the fuzzy knowledge entered by the human being. The more fuzzy knowledge supplied, the better the relationship can be defined. Thus, the human being is freed from having to depend on trial and error techniques to fine-tune the parameters of the fuzzy knowledge. Finally, the input-output relationship of a neural network can be expressed with greater precision than that of a fuzzy representation. It is thus to the user's advantage to use a neural network for real applications. To convert the data representation from a neural network to a fuzzy logic scheme, the invention is used as follows: First, the neural network learns independently (see Fig. 2(b), steps 224-234) by using the neural network learning data (step 230, input-output data) . Second, the neural network representation is converted to a fuzzy representation steps 214-222 (Fig. 2(b)) and steps 256-266 (Fig. 2(b)). As a result, the process of calculating how to get from input to output in a fuzzy system is more comprehensible to a human being than in a neural network. Thus, it is advantageous to convert to a fuzzy system in order to verify the result of learning by the neural network. (This can be used as a way to explicate the results of neural network learning.) Nemerous applications of the fuzzy/network conversion device are available. An example of one simple application is for providing control to an inverted pendulum. As shown in Fig. 8(d), the control objective is to keep a pendulum 802 at a vertical position (where 0 = 0) by moving a cart 804 horizontally as indicated by double-arrow 806. More specifically, a control system implementing the present invention is provided and is shown in Fig. 8(e). The position 0 of the pendulum 802 is measured by means of a potentiometer (not shown) . A motor 808 is used to control the position of the pendulum 802. The pendulum position is controlled by fuzzy controller 810 which generates control signal y(t) for the motor 808. The control signal output y(t) is based on an input x(t) which represents the pendulum's position. Alrhough the pendulum controller can be implemented solely as a fuzzy logic device, control tuning for a fuzzy controller is difficult. Accordingly, a fuzzy to neural network conversion device 812, in accordance with the principles of the invention described above, is provided to achieve a tuned control signal that more accurately and efficiently achieves the control objective. In this example, the conversion device 812 receives, as inputs, sample input/output signals 814 from fuzzy controller 810 and controller parameters 816. The conversion device in turn produces tuned control parameters 818 which are then provided as output y(t) to control motor 808.- Re erring now to Fig. 9, a device for performing the data optimization process discussed previously is shown. While the data optimization technique shown in Figs. 9-12 may be used (at step 256) with the fuzzy/neural network conversion scheme of the present invention, other data optimization processes also can be employed. The data optimization process also can be applied to other systems and environments. One of the goals of the Iterated Downhill Simplex system is to provide a device to set initial values of a data series as the starting point of a search, to perform the Downhill Simplex procedure to search for the combination of data which will minimize an evaluation function where the search is begun from a given set of data and performed according to the DS Method, to calculate an evaluation value for an evaluation function of the data series, and to judge whether the DS procedure used to search for the optimal combination of data should be performed again or concluded. Figure 9 shows how the components 400 are organized. The components shown in Fig. 9 can represent either process steps, as shown in Fig. 10, or can be provided in a single computer, or as several computers. The IDS is composed of a device that sets the initial values 402 of a data series as the starting point of a search and a device to perform the DS procedure 404 that searches for the combination of data which will minimize an evaluation function. The search commences from a given set of data and continues according to the DS method. A device is also included that calculates an- evaluation value 406 for an evaluation function 410 of the data series. A judgement device 408 then determines whether the DS procedure used to search for the optimal combination of data should be performed again or concluded. The devices for performing the DS procedures can be embodied either in hardware or in computer software. The goal of the device is to search a data series in order to optimize the combination of the data by minimizing a previously specified evaluation function. The operational steps 500 employed by the device 400 in a programmed computer implementation are described below and are shown in Figure 10. After the start at step 502, at step 504 the device to set condition 402 (Fig. 9) sets the initial values Q i for the data series to be optimized. Those values are set randomly as follows: x oi - ( Xαil, x oi f •••/ x oi : Initial values of data series no. i i = l, 2, .. * , n : Order cf data series m = n + l Next, at ste ' 506, the data series set by the condition setting device 402 is designated data series X for the device 404 which performs the DS procedure. x i = (Xil *i2, ..., x m : Data series no. Xi - X oi i The arrangement of the data in this data series is shown in Figure 12. At step 508, the evaluation value Ei for data series i in the device which performs the DS procedure 404 is calculated by the calculation device 406: Ei ~~ - f (Xi) : Evaluation value for data series Xi f(.) : Evaluation function At step 510, the data series i are rearranged so that they are in descending order of their evaluation value Ej < E 2 < ... < E n At step 512, the data series with the largest evaluation value Ei is considered the center of gravity of the other data series. n-l c = i=l n - l At step 514, a reversal of the simplex procedure is performed. The data series with the highest evaluation value Xn is moved to the opposite side of the center of balance C. X r - C + α (C - X n ) a > 0 At step 516, the evaluation value E r is then calculated for data series X r by the calculation device 406 after this data series has been moved. At step 518, if Ei < E r < E n _χ (if the evaluation value is small) , then X r is changed to X n such that X n « x r at step 520 (a post-reversal Simplex procedure is used) , and the process proceeds to step 538 below. At step 522, if E r < Ei (if the evaluation value is very small) , then the Simplex procedure is expanded. The distance between data series X r and center of gravity C is reduced, and X rr is obtained at step 524. χ rr « c - a (X r - C) α > 1 (If E r >, Ei, as determined by step 522, the process proceeds to step 534 below.) At step 526, the evaluation value E rr for the data series X rr after the data series have been moved is calculated by the device 406. At step 528, if E rr < E (the evaluation value has become even smaller) , then X rr is changed to X π such that X n = X rr at step 530 (a post-expansion Simplex is used) . Operations then proceed to step 538: If ∑rz >_ E at step 528 (if the evaluation value has not gotten quite small) , then X r is changed to X n such that X n = χ r at step 532 (a post-inversion Simplex is used) . Processing then proceeds to step 538. If, on the other hand at step 522, E r > Ei and at step 524, if E r > E n (if the evaluation value has grown larger) , then the Simplex is further contracted the distance between data series X n and center of balance C. X c is then obtained at step 536: X c = C + β (X n - C) 0 < β < 1 At step 534 , if E r < E n (the evaluation value is not getting much smaller) , then the Simplex is further contracted , the distance between data series X r and center of balance C is reduced, and x c is obtained at step 544. X c = C + β (X r - C) 0 < β < 1 At step 546, the evaluation value E c for the data series X c after the data series have been moved is calculated by the device 406. At step 548, if at this time: E σ < Min E Γ , E n J the evaluation value has gotten smaller) , X c is changed to X n such that X n « X c at step 550 (a post-contraction simplex is used) , and operation proceed to step 538 below. If this is not the case (if the evaluation value is greater than min E r , E n ) , then processing proceeds to step 538. At step 533, the degree of centralization of all the data series Xi is examined by the judging device 408. If the judging device 408 concludes that the degree of centralization is greater than a given value A as defined by the equation below (if it is not sufficiently centralized), processing then returns to step 510 described above. n A < max (max (Xij) ) i-1 j-1 Where A is the extent of centralization of all data series Xi needed to conclude one cycle of DS method. At step 540 the evaluation function of the data series is examined. If it is less than a given value E Q such that E < E 0 (if the optimal solution has been found) , the IDS procedure (the entire process) is concluded by judging device 408 at step 542. If E > E 0 at step 540 (if the optimal solution has not been ound), then processing returns at step 504. The above is the order of processing used by the device 400 to optimize a combination of data described in this application. Steps 508 to 538 constitute the processing steps cf the DS Method. Most of them are executed by the device 404 to perform the DS procedure and the device 406 to calculate evaluation values. Generally speaking, the DS Method provides a shorter search time at the cost of not being able to conduct a wide search of the space occupied by the data series. As a result, it is not always able to produce the optimal solution. By adding steps 504, 506 and 540 described above, however, the DS procedure can be applied from various starting points. This results in a DS procedure which can conduct a wide search of the space occupied by the data series. Conducting this type of search greatly increases the probability of finding the optimal solution. An example of the operations of the DS Method is discussed below such that the number of data series is 3 (n = 3) and the number of data in each series is 2 (n = 2) . The following shows the order of operations used to move data series in the DS procedure. 1) A simplex is formed from data series Xi, X 2 and X 3 (Steps 504, 506). 2) X3, the series with the greatest evaluation value, is removed from consideration., and the center of balance C is found for X and X 2 (Steps 508-512) . 3) The simplex is inverted (data series X 3 is moved to X r , the opposite side of center of balance C) (steps 514-516) . 4) If Ei < E r < E2 then the evaluation value is decreasing, X r is changed to X3 (a post-inversion simplex is used) (Steps 518,520) . 5) If E r < E then the evaluation value has gotten extremely small , and the simplex is expanded further (the distance between data series X r and center of balance C is reduced and the value of X rr is found) . If, at this time : E rr < Ei (the evaluation value is still getting smaller) , then X rr is changed to X3 (a post-expansion simplex is used) . If this is not the case (if the evaluation value is not getting much smaller) , then X r is changed to X3 (a post-inversion simplex is used) (Steps 522, 524 and 526. 6 ) If E 2 < E r and E3 <. E r , (if the evaluation value is getting large) , then the simplex is further contracted (the distance between the data series X3 and the center of balance C is reduced, and the value of X c is obtained) (Steps 522, 524 and 536). If at this time Ξ c < E3 (If the evaluation value is decreasing) , then X c is changed to X 3 (a post- contraction simplex is used) (Step 550) . If this is not the case (if the evaluation value is growing larger), X r is changed to X 3 (a post-inversion simplex is used) (Step 538). 7) If E 2 < E r and E r < E3 (if the evaluation value is not decreasing much) , then the simplex is further contracted (the distance between the data series X r and the center of balance C is reduced, and the value of X c is obtained) (step 544) . If at this time E c < E3 (if the evaluation value is decreasing) , then X c is changed to x 3 (a post-contraction simplex is used) (Step 550) . If this is not the case (if the evaluation value is growing larger) , X r is changed to X 3 (a post-inversion simplex is used) . By repeating the order of processing described above, the processing moves the simplex in the direction which causes the evaluation value to decrease. When the simplex constricts to a given degree, the DS procedure comes to an end. The previously described method is illustrated in more detail in Figs.10-11. Although only a preferred embodiment is speci ically illustrated and described herein, it will be appreciated that many mo d i f ications and variations of the present invention are possi bl e in light of the above teachings and within the purview o f t h e appended claims without departing from the spirit and intended scope of the invention.

Claims: CLAIMS 1. An apparatus for automatically converting data describing a neural network to data defining a relationship of fuzzy variables, comprising: a memory for storing data describing behavior of a neural network; means for retrieving said stored data describing the behavior of a neural network; means responsive to said retrieved data for determining initial data defining a relationship of fuzzy variables ; means for applying said fuzzy variables to a fuzzy processor; means for generating representative input values to said fuzzy processor; calculation means for evaluating the accuracy of approximation between said neural network and said fuzzy processor; and neural network to fuzzy conversion means for determining parameters of said fuzzy logic and for dynamically changing a number of membership functions based upon said calculated evaluation approximation such that said neural network representation and said relationship of the fuzzy variables have corresponding dynamic content . 2. The apparatus of claim 1, wherein said memory stores initial neural network data, a weight of the neurons in said neural network located between an input layer and a medial layer, a weight of the neurons located between said medial layer and an output layer and the number of neurons in the neural network. 3. The apparatus of claim 2, wherein said means responsive to said retrieved data sets initial parameters for fuzzy variables based upon said neural network data stored in said memory, said parameters including the number of fuzzy input membership functions, the number of fuzzy output membership functions, and the coordinate values of singletons for fuzzy conclusions with respect to said output membership functions. 4. The apparatus of claim 3, wherein said means responsive to retrieved data includes: input setting means for setting a number of inputs in said fuzzy system equal to a number of neurons in said neural network; input membership function adding means for determining said fuzzy input membership functions by adding a constant to said set number of neurons between said input layer and said medial layer; fuzzy system output setting means for setting the number of outputs for said fuzzy system equal to the number of neurons between said medial layer and said output layer; and output membership determining means for calculating said membership output functions based upon said input membership functions and said number of inputs. 5. The apparatus of claim 4, wherein said device for generating representative input values further comprises: boundary point determining means for determining the smallest and largest points for each fuzzy membership unction whose membership values are 1.0 and 0.5; boundary point collecting means for collecting intersections of all said input values. 6. The apparatus of claim 1, further comprising means for generating representative fuzzy output values to said fuzzy processor, wherein said fuzzy output values are generated by evaluating outputs from a medial layer of newrons from said retrieved stored data corresponding to said representative fuzzy input values so that a fuzzy inference result is calculated for each respective input value. 7. The apparatus of claim 6, wherein said fuzzy processor provides said fuzzy output values to said calculation means in order to compare a result represented by said fuz.zy output value to a predetermined evaluation threshold such that said parameters for said fuzzy variables are modified by said neural network to fuzzy conversion means when said result does not match said evaluation threshold. 8. The apparatus of claim 7, further comprising evaluation threshold determining means for setting said evaluation threshold based upon a number of learning cycles in said neural network. 9. An apparatus for automatically converting data describing a fuzzy inference to data defining a neural networ , comprising: a memory for storing fuzzy data; fuzzy inference means for retrieving said stored data describing said fuzzy inference; means responsive to said retrieved fuzzy inference data for determining a relationship of neural network variables; means for applying said neural network variables to a neural network processor; evaluating means for evaluating whether said determined neural network is within a specified degree of certainty with respect to a solution for said fuzzy inference; and fuzzy to neural conversion means for converting said fuzzy parameters to neural network representation of said fuzzy inference data.

Inventors: ISAKA SATORU, ISAKA, SATORU
Applicants: ISAKA SATORU, OMRON TATEISI ELECTRONICS CO, OMRON CORPORATION
Application year: 1993
Main classification: G06F15
IPC codes: G06F9, G06F15, G06N3, G06N7