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 |
This section discusses the fuzzy logic controller (FLC), its application and design. Fuzzy control is used in a variety of machines and processes today, with widespread application especially in Japan. A few of the applications in use today are in the list in Table 16.10, adapted from Yan, et al.
Application | FLC function(s) |
---|---|
Video camcorder | Determine best focusing and lighting when there is movement in the picture |
Washing machine | Adjust washing cycle by judging the dirt, size of the load, and type of fabric |
Television | Adjust brightness, color, and contrast of picture to please viewers |
Motor control | Improve the accuracy and range of motion control under unexpected conditions |
Subway train | Increase the stable drive and enhance the stop accuracy by evaluating the passenger traffic conditions. Provide a smooth start and smooth stop. |
Vacuum cleaner | Adjust the vacuum cleaner motor power by judging the amount of dust and dirt and the floor characteristics |
Hot water heater | Adjust the heating element power according to the temperature and the quantity of water being used |
Helicopter control | Determine the best operation actions by judging human instructions and the flying conditions including wind speed and direction |
A fuzzy logic controller diagram was shown in Chapter 3. Let us redraw it now and discuss a design example. Refer to Figure 16.2. For the purpose of discussion, let us assume that this FLC controls a hot water heater. The hot water heater has a knob, HeatKnob(0-10) on it to control the heating element power, the higher the value, the hotter it gets, with a value of 0 indicating the heating element is turned off. There are two sensors in the hot water heater, one to tell you the temperature of the water (TempSense), which varies from 0 to 125° C, and the other to tell you the level of the water in the tank (LevelSense), which varies from 0 = empty to 10 = full. Assume that there is an automatic flow control that determines how much cold water (at temperature 10° C) flows into the tank from the main water supply; whenever the level of the water gets below 40, the flow control turns on, and turns off when the level of the water gets above 95.
Figure 16.2 Fuzzy control of a water heater.
The design objective can be stated as:
Keep the water temperature as close to 80° C as possible, in spite of changes in the water flowing out of the tank, and cold water flowing into the tank.
The range of values that inputs and outputs may take is called the universe of discourse. We need to define the universe of discourse for all of the inputs and outputs of the FLC, which are all crisp values. Table 16.11 shows the ranges:
Name | Input/Output | Minimum value | Maximum value |
---|---|---|---|
LevelSense | I | 0 | 10 |
HeatKnob | O | 0 | 10 |
TempSense | I | 0 | 125 |
The inputs to the FLC are the LevelSense and the TempSense. We can use triangular membership functions to fuzzify the inputs, just as we did in Chapter 3, when we constructed the fuzzifier program. There are some general guidelines you can keep in mind when you determine the range of the fuzzy variables as related to the crisp inputs (adapted from Yan, et al.):
Both the input variables LevelSense and TempSense are restricted to positive values. We use the following fuzzy sets to describe them:
XSmall, Small, Medium, Large, XLarge |
In Table 16.12 and Figure 16.3, we show the assignment of ranges and triangular fuzzy membership functions for LevelSense. Similarly, we assign ranges and triangular fuzzy membership functions for TempSense in Table 16.13 and Figure 16.4. The optimization of these assignments is often done through trial and error for achieving optimum performance of the FLC.
Crisp Input Range | Fuzzy Variable |
---|---|
02 | XSmall |
1.54 | Small |
37 | Medium |
68.5 | Large |
7.510 | XLarge |
Figure 16.3 Fuzzy membership functions for LevelSense.
Crisp Input Range | Fuzzy Variable |
---|---|
020 | XSmall |
1035 | Small |
3075 | Medium |
6095 | Large |
85125 | XLarge |
Figure 16.4 Fuzzy membership functions for TempSense.
Previous | Table of Contents | Next |