0% found this document useful (0 votes)
10 views45 pages

Process_Control_Topic_9

The document discusses fuzzy logic as a control system that utilizes continuous values between 0 and 1 to manage processes, contrasting with traditional binary logic. It highlights the advantages of fuzzy control in mimicking human decision-making and handling complex, nonlinear systems where conventional methods may fail. Key concepts include fuzzification, defuzzification, and the use of fuzzy sets and rules to create a more intuitive and adaptable control system.

Uploaded by

hesenoguz234
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views45 pages

Process_Control_Topic_9

The document discusses fuzzy logic as a control system that utilizes continuous values between 0 and 1 to manage processes, contrasting with traditional binary logic. It highlights the advantages of fuzzy control in mimicking human decision-making and handling complex, nonlinear systems where conventional methods may fail. Key concepts include fuzzification, defuzzification, and the use of fuzzy sets and rules to create a more intuitive and adaptable control system.

Uploaded by

hesenoguz234
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 45

Course: Process Control

Topic 9: Fuzzy Logic and Process Control

9.1. Fuzzy control system


A fuzzy control system is a control system based on fuzzy logic - a
mathematical system that analyzes analog input values in terms of logical variables
that take on continuous values between 0 and 1, in contrast to classical or digital logic,
which operates on discrete values of either 1 or 0 (true or false, respectively).

Overview
Fuzzy logic is widely used in machine control. The term "fuzzy" refers to the
fact that the logic involved can deal with concepts that cannot be expressed as the
"true" or "false" but rather as "partially true". Although alternative approaches such as
genetic algorithms and neural networks can perform just as well as fuzzy logic in
many cases, fuzzy logic has the advantage that the solution to the problem can be cast
in terms that human operators can understand, so that their experience can be used in
the design of the controller. This makes it easier to mechanize tasks that are already
successfully performed by humans.

Motivation for fuzzy control


Conventional control theory uses an explicit mathematical (analytical) model of
a process to be controlled and specifications of the desired closed-loop behavior to
design a controller [3]. This approach may fall short if the model of the process is
difficult to obtain, (partly) unknown, or highly nonlinear. The design of controllers for
seemingly easy everyday tasks such as driving a car or grasping a fragile object
continues to be a challenge for robotics, while these tasks are easily performed by
human beings. Yet, humans do neither use mathematical models nor exact trajectories
for controlling such processes.
Many processes controlled by human operators in industry cannot be automated
using conventional control techniques, since the performance of these controllers is
often inferior to that of the operators. One of the reasons is that linear controllers,
which are commonly used in conventional control, are not appropriate for nonlinear
plants. Another reason is that humans aggregate various kinds of information and
combine control strategies, that cannot be integrated into a single analytic control law.
The underlying principle of knowledge-based (expert) control is to capture and
implement experience and knowledge available from experts (e.g., process operators).
A specific type of knowledge-based control is the fuzzy rule-based control,
where the control actions corresponding to particular conditions of the system are
described in terms of fuzzy if-then rules. Fuzzy sets are used to define the meaning of
qualitative values of the controller inputs and outputs such small error, large control
action. Fuzzy logic can capture the continuous nature of human decision processes and
as such is a definite improvement over methods based on binary logic (which are
widely used in industrial controllers).
The early work in fuzzy control was motivated by a desire to
 mimic the control actions of an experienced human operator (knowledge-based
part)
 obtain smooth interpolation between discrete outputs that would normally be
obtained (fuzzy logic part).
Since then the application range of fuzzy control has widened substantially.
However, the two main motivations still persevere. The linguistic nature of fuzzy
control makes it possible to express process knowledge concerning how the process
should be controlled or how the process behaves. The interpolation aspect of fuzzy
control has led to the viewpoint where fuzzy systems are seen as smooth function
approximation schemes.
In most cases a fuzzy controller is used for direct feedback control. However, it
can also be used on the supervisory level as, e.g., a self-tuning device in a
conventional PID (Proportional-Integral-Differential) controller [3,4]. Also, fuzzy
control is no longer only used to directly express a priori process knowledge. For
example, a fuzzy controller can be derived from a fuzzy model obtained through
system identification. Most often used are
 Mamdani (linguistic) controller with either fuzzy or singleton consequents.
This type of controller is usually used as a direct closed-loop controller.
 Takagi-Sugeno (TS) controller, typically used as a supervisory controller.

9.1.1. Fuzzy sets


The input variables in a fuzzy control system are in general mapped by sets of
membership functions similar to this, known as "fuzzy sets". The process of
converting a crisp input value to a fuzzy value is called "fuzzification" [5].
A control system may also have various types of switch, or "ON-OFF", inputs
along with its analog inputs, and such switch inputs of course will always have a truth
value equal to either 1 or 0, but the scheme can deal with them as simplified fuzzy
functions that happen to be either one value or another.
Given "mappings" of input variables into membership functions and truth
values, the microcontroller then makes decisions for what action to take, based on a set
of "rules", each of the form:
IF brake temperature IS warm AND speed IS not very fast
THEN brake pressure IS slightly decreased.
In this example, the two input variables are "brake temperature" and "speed"
that have values defined as fuzzy sets. The output variable, "brake pressure" is also
defined by a fuzzy set that can have values like "static" or "slightly increased" or
"slightly decreased" etc.
This rule by itself is very puzzling since it looks like it could be used without
bothering with fuzzy logic, but remember that the decision is based on a set of rules:
 All the rules that apply are invoked, using the membership functions and truth
values obtained from the inputs, to determine the result of the rule.
 This result in turn will be mapped into a membership function and truth value
controlling the output variable.
 These results are combined to give a specific ("crisp") answer, the actual brake
pressure, a procedure known as "defuzzification".
This combination of fuzzy operations and rule-based "inference" describes a
"fuzzy expert system".
Traditional control systems are based on mathematical models in which the
control system is described using one or more differential equations that define the
system response to its inputs. Such systems are often implemented as "PID controllers"
(proportional-integral-derivative controllers). They are the products of decades of
development and theoretical analysis, and are highly effective.
If PID and other traditional control systems are so well-developed, why bother
with fuzzy control? It has some advantages. In many cases, the mathematical model of
the control process may not exist, or may be too "expensive" in terms of computer
processing power and memory, and a system based on empirical rules may be more
effective.
Furthermore, fuzzy logic is well suited to low-cost implementations based on
cheap sensors, low-resolution analog-to-digital converters, and 4-bit or 8-bit one-chip
microcontroller chips. Such systems can be easily upgraded by adding new rules to
improve performance or add new features. In many cases, fuzzy control can be used to
improve existing traditional controller systems by adding an extra layer of intelligence
to the current control method.
A fuzzy set is represented by a membership function defined on the universe of
discourse.The universe of discourse is the space where the fuzzy variables are defined.
The membership function gives the grade, or degree, of membership within the set, of
any element of the universe of discourse. The membership function maps the elements
of the universe onto numerical values in the interval [0, 1]. A membership function
value of zero implies that the corresponding element is definitely not an element of the
fuzzy set, while a value of unity means that the element fully belongs to the set. A
grade of membership in between corresponds to the fuzzy membership to set. In crisp
set theory, if someone is taller than 1.8 meters, we can state that such person belongs
to the “set of tall people”.
However, such sharp change from 1.7999 meters of a “short person” to 1.8001
meters of a “tall person” is against the common sense. Another example could be
given as follows: Suppose a highway has a speed limit as 65 miles/hour. Those who
drive faster than 65 miles/hours belongs to the set A whose elements are violators and
their membership function has the value of 1.
On the other hand, those who drive slower do not belong to the set A. The sharp
transition between membership and non-membership would be realistic? Should there
be a traffic summons issued to drivers who are caught at 65.5 miles/hour ? Or at 65.9
miles/hour ? Therefore, in practical situations there is always a natural fuzzification
when someone analysis statements and a smooth membership curve usually better
describes the grade that an element belongs to a set.

Fuzzification
Fuzzification is the process of decomposing a system input and/or output into
one or more fuzzy sets [3]. Many types of curves can be used, but triangular or
trapezoidal shaped membership functions are the most common because they are
easier to represent in embedded controllers. Fig. 9.1 shows a system of fuzzy sets for
an input with trapezoidal and triangular membership functions. Each fuzzy set spans a
region of input (or output) value graphed with the membership. Any particular input is
interpreted from this fuzzy set and a degree of membership is interpreted. The
membership functions should overlap to allow smooth mapping of the system. The
process of fuzzification allows the system inputs and outputs to be expressed in
linguistic terms so that rules can be applied in a simple manner to express a complex
system.
Suppose a simplified implementation for an air-conditioning system with a
temperature sensor. The temperature might be acquired by a microprocessor which has
a fuzzy algorithm to process an output to continuously control the speed of a motor
which keeps the room in a “good temperature,” it also can direct a vent upward or
downward as necessary. The figure illustrates the process of fuzzification of the air
temperature. There are five fuzzy sets for temperature: COLD, COOL, GOOD,
WARM, and HOT.

