| ||||||||||||||
| ||||||||||||||
|
||||||||||||||
Falcon: Fuzzy Adaptive Learning Control NetworkBy Imri Goldberg
Fuzzy Logic
Basic DefinitionsFuzzy Logic theory can be seen as an expansion of our “regular” two valued logic. In fuzzy logic, instead of the binary 0,1 we also have all the values in-between: [0,1].This way, objects that in “crisp”- non-fuzzy - either belonged to a group or didn’t belong to that group, now belong to a degree. For example, Consider the group Tall. For a man to belong to such a group we shall set an arbitrary border: 1.75 meters and above is tall, while below 1.75 meters is not tall. In fuzzy logic the difference is less crisp- a man with the height of 1.65 may be considered tall to a degree of 0.5. Consider the following graphs for visualization:
An item’s membership value in a group is calculated using a membership function. Membership functions are actually functions that upon receiving an input, return this value’s membership in a group. The e Here is a graph, showing two examples of such a function:
As in crisp sets, we can also do the basic operations- AND OR and NOT. There are other operations that can be performed on fuzzy variables, which are called linguistic hedges. Consider the fuzzy variable warm- we may have VERY warm, RATHER warm, so on. The words “Rather” and “Very” play the role of linguistic hedges in this example. There are more linguistic hedges, such as “More or less”, “Quite”, and so on. Another important concept is linguistic variables. Linguistic variables take fuzzy variables as their values. For example you may consider the linguistic variable height- it can take the fuzzy variables short, average, tall, very tall, so on.
Approximate ReasoningApproximate reasoning is the process that we use to reach fuzzy conclusions given fuzzy inputs. In approximate reasoning we deal with propositions that are assigned truth values- that can range from 0 (completely false) to 1 (completely true). Canonical propositions come in the form of:X is P.X - the subject of the proposition. P - the predicate.
An example of a proposition could be: As seen- the predicate is a fuzzy variable. Also, the subject of a proposition can be another proposition- (Leaves are Green) is true.To change the nature of the predicate, we have Fuzzy Predicate Modifiers, such as Not, Very, More or Less, so on. The Predicate Modifiers are similar to linguistic hedges. To modify the subject and sometimes the proposition itself, we have Fuzzy Quantifiers, such as Many, much, frequently, sometimes. An example of all those modifiers: Usually (most Leaves are not red).Where usually and most are quantifiers, and not is a predicate modifier. There are actually many ways to accomplish approximate reasoning. One of the most popular and useful ways is called the “generalized modus ponens”. This is the actual representation of this process: If x is A then y is B x is A’The meaning of these reasoning process is: Given that “if x is A then y is B” and “x is A to a degree g”, we deduct that “y is B to a degree g”. An example of this process might be: given the rule: “If wind is blowing, then close window”, and also given that “Wind is blowing with medium speed”, we reason that we should “Close the window halfway”, as medium might translate to halfway, or a similar word.
A Fuzzy ControllerA fuzzy controller has four major parts: the Fuzzifier, the inference engine, the rule base, and the defuzzifier. Here is a figure to visualize the structure:
The Fuzzifier:Input is presented to the Fuzzifier. The Fuzzifier then converts the numerical input – such as temperature, height, or any other measure, into a fuzzy value, that is, membership values in various groups.
The Inference Engine and the Rule Base:The rule base is in fact a big database of rules, each in the form of:IF x1 is A1 and x2 is A2 and … And xn is An THEN y1 is B1 and y2 is B2 and… yn is Bn.Where x1...xn are the inputs, y1...yn are the outputs, and A1...An and B1...Bn are corresponding fuzzy sets. A more general form is: If (Preconditions) THEN consequents.An example of such a rule can be: IF temperature is high AND weather is cool THEN window_opening is much. The inference engine goes through all the rules, evaluating the firing strength of each rule - which in turn is proportional to the truth-value of the preconditions. After all the rules are computed, we have the firing strength of each rule. A problem then arises- we might have several rules with similar consequents, but different firing strength. Such a situation will result with different membership values for the same output. Here the defuzzifier comes in.
The defuzzifierThe defuzzifier’s job is to receive as input the membership values of the outputs, or in other words, the fuzzy outputs. Then it returns the actual numerical output, which may be a drug dose, a desired temperature, or any other variable. There are many methods of solving that problem, and all of them aggregate the membership values of the outputs, in some form of an average, to find out the actual output.
The Falcon
General ExplanationThe FALCON - Fuzzy Adaptive Learning Control Network - is a structure used to combine the strengths of both fuzzy logic, and neural networks.From the fuzzy logic point of view, the network can learn from expert knowledge and is readable. On the other hand, from the neural network point of view, the network can optimize itself to minimize error in outputs, by using gradual descent and distributed learning, thus fine-tuning the results.
Comparison between the Falcon and the Fuzzy Clustering AlgorithmThe most prominent difference between the two methods is, that while the Fuzzy Clustering algorithm is an enhancement to the Back Propagation algorithm, the Falcon has a unique structure, much more similar to the Fuzzy controller, and therefor, much closer to the fuzzy paradigm.This may be seen in the learning algorithm of both methods: in the Falcon, the learning is divided into two distinct segments, structure learning, which is closer to fuzzy rule extraction, and parameter learning, which makes use of the essence of the back propagation algorithm. On the other hand, in the Fuzzy Clustering algorithm, the learning process itself is identical to the learning process of the Back Propagation algorithm, but uses a different approach to update the weights.
StructureThe network is composed of five layers -
![]() Figure 2.1
Getting OutputThe first layer, the input variables layer, just receives the numerical input, and sends it along, without processing it.The second layer, which operates like a fuzzy logic Fuzzifier converts each input variable into input terms, with corresponding fuzzy values of truth, between 0 and 1, using the membership functions, already presented in the discussion of fuzzy logic. Next the rules are processed. Each rule is connected to one input term of each input variable, from which it gets its inputs. For each rule we compute the firing strength using its consequents’ membership values, and also the rule’s strength. After each rule’s firing strength is calculated, we use the nodes of the third layer - the output term nodes – to sum the input to each output term. Each rule outputs to one term of each output variable, and for each such term, the various inputs are summed up. After each output term value is calculated, all that is left to do is to compute the exact value of the output variables, using the fuzzy values we have. This is done just like in the defuzzifier, as explained before in the discussion of fuzzy logic. LearningBoth forms of learning used with the Falcon are supervised learning, that is, an input pattern is supplied to the network, with a corresponding desired output. This is repeated for as many times necessary for each learning method, until the network is fully functional.
Structure learningAt the beginning of this learning process, the number of input and output variables is set, and each variable’s membership functions are also set. Our goal in this learning process is to determine the rules, or the third layer nodes.
For each input-output pattern available, the following is done: Thus, the variables are passed along to the corresponding term layers, where each variable is fuzzified. Note that output variable terms layer acts just like the input variables terms layer in this process. After all of this is done, we have fuzzy values both for the input, and the output variables. Then a rule node is created. Such a rule node is connected to one term node for each variable – either input or output. The term node it is connected to, is the term node with the maximum outputted membership value. After the connections are determined, the rule’s strength is determined, as the product of all the fuzzy outputs of the term nodes it is connected to. After this process is finished, the network is ready to receive another input-output pattern. After all patterns are processed, the structure learning phase is complete.
TestsTo test the Falcon, the sine wave function was arbitrarily chosen.Samples were generated, in the range of –Pi to +Pi. The Falcon’s objective was, given the x value, return the desired y value, according to the equation:
y = sin(x)
It is clearly visible that the network is capable of learning with ideal data. The next test, was almost identical to the first one, with a slight change - the Falcon this time had 40 input membership functions. The resulting graph (drawn using 80 sample outputs of the network):
In this graph, the basic shape of the sine function may still be clearly seen, but it is evident that there are errors, and also, in the middle there is an area in which the network returned “unknown”. This is the result of lack of samples- when there are more membership functions then samples, the network does not learn enough rules to cover all of the input space, and errors, and “unknown” answers occur. The next test was with 10% noise in the data, that is, to each sample a value between +0.2 and –0.2 was added randomly to the output, while a value between +0.6 and –0.6 was added to the input (before calculation). The network retained the original structure of 20 input membership functions. The resulting graph (drawn using 80 sample outputs of the network):
In this graph, the shape of the sine function can still be seen but it is also evident that it is very contorted. Since the noise to the input was added before calculation, it resulted in less-then-uniform distribution, thereby resulting with segments of “unknown”. In some cases, the “Unknown” answer is unacceptable, so that an answer with a reasonable error is required. In such cases we can use Gauss membership functions. Using this kind of membership functions, the rules always fire, even with small values. This may increase the error, but will result with no “Unknown” answers whatsoever. Here are the corresponding graphs for the last two problems – insufficient data, and noise, but this time with fuzzy membership functions. Insufficient data: (Drawn with 80 sampled outputs)
Noise: (Drawn with 80 sampled outputs)
In these graphs, the usefulness of gauss membership functions may clearly be seen. Although errors are present, the graph still retains the shape of the original function, while there are no areas of “Unknown” answers. To conclude, it has been shown that the Falcon is capable of learning both from insufficient data, and from data with noise, although both have an adverse effect on its output.
References
Download the zipped Microsoft Word document:
Submitted: 17/10/2001 Article content copyright © Imri Goldberg, 2001.
|
|
|||||||||||||
All content copyright © 1998-2007, Generation5 unless otherwise noted.
- Privacy Policy - Legal - Terms of Use -