Fuzzy logic control has been widely used in the system control and. The reason for using fuzzy logic in control applications stems from the idea of modeling uncertain- ties in the knowledge of a system’s behavior through fuzzy sets and rules that are vaguely or ambiguously specified [5]. Fuzzy logic control requires fuzzy membership functions to be generated before fuzzification takes place. The intent of induction is to discover a law having objective validity and can be used universally where it begins with the particular and may be concluded with the general [6]. The induc- tion is performed by using the entropy minimization principle, where the parameters corresponding to the output classes are most optimally clustered [7].
5.3.1 Membership Functions Generation
Membership function generation is based on the partitioning which draws a threshold line between two classes based on sample data. A threshold line is determined with an entropy minimization method, before segmentation process, first into two classes.
Then by partitioning the first two classes one more time, three different classes are obtained. Therefore, by repeating the partitioning process, the data is classified into a number of classes, or fuzzy sets, depending on the shape of membership function used in each set.
The following is a review briefly explaining the threshold value calculation with induction principle for a two-class problem. Assuming that a threshold value for a sample is in the range betweenx1andx2. Considering this sample alone, we write an entropy equation for the regions [x1,x] and [x,x2] regions. The first region is denoted pand the second region isq, as is shown in Fig.5.2. By moving an imaginary threshold valuexbetweenx1andx2, we calculate entropy for each value ofx.
An entropy with each value ofxin the region and is expressed by Christensen [1980] (as cited in [7]):
S(x)= p(x)Sp(x)+q(x)Sq(x) (5.8) where
Sp(x)= −[p1(x)lnp1(x)+p2(x)lnp2(x)] (5.9)
Sq(x)= −[q1(x)lnq1(x)+q2(x)lnq2(x)] (5.10) wherepk(x)andqk(x)are the conditional probabilities that the classksample is in the region [x1,x1+x] and [x1+x,x2] respectively. p(x)andq(x)are the probabilities that all samples are in the region [x1,x1+x] and [x1+x,x2], respectively where
p(x)+q(x)=1.
A value ofxthat gives the minimum entropy is the optimum threshold value. The entropy estimates of pk(x),qk(x),p(x)andq(x)are as follows:
pk(x)= nk(x)+1
n(x)+1 (5.11)
Fig. 5.2 Illustration of threshold value idea
qk(x)= Nk(x)+1
N(x)+1 (5.12)
p(x)= n(x)
n (5.13)
q(x)=1−p(x) (5.14)
where
nk(x)=number of class k samples located in [x1,x1+x]
n(x)=the total number of samples located in [x1,x1+x]
Nk(x)=number of class k samples located in [x1+x,x2] N(x)=the total number of samples located in [x1+x,x2] n=total number of samples in [x1,x2]
l=a general length along the interval [x1,x2]
While movingxin the region [x1,x2], the values of entropy for each position ofx is calculated. The values ofxthat holds the minimum entropy is called the primary threshold (PRI) value. Then, the region [x1,x2] is divided into two using the PRI value. The left side of the primary threshold is the negative side while the right side is the positive side. Then, a shape for the two membership functions are chosen, such as trapezoid, triangle or rectangle. The choice of shape is arbitrary. As the region [x1,x2] is further subdivide, the choice of shape becomes less important, as long as the sets are overlapping.
Then in next sequence, the segmentation is repeated on each side of region to determine the secondary threshold values by applying the same procedure (Fig.5.3a).
The secondary threshold in the negative area is denoted as SEC1 and the other in the positive are is SEC2, therefore now there are three threshold lines in the sample space. The threshold SEC1 and SEC2 are the minimum entropy points that divide the respective areas into two classes. Then, three labels of PO (positive), ZE (zero) and NG (negative) are used for each of the classes, and the three threshold values (PRI, SEC1 and SEC2) are used as the toes of the three separate membership shapes as in Fig.5.3b.
In fuzzy logic applications, odd number of membership functions are usually used to partition a region such as five or seven labels. Therefore, to develop seven partitions, tertiary threshold values are required in each of three classes. So, there are now four tertiary threshold values: TER1, TER2, TER3 and TER4. Two of the tertiary thresholds lie between primary and secondary thresholds and the other two is between secondary threshold and the ends of sample space such as shown in Fig.5.3c. In this figure, the labels used are NB (negative big), NM (negative medium), NS (negative small), ZE (zero), PS (positive small), PM (positive medium) and PB (positive big).
Fig. 5.3 Repeated partitions and corresponding fuzzy sets label:athe first partition, bthe second partition and cthe third partition
5.3.2 Fuzzification
The fuzzification is a coding process in which each numerical input of a linguistic variable is transformed in the membership function values of its attributes. First phase of fuzzy logic proceeding is to deliver input parameters for given fuzzy system based on which the output result will be calculated. Most variables existing in the real world are crisp or classical variables. One needs to convert those crisp variables (both input and output) to fuzzy variables, and then apply fuzzy inference to process those data to obtain the desired output. These parameters are fuzzified with the use of pre-defined input membership functions, which can have different shapes. The most common are triangular shape, however bell, trapezoidal, sinusoidal and exponential can be also used. The degree of membership function is determined by placing a chosen input variable on the horizontal axis, while vertical axis shows quantification of grade of membership of the input variable. The only condition a membership function must meet is that it must vary between zero and one. The value zero means that input variable is not a member of the fuzzy set, while the value one means that input variable is fully a member of the fuzzy set.
The triangular functionμ(x)that is used to determine the membership function is defined by a lower limita, an upper limitb, and a valuemwherea <m < b (Fig.5.4) as expressed in Eq. (5.15), while the trapezoidal function is in Eq. (5.16).
Fig. 5.4 Triangular and trapezoidal shape membership function
µ(x)=
⎧⎪
⎪⎪
⎨
⎪⎪
⎪⎩
0 x<a
x−a
m−a a<x≤m
b−x
b−m m<x<b
0 x≥b
(5.15)
μT r ap(x)=
⎧⎪
⎪⎪
⎪⎪
⎨
⎪⎪
⎪⎪
⎪⎩
0 x<a
x−a
m−a a≤x<m 1 m≤x<n
b−x
b−n n≤x<b
0 x≥b
(5.16)