The Method Of Fuzzy Logic Computer Science Essay

Published: Last Edited:

This essay has been submitted by a student. This is not an example of the work written by our professional essay writers.

For many years, human has challenged the acquiring of knowledge, especially without ambiguity one. Since Aristotelian two-valued logic has been introduced, this logic has helped human achieve remarkable success and to conduct toward modern technology. However, at the beginning of twentieth century, researchers and scientists noticed that traditional logic could not answer some phenomena in the world. For instance, thinking about problems in Newton's laws problems, molecular size, led scientists and researchers to consider about random phenomena. That influenced all branch of sciences, which eventually led to statistics and probability science.

Fuzzy logic is an innovative method that allows us to describe systems' behaviors through using linguistic forms. Nowadays, the application of fuzzy system ranges from even culinary appliances to electronics, and industrial automation to environment and spatial decision-making solutions. The researches have shown the successful applicability of fuzzy system as a conventional modeling, even by fuzzy logic everyday language could be used in. Fuzzy logic describes ambiguous terms such as "high ", and "very low"; it fills the vacancy in crisp models.

Fuzzy logic, as a base for precision in all the sciences and theoretical disciplines, is used by the modern science to explain the robustness of conclusions, which agree with human thought. Classic logic (traditional, conventional, binary and crisp) has history as well as the history of science, nonetheless fuzzy logic is more descriptive and applicable for some systems, it is newborn and novel. Fuzzy logic is an extension for classic logic, that is, continuous logic. In fact, the designing of fuzzy logic was a response to the continuous changing of variables in environmental and physical processing or some restrictions in environmental studies in conventional (binary) logic. Furthermore, fuzzy system simplifies processes in complex systems, even by incomplete data, which are not possible by conventional statistical methods; indeed, no longer it needs to solve complex equations in control system.

As real language, fuzzy control system allows us to incorporate the ambiguous and approximate nature of human logic into computers, which leads to quick development cycles, easy programming and accurate controlling. One utility of fuzzy models is application of rules, in fact, often, human uses rules in any type, but these rules are not exactly fixed, however bi-valued systems could not operate based on such fuzzy concepts.

The industrial application of fuzzy logic is started by Mamdani (1974) to control a steam generator, which could not get under control with conventional techniques. Next, Zimmermann used fuzzy logic in decision support systems. Primary practically applications of fuzzy logic in Japan were a water treatment plant by Fuji Electric in 1983 and a subway system by Hitachi, which was opened in 1987. The Japanese companies used the fuzzy system in image processing, and photography to produce images that are more desirable (fuzzyTECH, 2001).

Fuzzy logic was proposed by Lotfi Zadeh(1965), against the Aristotelian binary logic. This logic not only proved theoretically but also applied successfully in industrial fields. Fuzzy logic at first was introduced for information processing method. Fuzzy set theory, instead of dealing only with truth and falseness, handles the membership of number between zero to 1, in other words; a set defined by binary logic has two member (zero, one), in fuzzy set theory has infinite members that have values from zero to one. Therefore, the fact makes fuzzy logic closer to human mind. So that, members in a set addition to the mode of being a member or not, can be defined in range of two modes.

Fuzzy logic helps to manipulate information to achieve the determined results even with imprecise and ambiguous information, especially in control systems. Its methods to control systems mimic how human making decisions, but faster and more accurate.


Probability is behind any systems so that phenomena in term of probability are strongly affect all branches of science, especially in complex stochastic systems, which increases with the increasing of the number of observations, the nature of this ambiguity in such systems is different. Those phenomena occur randomly and by chance.

In mathematical disciplines, such as probability theory, information theory, and fuzzy set theory, deal with the description of uncertainty in knowledge, here, we consider only two types of uncertainty, stochastic and lexical uncertainty (Mian, 1999).

Consider these statements:

Statement 1 "The probability of drought event is 0.7."

Statement 2 "In arid zones, this year will probably be a very dry year."

The first statement is about stochastic uncertainty, it says the probable occurrence of certain event, its probability is 0.7.

