Today control systems are usually described by mathematical models that follow the laws of physics, stochastic models or models which have emerged from mathematical logic. A general difficulty of such constructed model is how to move from a given problem to a proper mathematical model. Undoubtedly, today’s advanced computer technology makes it possible; however managing such systems is still too complex.
These complex systems can be simplified by employing a tolerance margin for a reasonable amount of imprecision, vagueness and uncertainty during the modelling phase. As an outcome, not completely perfect system comes to existence; nevertheless in most of the cases it is capable of solving the problem in appropriate way. Even missing input information has already turned out to be satisfactory in knowledge-based systems.
Fuzzy logic allows to lower complexity by allowing the use of imperfect information in sensible way. It can be implemented in hardware, software, or a combination of both. In other words, fuzzy logic approach to problems’ control mimics how a person would make decisions, only much faster.
The fuzzy logic analysis and control methods shown in Figure 1 can be described as:
The following is Fuzzy Logic Control/Analysis Method diagram.
Figure 1. The fuzzy logic Control-Analysis method |
In order to operate fuzzy logic needs to be represented by numbers or descriptions. For example, speed can be represented by value 5 m/s or by description “slow”. Term “slow” can have different meaning if used by different persons and must be interpreted with respect to the observed environment. Some values are easy to classify, while others can be difficult to determine because of human understanding of different situations. One can say “slow”, while other can say “not fast” when describing the same speed. These differences can be distinguished with help of so-called fuzzy sets.
Usually fuzzy logic control system is created from four major elements presented on Figure 2: fuzzification interface, fuzzy inference engine, fuzzy rule matrix and defuzzification interface. Each part along with basic fuzzy logic operations will be described in more detail below.
Figure 2. Fuzzy logic controller [1] |
Below some basic information about fuzzy logic will be presented, while a comprehensive theory of fuzzy logic can be found in [2].
• Universe of Discourse
It is a range of all possible values considered as fuzzy system input.
• Fuzzy Set
A fuzzy set µ is a function from the reference set X to the unit interval, i.e.
(1) |
µ(X) represents the set of all fuzzy sets of X.
• Membership Function
It is a graphical representation of fuzzy sets, µ_{F}(x).
Figure 3. An example of fuzzy logic membership function |
Figure 3 shows the membership functions of three fuzzy sets, “slow”, “average”, and “fast”, for a fuzzy variable Velocity. The universe of discourse creates all possible values of Velocity, i.e., X = 19. For Velocity value 19 km/h, the fuzzy set “slow” has the membership value 0.6. Hence, µ_{slow}(19) = 0.6. Similarly, µ_{average}(19) = 0.4, and µ_{fast}(19) = 0.
• Support
The support of a fuzzy set F is the crisp set of all points in the Universe of Discourse U such that membership function of F does not equal zero
(2) |
• Crossover point
It is an element in U where its membership function equals 0.5.
• Centre
The centre of a fuzzy set F is the point (or points) at which µ_{F}(u) achieves its maximum value.
First phase of fuzzy logic proceeding is to deliver input parameters for given fuzzy system based on which the output result will be calculated. These parameters are fuzzified with 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. Simpler functions will not require complex computing and will not overload the implementation. 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.
With each input parameter there is a unique membership function associated. The membership functions associate a weighting factor with values of each input and the effective rules. These weighting factors determine the degree of influence or degree of membership (DOM) each active rule has. By computing the logical product of the membership weights for each active rule, a set of fuzzy output response magnitudes are produced. All that remains is to combine and defuzzify these output responses [3].
The rule matrix is used to describe fuzzy sets and fuzzy operators in form of conditional statements. A single fuzzy if-then rule can be as follows
If x is A then y is Z,
where A is a set of conditions that have to be satisfied and Z is a set of consequences that can be inferred.
In rule with multiple parts, fuzzy operators are used to combine more than one input: AND = min, OR = max and NOT = additive complement. Geometrical demonstration of fuzzy operators is shown in Figure 4.
Figure 4. Graphical interpretation of fuzzy operators |
The rule matrix is a simple graphical tool for mapping the fuzzy logic control system rules. It accommodates two or more input variables and expresses their logical product (AND or OR) as one output response variable. The degree of membership for rule matrix output can take value of maximum, minimum of the degree of previous of the rule [1]. It is often probable, that after evaluation of all the rules applicable to the input, we get more than one value for the degree of membership. In this case, the simulation has to take into consideration, all three possibilities, the minimum, the maximum or an average of the membership-degrees.
Inference Mechanisms
Inference mechanism allows mapping given input to an output using fuzzy logic. It uses all pieces described in previous sections: membership functions, logical operations and if-then rules. The most common types of inference systems are Mamdani and Sugeno. They vary in ways of determining outputs.
Mamdani method
Below examples are based on two fuzzy control rules in the form of
R_{1}: if x is A_{1} and y is B_{1} then
z is
C_{1}
R_{2}: if x is A_{2} and y is B_{2} then
z is
C_{2}
Result: z is C, where x equals x_{0} and y equals y_{0}.
The firing levels of the rules, denoted by α_{i}, i = 1, 2 are calculated by
(3) |
(4) |
The individual rule outputs are derived by
(5) |
(6) |
Then the overall system output is calculated by oring the individual rule outputs
(7) |
Finally, to obtain a deterministic control action, chosen defuzziﬁcation mechanism must be implemented.
Sugeno method
Below examples are based on two fuzzy control rules in the form of
R_{1}: if x is A_{1} and y is B_{1} then
z is z_{1} = a_{1}x_{1}+b_{1}y_{1}
R_{2}: if x is A_{2} and y is B_{2} then z is z_{2} = a_{2}x_{2}+b_{2}y_{2}
Result: z_{0}, where x equals x_{0} and y equals y_{0}.
The firing levels of the rule are calculated in the same way as in Mamdani method, based on (3) and (4) equations. The individual rule outputs are calculated from the below relationships
(8) |
(9) |
If there is n rules in the rule matrix, the crisp control result derived from the following equations
(10) |
where α_{i} is a firing level of the i rule, and i = 1, …., n.
The Sugeno method works well with linear techniques, as it is computationally efficient. It is suitable to apply optimisation and adaptive techniques. Furthermore, it guarantees continuity of the output surface and it is well suited to mathematical analysis. An advantage of the Mamdani method is that is it intuitive and has widespread of acceptance. It can be well suited to human input [3].
Defuzzification task is to find one single crisp value that summarises the fuzzy set. There are several mathematical techniques available: centroid, bisector, mean, maximum, maximum and weighted average. Figure 5 demonstrate illustration of how values for each method are chosen.
Figure 5. Graphical demonstration of defuzzification methods [3] |
Centroid defuzzification is the most commonly used method, as it is very accurate. It provides centre of the area under the curve of membership function. For complex membership functions it puts high demands on computation. It can be expressed by the following formula
(11) |
where z_{0} is defuzzified output, u_{i} is a membership function and x is output variable.
Bisector defuzzification uses vertical line that divides area under the curve into two equal areas.
(12) |
Mean of maximum defuzzification method uses the average value of the aggregated membership function outputs.
(13) |
where x’ = {x; µ_{A}(x) = µ*}.
Smallest of maximum defuzzification method uses the minimum value of the aggregated membership function outputs.
(14) |
Largest of maximum defuzzification method uses the maximum value of the aggregated membership function outputs.
(15) |
Weighted average defuzzification method, based on peak value of each fuzzy sets, calculates weighted sum of these peak values [4]. According to these weight values and the degree of membership for fuzzy output, the crisp value of output is determined by the following formula
(16) |
where µ_{i} is the degree of membership in output singleton i, W_{i} and is the fuzzy output weight value for the output singleton i.[3].
Fuzzy Logic provides a completely different approach. One can concentrate on solving the problem rather than trying to model the system mathematically, if that is even possible. This almost invariably leads to quicker, cheaper solutions. Once understood, this technology is not difficult to implement and the results are usually quite surprising and more than satisfactory.
[1] Fullér R., HASSANEIN H., ALI A.N.,: Neural fuzzy systems:
towards IMT-advanced networks. Åbo: Åbo akademi, 1996, xxvii, 275 p. ISBN
95-165-0624-0.
[2] Wang L-X., HASSANEIN H., ALI A.N.,: Adaptive fuzzy systems
and control: design and stability analysis. Englewood Cliffs, N.J: Prentice
Hall, 1994, xxvii, 275 p. ISBN 978-013-1471-092.
[3] Ross T.J., HASSANEIN H.,
ALI A.N.,: Fuzzy logic with engineering applications: design and stability
analysis. 3rd ed. Chichester (Royaume Uni): Wiley, 2010, xxvii, 275 p. ISBN
978-047-0748-510.
[4] Kaehler S.D.,: Fuzzy Logic Tutorial. Seattle Robotics
Society [online]. 1998. ed. [cit. 2012-08-22]. Avaible at:
http://www.seattlerobotics.org/encoder/mar98/fuz/flindex.html