Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Cahier
technique
no. 191
Fuzzy logic
F. Chevrie
F. Guély
Cahiers Techniques are a collection of documents intended for engineers
and technicians, people in the industry who are looking for information in
greater depth in order to complement that given in display product
catalogues.
Foreword
The author disclaims all responsibility further to incorrect use of information
or diagrams reproduced in this document, and cannot be held responsible
for any errors or oversights, or for the consequences of using information
and diagrams contained in this document.
François CHEVRIE
François GUELY
Contents
1 Introduction 1.1 Fuzzy logic today pp. 4
1.2 The history of fuzzy logic pp. 4
1.3 Value and use of fuzzy logic for control pp. 5
2 Theory of fuzzy sets 2.1 Notion of partial membership pp. 6
2.2 Membership functions pp. 6
2.3 Fuzzy logic operators pp. 8
2.4 Fuzzy rules pp. 9
3 A teaching application example 3.1 Introduction pp. 14
3.2 Presentation of the example pp. 14
3.3 Linguistic variables and terms pp. 15
3.4 Rules and outputs pp. 15
4 Implementation 4.1 when can fuzzy rule bases be used? pp. 16
4.2 Designing an application pp. 16
4.3 Using an application pp. 17
4.4 Choosing the implementation technology pp. 17
4.5 Standards pp. 18
5 Fuzzy application 5.1 Application types pp. 19
5.2 Examples of industrial achievements pp. 20
6 Conclusion pp. 24
Appendix pp. 26
Bibliography pp. 28
“Fuzzy” or “gradual”
y A B
outline
t
z
x
“Crisp” outline x belongs neither to A nor B
y belongs completely to A
z belongs completely to B
A: conventional set B: fuzzy set t belongs partially to B
1 1
Characteristic function
Characteristic function “medium height”
“medium height”
0 0
1m60 1m80 Variable: height 1m72 Variable: height
µ
Small Medium Tall
Low
1
Height 0.4
µ µ
10 20 30 °C 50 100 %
High Low
Temperature Humidity temperature humidity
µ µ µ
µ µ µ
Fig. 11 : implication.
Fig. 12 : fuzzification.
c Degree of activation
The degree of activation of a rule is the (see section 2.3.), as shown in figure 13 . The
evaluation of the predicate of each rule by logic “AND” is performed by realising the minimum
combination of the predicate proposals between the degrees of truth of the proposals.
Min High
0.5
0.3 } = 0.3
2.5 bar 17°C
Pressure Temperature Valve opening
Fig. 13 : activation.
c Implication
The degree of activation of the rule is used to The conclusion fuzzy set is built by realising the
determine the conclusion of the rule: this minimum between the degree of activation and
operation is called the implication. There are the membership function, a sort of “clipping”
several implication operators (see appendix), but of the conclusion membership function
the most common is the “minimum” operator. (see fig. 14 ).
Min
0.5
0.3 } = 0.3
2.5 bar 17°C
Pressure Temperature Valve opening
Fig. 14 : implication.
0.3
2.5 bar 17°C
Pressure Temperature Valve opening
Aggregation:
MAXIMUM
Valve opening
Fig. 15 : aggregation of rules.
3.1 Introduction
Most fuzzy logic achievements require preliminary following example is based on a fictitious
specialist knowledge of the application area. In application and is designed to illustrate the
order to be easily understood by the reader, the procedure for creating a fuzzy rule base.
Tunnel
Drum
Measurement off line of:
- chlorine ratio
- micro-organism ratio
µ µ
Negative Positive Positive
Acceptable High big
Cl_ratio Water_f_var
µ µ
Negative Positive Positive
Low High big
Turbidity CI_f_var
µ µ
Acceptable Negative Positive
Low High
TMicro_ratio Speed_var
µ
Validation of
operation
Programming level:
Interpretation in form of rules
- Automatic control engineer and membership functions
- Ladder / Grafcet
« Open loop »
Implementation tests
10-7
10-6
10-5
RISC
10-4 Image
processing
32 bits
10-3 Control system, car
-2 16 bits
10
8 bits Cameras
10-1
1 4 bits Control
Washing
10 machines Financial analyses
2
10 Medical diagnosis
3
10 Number of
rules
1 10 100 1 000 10 000
4.5 Standards
Components Today, a work group in which Schneider plays
Absence of standards is one of the main an active part, has incorporated the “fuzzy logic”
problems holding up the use of fuzzy logic chips. language standard into the language standard of
This is because these components are not programmable controllers (first official draft of
compatible with one another as each one is the standard IEC 61131-7 available in 1997). Other
result of choices made by manufacturers. initatives in the field of fuzzy logic
standardisation should spring from this.
Software
Regarding software, lack of portability has also
slowed down widespread use of fuzzy logic in
industry.
Grid building
10 11
4 3 2 1
7 6 5
Once the membership functions have been IF average input THEN average output
suitably tuned, two rules are sufficient to (see fig. 24 ).
describe the proportional controller:
Once the proportional term has been simulated,
IF low input THEN low output. the exceptions are introduced in the form of
IF high input THEN high output. other rules depending on other input variable
A third rule is added at the operators’ request as combinations.
they find it improves their understanding of the A simple example of this possibility is illustrated
operation: in figure 25 .
µ
Controlled output z
Low Average High Area corresponding to the Exception
input input input proportional controller influencing area
µ
Low Average High
output output output
Input
variable x
Exception y
Fig. 24 : simulating a controller proportional term. Fig. 25 : introducing an exception into a proportional term.
IF nitro O2 content AND denitri O2 content AND NOx content THEN recirculation quantity
Below is another treatment using fuzzy logic: part The exceptional condition is detected by the
of the sludge deposited in the downstream basin strong turbidity, as sludge deposits minimum
is recycled and re-injected upstream. The table in sediment due to the excessively high flow.
figure 27 lists the rules for sludge recycling. The
For information, other installation functions use
first rule expresses an exception due to an
fuzzy logic:
excessively high upstream flow. In these
conditions, a high degree of recycling would c air injection,
result in increased overload of the installation. c management of excess sludge.
IF turbity AND drained off quantity AND sludge level THEN quantity
of discharged water of recycled sludge
6 Conclusion
c Classed as an artificial intelligence technique, (see fig. 30 ), and offer simple evaluation
fuzzy logic is used to model and replace process possibilities.
control expertise and designer/operator expertise.
c Evaluation limited to competition with the other
c A tool for enhancing quality and increasing conventional control tools is not productive as
productivity, fuzzy logic offers competitive such tools (e.g. PID controllers) continue to be
advantages to industrial firms seeking technical- useful in most application areas.
economic optimisation.
c Fuzzy logic has its own special areas in which
c This Cahier Technique specifies the areas in it works wonders: these are areas involving
which this interesting approach can be used to expertise, nuanced decision-making,
advantage. consideration of non-linear phenomena and
subjective parameters, not to mention
c Thanks to suitable programmable controllers
contradictory decision-making factors. Contact
and user-friendly tools, fuzzy logic is now
with Schneider specialists will enable users and
accessible to all automatic control engineers
designers to find a suitable answer to their
wishing to increase the scope of their skills and
perfectly understandable question:
the performance of their achievements. These
tools are available in the development “What decisive advantages can fuzzy logic offer
environment of some programmable controllers me in my application?”.
Fig. 30 : for fuzzy logic, the Schneider programmable controllers are equipped with user-friendly development tools on PC.
ZADEH Logic
operator operation
A∩B
A B
µA µB
µA∩B
A∪B
A B
µA µB
Union µA∪B = MAX (µA, µB) OR
µA∪B
_
A
µA µA_
Negation A µA_ = 1 - µA NOT
A
The mechanism generalising the implication is The Lukeziewicz operator behaves like the
known as the “fuzzy implication”. There are conventional implication when we limit ourselves
several fuzzy implication operators, including to boolean values. This is not the case for the
those mentioned below: Larsen and Mamdani operators used in the
MAMDANI: µA ⇒B = MIN (µA, µB) Mamdani rule bases. These operators are the
LARSEN: µA ⇒B = µA . µB most extensively used as:
LUKASIEWICZ: µA ⇒B = MIN (1,1 - µA + µB ) c they offer a high degree of robustness in
The fuzzy implication works like a conventional applications.
implication, where A and B are fuzzy sets. c calculations are considerably simplified and
The mechanism generalising the modus ponens allow simple graphic interpretation (see section
is known as the “generalised modus ponens”. It 2.4.). Calculations on input x and output y are
obeys the following formula, and is used to decoupled, as the formula below shows:
determine a B’ conclusion fuzzy set. In most µB’(y) = MAXx (Min (µA’ (x), µA(x), µB(y)) )
cases the operator T used is the Minimum
(known as the Zadeh operator). = Min (µB(y), MAXx (Min (µA’(x), µA(x)) )
µB’ (y) = MAXx (T(µA’(x), µA⇒B (x,y)) )
where T: modus ponens operator (t - standard),
Standards
IEC 61131-7: Programmable Controllers part 7
Fuzzy Control Programming.
Miscellaneous works
c Fuzzy models for pattern recognition.
IEEE Press, 1992.
James C. BEZDEK & Sanker K. PAL.
c Fuzzy sets and systems: Theory and
applications.
Academic Press 1980, Mathematics in Sciences
and Engineering vol. 144.
D. DUBOIS, H. PRADE.
c Evaluation subjective ; méthodes, applications
et enjeux.
Les cahiers des clubs CRIN, club CRIN logique
floue.
c A.I. and expert system myths, legends and
facts.
IEEE Expert 02/90, pp 8-20, 29 réf.
M.S. FOX.
c La logique floue et ses applications.
Addison-Wesley, 1995.
Bernadette BOUCHON-MEUNIER.
Internet
c http://www-isis.ecs.soton.ac.uk/research/nfinfo/
fuzzy.html
c http://www.ortech-engr.com/fuzzy/
reservoir.html
c http://www-cgi.cs.cmu.edu/afs/cs.cmu.edu/
project/ai-repository/ai/areas/fuzzy/0.html
007431 12-98