Fig. 9.1. Fuzzy sets defining temperature

The membership function for fuzzy sets COOL and WARM are trapezidal, the
membership function for GOOD is triangular, and the membership functions for
COLD and HOT are half-triangular with shoulders indicating the physical limits for
such process (staying in a place with a room temperature lower than 8 degrees Celsius
or above 32 degrees Celsius would be quite uncomfortable). The way to design such
fuzzy sets is a matter of degree and depends solely on the designer’s experience and
intuition. Most probably an Eskimo and an Equatorian would draw very different
membership functions for such fuzzy sets!
The figure shows some non-overlaping fuzzy sets, which can indicate any non-
linearity in the modeling process. There an input temperature of 18 degrees Celsius
would be considered COOL with a degree of 0.75 and would be considered GOOD
with a degree of 0.25. In order to build the rules that will control the air conditioning
motor, we could watch how a human expert would adjust the settings to speed up and
slow down the motor in accordance to the temperature, obtaining the rules empirically.
If the room temperature is good, keep the motor speed medium, if it is warm, turn the
knob of the speed to fast, and blast the speed, if the room is hot. On the other hand, if
the temperature is cool, slow down the speed, and stop the motor if it is cold. This is
the beauty of fuzzy logic: to turn common-sense, linguistic descriptions, into a
computer controlled system. Therefore, it is required to understand how to use some
logical operations to build the rules.
Boolean logic operations must be extended in fuzzy logic to manage the notion
of partial truth - truth values between “completely true” and “completely false.” A
fuzziness nature of a statement like “X is LOW” might be combined to the fuzziness
statement of “Y is HIGH” and a typical logical operation could be given as X is LOW
and Y is HIGH. What is the truth value of this and operation? The logic operations
with fuzzy sets are performed with the membership functions. Although there various
other interpretations for fuzzy logic operations, the following definitions are very
convenient in embedded control applications:
truth(X and Y) = Min(truth(X), truth(Y))
truth(X or Y) = Max(truth(X), truth(Y))
truth(not X) = 1.0 - truth(X)

Defuzzification
After fuzzy reasoning we have a linguistic output variable which needs to be
translated into a crisp value. The objective is to derive a single crisp numeric value that
best represents the inferred fuzzy values of the linguistic output variable.
Defuzzification is such inverse transformation which maps the output from the fuzzy
domain back into the crisp domain.
Some defuzzification methods tend to produce an integral output considering all
the elements of the resulting fuzzy set with the correspondi ng weights. Other met
hods take into account just the elements corresponding to the maximum points of the
resulting membership functions.
The following defuzzification methods are of practical importance [2]:
Center-of-Area (C-o-A) - The C-o-A method is often referred to as the Center-
of-Gravity method because it computes the centroid of the composite area representing
the output fuzzy term.
Center-of-Maximum (C-o-M) - In the C-o-M method only the peaks of the
membership functions are used. The defuzzified crisp compromise value is determined
by finding the place where the weights are balanced. Thus the areas of the membership
functions play no role and only the maxima (singleton memberships) are used. The
crisp output is computed as a weighted mean of the term membership maxima,
weighted by the inference results.
Mean-of-Maximum (M-o-M) – The M-o-M is used only in some cases where
the C-o-M approach does not work.

9.1.2. Fuzzy control in detail


Fuzzy controllers are very simple conceptually [6]. They consist of an input
stage, a processing stage, and an output stage. The input stage maps sensor or other
inputs, such as switches, thumbwheels, and so on, to the appropriate membership
functions and truth values. The processing stage invokes each appropriate rule and
generates a result for each, then combines the results of the rules. Finally, the output
stage converts the combined result back into a specific control output value.
The most common shape of membership functions is triangular, although
trapezoidal and bell curves are also used, but the shape is generally less important than
the number of curves and their placement. From three to seven curves are generally
appropriate to cover the required range of an input value, or the "universe of
discourse" in fuzzy jargon.
As discussed earlier, the processing stage is based on a collection of logic rules
in the form of IF-THEN statements, where the IF part is called the "antecedent" and
the THEN part is called the "consequent". Typical fuzzy control systems have dozens
of rules.
Consider a rule for a thermostat :
IF (temperature is "cold") THEN (heater is "high")
This rule uses the truth value of the "temperature" input, which is some truth
value of "cold", to generate a result in the fuzzy set for the "heater" output, which is
some value of "high". This result is used with the results of other rules to finally
generate the crisp composite output. Obviously, the greater the truth value of "cold",
the higher the truth value of "high", though this does not necessarily mean that the
output itself will be set to "high" since this is only one rule among many. In some
cases, the membership functions can be modified by "hedges" that are equivalent to
adverbs. Common hedges include "about", "near", "close to", "approximately", "very",
"slightly", "too", "extremely", and "somewhat".
These operations may have precise definitions, though the definitions can vary
considerably between different implementations. "Very", for one example, squares
membership functions; since the membership values are always less than 1, this
narrows the membership function. "Extremely" cubes the values to give greater
narrowing, while "somewhat" broadens the function by taking the square root.
In practice, the fuzzy rule sets usually have several antecedents that are
combined using fuzzy operators, such as AND, OR, and NOT, though again the
definitions tend to vary: AND, in one popular definition, simply uses the minimum
weight of all the antecedents, while OR uses the maximum value. There is also a NOT
operator that subtracts a membership function from 1 to give the "complementary"
function.
There are several ways to define the result of a rule, but one of the most
common and simplest is the "max-min" inference method, in which the output
membership function is given the truth value generated by the premise.
Rules can be solved in parallel in hardware, or sequentially in software. The
results of all the rules that have fired are "defuzzified" to a crisp value by one of
several methods. There are dozens, in theory, each with various advantages or
drawbacks.
The "centroid" method is very popular, in which the "center of mass" of the
result provides the crisp value. Another approach is the "height" method, which takes
the value of the biggest contributor. The centroid method favors the rule with the
output of greatest area, while the height method obviously favors the rule with the
greatest output value.
The diagram below [6] demonstrates max-min inferencing and centroid
defuzzification for a system with input variables "x", "y", and "z" and an output
variable "n". Note that "mu" is standard fuzzy-logic nomenclature for "truth value":
Fig. 9.2. Max-min inferencing and centroid defuzzification

Notice how each rule provides a result as a truth value of a particular


membership function for the output variable. In centroid defuzzification the values are
OR'd, that is, the maximum value is used and values are not added, and the results are
then combined using a centroid calculation.
Fuzzy control system design is based on empirical methods, basically a
methodical approach to trial-and-error. The general process is as follows:
 Document the system's operational specifications and inputs and outputs.
 Document the fuzzy sets for the inputs.
 Document the rule set.
 Determine the defuzzification method.
 Run through test suite to validate system, adjust details as required.
 Complete document and release to production.
As a general example, consider the design of a fuzzy controller for a steam
turbine. The block diagram of this control system appears as follows:
The input and output variables map into the following fuzzy set [6]:
Fig. 9.3. Block diagram of a control system for a steam turbine

where:
N3: Large negative.
N2: Medium negative.
N1: Small negative.
Z: Zero.
P1: Small positive.
P2: Medium positive.
P3: Large positive.

The rule set includes such rules as:


rule 1: IF temperature IS cool AND pressure IS weak,
THEN throttle is P3.
rule 2: IF temperature IS cool AND pressure IS low,
THEN throttle is P2.
rule 3: IF temperature IS cool AND pressure IS ok,
THEN throttle is Z.
rule 4: IF temperature IS cool AND pressure IS strong,
THEN throttle is N2.
In practice, the controller accepts the inputs and maps them into their
membership functions and truth values. These mappings are then fed into the rules. If
the rule specifies an AND relationship between the mappings of the two input
variables, as the examples above do, the minimum of the two is used as the combined
truth value; if an OR is specified, the maximum is used. The appropriate output state is
selected and assigned a membership value at the truth level of the premise. The truth
values are then defuzzified. For an example, assume the temperature is in the "cool"
state, and the pressure is in the "low" and "ok" states. The pressure values ensure that
only rules 2 and 3 fire [6]:

Fig. 9.4. The rule set of a control system for a steam turbine

The two outputs are then defuzzified through centroid defuzzification:

The output value will adjust the throttle and then the control cycle will begin again to
generate the next value.
9.1.3. Building a fuzzy controller
Most commercial fuzzy products are rule-based systems that receive current
information in the feedback loop from the device as it operates and control the
operation of a mechanical or other device [4,5]. A fuzzy logic system has four blocks
as shown in Fig. 2. Crisp input information from the device is converted into fuzzy
values for each input fuzzy set with the fuzzification block. The universe of discourse
of the input variables determines the required scaling for correct per-unit operation.
The scaling is very important because the fuzzy system can be retrofitted with other
devices or ranges of operation by just changing the scaling of the
input and output. The decision-making-logic determines how the fuzzy logic
operations are performed (Sup-Min inference), and together with the knowledge base
determine the outputs of each fuzzy IF-THEN rules. Those are combined and
converted to crispy values with the defuzzification block. The output crisp value can
be calculated by the center of gravity or the weighted average.