The latter one is accounted as lexical statement. Firstly, the event itself is not clearly defined; secondly it is a "subjective category" (Mian, 1999). For some farmers, a very dry year means as lack of water for lands, whereas for others, it might mean to have been surpassed than last year's deposit. For one farmer, it might be no fixed threshold to define whether this year is dry or not. In addition, in the latter statement, there is no quantifying expression of probability with numerical value. Hence, here the concept of "drought year" is a subjective category.

The using of subjective categories in statements plays a major role in the decision-making processes, as statement 2, even without quantity, it is understandable for human; he or she can use it successfully to evaluate a complex system. Sometimes, we add some flexibility in the definition of word, especially, in decision making such as the "appropriate" positions. For instance, in most legal systems, there exist contradictory lows such that punishment and forgiveness, which are judged based on their situations.

In the spatial features and factors in environment, not only boundaries are clearly undefined, but also are mixed and interactive. For instance, in the classification of soil types in image processing, the assigning of pixels for a certain titled class might have somewhat uncertainties, particularly in the boundary of two classes. Any pixel might have the spectral mixture of inherent materials. Furthermore, some natural phenomena such as desertification that inherently are resulted from the contemporary various and different factors such as erosion (either wind or water), vegetation deterioration, flooding, and drought events. Therefore, the effects cannot be explicitly determined.

Sometimes uncertainty is due to the paucity of the relevant data, vague definition or internal variability. In the absence of sufficient data, it is difficult to measure how various elements influence the spatial variation of concepts such as vulnerability and sensitivity, consequently, there will be a need for methods to manage uncertainty (Bone, et al., 2005) (Agnew, et al., 1994). In relation to the heterogeneous and continuous nature of desert areas by remote sensing, few researches have been performed, especially vulnerability mapping desertification with integrated remote sensing, GIS, and fuzzy.

In land degradation mapping, a geologist or a geographer might provide the different maps, even there are no exact same soil maps planned by different soil experts. The fact is derived from the reality, it is not possible to define rules for each possible case, as an alternative, we define rules for some different cases, these rules are discreet points in the continuum of possible cases and people respond them. Therefore, for a given situation he/she combines rules, and describes the analogical situation. This approach is possible because of the flexibility in the definition of words, in rule forms (Mian, 1999).

Linguistic variable

Zadeh (1973) proposed linguistic variables in the concept of fuzzy, because for human, imagining variables as terms or linguistic issues is better than to imagine them as numbers.

Fuzzy set terms as adjectives describe fuzzy variables; variables such as temperature, flow, pressure, speed, etc. can be described by term set {low, moderate or high}. A variable such "error" can have fuzzy set {large positive, small positive, zero, small negative, big negative}. For the variable "drought", there might be term set {dry, wet} as well, that any of them will be projected by an appropriate membership function.

Fuzzy set

In traditional knowledge, classical sets are used; even computer systems at first were designed based on them.

In the classical (conventional) set theory, the elements of a set A considering the universe set X can be represented by specifying characteristic function (x) of elements:


Therefore, (x) has only null ("False"), and one ("True") to express truth degree. Therefore classical set called binary set, or crisp set. Non-crisp set, which is known as fuzzy set, is an extension of classical set. In that, the characteristic function called membership function to indicate the degree of truth, which shows the truth graded value for any element, in range of closed interval [0, 1]. In other words, fuzzy set is the superset of conventional (Boolean) set that has been extended to handle the concept of partial true values between "fully true" and "completely false" (Glöckner, 2006). The membership grade for an element in fuzzy set is calculated by mapping elements in range of zero and one by using membership function.

In manmade plans, we can find sharp and distinct boundaries among land use types such as croplands and residential areas. However, in dry lands, land covers such as forestlands, pasturelands, lowlands, pediments and plateaus have not sharp and exact boundaries. In fact, their boundaries are vague and imprecise. Even though having the spatial similarities of some land types, desert terrains are highly inhomogeneous; there are very few homogeneous classes and boundaries among them are very vague as well (Erwig, et al., 1997).

