22.

c++ neural networks and fuzzy logic 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 ! 

Fuzzy Control Systems

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.

  machine under control—this is the machine or process that you are controlling, for example, a washing machine
  outputs—these are the measured response behaviors of your machine, for example, the temperature of the water
  fuzzy outputs—these are the same outputs passed through a fuzzifier, for example, hot or very cold
  inference engine/fuzzy rule base—an inference engine converts fuzzy outputs to actions to take by accessing fuzzy rules in a fuzzy rule base. An example of a fuzzy rule: IF the output is very cold, THEN increase the water temperature setting by a very large amount
  fuzzy inputs—these are the fuzzy actions to perform, such as increase the water temperature setting by a very large amount
  inputs—these are the (crisp) dials on the machine to control its behavior, for example, water temperature setting = 3.423, converted from fuzzy inputs with a defuzzifier

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

Copyright © IDG Books Worldwide, Inc.



C++ Neural Networks and Fuzzy Logic
C++ Neural Networks and Fuzzy Logic
ISBN: 1558515526
EAN: 2147483647
Year: 1995
Pages: 139

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net