Fig. 9.5. Fuzzy Controller Block Diagram

In order to process the input to get the output reasoning there are six steps
involved in the creation of a rule based fuzzy system:
1. Identify the inputs and their ranges and name them.
2. Identify the outputs and their ranges and name them.
3. Create the degree of fuzzy membership function for each input and output.
4. Construct the rule base that the system will operate.
5. Decide how the action will be executed by assigning strengths to the rules.
6. Combine the rules and defuzzify the output
Consider implementing with a microcontroller chip a simple feedback
controller [6]:

Fig. 9.6. Simple feedback fuzzy controller

A fuzzy set is defined for the input error variable "e", and the derived change in
error, "delta", as well as the "output", as follows:
LP: large positive
SP: small positive
ZE: zero
SN: small negative
LN: large negative
If the error ranges from -1 to +1, with the analog-to-digital converter used
having a resolution of 0.25, then the input variable's fuzzy set (which, in this case, also
applies to the output variable) can be described very simply as a table, with the error /
delta / output values in the top row and the truth values for each membership function
arranged in rows beneath:

or, in graphical form (where each "X" has a value of 0.1):

Suppose this fuzzy system has the following rule base:


rule 1: IF e = ZE AND delta = ZE THEN output = ZE
rule 2: IF e = ZE AND delta = SP THEN output = SN
rule 3: IF e = SN AND delta = SN THEN output = LP
rule 4: IF e = LP OR delta = LP THEN output = LN
These rules are typical for control applications in that the antecedents consist of
the logical combination of the error and error-delta signals, while the consequent is a
control command output. The rule outputs can be defuzzified using a discrete centroid
computation:
SUM( I = 1 TO 4 OF ( mu(I) * output(I) ) ) / SUM( I = 1 TO 4 OF mu(I) )
Now, suppose that at a given time we have:
e = 0.25, delta = 0.5
Then this gives:
Plugging this into rule 1 gives:
rule 1: IF e = ZE AND delta = ZE THEN output = ZE
mu(1) = MIN( 0.7, 0.3 ) = 0.3
output(1) = 0
……………….
where:
 mu(1): Truth value of the result membership function for rule 1. In terms
of a centroid calculation, this is the "mass" of this result for this discrete case.
 output(1): Value (for rule 1) where the result membership function (ZE) is
maximum over the output variable fuzzy set range. That is, in terms of a centroid
calculation, the location of the "center of mass" for this individual result. This value is
independent of the value of "mu". It simply identifies the location of ZE along the
output range.
The other rules give:
rule 2: IF e = ZE AND delta = SP THEN output = SN
mu(2) = MIN( 0.7, 1 ) = 0.7
output(2) = -0.5
rule 3: IF e = SN AND delta = SN THEN output = LP
mu(3) = MIN( 0.0, 0.0 ) = 0
output(3) = 1
rule 4: IF e = LP OR delta = LP THEN output = LN
mu(4) = MAX( 0.0, 0.3 ) = 0.3
output(4) = -1
This system can be implemented on a standard microprocessor, but dedicated
fuzzy chips are now available. For example, Adaptive Logic INC of San Jose,
California, sells a "fuzzy chip", the AL220, that can accept four analog inputs and
generate four analog outputs. A block diagram of the chip is shown below [6]:
Fig. 9.7. Block diagram of the AL220 "fuzzy chip" - ADC: analog-to-digital converter,
DAC: digital-to-analog converter, H: sample/hold

9.1.4. Antilock brakes


As a first example, consider an anti-lock braking system, directed by a
microcontroller chip [6]. The microcontroller has to make decisions based on brake
temperature, speed, and other variables in the system.
The variable "temperature" in this system can be subdivided into a range of
"states": "cold", "cool", "moderate", "warm", "hot", "very hot". The transition from
one state to the next is hard to define.
An arbitrary static threshold might be set to divide "warm" from "hot". For
example, at exactly 90 degrees, warm ends and hot begins. But this would result in a
discontinuous change when the input value passed over that threshold. The transition
wouldn't be smooth, as would be required in braking situations.
The way around this is to make the states fuzzy. That is, allow them to change
gradually from one state to the next. In order to do this there must be a dynamic
relationship established between different factors.
We start by defining the input temperature states using "membership functions":

Fig. 9.8. Defining the input temperature states using "membership functions"

With this scheme, the input variable's state no longer jumps abruptly from one
state to the next. Instead, as the temperature changes, it loses value in one membership
function while gaining value in the next. In other words, its ranking in the category of
cold decreases as it becomes more highly ranked in the warmer category.
At any sampled timeframe, the "truth value" of the brake temperature will
almost always be in some degree part of two membership functions: i.e.: '0.6 nominal
and 0.4 warm', or '0.7 nominal and 0.3 cool', and so on.
The above example demonstrates a simple application, using the abstraction of
values from multiple values. This only represents one kind of data, however, in this
case, temperature.
Adding additional sophistication to this braking system, could be done by
additional factors such as traction, speed, inertia, set up in dynamic functions,
according to the designed fuzzy system.

9.1.5. Examples:
Mamdani controller
A Mamdani controller is usually used as a feedback controller. Since the rule
base represents a static mapping between the antecedent and the consequent variables,
external dynamic filters must be used to obtain the desired dynamic behavior of the
controller (Fig. 9.9) [8].

Figure 9.9. Fuzzy controller in a closed-loop configuration

Fuzzy controller in a closed-loop configuration (top panel) consists of dynamic


filters and a static map (middle panel). The static map is formed by the knowledge
base, inference mechanism and fuzzification and defuzzification interfaces.
The control protocol is stored in the form of if-then rules in a rule base which is
a part of the knowledge base. While the rules are based on qualitative knowledge, the
membership functions defining the linguistic terms provide a smooth interface to the
numerical process variables and the set-points. The fuzzifier determines the
membership degrees of the controller input values in the antecedent fuzzy sets. The
inference mechanism combines this information with the knowledge stored in the rules
and determines what the output of the rule-based system should be. In general, this
output is again a fuzzy set.
For control purposes, a crisp control signal is required. The defuzzifier
calculates the value of this crisp signal from the fuzzy controller outputs.
In Fig. 9.9 one can see that the fuzzy mapping is just one part of the fuzzy
controller. Signal processing is required both before and after the fuzzy mapping. The
dynamic pre-filter and post-filter process the controller's inputs and outputs. They
typically perform signal scaling and dynamic filtering, e.g., compute the derivative and
the integral of the control error or of the control signal.
This decomposition of a controller to a static map and dynamic filters can be
done for most classical control structures. To see this, consider a PID described by the
following equation
u(t)=Pe(t)+I∫t0e(τ)dτ+Dde(t)dt,
where u(t) is the control signal fed to the process to be controlled and e(t)=r(t)
−y(t) is the error signal, i.e., the difference between the desired and measured process
output. The abowe Eequation is a linear function (geometrically a hyperplane)
u=∑i=13aixi,
where x1=e(t),x2=∫t0e(τ)dτ,x3=de(t)dt and the ai parameters are the P, I and D
gains. The linear form can be generalized to the nonlinear function
u=f(x).(3)
In the case of a fuzzy logic controller, the nonlinear function f is represented by
a fuzzy mapping. Clearly, fuzzy controllers analogous to linear P, PI, PD or PID
controllers can be designed by using appropriate dynamic filters such as differentiators
and integrators.
Mamdani fuzzy systems are quite close in nature to manual control. The
controller is defined by specifying what the output should be for a number of different
input signal combinations. Each input signal combination is represented as a rule of
the following form:
Ri: If x1 is Ai1 … and xn is Ain then u is Bi,i=1,2,…,K.
Also other logical connectives and operators may be used, e.g., or and not. In
Mamdani fuzzy systems the antecedent and consequent fuzzy sets are often chosen to
be triangular or Gaussian. It is also common that the input membership functions
overlap in such a way that the membership values of the rule antecedents always sum
up to one. In this case, and if the rule base is on conjunctive form, one can interpret
each rule as defining the output value for one point in the input space. The point in the
input space is obtained by taking the centers of the input fuzzy sets. Then the output
value is the center of the output fuzzy set (center-of-area method). The fuzzy reasoning
results in a smooth interpolation between the points in the input space as it can be seen
in Fig. 9.10, 9.11 and 9.12. With this interpretation a Mamdani system can be viewed
as defining a piecewise constant function with interpolation [8].
Figure 9.10: Membership functions partition the input space.

Figure 9.11. Each rule defines the output value for one point or area in the input
space.