In dry lands except uniform land types such as sand dunes and permanent water bodies, all other features are so small or complex that cannot be easily identified by the coarser resolution satellite images. Therefore, there are many mixed pixels in acquired images. In arid zones, changes over space and time will not occur drastically, as they are slowly continuous processes.

Figure 3.1 illustrates the set of "the hot months of a year" (inside red line) including months with temperature 22.5 °C or higher, the universe discourse is total months of a year.

Figure ‎3.1 Set of "hot months" in crisp set theory; the data are the monthly average temperature of Kashan Climatology Station, Iran, 1967-2008.

Figure ‎3.2 Crisp and fuzzy membership representation for hot months

a) The classical (crisp) logic representation of "hot months "with characteristic membership value[0,1], b)The multi-valued logic representation of "hot month " that include all months, the red-colored ones are "hot month" considering discrete values, c)The truly "fuzzy" set of "hot month" in a year with the inclusive membership degree between one and zero, considering the continuum of natural values.

Considering an answer for term "hot month in a year" in the northern hemisphere, they are the months of warm season. To find an appropriate answer, a person would compare the status of months by two "prototypes", firstly, "perfect" hot months of year with sunny and torrid days, and another is "perfect not hot" months without these characteristics, then it possible to evaluate between two ranks.

In classical (crisp) logic, to make a model, first we should define the set of all hot months. Then, by using mathematical function, we decide about each month whether it is a member of set, and is included or not. Therefore, the set may include {May, June, July, August, September}.

In Figure 3.2 (c), each month temperature is associated with a certain degree to which it matches the prototype for "hot months". This degree is called the "degree of membership", μ(x) for the element x X, the set "hot months". The month temperature is called a "base variable", x, with the universe X. The range of is from zero to one, representing complete none-membership to the set, and full membership.

In Figure 3.2, the contiguous and graduated changing of colors from red to blue indicates the degree to which the month temperature belongs to the set of "hot months". A gradation of color that makes the area in Figure 3.2 (c) looks as if it is fuzzy.

In Table 3.1, the monthly mean temperature values are brought from the meteorology station of Kashan. The degree of membership of temperature is calculated for "hot" term in range(25-30 Celsius degree); the months with temperature 30 °C and higher are designated as full membership, and the month with temperature 25 °C and lower has no membership value. As temperature 25 °C or lower has no membership at all, a temperature of 30 °C or higher would have complete membership. Temperature values between two ranges are members of the set only to a certain degree, considering temperature 25°as crossover point.

As Figure 3.2(a) shows that as crisp set, a temperature of 24 °C and a temperature of 27 °C, are evaluated differently, the crisp threshold has selected the latter one.

Table ‎3.1 Fuzzy and crisp values of monthly mean temperature of Kashan Climatology Station.


























Crisp values













Fuzzy values













In converting crisp conventional logic to fuzzy set, we should consider the threshold for the selection boundary, here, 25 °C, has degree membership value 0.5 in fuzzy set, as it called the crossover point, in simple defuzzification, the crossover point will be used that the values higher than 0.5 get true value. As mentioned before, fuzzy set is a generalized conventional set. Here, the degree of membership in a set becomes the degree of truth of a statement. For example, the expression, "the month has temperature 27 °C," would get "True" in crisp set in converting the fuzzy degree of 0.7.

Fuzzy inference system (FIS)

A fuzzy inference system (FIS) has three main blocks: furzification, rule base, defuzzification.

In fuzzification, the crisp input values are translated into linguistic concepts, fuzzy sets, by using the corresponding membership function. In fuzzy rule inference, or rule base, the defined fuzzy sets of different variable are connected to each other and the result is calculated; IF. .. THEN rules, which define the relationship between the linguistic variables, are defined as antecedent (IF-part) and conclusion (Then-part).In defuzzification, the result of the fuzzy inference is retranslated from a linguistic concept to a crisp output value.

