Fuzzy Logic Controller
Fuzzy Logic Controller
Fuzzy logic is a basic control system which relies on the degrees of state of the input and the
output depends on the state of the input and rate of change of this state. In other words, a
fuzzy logic system works on the principle of assigning a particular output depending on the
probability of the state of the input.
Fuzzy logic works on the concept on deciding the output on the basis of assumptions.
It works on the basis of sets. Each set represents some linguistic variable defining the
possible state of the output. Each possible state of the input and the degrees of change of the
state are a part of the set, depending upon which the output is predicted. It basically works on
the principle of If-else-the, i.e. If A AND B Then Z.
Fuzzification is the first step to apply a fuzzy inference system. 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. Finally, in most cases, those fuzzy outputs need to be
converted back to crisp variables to complete the desired control objectives.
Generally, fuzzification involves two processes: derive the membership functions for
input and output variables and represent them with linguistic variables. This process is
equivalent to converting or mapping classical set to fuzzy set to varying degrees.
In practice, membership functions can have multiple different types, such as the
triangular waveform, trapezoidal waveform, Gaussian waveform, bell-shaped waveform,
sigmoidal waveform and S-curve waveform. The exact type depends on the actual
applications. For those systems that need significant dynamic variation in a short period of
time, a triangular or trapezoidal waveform should be utilized. For those system that need very
high control accuracy, a Gaussian or S-curve waveform should be selected.
To illustrate the process of fuzzification, we still use the air conditioner example
developed in the previous section. Assume that we have an air conditioner control system that
is under the control of only a heater. If the temperature is high, the heater control motor
should be turned off, and if the temperature is low, that heater motor should be turned on,
which are common sense.
Regularly, the normal temperature range is from 20 0F to 90 0F. This range can be
further divided into three sub-range or subset, which are
Low temperature: 20 0F ~ 40 0F, 30 0F is center
Medium temperature: 30 0F ~ 80 0F, 55 0F is center
High temperature: 60 0F ~ 90 0F, 75 0F is center
Next those three ranges need to be converted to linguistic variables: LOW, MEDIUM and
HIGH, which correspond to the three temperature ranges listed above.
The membership function of these temperatures is shown in Figure 2. To make thing
simple, a trapezoidal waveform is utilized for this type of membership function. A crisp low
temperature can be considered as a medium temperature to some degree in this fuzzy
membership function representation. For instance, 35 0F will belong to LOW and MEDIUM
to 0.5 degree. Some terminologies used for the membership function are also shown in Figure
2.
The support of a fuzzy set, says LOW, is the set of elements whose degree of
membership in LOW is greater than 0.
The core of a fuzzy set is the set of elements whose degree of membership in that set
is equal to 1, which is equivalent to a crisp set. The boundary of a fuzzy set indicates the
range in which all elements whose degree of membership in that set is between 0 and 1 (0 and
1 are excluded). After the membership functions are defined for both input and output, the
next step is to define the fuzzy control rule.
The rows and columns represent two inputs, the temperature input and the change rate
of the temperature input, and those inputs are related to IF parts in IFTHEN rules. The
conclusion or control output can be considered as a third dimensional variable that is located
at the cross point of each row (temperature) and each column (change rate of the
temperature), and that conclusion is associated with the THEN part in IF-THEN rules. For
example, when the current temperature is LOW, and the current change rate of the
temperature is also LOW, the heater motor’s speed should be FAST to increase the
temperature as soon as possible. This can be represented by the IF-THEN rule as IF the
temperature is LOW, and the change rate of the temperature is LOW, THEN the conclusion
or output (heater motor speed) should be FAST All other rules follow a similar strategy,
which is very similar to a human being’s intuition. In this air conditioner example, a total of
nine rules are developed. For those applications that need high control accuracy, the input and
output should be divided into more small segments, and more fuzzy rules should be applied.