You are on page 1of 20

Fuzzy Controller

CONTROL SYSTEM

Any system whose outputs are controlled by some inputs to the system
is called a control system.
TRADITIONAL vs FUZZY LOGIC CONTROLLERS
(FLC)
FUZZY CONTROL
Why Fuzzy Control ?
Fuzzy control incorporates ambiguous human logic into computer
programs. It suits control problems that cannot be represented by
mathematical models:
1. Weak model
2. Parameter variation problem
3. Unavailable or incomplete data
4. Very complex plants
5. Good qualitative understanding of plants or process operation
Because of unconventional approach, design of such controllers
leads to faster development / implementation cycles.
Origin of Fuzzy Controller
•E.H. Mamdani is credited with building the world's first fuzzy logic
controller, after reading Dr. Zadeh's paper on the subject.
• Dr. Mamdani, London University, U.K., stated firmly and clearly
that utilizing a fuzzy logic controller for speed control of a steam
engine was much superior to controlling the engine by conventional
mathematically based control systems and logic control hardware.
•Dr. Mamdani found that, using the conventional approach, extensive
trial and error work was necessary to arrive at successful control for a
specific speed set-point.
• Further, due to the non-linearity of the steam engine operating
characteristics, as soon as the speed set-point was changed, the trial
and error effort had to be done all over again to arrive at effective
control. This did not occur with the fuzzy logic controller, which
adapted much better to changes, variations and non-linearity in the
system.
Architecture of Fuzzy Controller

Input
Rule base

Defuzzification
Preprocessing Fuzzification
Inference
engine

Controller

Post processing Output


DESCRIPTION OF FLC COMPONENTS

A Fuzzy Logic Controller usually consists of:

A fuzzification unit which maps measured inputs of crisp value into


fuzzy linguistic values to be used by a fuzzy reasoning mechanism.

A knowledge base (KB) which is the collection of expert control


knowledge required to achieve the control objective.

A fuzzy reasoning mechanism that performs various fuzzy logic


operations to infer the control action for the given fuzzy inputs.

A Defuzzification unit which converts the inferred fuzzy control


action into the required crisp control values to be entered into the
system process.
Preprocessing
The inputs are most often hard or crisp measurements from some
measuring equipment, rather than linguistic. A preprocessor, the
first block in Fig. , conditions the measurements before they enter
the controller.
Examples of preprocessing are:
• Quantization in connection with sampling or rounding to integers

• Normalization or scaling onto a particular, standard range

• Filtering in order to remove noise


• Averaging to obtain long term or short term tendencies

• A combination of several measurements to obtain key indicators;


and differentiation and integration or their discrete equivalences.
Fuzzification

The first block inside the controller is Fuzzification, which


converts each piece of input data to degrees of membership by
a lookup in one or several membership functions.

The fuzzification block thus matches the input data with the
conditions of the rules to determine how well the condition of
each rule matches that particular input instance.

There is a degree of membership for each linguistic term that


applies to that input variable.
Rule base
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.
1. If error is Neg and change in error is Neg then output is NB
2. If error is Neg and change in error is Zero then output is NM
3. If error is Neg and change in error is Pos then output is Zero
4. If error is Zero and change in error is Neg then output is NM
5. If error is Zero and change in error is Zero then output is Zero
6. If error is Zero and change in error is Pos then output is PM
7. If error is Pos and change in error is Neg then output is Zero
8. If error is Pos and change in error is Zero then output is PM
9. If error is Pos and change in error is Pos then output is PB
Rules in fuzzy controller are represented in relational
format, a more compact representation
Error Change in error Output

Neg Pos Zero


Neg Zero NM
Neg Neg NB
Zero Pos PM
Zero Zero Zero
Zero Neg NM
Pos Pos PB
Pos Zero PM
Pos Neg Zero
Inference Engine
Evaluates all rules and determines their truth values. If an input
does not precisely correspond to an IF THEN rule, partial matching
of the input data is used to interpolate an answer.

Combines all fuzzy conclusions obtained by inference into a


single conclusion. Since different fuzzy rules might have different
conclusions, consider all rules.

A simple MAX-MIN method of selection is used where the


maximum fuzzy value of the inferences is used as the final
conclusion. So, composition selects a fuzzy value since this was
the highest fuzzy value associated with the inference conclusions
Mamdani Type Fuzzy Inference Control
An example of fuzzy controller for temperature control system
• Rule 1 :- If error is POSITIVE-HIGH then keep the heater
on for LONGER duration
• Rule 2 :- If error is POSITIVE-LOW then keep the heater
on for SMALLER duration

Rules are modified as


Rule 1:- If error is POSITIVE-HIGH and change in error is
POSITIVE-HIGH then keep the heater on for LONGER duration
Rule 2 :- If error is POSITIVE-LOW and change in error is
POSITIVE-LOW then keep the heater on for SMALLER duration
T-S Fuzzy Inference Control

• Rule 1 :- If x1 is LARGE and x2 is MODERATE then


x (k+1) = [ 0.5 0.4
2.0 1.0 ] x (k)

• Rule 2 :- If x1 is LARGE and x2 is LARGE then


x (k+1) = [ 0.6 0.8
1.0 2.0 ] x (k)
Defuzzification
• There are many Defuzzification methods. Two of the
more common techniques are the centroid and
maximum methods.

• In the centroid method, the crisp value of the output


variable is computed by finding the variable value of
the center of gravity of the membership function for
the fuzzy value.

• In the maximum method, one of the variable values at


which the fuzzy subset has its maximum truth value is
chosen as the crisp value for the output variable.
CLASSICAL FUZZY LOGIC CONTROLLER
FUZZY LOGIC CONTROLLER (FLC) AND
CONVENTIONAL PROPORTIONAL INTEGRAL
DERIVATIVE (PID)
PID Controllers
• Most useful when a mathematical model of the plant is not
available
• It is a generic control loop feedback mechanism widely used in
industrial control system.
• A PID controller calculates an error value as the difference
between a measured process variable and a desired set-point.
• The controller attempts to minimize the error by adjusting the
process control inputs .
• Here
– P (proportional) – depends on present error
– I (Integral) – accumulation of past error
– D (Derivative) – prediction for future errors
• A PID controller will be called a PI, PD, P or I controller in the
absence of the respective control actions
FLC AND PID CONTROLLERS

You might also like