Figure 9.12. Fuzzy logic interpolates between the constant values.

fuzzy PD controller
Consider a fuzzy counterpart of a linear PD (proportional-derivative) controller
[8]. The rule base has two inputs (the error e , and the error change (derivative) e˙) and
one output, i.e., the control action u . An example of a possible rule base is shown in
the following scheme.

NNZPP
BS ES B
N N N NNZ
BBBSSE
NNNNZ P
S BS S ES
e !
style="bac
NNZ PP
kground-
S S E SS
color:#F5F
5F5;"| ZE
P NZ P PP
S S E S SB
PZP P PP
BES S BB

Figure 9.13. Fuzzy PD control surface.

Five linguistic terms are used for each variable, (NB - Negative big, NS -
Negative small, ZE - Zero, PS - Positive small and PB - Positive big). Each entry of
the table defines one rule, e.g. R23 : "If e is NS and e˙ is ZE then u is NS. Fig. Figure
9.13 shows the resulting control surface obtained by plotting the inferred control action
u for discretized values of e and e˙ . In fuzzy PD control, the difference Δe=e(k)
−e(k−1) is often used as an approximation for the derivative.

Takagi-Sugeno controller
Takagi-Sugeno (TS) fuzzy controllers are close to gain scheduling approaches.
Several linear controllers are defined, each valid in one particular region of the
controller's input space. The overall controller's output is obtained by interpolating the
local linear controllers see Fig. 9.14 [8].

Figure 9.14. The TS fuzzy controller can be seen as a collection of several local
controllers combined by a fuzzy scheduling mechanism.

An example of a TS control rule base is


R1R2: If r is Low then u1=PLowe+DLowe˙If r is High then u2=PHighe+DHighe˙
In this example, the antecedent variable is the reference r while the consequent
variables are the error e and its derivative e˙ , respectively. The controller's output is
therefore linear in e and e˙ , but the parameters of the linear mapping depend on the
reference
u=μLow(r)u1+μHigh(r)u2μLow(r)+μHigh(r)=μLow(r)(PLowe+DLowe˙)
+μHigh(r)(PHighe+DHighe˙)μLow(r)+μHigh(r)
If the local controllers differ only in their parameters, the TS controller is a rule-
based form of a gain-scheduling mechanism. Heterogeneous control can employ
different control laws in different operating regions. In the latter case, e.g. time-
optimal control for dynamic transitions can be combined with PI(D) control in the
vicinity of setpoints. Therefore, the TS controller can be seen as a form of supervisory
control.

Fuzzy supervisory control


A fuzzy inference system can also be applied at a higher, supervisory level of the
control hierarchy. A supervisory controller is a secondary controller which augments an
existing controller so that the control objectives can be met which would not be possible
without the supervision. A supervisory controller can, for instance, adjust the parameters of a
low-level controller according to the process information (Fig. 9.15) [8].

Figure 9.15. Fuzzy supervisory control.

In this way, static or dynamic behavior of the low-level control system can be
modified in order to cope with process nonlinearities or changes in the operating or
environmental conditions. An advantage of a supervisory structure is that it can be
added to already existing control systems. Hence, the original controllers can always
be used as initial controllers for which the supervisory controller can be tuned for
improving the performance. A supervisory structure can be used for implementing
different control strategies in a single controller. An example is choosing proportional
control with a high gain, when the system is very far from the desired reference signal
and switching to a PI-control in the neighborhood of the reference signal. Because the
parameters are changed during the dynamic response, supervisory controllers are in
general nonlinear.
Many processes in the industry are controlled by PID controllers. Despite their
advantages, conventional PID controllers suffer from the fact that the controller must
be re-tuned when the operating conditions change. This disadvantage can be reduced
by using a fuzzy supervisor for adjusting the parameters of the low-level controller. A
set of rules can be obtained from experts to adjust the gains P and D of a PD
controller, e.g, based on the current set-point r. The rules may look like

If process output is High


Then reduce proportional gain Slightly and
increase derivative gain Moderately

The TS controller can be interpreted as a simple version of supervisory control.


For instance, the TS rules (Figure 9.15) can be written in terms of Mamdani or
singleton rules that have the P and D parameters as outputs. These are then passed to a
standard PD controller at a lower level.

Example: pressure control


A supervisory fuzzy controller has been applied to pressure control in a
laboratory fermenter, depicted in Fig. 9.16, 9.17 and 9.18 [8].

Figure 9.16. Experimental setup.


Figure 9.17. Nonlinear steady-state characteristic.

Figure 9.18. The supervisory fuzzy control scheme.

The volume of the fermenter tank is 40 l, and normally it is filled with 25 l of


water. At the bottom of the tank, air is fed into the water at a constant flow-rate, kept
constant by a local mass-flow controller. The air pressure above the water level is
controlled by an outlet valve at the top of the tank. With a constant input flow-rate, the
system has a single input, the valve position, and a single output, the air pressure.
Because of the underlying physical mechanisms, and because of the nonlinear
behavior of the control valve, the process has a nonlinear steady-state characteristic,
shown in Fig. 9.19 [8], as well as a nonlinear dynamic behavior.

Figure 9.19. Membership functions for u(k)

A single-input, two-output supervisor shown in Fig. 9.18, was designed. The


input of the supervisor is the valve position u(k) and the outputs are the proportional
and the integral gain of a conventional PI controller. The supervisor updates the PI
gains at each sample of the low-level control loop (5 s).
The domain of the valve position between 0 and 100 was modeled with Small,
Medium, Big and Very Big as membership functions (cf. Fig. 9.19).
The PI gains P and I associated with each of the fuzzy sets are given as follows:

Gains ∖u(k) !
Small Medium Big Very big
width="50"
P 190 170 155 140
I 150 90 70 50

Figure 9.20. Real-time control result of the supervisory fuzzy controller.

The P and I values were found through simulations in the respective regions of
the valve positions. The overall output of the supervisor is computed as a weighted
mean of the local gains. The supervisory fuzzy controller, tested and tuned through
simulations, was applied to the process directly (without further tuning), under the
nominal conditions. The real-time control results are shown in Fig. 9.20.

Model-based fuzzy control


Although fuzzy control was initially introduced as a model-free control design
method based on the knowledge of a human operator, current research is almost
exclusively devoted to model-based fuzzy control methods that can guarantee stability
and robustness of the closed-loop system [8]. This approach assumes that a fuzzy
model describing the process to be controlled is available. A fuzzy controller is then
designed whose structure matches the structure of the fuzzy plant model. This idea, for
TS fuzzy systems called parallel distributed compensation (Tanaka 2001), has proven
very fruitful.
To illustrate the approach, consider the following continuous Takagi-Sugeno
(CTS) model in the state-space form
x˙(t)y(t)==∑i=1rhi(z(t))(Aix(t)+Biu(t))∑i=1rhi(z(t))Cix(t)
where hi(z(t))≥0 are the degrees of fulfillment of the rules (given by the
membership degrees), satisfying the convex sum property ∑ri=1hi(z(t))=1 , and Ai,Bi
and Ci are the matrices of the local state-space model which is supposed to be
observable and controllable. The parallel distributed compensation (PDC) law for CTS
system, is given by
u(t)=−∑i=1rhi(z(t))Fix(t)
The goal is to design Fi s.t. a robust control law is obtained. Consider the above
scalar functions hi(·) , and symmetric matrices Υij=ΥTij. Many control design
problems can be stated as finding the least conservative conditions ensuring
∑i=1r∑j=1rhi(z(t))hj(z(t))Υij<0)
The basic result considers the quadratic Lyapunov function
V(x)=xT(t)Px(t)withP=PT>0.
whose derivative along the trajectories of the CTS in the closed loop with the
PDC la result with
Υij=(Ai−BiFj)TP+P(Ai−BiFj).
The main approach is based on the use of Linear Matrix Inequality (LMI)
techniques (Boyd 1994), where conditions valid for any hi verifying the convex
sum property are used.

Logical interpretation of fuzzy control


In spite of the appearance there are several difficulties to give a rigorous logical
interpretation of the IF-THEN rules. As an example, interpret a rule as IF (temperature
is "cold") THEN (heater is "high") by the first order formula Cold(x)→High(y) and
assume that r is an input such that Cold(r) is false. Then the formula Cold(r)→High(t)
is true for any t and therefore any t gives a correct control given r. A rigorous logical
justification of fuzzy control is given in Hájek's book where fuzzy control is
represented as a theory of Hájek's basic logic. Also in Gerla another logical approach
to fuzzy control is proposed based on fuzzy logic programming.Indeed, denote by f the
fuzzy function arising of an IF-THEN systems of rules. Then we can translate this
system into a fuzzy program P containing a series of rules whose head is "Good(x,y)".
The interpretation of this predicate in the least fuzzy Herbrand model of P coincides
with f. This gives further useful tools to fuzzy control.

