EarthWeb   
HomeAccount InfoLoginSearchMy ITKnowledgeFAQSitemapContact Us
     

   
  All ITKnowledge
  Source Code

  Search Tips
  Advanced Search
   
  

  

[an error occurred while processing this directive]
Previous Table of Contents Next


6.2.1 Coding Scheme

The liquid level fuzzy controller presented in Chapter 2 employed triangular membership functions. Thus, the following presentation describes the use of a GA to adjust triangular membership functions. However, the same method can be applied to other membership function forms such as the trapezoidal membership functions used in the cart-pole controller of Chapter 3.

The unoptimized, arbitrarily selected, triangular membership functions used initially for the liquid level controller were shown in Chapter 2 (Figures 2.2 through 2.4). Here, the membership functions for Error (E) are repeated in Figure 6.1. Recall that there are four fuzzy sets used to describe error (E), five fuzzy sets used to describe the time rate of change of error (ΔE), and five fuzzy sets to describe the percent change in flow rate (Qnet). These fuzzy sets provide linguistic terms that can describe both the condition (E and ΔE) and the action (Qnet) variables. With these definitions, there are 20 rules in the controller. The membership functions determine under precisely what conditions, and to what extent each rule is applied for particular values of E and ΔE. Improving these membership functions improves the performance of the controller.


Figure 6.1  The linguistic terms used to describe the condition and action variables for the liquid level controller are initially defined with the triangular membership functions shown above.

As a constraint on the GA’s search, the membership functions in the liquid level controller were forced to maintain their triangular shape and their height, but the size of their base and their position relative to one another was allowed to change. The triangles describing extreme membership functions (those right triangles at the upper and lower limits of the variables they were describing; terms like NB and PB for E and ΔE; BN and BP for change in Q) were forced to remain fixed to their associated extreme limits. In other words, they were forced to remain right triangles with their apex at either the lower or upper limit of the condition or action variable they describe. Membership functions defining interior membership functions were forced to remain isosceles triangles. Thus, the definition of each extreme triangle requires a single point (a left or right base point), while the definition of each interior membership function requires two points (both a left and a right base point). Figure 6.2 shows the six points that must be defined under these constraints to completely define the membership functions for E. (This figure has membership functions that are slightly different from those shown in Figure 6.1 so that the six points can be clearly identified.) When the membership functions associated with E, ΔE, and Qnet are considered, the result is a search problem with 22 parameters that must be defined (six points defining the triangles for E and eight points each defining the triangles for ΔE and Qnet).


Figure 6.2  The entire set of membership functions defining the linguistic terms used to describe the error in liquid level setpoint can be described with the definition of the six points identified above with a •.

Thus, the search for efficient membership functions for the liquid level control problem defined in Chapter 2 involves the selection of values for 22 parameters (22 points are needed to locate the 14 triangles that describe the fuzzy terms). This is a much larger search problem than the curve-fitting problems addressed in Chapter 5. However, again, the application of GAs to search problems requires only the coding of the parameters and the definition of a fitness function; the size of the problem does not prevent the use of a GA. It might, however, force an increase in either the population size or the maximum number of generations, or both.

In Chapter 5, the curve-fitting problems were solved with a GA using a concatenated, mapped, unsigned binary coding. In this coding, parameters that vary continuously between some minimum and maximum values are represented with bit strings. This same approach is applicable to the points defining the triangular membership functions in the current problem. For instance, a substring can be formed to represent the right base point of the extreme membership function NB describing E as shown in Figure 6.2. The substring is allocated a specified number of bits, p, and mapped using the familiar formula

where bin is the integer value represented by a p-bit string, Cmin is the minimum value of the parameter, Cmax is the maximum value of the parameter, and C is the value of the parameter represented by the substring. Each of the remaining parameters can be represented with similar substrings, and the entire parameter set can be represented by a string formed through the concatenation of the individual substrings. Again, the GA manipulates a population of strings using the familiar operators of reproduction, crossover, and mutation.

The remaining tasks include determining the number of bits to be allocated for each of the 22 parameters and the selection of appropriate minimum and maximum values for each of the parameters. To keep things simple, and because there is no apparent reason for using substrings of different lengths, each substring is represented with four bits. Thus, the resulting strings are thus 88 bits in length. In other problems it will be necessary to use substrings with more or fewer bits (i.e., different lengths) and the current coding scheme can certainly accommodate such a need.


Previous Table of Contents Next

Copyright © CRC Press LLC

HomeAccount InfoSubscribeLoginSearchMy ITKnowledgeFAQSitemapContact Us
Products |  Contact Us |  About Us |  Privacy  |  Ad Info  |  Home

Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc. All rights reserved. Reproduction in whole or in part in any form or medium without express written permission of EarthWeb is prohibited. Read EarthWeb's privacy statement.