Fuzzy Control System Design: Module 2 Objectives
Fuzzy Control System Design: Module 2 Objectives
Fuzzy Control System Design: Module 2 Objectives
Module 2
2
Module 2 Contents
• 2.1 Overview of fuzzy logic control
– 2.1.1 Review of Control System Basics
– 2.1.2 Why fuzzy logic control?
4
2.1.1 Review of Control System Basics
Example of control systems
– Cars, Aeroplanes, Trains, Ships, ...
– Nuclear Plants, Power Stations, ...
– Washing Machines, Refrigerators, ...
– Disk Drives, Stepper Motors, .......
– Chemical Processes, Food Processing Plants .....
– Robotic Manipulators, NC Machines, …
• Position • Pressure
• Speed • Turgidity
• Concentration
• Liquid level
• Intensity
• Temperature • Etc.
5
+ Controller
Setpoint Process Output
-
Summer Feedback
(Op-Amp)
Control objective
• In many control systems, the objective is to design a controller such
that output can be controlled by giving the desired signals at the input.
Example of control
– Alignment of the front wheel of a vehicle follows that of the driver’s
steering wheel
– Rudders of a boat follow its steering wheel
– Concentration in liquids follows a given set-point
– Temperature of furnace follows a given set-point
6
Control Systems Performance
• What are the factors affecting control systems?
– Choice of the Controllers (Algorithms)
– Tuning of Controllers
– Selection of Control Variables
– Selection of Performance Index
– Types of Sensors (Measurement Errors)
– Actuators
– Disturbances/Environment
– Noise
– Control Configuration
– Design Techniques
– Nonlinearity 7
8
Control system components
A military helicopter
A space shuttle
9
10
Example of Control Paradigms
Control Design Techniques and Control Paradigms
Modern
Classical
Artificial Intelligence
State Feedback
Root Locus State Estimation
Bode Plot Observers
Nichols Chart Optimal Control
Nyquist Plots Robust Control
H-Infinity
Internal Model Control
Adaptive Control
Neuro-Control
Fuzzy Control
Genetic Algorithms
Knowledge Based Systems
11
Example of Controllers
that can be applied in control systems
12
Overview of Fuzzy Logic Control
• The idea was first proposed by Mamdani and Assilian around 1972.
• Many industrial and consumer products using fuzzy logic technology have been built
and successfully sold worldwide.
13
Prof. E. H. Mamdani
Founder of Fuzzy
Logic Control
14
• The basic idea behind fuzzy logic control is to incorporate
the “expert experience” of a human operator in the design
of a controller in controlling a process whose input-output
relationship is described by a collection of fuzzy control
rules (e.g. IF-THEN rules) involving linguistic variables.
15
• Simple to design
16
Overview of Fuzzy Logic Control
Where do we start?
What are the Basics/Background needed?
What are the components of a Fuzzy
Controller?
Where can it be applied?
17
Ru le s
-
Rateof Change
of Error Output Transducer
or Sensor
18
2.2.1 Components of the
fuzzy logic controller
• It generally comprises four principal components:
• fuzzifier
• knowledge base
• inference engine
• defuzzifier
Knowledge
Base
Fuzzy Fuzzy
Inference
Fuzzifier Defuzzifier
Engine
20
Design Process
Identify controller Inputs and Outputs as the Fuzzy
variables
Break up Inputs and Outputs into several Fuzzy Sets
and label them according to the problem to be solved
and set up the fuzzy variables on the appropriate
universes of discourse <FUZZIFICATION>
Configure/develop RULES to solve the problem
Choose Inference Encoding procedure
Choose a DEFUZZIFICATION Strategy
Tune the adjustable parameters
21
22
Components of the Fuzzy Logic Controller
23
Inference Mechanism
Sensor
e readings
Control
signal
Defuzzification
Fuzzification
Rule base
∆u
IFXisAAND Yis B
∆e THEN Zis C
24
• A fuzzifier then transforms the crisp values of e and
∆e into corresponding fuzzy values (usually there are
several fuzzy values of e and ∆e).
25
2.2.2 Fuzzification
What is
Fuzzification?
26
Fuzzification
• Involves the conversion of the input/output signals
into a number of fuzzy represented values (fuzzy
sets).
• Choose an appropriate Membership Function to
represent each Fuzzy Set
• Label the Fuzzy Sets appropriately such that they
reflect the problem to be solved
• Set up the Fuzzy Sets on appropriate Universes
of Discourse
• Adjust / tune the widths and centerpoints of
membership functions judiciously
27
28
Input and Output Variables
of the Fuzzy Rice Cooker
"
#
29
Fuzzification
+ $ %
, *%∆
#
$ %
- &% '(
+ %"
$"
#
. ( $)
+ %θ % * (
30
Fuzzification
/
%µ∆ / 0 )/
1
2" , 3,
4(
5
+
, *%∆
31
/
%µ" / 0 )/
1
2" , 3,
4(
5
-
+ %W
/
%µθ / 0 )/
1
2" , 3,
4(
5
. ( + %
θ 32
6 1
7 ' 6
Negative Medium NM
Negative Small NS
Zero ZE
Positive Small PS
Positive Medium PM
33
34
62/ -8-1
96628 )::96 .6 8 28.+21
• Usually fuzzy sets are overlapped by about 25%.
mθ
NM NS ZE PS PM
1
0
0 Pendulum Angle,θ
m∆θ
NM NS ZE PS PM
1
0
0 Angular Velocity,∆θ
mv
NM NS ZE PS PM
1
0
0 Motor Voltage, v
2.2.3Knowledge Base
• The knowledge base of a fuzzy logic controller consists of a data base and a rule
base.
• The basic function of the data base is to provide the necessary information for the
proper functioning of the fuzzification module, the rule base and the defuzzification
module.
38
(i) Expert experience and control engineering knowledge
• This method is the least structured of the four methods and yet it is
one of the most widely used today.
39
40
(iii) Based on fuzzy model of a process
• In the linguistic approach, the linguistic description of the dynamic
characteristics of a controlled process may be viewed as a fuzzy
model of the process.
• The set of fuzzy control rules forms the rule base of the fuzzy logic
controller.
41
• There are now many examples of fuzzy controllers which have the
capability to learn and to compose the rules involving neural networks
and genetic algorithm.
42
Example of Fuzzy Control Rules
43
IF e is PL AND De is ZE THEN Du is PL
44
Example 2.1
45
N
Z
46
Rules?
47
e(k ) = r (k ) − y (k )
de(t )
• For the derivative of the error in continuous time:
dt
• and in discrete time at sampling instant k:
∆e( k ) = (e( k ) − e( k − 1) )
Inference Mechanism
Sensor
e rea dings
Control
signal
Defuzzification
Fuzzification
Rule base
∆u
IF X is A AND Y is B
∆e TH EN Z is C
49
• More specifically,
R1: if (E is negative and ∆E is positive )
then ∆U is positive,
R2: if (E is negative and ∆E is negative)
then ∆U is negative.
50
Observation of system response
for deriving fuzzy control rules
k ) = (e(k ) − e(k − 1))
∆e(e(k)=r(k)-y(k)
e- e-
∆e+ ∆e- e-
Setpoint ∆e+
e+
∆e+
e+ e+ e- e+ e+ e- e- e+
∆e- ∆e+ ∆e- ∆e- ∆e+ ∆e+ ∆e- ∆e-
a1
1 2 3 4 5 6 7 8 9 10 11 12 51
TABLE I
PROTOTYPE OF FUZZY CONTROL RULES WITH TERM SETS
(NEGATIVE, ZERO, POSITIVE)
TABLE 2
P ROTOTYPE OF F UZZY C ONTROL R ULES W ITH T ERM S ETS
( N EGATIVE, Z ERO, P OSITIVE)
53
TABLE 4
PROTOTYPE OF FUZZY CONTROL RULES WITH TERM SETS
{NB, NM, NS, ZE, PS, PM, PM}
54
2.2.4 The Inference Mechanism
What is an Inference
Procedure in FLCS?
Knowledge
Base
Fuzzy Fuzzy
Inference
Fuzzifier Defuzzifier
Engine
• Two most common methods used in fuzzy logic control are the max-
min composition and the max-(algebraic) product composition.
• The inference or firing with this fuzzy relation is performed via the
operations between the fuzzified crisp input and the fuzzy relation
representing the meaning of the overall set of rules.
56
Several Inference Procedures that
can be used in FLCS….
Max-Min
Max-Algebraic Product (or Max-Dot)
Max-Drastic Product
Max-bounded Product
Max-bounded sum 2 most commonly
Max-algebraic sum used
Max-Max
Min-Max
57
Example 2.2
• Consider a simple system where each rule comprises two antecedents and
one consequent. A fuzzy system with two non-interactive inputs x1 and x2
(antecedents) and a single output y (consequent) is described by a collection
of n linguistic if-then propositions:
where A1(k) and A2(k) are fuzzy sets representing the kth antecedent pairs and
B(k) are the fuzzy sets representing the kth consequent.
• Based on the Mamdani implication method of inference, and for a set of
disjunctive rules, the aggregated output for the n rules will be given by
58
Example of fuzzy inferencing using
Mamdani’s max-min compositional operator
Rule 1
µ µ µ
A 11 A 12 1 B1
1 1
min
0 x1 0 x2 y
input( i) input( j)
Rule 2
µ µ µ
A 21 1 A 22 1 B2
1
min
0 x1 x2 y
input( i) input( j)
Defuzzification
µ
1
y
y*
59
• The figure illustrates the graphical analysis of two rules, where the
symbols A11 and A12 refer to the first and second fuzzy antecedents of
the first rule, respectively, and the symbol B1 refers to the fuzzy
consequent of the first rule.
• The symbols A21 and A22 refer to the first and second fuzzy
antecedents, respectively, of the second rule, and the symbol B2
refers to the fuzzy consequent of the second rule.
61
Example 2.3
62
Example of fuzzy inferencing using
Larsen’s Max-product compositional operator
Rule 1
µ µ µ
A 11 A 12 1 B1
1 1
0 x1 0 x2 y
input( i) input( j)
Rule 2
µ µ µ
A 21 1 A 22 1 B2
1
0 x1 x2 y
input( i) input( j)
Defuzzification
µ
1
y
y* 63
2.2.5 Defuzzification
Knowledge
Base
Fuzzy
Fuzzy Crisp
Inference
Fuzzifier Defuzzifier`
Engine
64
Some Notes on Defuzzification
65
66
(i) Max membership method
• This scheme is limited to peaked output functions.
• This method is given by the algebraic expression:
µz(z*) ≥ µz(z) for all z ∈Z
µ
1
0 z
z*
67
µz z* =
1 µ (z)Z
0
z
z* 68
(iii) Weight average method
• This method is only valid for symmetrical output
membership functions.
• The weight average method is formed by weighting
each membership function in the output by its
respective maximum membership value, z.
• It is given by the algebraic expression
µ ( z ).z
z
µ z* =
1
µ ( z)
z
0
z1 z2 z 69
0 a z* b z
70
2.3 Design procedure of the fuzzy logic
controller
• There is a general procedure that can be followed for designing a fuzzy
control system.
• Firstly, the designer have to identify the process input and output variables
that need to be considered. Thus, one must have a good knowledge on
the system to be controlled.
• Next, one should determine on the number of fuzzy partitions (or fuzzy
subsets) for the input and output linguistic variables.
• This number has an essential effect on how fine a control can be obtained.
71
• Finally, once the fuzzy control system has been constructed, the
simulation of the system can be carried out.
• The performance of the system can be analyzed. If the results are not
as desired, changes are made either to the number of the fuzzy
partitions or the mapping of the membership functions and then the
system can be tested again.
73
Design Planning
-identify process input & output variables
-Identify Controllers inputs & outputs
- determine the number of fuzzy partitions
- choose types of membership functions
- derive fuzzy control rules-based
- define inference engine
- choose defuzzification method
Fuzzy Logic
Parameters Tuning Controller Operation
- mapping of membership
- Fuzzification
functions
- Fuzzy Inference
- fuzzy inference rules
- Defuzzification
- scaling factors
No OK
Yes
74
End
2.4 Summary of Module 2
• As fuzzy logic has been successfully applied to many control
problems, more than any other areas of applications, in this module
we review some control system basics.
75