9.2. Envelope Optimization and Control Using Fuzzy Logic

In the Control Magazine topic entitled Envelope Optimization by Bela Liptak


(www.controlglobal.com; 1998), a multivariable control strategy is described whereby
a process is “herded” to stay within a safe operating envelope while the optimization
proceeds. Building on that work, a method to implement Envelope Optimization using
fuzzy logic is described in this section.
Background
The basic building tool for this optimization methodology is the fuzzy logic Envelope
Controller (EC) function block. Such EC blocks are often chained (or sequenced) one
after the other. As shown below, each EC in the chain sequence focuses on a single
process variable, with the complete chain forming an efficient and sophisticated
optimization strategy.

Figure 9.21. Envelope controlles in a chain sequence

With such a chain sequence construction, it is possible to incorporate many


constraints. It is not difficult to add or remove a constraint or change its priority, even
in real time.
To better understand the operation of the chain sequence shown in the figure
above, use the following analogy. Three operators are sitting side by side in front of
their own operator’s console. Each operator can only view a single PV. There are
operating constraints for the PV [Very Low, Low, Normal, High, Very High]. Each
operator can make incremental control moves to the single output variable. They can
make a move once a minute.
Operator #1 monitors PV1. If PV1 is Very High, a fixed size negative
incremental move will be made. If PV1 is Very Low, a positive move will be made.
Otherwise no control move is made. Control moves are made to insure the constraints
are not exceeded.
Operator #2 monitors PV2. If PV2 is Very High, a fixed size negative
incremental move needs to be made. If PV2 is Very Low, a positive move needs to be
made. Otherwise no control move needs to be made. But first, permission from
Operator #1 is required. If PV1 is Very High, a positive control move is not allowed. If
PV1 is Very Low, a negative move is not allowed. Otherwise permission is granted for
any move.
Permission is a fuzzy variable which varies from 0.0 to 1.0. Permission of 0.50
allows Operator # 2 to make half of the fixed control move.
Operator #3 monitors PV3. This operator performs the optimization function. In
this example, it will be to maximize production rate. Therefore PV3 is the production
rate. If PV3 is not High, a positive control move will be made. This operator only
makes positive control moves. But first permission from both Operator #1 and
Operator #2 is required. It will insure that the constraints are not violated. This
requires that neither PV1 or PV2 are High. Operator #3 will stop making control
moves when PV3 becomes High.
It is up to Operator #1 and Operator #2 to reduce the production rate if a
constraint is exceeded.
A detailed description of the Envelope Controller block is given in the next
section. However it may be clearer to go directly to the two optimization examples at
the end of the topic and then come back and read the rest of the topic. The description
of the Envelope Controller Block is included for completeness.
Two optimization examples are shown later in this topic. The first deals with
minimizing the amount of combustion air for an industrial power boiler. The second
deals with minimizing the outlet pressure of a forced draft fan of an industrial power
boiler to minimize energy losses.
This controller is best suited to applications where there are multiple measured
input variables that must stay within prescribed limits and there is a single output
variable.

9.2.1. The Envelope Controller Block


Before discussing how the fuzzy logic Envelope Controller (EC) function block
can be chained in a sequence to form an optimization strategy, we first consider the
function of a single EC block.
A schematic of the basic EC block is shown in the figure below [1]:

Figure 9.22. Envelope controller

As will be illustrated in the examples later in this topic, the terms "upstream"
and "downstream" refer to the flow of information in the chain sequence of EC's in the
optimization strategy and not the flow of material through processing units.
The basic construction is to use the chain of ECs to oversee constraints in order
of priority. The last EC in the chain is used as an optimizer.

Envelope Controller Inputs, Outputs and Parameters:


Inputs:
1. Process Variable (continuous PV)
2. Down_Permit (0 – 1.0)
3. Up_Permit (0 – 1.0)
Outputs:
1. Incremental Control Output (continuous CO)
2. Down_Permit (0 – 1.0)
3. Up_Permit (0 – 1.0)
Parameters to Specify:
1. NEG - (size of negative move)
2. POS - (size of positive move)
3. Six breakpoints (VL, L, N_L, N_H, H, VH) on the PV axis which uniquely
identifies all five membership functions
4. G - (Overall Gain)
Switches to Set:
1. Bypass (on/off)
2. Control Action (Reverse or Direct)
Membership Functions:
Five membership functions are shown superimposed in the Envelope Controller
(EC) figure above. Each membership function is a fuzzifier. A continuous process
variable (PV) is mapped to 5 sets of fuzzy variables whose values are between 0.0 and
1.0. They are:

1. PV_VL = μ1(PV) VL: Very Low


2. PV_L = μ2(PV) L: Low
3. PV_N = μ3(PV) N: Normal
4. PV_H = μ4(PV) H: High
5. PV_VH = μ5(PV) VH: Very High

Where μ means degree of membership. When PV is midway between VL and L


in the above EC diagram, for example, then μ1 = 0.5 and μ2 = 1.0. All the rest are 0.0.
The fuzzy variables, such as PV_N, are called linguistic variables. Here, PV_N
means “PV is Normal.” Similarly, PV_VH means "PV is very high."
Control Action Switch
This switch has two positions as shown in the figure above: “Reverse” and
“Direct.” In most processes, when the process variable (PV) exceeds the high limit, the
controller output (CO) must be decreased to bring it back into the safe operating
envelope. The control action switch must be in the “Reverse” position for this to occur.
However, there are processes where the CO must be increased to bring it back
into the safe operating envelope if the PV exceeds the high limit. The position of the
control action switch must be “Direct” for these processes.
Thus, the control action switch of the EC is analogous to the direct and reverse
action of PID controllers.
Bypass Selector Switch
As shown in the figure above, an EC has a bypass switch. When the EC is in
bypass mode, the EC is switched out of the chain sequence and the Up Permit_In and
Down Permit_In signals pass through the EC unchanged as if it does not exist.
Controller Functionality
The membership functions of each EC define the safe operating region for the
incoming PV. When the PV is in the “PV Normal Region,” the incremental control
move (override) produced by the EC is 0.0. The Up Permit_In and Down Permit_In
values are passed unmodified to the next Envelope Controller in the chain sequence.
To simplify the discussion, we assume the EC uses reverse action in the
following logic. A direct action EC uses analogous, though opposite, logic.
When the PV entering an EC is in the “High” or “Low” regions, the Up
Permit_Out or the Down Permit_Out variable is modified by the fuzzy variable
Correction Factors (CF):
1. Up Permit_CF = NOT (H)
2. Down Permit_CF = NOT (L) where NOT (x) = 1–x
The product operator (μA[PV]*μB[PV]) is used in the EC computation. This is
one version of the fuzzy “AND.” The Up Permit_In and Down Permit_In are
multiplied by the appropriate correction factors to become:
1. Up Permit_Out = (Up Permit_In)* (Up Permit_CF )
2. Down Permit_Out = (Down Permit_In)*( Down Permit_CF)
When the PV enters the “Very High” or “Very Low” regions, an incremental
control move (override) is made to nudge the PV back into the safe region:
1. ΔCO = (Down Permit_In)*(PV_VH)*NEG*G
2. ΔCO = (Up Permit_In)*(PV_VL)*POS*G
This is a simple two-rule controller. For a EC with reverse action, these rules
can be summarized:
[R1] if there is permission to make a negative control move and the PV is very
high (VH), then make a negative incremental control move.
[R2] if there is permission to make a positive control move and the PV is very
low (VL), then make a positive incremental control move.
NEG*G and POS*G are singletons. ΔCO is the defuzzified value. It is simply
the product of the singleton and the truth of the rule. There are many defuzzification
techniques. A simple but highly effective method uses singletons and a simple center
of gravity calculation. This is the one used in these applications.
Chaining in Sequence
ECs are chained in sequence to form an efficient Envelope Optimization
controller. With a proper number of constraints in proper priority order, they form a
safe operating envelope for the process. ECs can be implemented in most all modern
process control system to create Envelope Optimization logic.

9.2.2. Examples
Example 1: Minimum Excess Air Optimization
This application of Envelope Optimization is for an industrial power boiler. As
shown below [1], it uses five ECs chained in sequence. Like many optimization
problems, the solution for minimum excess air optimization is found on the constraint
boundary.
Figure 9.23. Minimum excess air optimization