In fuzzy system like the modes of human reasoning, reasoning plays a major rule. The reasoning in system is approximation rather than exact. The essential characteristics of fuzzy logic are as follows (Fuller, 1995):

In fuzzy logic, the results are derived by approximation reasoning like human nature.

In fuzzy logic, everything is belongs to its universe course by a graded degree.

Any conventional system can be converted to a fuzzy system

In fuzzy system, knowledge is interpreted through rule and variables.

Fuzzy model can control non-linear system easily and simply, that in the mathematical models, they might be very difficult or complex.


Fuzzification is a stage that is applied to convert crisp values to the given fuzzy set by the function known as membership function (MF).

Fuzzification is the mapping of inputs into the degree of membership by proper membership functions for the partitions of linguistic variables as linguistic term sets or linguistic values. The fuzzy term sets are most commonly used for converting objects or phenomena in the continuous values, where the classes have shared boundaries (Burrough, 1989).

There are several forms of membership functions. Generally, the shapes of membership functions are triangular, trapezoidal, and bell-like or Gaussian forms that might be drawn linearly or non-linearly (Figure 3.3). The crisp quantities, as supporters, are on the horizontal axis. The results from the function of membership are projected on the vertical axis. The quantity on the horizontal axis is the base variable and represents the universe of discourse; while the quantity on the vertical axis is the truth degree belongs to the fuzzy set.

Figure ‎3.3 : The shapes of membership functions; trapezoidal (a), triangular (b), and bell shaped(c).

Fuzzy rule inference

Generally, fuzzy rules definitions are proven by the generalized modus ponens and the fuzzy implication principles. Cause-effect relations are defined as rules; they are the following form:

Rule: IF antecedent, THEN consequence

P => Q

The IF-part (antecedent, P) is comprised of inputs which are aggregated together by operators (And, Or), this part is used to fire the agent of rule, while the Then-part is consequence (Q).

The rule inference consists of the three sub-stages; aggregation, activation and accumulation (composition). Aggregation determines the degree of accomplishment of the consequence (Q) from the degree of membership of the sub-antecedent.

However, if the antecedent (IF-part) consists of a combination of several sub-conditions, the degree of accomplishment must be determined by aggregation of the individual values.

If conjunction or disjunction combination of sub-conditions exists, the degree of accomplishment is calculated by means of the AND or OR operator, respectively.

To compute the conclusion based on condition, there are T-implication, or S-implication methods (Fuller, 1995); T-implication, which is practically implemented in systems (Figure 3.4), uses the minimum (Mamdani model) or multiplication (Larsen model) operators.

Figure ‎3.4 T-implication (Mamdani model) on the left, and S-implication on the right side (NEMA, 2005).

Before the accumulation of all rules, activation should be considered, which represents the participating of rule in inference system by giving weight for each rule (weight Ã- rule). If weight factor as certainty is null, it means that rule is out of inference system (NEMA, 2005).

Accumulation stage is the combination of activated all rules to calculate overall result. Generally, the maximum operator is used.


For building rule-based system, expert designates some linguistic variables and applies operators such as disjunction (OR), intersection (AND), and negation (NOT) to connect variables, which they might constitute simple or composite terms. For composite one, expert uses the mentioned operators corresponding to OR and NOT combination. Negation unary operator is the complement membership degree of variable, that is, values smaller or bigger than the relevant fuzzy set.

The possible combination of operators is illustrated in Figure 3.5 for possible forms with two fuzzy set terms (A, B). Two diagrams in top left form strong fuzzy partitions. The others are derived from the combination of elementary terms and possible operators.

Figure ‎3.5 Possible linguistic terms and operators (AND, OR, and NOT) for a fuzzy partition with two linguistic terms (A, B).


Practical process requires that the output of accumulation of overall rules is converted to a single crisp value. In fuzzy evaluation system, it is needed to receive a crisp value at the end. The most popular defuzzification method is the centroid calculation, which finds the center of area under the curve. Center of area finds the vertical separative point that half of the area under the fuzzy set is on each side of the point.