C++ Neural Networks and Fuzzy Logic
by Valluru B. Rao M&T Books, IDG Books Worldwide, Inc. ISBN: 1558515526 Pub Date: 06/01/95 |
Previous | Table of Contents | Next |
Sample output from the program is shown below. Our input is in italic; computer output is not. The categories defined by the graph in Figure 3.2 are entered in this example. Once the categories are set up, the first data entry of 4.0 gets fuzzified to the accommodative category. Note that the memberships are also presented in each category. The same value is entered again, and this time it gets fuzzified to the very accommodative category. For the last data entry of 12.5, you see that only the very tight category holds membership for this value. In all cases you will note that the memberships add up to 1.0.
fuzzfier Please type in a category name, e.g. Cool Enter one word without spaces When you are done, type `done' : v.accommodative Type in the lowval, midval and highval for each category, separated by spaces e.g. 1.0 3.0 5.0 : 0 3 6 Please type in a category name, e.g. Cool Enter one word without spaces When you are done, type `done' : accommodative Type in the lowval, midval and highval for each category, separated by spaces e.g. 1.0 3.0 5.0 : 3 6 9 Please type in a category name, e.g. Cool Enter one word without spaces When you are done, type `done' : tight Type in the lowval, midval and highval for each category, separated by spaces e.g. 1.0 3.0 5.0 : 5 8.5 12 Please type in a category name, e.g. Cool Enter one word without spaces When you are done, type `done' : v.tight Type in the lowval, midval and highval for each category, separated by spaces e.g. 1.0 3.0 5.0 : 10 12 14 Please type in a category name, e.g. Cool Enter one word without spaces When you are done, type `done' : done =================================== ==Fuzzifier is ready for data== =================================== input a data value, type 0 to terminate 4.0 Output fuzzy category is ==> accommodative<== category membership ----------------------------- v.accommodative 0.666667 accommodative 0.333333 tight 0 v.tight 0 input a data value, type 0 to terminate 4.0 Output fuzzy category is ==> v.accommodative<== category membership ----------------------------- v.accommodative 0.666667 accommodative 0.333333 tight 0 v.tight 0 input a data value, type 0 to terminate 7.5 Output fuzzy category is ==> accommodative<== category membership ----------------------------- v.accommodative 0 accommodative 0.411765 tight 0.588235 v.tight 0 input a data value, type 0 to terminate 11.0 Output fuzzy category is ==> tight<== category membership ----------------------------- v.accommodative 0 accommodative 0 tight 0.363636 v.tight 0.636364 input a data value, type 0 to terminate 12.5 Output fuzzy category is ==> v.tight<== category membership ----------------------------- v.accommodative 0 accommodative 0 tight 0 v.tight 1 input a data value, type 0 to terminate 0 All done. Have a fuzzy day !
The most widespread use of fuzzy logic today is in fuzzy control applications. You can use fuzzy logic to make your air conditioner cool your room. Or you can design a subway system to use fuzzy logic to control the braking system for smooth and accurate stops. A control system is a closed-loop system that typically controls a machine to achieve a particular desired response, given a number of environmental inputs. A fuzzy control system is a closed-loop system that uses the process of fuzzification, as shown in the Federal Reserve policy program example, to generate fuzzy inputs to an inference engine, which is a knowledge base of actions to take. The inverse process, called defuzzification, is also used in a fuzzy control system to create crisp, real values to apply to the machine or process under control. In Japan, fuzzy controllers have been used to control many machines, including washing machines and camcorders.
Figure 3.3 shows a diagram of a fuzzy control system. The major parts of this closed-loop system are:
Figure 3.3 Diagram of a fuzzy control system.
The key to development of a fuzzy control system is to iteratively construct a fuzzy rule base that yields the desired response from your machine. You construct these fuzzy rules from knowledge about the problem. In many cases this is very intuitive and gives you a robust control system in a very short amount of time.
Previous | Table of Contents | Next |