Control Objectives
1) Maintain combustion air at minimum flow required for safe operation and
maximum boiler efficiency.
2) Stay within the safe operating envelope as defined by the limits of the first
four ECs.
3) Take immediate corrective action when any of the prioritized constraints are
violated.
4) Optimization must proceed slowly to avoid upsetting the process.
Optimization Functionality
The air-to-fuel (A/F) ratio is slowly reduced by the negative incremental moves
made by the Optimizer EC (the last in the chain sequence) until a limit is reached on
one of the first four ECs. This limit condition would then reduce the Down Permit
entering the Optimizer EC to 0.0.
Notice that the Up and Down Permits are set to 1.0 at the top of the chain. If the
PVs of the first four ECs are all in the “Normal” regions. The Up Permit and Down
Permit will pass down the chain unmodified as 1.0.
The first EC sets the high and low limits for the A/F ratio. Note that this EC has
the highest priority. If the A/F reaches its low limit, the Down Permit goes to 0.0. The
second EC sets the high limit for Opacity (no low limit). The third EC sets the high
and low limits for O2. The fourth EC sets the high limit for combustibles (unburned
hydrocarbons). There is no low limit. Normally this control operates at the low limit
for A/F ratio with low O2 and very low combustibles.
Aside: The optimization function is automatically disabled when the combustibles
meter goes into self-calibration and resumes normal operation when the calibration
is finished. The operator can also turn the optimization “off” at any time. The
Minimum Excess Air Optimization can function with just O 2 if the combustibles
meter is out of service. The Combustibles EC would need to be placed on “bypass”
for this to occur.
While the optimizing function is slow, that is not the case for the constraint
override action. For example, if the O2 fell below the low limit, the A/F ratio would
quickly increase to bring O2 back within the “Normal” region.
Tuning this control is not simple. It requires selecting numerous gains and
membership breakpoints. The slope of the membership functions are part of the loop
gain when override action is taking place.
While tuning the control is difficult, the good news is that once it is tuned it
does not seem to require any tweaking afterwards. This particular application has used
the same tuning parameters since it was commissioned several years ago with no
apparent degradation in performance.

Example 2: Forced Draft Fan Outlet Pressure Optimization


This application of Envelope Optimization is for an industrial power boiler. It
uses five ECs chained together as shown in the graphic below [1].

Figure 9.24.FD fan outlet pressure optimization

On this power boiler, the Forced Draft (FD) Fan Outlet Pressure is controlled
with a PID controller. The PID controller accomplishes this by adjusting the inlet
vanes. This provides a constant pressure source for the windbox air dampers. At high
steaming rates the pressure needs to be fairly high (about 10.0 inches). At lower
steaming rates it doesn’t need to be this high and results in a large pressure drop across
the windbox dampers. This results in more energy being used than is necessary.
Control Objectives
1) Maintain the FD fan outlet pressure at the minimum pressure required to
provide the amount of air needed for combustion.
2) Maintain the windbox air dampers in a mid-range position for maximum
controllability.
3) Stay within the “Safe Operating Envelope” as defined by the limits of the
first four Envelope Controllers.
Optimization Functionality
The FD fan outlet pressure set point is slowly reduced by negative incremental
moves made by the last Envelope Controller (Optimizer) until a limit is reached on one
of the first four ECs. Normally it is the FD Fan Pressure set point EC that reaches its
low limit and reduces the Down Permit to 0.0 entering the Optimizer EC.
The Down Permit does not suddenly go to 0.0 as the low limit is reached. It
gradually decreases because of the slope of the PV_L membership function. When the
truth of PV_L is 0.5, the Down Permit becomes 0.5 and only half of the Optimizer’s
regular incremental move is made. Likewise, when PV_L is 0.1 only one tenth of the
Optimizer’s regular move is made.
The first EC sets the high and low limits for the FD damper position. The
actuator always has the highest priority. The second EC sets the high and low limits
for the FD outlet pressure set point. The third EC sets the high limit for the windbox
air dampers (no low limit). The fourth EC sets the low limit for O2 (no high limit).
At low boiler steaming rates the FD fan outlet pressure is held at minimum by
the second EC. As the boiler steaming rate increases, the windbox dampers open
further to provide more combustion air. The damper position reaches its very high
limit causing a positive incremental override control move from the third EC. This
causes the pressure set point to increase. As the FD fan outlet pressure rises, the
damper moves back to a lower value.
Note that the total incremental control move is made up of the sum of the
moves from all of the ECs. In this situation, the new equilibrium occurs when the sum
of the third and fifth ECs equal 0.0. The third EC is making a positive move and the
Optimizer EC is making a negative move. If the gains and slopes of the membership
functions of the third EC are not carefully selected, cycling (otherwise known as
instability) will occur. In control jargon this feature could be called mid-ranging. It is
desired to always have the windbox damper operating in its normal range.
If for some reason the O2 goes below its very low limit, positive incremental
override control moves will be made by the fourth EC raising the FD fan outlet
pressure. This increases air flow to the windbox. This is a safety feature.
Tuning this control is not simple. This is particularly true for the interaction
between the third EC and the Optimizer. In this application none of the PVs have
significant time constants or delays. Therefore predicted PVs were not used. While
tuning the control is difficult, the good news is that once it is tuned it does not seem to
require any tweaking afterwards. This particular application has used the same tuning
parameters since it was commissioned several years ago with no apparent degradation
in performance.

Final Thoughts
An interesting method to implement Envelope Optimization using fuzzy logic
has been presented in this topic. Constraints can be prioritized with those affecting
safety and environmental concerns at the top of the list. The Envelope Controller is at
the heart of the approach. Linking these controllers together in a chain allows one to
form a “Safe Operating Envelope” which is the constraint boundary. Optimization
proceeds as the process is kept within this envelope. Two examples were shown that
use this methodology.
The reader should study some of the fundamental concepts of fuzzy logic if
they are interested in an in-depth understanding of this approach. Understanding how
to tune these controls is the most difficult part of the application. This can only be
done during the startup phase or with a dynamic simulation.
The method described and the examples presented are valid for situations where
there is only one variable to manipulate. This approach can be extended to problems
where there are multiple variables to manipulate. The author has worked on problems
where two variables were manipulated. It usually requires a sophisticated predictive
model to provide inputs to some of the Envelope Controllers. It actually becomes a
type of Model Predictive Control (MPC).

9.3. Fuzzy Logic Applications

Almost any control system can be replaced with a fuzzy logic based control
system. This may be overkill in many places however it simplifies the design of many
more complicated cases. So fuzzy logic is not the answer to everything, it must be
used when appropriate to provide better control. If a simple closed loop or PID
controller works fine then there is no need for a fuzzy controller. There are many cases
when tuning a PID controller or designing a control system for a complicated system is
overwhelming, this is where fuzzy logic gets its chance to shine.
One of the most famous applications of fuzzy logic is that of the Sendai
Subway system in Sendai, Japan. This control of the Nanboku line, developed by
Hitachi, used a fuzzy controller to run the train all day long. This made the line one of
the smoothest running subway systems in the world and increased efficiency as well as
stopping time. This is also an example of the earlier acceptance of fuzzy logic in the
east since the subway went into operation in 1988 (http://sipi.usc.edu/pdf).
The most tangible applications of fuzzy logic control have appeared
commercial appliances. Specifically, but not limited to heating ventillation and air
conditioning (HVAC) systems. These systems use fuzzy logic thermostats to control
the heating and cooling, this saves energy by making the system more efficient. It also
keeps the temperature more steady than a traditional thermostat
(http://www.fuzzytech.com/e/e_a_esa.html).
Another signifigant area of application of fuzzy control is in industrial
automation. Fuzzy logic based PLCs have been developed by companies like Moeller.
These PLCs, as well as other implementations of fuzzy logic, can be used to control
any number of industrial processes (http://www.fuzzytech.com/e/e_a_plc.html).
Fuzzy logic also finds applications in many other systems. For example, the
MASSIVE 3D animation system for generating crowds uses fuzzy logic for artificial
intelligence. This program was used extensivly in the making of the Lord of the Rings
trilogy as well as The Lion, The Witch and the Wardrobe films.
As a final example of fuzzy logic, it can be used in areas other than simply
control. Fuzzy logic can be used in any decision making process such as signal
processing or data analysis. An example of this is a fuzzy logic system that analyzes a
power system and diagnoses any harmonic disturbance issues. The system analyzes the
fundamental voltage, as well as third, fifth and seventh harmonics as well as the
temperature to determine if there is cause for concern in the operation of the system.
9.3.1. Fuzzy Logic in Industrial Automation
In recent years, fuzzy logic has proven well its broad potential in industrial
automation applications [7]. In this application area, engineers primarily rely on
proven concepts. For discrete event control, they mostly use ladder logic, a
programming language resembling electrical wiring schemes and running on so called
programmable logic controllers (PLC). For continuous control, either bang-bang type
or PID type controllers are mostly employed.
While PID type controllers do work fine when the process under control is in a
stable condition, they do not cope well in other cases:
 The presence of strong disturbances (non-linearity)
 Time-varying parameters of the process (non-linearity)
 Presence of dead times
The reason for this is that a PID controller assumes the process to behave in a
strictly linear fashion. While this simplification can be made in a stable condition,
strong disturbances can push the process operation point far away from the set
operating point. Here, the linear assumption usually does not work any more. The
same happens if a process changes its parameters over time. In these cases, the
extension or replacement of PID controllers with fuzzy controllers has been shown to
be more feasible more often than using conventional but sophisticated state controllers
or adaptive approaches. However, this is not the only area where there is potential for
fuzzy logic based solutions.
Multi-Variable Control
The real potential of fuzzy logic in industrial automation lies in the
straightforward way fuzzy logic renders possible the design of multi-variable
controllers. In many applications, keeping a single process variable constant can be
done well using a PID or bang-bang type controller. However, set values for all these
individual control loops are often still set manually by operators. The operators
analyze the process condition, and tune the set values of the PID controllers to
optimize the operation. This is called "supervisory control" and mostly involves
multiple variables.

Figure 9.25. Using a Fuzzy Logic Controller to Determine the Set Values for
Underlying PID Control Loops

Alas, both PID and bang-bang type controllers can only cope with one variable.
This usually results in several independently operating control loops. These loops are
not able to "talk to each other". In cases where it is desirable or necessary to exploit
interdependencies of physical variables, one is forced to set up a complete
mathematical model of the process and to derive differential equations from it that are
necessary for the implementation of a solution. In the world of industrial automation,
this is rarely feasible:
 Creating a mathematical model for a real-word problem can involve years of
work.
 Most mathematical models involve extensive simplifications and linearizations
that require "fudge" factors to optimize the resulting controller later on.
 Tuning the fudge factors of a controller derived from a mathematical model is
"fishing in the dark", because optimizing the system at one operating point
using global factors usually degrades the performance at other operating points.
Also, many practitioners do not have the background required for rigorous
mathematical modeling. Thus, the general observation in industry is that single process
variables are controlled by simple control models such as PID or bang-bang, while
supervisory control is done by human operators.
This is where fuzzy logic provides an elegant and highly efficient solution to
the problem. Fuzzy logic lets engineers design supervisory multi-variable controllers
from operator experience and experimental results rather than from mathematical
models. A possible structure of a fuzzy logic based control system in industrial
automation applications is exemplified by Figure 1. Each single process variable is
kept constant by a PID controller, while the set values for the PID controller stem from
the fuzzy logic system. This arrangement is typical for cases like control of several
temperature zones of an oven or control of oxygen concentrations in different zones of
a wastewater basin. In other cases, it could be reasonable to develop the complete
closed loop control solution in a fuzzy system.
This illustrates why it is very desirable to integrate conventional control
engineering techniques, such as ladder logic or instruction list language for digital
logic and PID control blocks tightly together with fuzzy logic functionality.
Merging Fuzzy Logic and PLCs
In 1990, when more and more successful applications proved the potential of
fuzzy logic in industrial automation, the German company Moeller GmbH and the
U.S./German company Inform Software created the fuzzyPLC based on the
observation that fuzzy logic needs tight integration with conventional industrial
automation techniques.
The fuzzyPLC Hardware and Firmware
Figure 9.26. The fuzzyPLC contains fuzzy and conventional logic processing
capabilities, field bus connections, and interfaces.

To make it available at a low cost, the core of the fuzzyPLC uses a highly
integrated two-chip solution. An analog ASIC handles the analog/digital interfaces at
industry standard 12 bit resolution. Snap-On modules can extend the periphery for
large applications of up to about 100 signals. An integrated field bus connection, based
on RS485, provides further expansion by networking. The conventional and the fuzzy
logic computation is handled by a 16/32 bit RISC microcontroller. The operating
system and communication routines, developed by Moeller, are based on a commercial
real time multitasking kernel. The fuzzy inference engine, developed by Inform
Software, is implemented and integrated into the operating system in a highly efficient
manner, so that scan times of less than one millisecond are possible. The internal RAM
of 256 KB can be expanded by memory cards using flash technology. Thus, the
fuzzyPLC is capable of solving quite complex and fast industrial automation problems
in spite of its compact and low price design.

The fuzzyPLC Engineering Software


The fuzzyPLC is programmed by an enhanced version of the standard fuzzy
logic system development software fuzzyTECH from Inform Software. fuzzyTECH is
an all-graphical, design, simulation, and optimization environment with
implementation modules for most microcontrollers and industrial computers. To
support the complete functionality of the fuzzyPLC, fuzzyTECH has been enhanced
with editors and functions to support the conventional programming of the PLC. Thus,
a user only needs one tool to program both conventional and fuzzy logic parts of the
solution.
Figure 9.27. Both the traditional logic and the Fuzzy Logic system is programmed by
fuzzyTECH 4.0.

The fuzzyTECH software combines all necessary editors for membership


functions, linguistic variables, rule tables, and system structure with analyzer functions
and optimization features. The software runs on a PC and is linked to the fuzzyPLC by
a standard serial cable (RS232) or the field bus (RS485). Through this link, the
developer downloads the designed system to the fuzzyPLC. Because fuzzy logic
systems often require optimization "on-the-fly", fuzzyTECH and the fuzzyPLC feature
"online-debugging" where the system running on the fuzzyPLC is completely
visualized by the graphical editors and analyzers of fuzzyTECH. Plus, in online-
debugging modes, any modification of the fuzzy logic system is instantly translated to
the fuzzyPLC without halting operation.

9.3.2. Application Case Studies


In this section, we review eight [7] recent highly successful applications of
fuzzy logic in industrial automation using the fuzzyPLC:
 Anti-Sway Control of Cranes
 Fire Zone Control in Waste Incineration Plants
 Dosing Control in Waste Water Treatment Plants
 Control of Tunnel Inspection Robots
 Positioning in Presses
 Temperature Control in Plastic Molding Machines
 Climate Control and Building Automation
 Wind Energy Converter Control

Anti-Sway Control of Cranes


In crane control, the objective is to position a load over a target point. While the
load connected to the crane head by flexible cables may well sway within certain
limits during transportation, the sway must be reduced to almost zero for load release
when the target position is reached. Hence, a controller must use at least two input
variables, for example position and sway angle. Thus, a simple PID controller cannot
be used as it is restricted to one input. Conventional solutions of the problem require
highly elaborate approaches, like model based control or state variable controllers that
need intensive engineering and hardware resources. These technologies tend to push
system costs into regions that make anti-sway systems economically unaffordable. For
these reasons, most cranes are still operated manually.

Figure 9.28. The 64 ton crane of Hochtief Corp. uses fuzzyPLC based anti-sway
positioning control

In spite of the difficulties involved with automated control, human operators


can control cranes quite well in most cases. Because fuzzy logic is a technology that
facilitates control system design based directly on such human experiences, it has been
used for crane automation for almost a decade. The types of cranes include container
cranes in harbors, steel pan cranes, and cranes in a manufacturing environment.
Recently, a 64 ton crane that transports concrete modules for bridges and tunnels over
a distance of 500 yards has been automated with a fuzzyPLC in Germany. The benefit
was a capacity gain of about 20% due to the faster transportation and an increase in
safety. Accidents were frequent, because the crane operators walk parallel to the crane
during operation with a remote controller. Before, when they had to watch the load to
concentrate on the sway angle, they frequently stumbled over parts lying on the
ground. The crane was commissioned in Spring 1995 and the fuzzy logic anti-sway
controller has been continuously enabled by the crane operator, showing the high
degree of acceptance by the operators. This fact is of special importance since not only
technological feasibility but also psychological aspects are important for the success of
an industrial automation solution.

Figure 9.29. A software simulation of the crane controller

Fire Zone Control in Waste Incineration Plants


Maintaining a stable burning temperature in waste incineration plants is
important to minimize the generation of toxic gases, such as dioxin and furan, as well
as to avoid corrosion in the burning chambers. There are two primary difficulties of
this temperature control process:
 The caloric value of the waste fluctuates strongly.
 The fire position and shape cannot be measured directly.
Because the heat generated from the burning process is used to produce
electrical energy, a stable incineration process is also of high commercial interest.
In recent applications at waste incineration plants in the cities of Hamburg and
Mannheim in Germany, fuzzy logic has been successfully applied. In Mannheim,
where two fuzzyPLCs were used to control the burning process, the steam generation
capacity of one furnace is 28 Mg/h. Using the industry standard conventional
controller, steam generation fluctuated by as much as 10 Mg/h in just one hour. The
fuzzy logic controller was capable of reducing this fluctuation to less than ±1 Mg/h.
This dramatically improved robustness and also caused the NOx and SO2 emission to
drop slightly, and the CO emission to drop to half.
Figure 9.30. In a waste incineration plant, a crane continuously delivers waste from
the bunker to the belt running through the burning zone. The exhaust gases are cooled
and cleaned.

Dosing Control in Waste Water Treatment Plants


Waste water treatment processes are a combination of biological, chemical, and
mechanical processes. This makes the creation of a complete mathematical model for
their control intractable. However, there is a large amount of human experience that
can be exploited for automated controller design. As such operator experience can be
efficiently put to work by fuzzy logic, many plants already use this technique.
In a recent application in Bonn, dosing of liquid FeCl3 for phosphate
precipitation has been successfully automated using the fuzzyPLC. Recently changes in
legislation require water treatment plants in Germany to limit the total amount of
phosphate in the released water to 1 milligram per liter. To extract the phosphate from
the water, FeCl3 is added, which converts the phosphate into FePO4 that is sedimented
with the sludge. Because a violation of the legal phosphate limit results in severe
penalties, the operators tend to overdose the FeCl3.
Figure 9.31. By injecting FeCl3 into the sludge, dissolved phosphate precipitates from
the waste water

To optimize the FeCl3 dosing, a fuzzy logic controller that uses the input
variables phosphate concentration, its derivative, water flow, its derivative, and dry
substance contents was designed. The output of the fuzzy logic controller is the change
of the set variable for the injected FeCl3. An underlying conventional PI type
controller stabilizes the FeCl3 flow to this set point. The PI type controller is
implemented as a function block in the fuzzyPLC as well. This is an example of the
combination of fuzzy logic and conventional control engineering techniques.
The total fuzzy logic controller uses 207 rules to express the control strategy
based on the five (5) input variables of the fuzzy logic control block. The total
implementation time was three (3) staff months and resulted in savings of about 50%
of the FeCl3 compared to the manual control before. Taking implementation time and
hardware/software costs into consideration with the savings on FeCl3 results a return
in investment time of half a year.
Figure 9.32. A software simulation of a simplified precipitation controller

Control of Tunnel Inspection Robots


The German Aerospace corporation DASA has developed a sewage pipe
inspection system using two robot units and a support truck [7]. The objective of the
robots is to detect leakage in segments of the pipe by applying air pressure to the
sealed space between the two robots. Because the vertical access shafts can be quite
far away from each other, the robots have to operate up to 400 yards away from the
truck. The robots are connected to each other and the truck by cables that provide air
pressure, electrical energy, and control signals to the robots.
Figure 9.33. The two robot units in the sewage pipe (right) are supplied from a
specialized truck by cables

When DASA developed the system, a severe control problem came up. To
avoid entanglement of the cables that can result in the robots getting stuck in the pipe,
cable tension must be controlled very carefully. A conventional approach using
complex state variable controllers turned out to be too costly in terms of both money
and design time. A control system implemented on two fuzzyPLCs using about 200
rules each showed very good results in a very short engineering time at less than 10%
of the costs of a conventional solution.

Positioning of Presses
One area with big potential for fuzzy solutions is the control of drives. In this
example, we discuss hydraulic axis control. One of the most complex fuzzy projects
was done for a hydraulic press used to press laminates, printed circuit boards, and floor
coverings. The task was the synchronized control of a 14-axis system. The position
control of the axis, a superimposed pressure controller, the parallel running of the steel
belt and the synchronization of all axes had to be solved.

Figure 9.34. Control of hydraulic systems is difficult as many non-linearities, Such as


the "stick-slip" effect, are involved
The automation system employed has a highly decentralized structure and
consists of two large master PLCs, a number of smaller compact PLCs, a PC based
supervisory system, and seven fuzzyPLCs. All units are networked using the integrated
field bus interfaces. Very important for the synchronization of the entire machine is the
ability of the field bus network to satisfy the real time requirements. One typical
problem involved in the control of hydraulic systems is the so-called "stick slip effect".
The transition of an axis from standstill to motion is highly non-linear because of the
transition from stick friction to slip friction. This makes designing a good controller
for hydraulic systems difficult. In the cited application, fuzzy logic rendered a good
solution technique, freeing system design from the burden of the theory of non linear
systems synthesis. The overall design time using fuzzy logic was only a third of what a
conventional approach had required in past applications of conventional control for
similar presses.

Temperature Control in Plastic Molding Machines


In plastic molding machines, temperature control is crucial to achieve high and
consistent product quality. This requires laborious tuning of the involved control
algorithms, because the dead times involved in an extrusion machine are significant
and there is significant coupling between the different temperature zones [7].

Figure 9.35. To achieve high product quality, keeping the temperature constant is
critical in molding plastic

To cut down the commission time for these machines, KM corporation has
developed a self-tuning controller using the fuzzyPLC. At start up time, some
parameters are estimated that are used to scale the non linear fuzzy controller. In
contrast to conventional tuning algorithms, this controller does not require a cooling
down of the machine to room temperature before self tuning can work. Even very
difficult temperature zones with big dead times can be handled by this algorithm and
the result is a very robust controller. This is important because the temperature
properties of an empty machine and one filled with plastic material are extremely
different. Compared to conventional systems, the fuzzy logic enhanced temperature
controller performs with a faster response time and a significantly smaller overshoot
combined with extreme robustness.

Figure 9.36. The Fuzzy Logic controller in the molding machine reaches the set point
faster and avoids overshoot
Climate Control Using Fuzzy Logic
Climate control systems reveal a high potential for energy savings. In a recent
application at a major hospital in Europe, the integration of fuzzy logic saves about
25% on electrical energy, equivalent to the amount of 50,000 per year.

Figure 9.37. An Application of Fuzzy Logic in the A/C system of a large hospital in
Germany saved more than 25% on energy costs
The fuzzy logic controller outputs the set values for the coolant valve, the water
heater valve, and the humidifier water valve. The fuzzy logic control strategy uses
different temperature and humidity sensors to determine how to operate the air
conditioning process in a way that conserves energy. Again, the capability of
processing interdependent variables results in significant advantages over conventional
solutions. For example, one knows that when temperature rises, relative humidity of
the air decreases.
This knowledge can be exploited by implementing a fuzzy logic control
strategy that allows the temperature controller "to tell" the humidity controller that it is
going to activate the heater valve. The humidity controller now can respond to this
before it can detect it by its sensor. The result is an increase in control quality.

Figure 9.38. Fuzzy Logic allows to increase the energy efficiency of an A/C system by
evaluating several process values.

Wind Energy Converter Control


In recent years, technological advancements made the commercial use of wind
energy feasible. A trend to larger plants further improved the cost/performance ratio.
However, such large wind energy converters require advanced control systems both to
ensure high efficiency and long life. The controller sets the angle of the rotor blades
based on the wind situation (pitch control). However, wind is not a one-dimensional
figure. Strength, gustiness, and fluctuation of the wind angle must be evaluated to
determine the optimal rotor blade angle.
Figure 9.39. To maximize the efficiency of a wind energy converter, the pitch
controller must consider many inputs

There is a trade-off between efficiency, safety and wear of the wind energy
converter. If the blade angle is set to draw the maximum amount of energy from the
wind, the risk of sudden wind gusts causing excessive mechanical stress on the
converter increases. For these reasons, an Aerodyn wind energy converter was
enhanced with a fuzzy system based on human experience to find the best compromise
to this trade-off [6]. The first implemented system is running in a field test and shows
quite promising results. The quality of the controller is not only measured in constancy
of the delivered power, but also in measures of mechanical stress on the tower, the
nacelle and the rotor blades. The next step will be the application of the achieved
results to the first 1.2 MW systems that are to be launched in the marketplace in 1996.

Conclusions
As a consequence of the high degree of awareness raised by a large number of
publications over the past five years in Europe, a substantial number of successful
applications have been generated. Of these, we have presented a selection of eight (8)
recent applications in this paper. In all applications, the key to success lies in the
clever combination of both conventional automation techniques and fuzzy logic. Fuzzy
logic by no means replaces conventional control engineering. Rather, it compliments
conventional techniques with a highly efficient methodology to implement multi-
variable control strategies. Thus, the major potential for fuzzy logic lies in the
implementation of supervisory control loops.

References
1. Practical Process Control. Proven Methods and Best Practices for Automatic
PID Control. http://www.controlguru.com/pages/table.html
2. Vichuzhanin, Vladimir. Realization of a fuzzy controller with fuzzy dynamic
correction. Central European Journal of Engineering. 2 (3): 2012, pp. 392–398.
3. Jan Jantzen, Foundations of Fuzzy Control. Wiley, 2007.
4. Kruse, B., M.Klawonn, H. Steinbrecher. Computational Intelligence: A
Methodological Introduction, Springer, 2013.
5. K. Michels, F. Klawonn, A. Nürnberger, and R. Kruse. Fuzzy Control:
Fundamentals, Stability and Design of Fuzzy Controllers. Springer, Berlin/Heidelberg,
Germany, 2006.
6. Fuzzy control system. https://en.wikipedia.org/wiki/Fuzzy_control_system
7. Jцrg Gebhardt, Constantin von Altrock. Recent Successful Fuzzy Logic
Applications in Industrial Automation. http://www.fuzzytech.com/e/e_a_plc.html
8. Robert Babuska, Ebrahim Mamdani. Fuzzy control. Scholarpedia, 3(2), 2008,
http://scholarpedia.org/topic/Fuzzy_control

You might also like