Você está na página 1de 28

Fuzzy Logic

Introduction
Adriano Joaquim de Oliveira Cruz
Universidade Federal do Rio de Janeiro

21 de maro de 2013

Adriano Cruz (UFRJ)

Introduction

2013/03/21

1 / 55

Introduction

2013/03/21

2 / 55

Summary
1

Introduction

Fuzzy Logic

Artificial Neural Networks

Evolutionary Systems

Swarm Intelligence

Hybrid Systems

History

Adriano Cruz (UFRJ)

Section Summary
1

Introduction

Fuzzy Logic

Artificial Neural Networks

Evolutionary Systems

Swarm Intelligence

Hybrid Systems

History

Adriano Cruz (UFRJ)

Introduction

2013/03/21

3 / 55

Bibliography
Adriano Joaquim de Oliveira Cruz.
Fuzzy logic presentations.
http://equipe.nce.ufrj.br/adriano/fuzzy/ln.htm.
Jyh-Shing Roger Jang, Chuen-Tsai Sun, and Eiji Mizutani.
Neuro-Fuzzy and Soft Computing: A Computational Approach to
Learning and Intelligence.
Prentice Hall, New Jersey, USA, 1997.
Bart Kosko.
Fuzzy Thinking: The New Science of Fuzzy Logic.
Harper and Collins, USA, 1994.
Hung T. Nguyen and Elbert A. Walker.
A First Course in Fuzzy Logic.
Chapman and Hall/CRC, New York, USA, 2000.
Adriano Cruz (UFRJ)

Introduction

2013/03/21

4 / 55

Bibliography

Lefteri H. Tsoukalas and Robert E. Uhrig.


Fuzzy and Neural Approaches in Engineering.
John Wiley and Sons, inc, 1997.
Constantin von Altrock.
Fuzzy Logic and Neuro Fuzzy Applications Explained.
Prentice Hall, New Jersey, USA, 1995.
John Yen and Reza Langari.
Fuzzy Logic: Intelligence, Control and Information.
Prentice Hall, New Jersey, USA, 1999.

Adriano Cruz (UFRJ)

Introduction

2013/03/21

5 / 55

Artificial Intelligence Definitions

AI is the activity of providing such machines as computers with the


ability to display behaviours that would be regarded as intelligent if it
were observed in human. (R. McLeod)?
AI is the study of agents that exist in an environment, perceive and
act. (S. Russel and P. Norvig)?

Adriano Cruz (UFRJ)

Introduction

2013/03/21

6 / 55

AI

AI emphasizes symbolic
processing
Acts on higher levels of
intelligence
AI seeks to understand

Adriano Cruz (UFRJ)

Introduction

2013/03/21

7 / 55

2013/03/21

8 / 55

Computational Intelligence

Acts on lower levels of


Intelligence
Uses learning extensively
Pattern recognition and
heuristics play important roles

Adriano Cruz (UFRJ)

Introduction

Computational Intelligence Tools

Fuzzy Logic
Artificial Neural Networks
Evolutionary Systems
Swarm Intelligence
Hybrid Systems

Adriano Cruz (UFRJ)

Introduction

2013/03/21

9 / 55

There is no free lunch!


These are possible solutions to
solve a problem.
Experience and experiments will
help to find the best choice.
Solution is not guaranteed.
The theorem There is no free
lunch proves that there is no
learning algorithm universally
efficient.
D.H. Wolpert and W.G.
Macready. No free lunch
theorems for optimization. IEEE
Transactions on Evolutionary
Computation, 1(1):6782, april
1997.
Adriano Cruz (UFRJ)

Introduction

2013/03/21

10 / 55

Section Summary
1

Introduction

Fuzzy Logic

Artificial Neural Networks

Evolutionary Systems

Swarm Intelligence

Hybrid Systems

History

Adriano Cruz (UFRJ)

Introduction

2013/03/21

11 / 55

Fuzzy Logic?

Logic that deals mathematically with imprecise information usually


employed by humans.
Multi-valued logic that extends Boolean logic usually employed in
computer science.

Adriano Cruz (UFRJ)

Introduction

2013/03/21

12 / 55

Does it work?

Adriano Cruz (UFRJ)

Introduction

2013/03/21

13 / 55

Fuzzy Logic examples of applications

Used to alleviate difficulties in developing and analysing complex


control systems.
Approximate Functions
Decision systems

Adriano Cruz (UFRJ)

Introduction

2013/03/21

14 / 55

Fuzzy Logic questions

Who is greater than 1.80 m?


Who is tall?
Who weighs more than 100 kg?
Who is heavy?
The driver was heavy and tall.

Adriano Cruz (UFRJ)

Introduction

2013/03/21

15 / 55

Introduction

2013/03/21

16 / 55

Section Summary
1

Introduction

Fuzzy Logic

Artificial Neural Networks

Evolutionary Systems

Swarm Intelligence

Hybrid Systems

History

Adriano Cruz (UFRJ)

ANN definitions

Computational models that try to emulate the structure of the human


brain wishing to reproduce at least some of its flexibility and power.
ANNs consist of many simple computing elements.
Usually simple non-linear summing operation.
Highly connected by links of varying strength.

Adriano Cruz (UFRJ)

Introduction

2013/03/21

17 / 55

2013/03/21

18 / 55

ANN

ANNs are able to learn from examples.


Function approximators.
Solutions not always correct.
ANNs are able to generalize the acquired knowledge.

Adriano Cruz (UFRJ)

Introduction

ANN models

Adriano Cruz (UFRJ)

Introduction

2013/03/21

19 / 55

ANN Model

Inputs

Input
Layer

Adriano Cruz (UFRJ)

Hidden
Layer

Introduction

Output
Layer

Output

2013/03/21

20 / 55

Training

Weight values change during the training process.


Values are presented at the inputs and outputs are compared to the
desired values.
Wrong outputs cause weights to change in order to reduce the error.
Process is repeated with different inputs till the ANN is able to give
the correct answers.
Hopefully the ANN will be able to give the correct answer even to
inputs that were not trained.

Adriano Cruz (UFRJ)

Introduction

2013/03/21

21 / 55

Introduction

2013/03/21

22 / 55

Section Summary
1

Introduction

Fuzzy Logic

Artificial Neural Networks

Evolutionary Systems

Swarm Intelligence

Hybrid Systems

History

Adriano Cruz (UFRJ)

Evolutionary Systems

ES are global search and optimization algorithms modelled from


natural genetic principles such as natural selection.
Genetic Algorithms (GAs) are a type of Evolutionary Systems.
They are stochastic searching methods.
Good solutions will survive and be combined by the natural selection
process.
At the end the most fit will survive.

Adriano Cruz (UFRJ)

Introduction

2013/03/21

23 / 55

The Metaphor

The metaphor that lays behind GAs is the natural selection.


The problem of each species in the nature is seek for the best
adaptations in order to survive in a hostile environment that is in
constant modification.

Adriano Cruz (UFRJ)

Introduction

2013/03/21

24 / 55

Adaptation

The sets of characteristics of an


individual, that distinguishes
from everybody else, defines its
survival capacity.
These characteristics are
determined by its genetic
material.

Adriano Cruz (UFRJ)

Introduction

2013/03/21

25 / 55

Mechanisms

The competition for scarce resources makes the adapted survive and
reproduce.
Through reproduction the genes from individuals are transmitted to
their descendants.
This continuous process of selection and reproduction of the best
individuals may conduct to more adapted individuals.

Adriano Cruz (UFRJ)

Introduction

2013/03/21

26 / 55

GA flux
Begin

Initial
Population
Mutation

Current
Generation

Evaluates

Select
Parents

Generate
Offsprings

Next
Generation

Crossing

Ok?
yes

End

Adriano Cruz (UFRJ)

Introduction

2013/03/21

27 / 55

Introduction

2013/03/21

28 / 55

Section Summary
1

Introduction

Fuzzy Logic

Artificial Neural Networks

Evolutionary Systems

Swarm Intelligence

Hybrid Systems

History

Adriano Cruz (UFRJ)

Swarm Intelligence

Swarm Intelligence (SI) is the property of a system whereby the


collective behaviours of (unsophisticated) agents interacting locally
with their environment cause coherent functional global patterns to
emerge.
SI provides a basis with which it is possible to explore collective (or
distributed) problem solving without centralized control or the
provision of a global model.

Adriano Cruz (UFRJ)

Introduction

2013/03/21

29 / 55

2013/03/21

30 / 55

Characteristics of Swarm Intelligence

Distributed, no central control


or data source.
No (explicit) model of the
environment.
Perception of environment, i.e.
sensing.
Ability to change environment.

Adriano Cruz (UFRJ)

Introduction

Motivations

Robust nature of animal problem-solving


simple creatures exhibit complex behaviour;
behaviour modified by dynamic environment.

Emergent behaviour observed in:


bacteria
ants
bees
...

Adriano Cruz (UFRJ)

Introduction

2013/03/21

31 / 55

Ant Colonies

Ants are behaviourally unsophisticated; collectively perform complex


tasks.
Ants have highly developed sophisticated sign-based stigmergy
communicate using pheromones;
trails are laid that can be followed by other ants.

Stigmergy is a method of indirect communication in a self-organising


emergent system where its individual parts communicate with one
another by modifying their local environment.

Adriano Cruz (UFRJ)

Introduction

2013/03/21

32 / 55

Section Summary
1

Introduction

Fuzzy Logic

Artificial Neural Networks

Evolutionary Systems

Swarm Intelligence

Hybrid Systems

History

Adriano Cruz (UFRJ)

Introduction

2013/03/21

33 / 55

Hybrid Systems

Each intelligent technique has its particular strengths and weakness


and cannot be applied to universally to every problem.
Mixing together these techniques systems improve the quality of the
solutions and allows application to different tasks.

Adriano Cruz (UFRJ)

Introduction

2013/03/21

34 / 55

Computational Intelligence Calendar

Adriano Cruz (UFRJ)

Introduction

2013/03/21

35 / 55

Introduction

2013/03/21

36 / 55

Section Summary
1

Introduction

Fuzzy Logic

Artificial Neural Networks

Evolutionary Systems

Swarm Intelligence

Hybrid Systems

History

Adriano Cruz (UFRJ)

Aristotle

Macedonian philosopher who lived between 384 e


322 AC
Studied under Plato in the Academy
Creator of formal logic
His father Nichomachus was court physician to
King Amyntas
Associates the spirit of observation and a
classification instinct
He was considered during the middle ages the
philosopher
He shaped much of the western mind.

Adriano Cruz (UFRJ)

Introduction

2013/03/21

37 / 55

Aristotle x Budha

Everything must either be or not be, whether in the present or in the


future.
Aristotle
I have not explained that the world is eternal or not eternal. I have
not explained that the world is finite or infinite.
The Buddha

Adriano Cruz (UFRJ)

Introduction

2013/03/21

38 / 55

Fuzzy Logic? Why?

Every language is vague.


All traditional logic habitually assumes that precise symbols are being
employed. It is therefore not applicable to this terrestrial life, but only
to an imagined celestial one.
Everything is vague to a degree you do not realize till you have tried
to make it precise.
Bertrand Russel

Adriano Cruz (UFRJ)

Introduction

2013/03/21

39 / 55

Fuzzy Logic? Why?

As far as the laws of Mathematics refer to reality, they are not


certain; and as far as they are certain, they do not refer to reality.
Albert Einstein

Adriano Cruz (UFRJ)

Introduction

2013/03/21

40 / 55

How to classify?

Happy people
Small rooms
High temperatures
Faster cars
High tax rates
High people

Adriano Cruz (UFRJ)

Introduction

2013/03/21

41 / 55

To be or not to be?

Bertrand Russel, while trying to formalize Mathematic had difficulties


due to the liar?s paradox.
I am lying.
If Eubulides statement was true, then he is lying when he says I am
lying and so he isnt, i.e. his statement is false.
If his statement is false, then he isnt lying when he tells us he is, and
so his statement is true.

Adriano Cruz (UFRJ)

Introduction

2013/03/21

42 / 55

To be or not to be?

Consider the set of all sets that are not members of its own set.
Is it a member of this set?
If it is a member then it is not, but if it is not then it is.

Adriano Cruz (UFRJ)

Introduction

2013/03/21

43 / 55

Detractors

Fuzzy theory is wrong, wrong, and pernicious. What we need is more


logical thinking, not less. The danger of fuzzy logic is that it will
encourage the sort of imprecise thinking that has brought us so much
trouble. Fuzzy logic is the cocaine of the science.
Prof. William Kaham - U. Cal - Berkeley
Fuzzification is a kind of scientific permissiveness. It tends to result
in socially appealing slogans unaccompanied by the discipline of hard
scientific work and patient observation.
Prof. Rudolf Kalam - U. Florida - Gainesville

Adriano Cruz (UFRJ)

Introduction

2013/03/21

44 / 55

The Beginning

Lotfy Zadeh. Fuzzy Sets, Information and Control, 1965


Principle of Incompatibility As the complexity of a system
increases, our ability to make precise yet significant descriptions about
its behaviour diminishes until a threshold is reached beyond which
precision and significance (or relevance) become almost mutually
exclusive characteristics.
Lofty Zadeh

Adriano Cruz (UFRJ)

Introduction

2013/03/21

45 / 55

Introduction

2013/03/21

46 / 55

Fuzzy Thinking

Adriano Cruz (UFRJ)

Function Approximator

Outputs

Inputs
Fuzzy System
outputs=f(inputs)

f is unknown

Adriano Cruz (UFRJ)

Introduction

2013/03/21

47 / 55

Fuzzy Rules

If the interest rate is high and the deficit is high then there will be a
recession.
If rush hour then diminish the interval between buses.
If the tyre skids then loose the brake a bit.
If the soil is very dry then water it for very long time.

Adriano Cruz (UFRJ)

Introduction

2013/03/21

48 / 55

Fuzzy System

Rules

Sets

Operations

Data
Management

Fuzzyfier

Adriano Cruz (UFRJ)

Inference
Engine

Defuzzyfier

Introduction

2013/03/21

49 / 55

Advantages

Uses rules that express imprecision of the real world.


Easy to understand, test and maintain.
Easy to be prototyped.
Robust. They operate even when there is lack of rules or wrong rules.
Need less rules.
Parallel evaluation of rules.
Accumulate evidences in favour and against.

Adriano Cruz (UFRJ)

Introduction

2013/03/21

50 / 55

Disadvantages

Need more tests and simulation.


Do not learn easily.
Difficult to establish correct rules.
Lack of precise mathematical model.

Adriano Cruz (UFRJ)

Introduction

2013/03/21

51 / 55

Commercial Products

Sendai subway: 16 stations and 13,5 km route, designed by Hitachi.


Washing machines that measure weight, saturation time and water
clarity in order to program cycles.
Portable camcorders with automatic focus and anti-jitter.
Vacuum cleaners that measure air dust to set suction power.
Microwave ovens that measure temperature, humidity, weight of food
to set time and power.

Adriano Cruz (UFRJ)

Introduction

2013/03/21

52 / 55

Commercial Products

Sugeno designed a voice controlled system to operate an unmanned


helicopter
Anti-Lock Braking Systems: Nissan, Mitsubishi. Honda, Mazda,
Hyunday, BMW, Bosch and Peugeot
Suspension, transmission and fuel injector systems are usual.
Hitachi uses approximately 150 rules to trade in Japanese bonds and
futures
Yamaichi Securities uses hundreds of rules to manage a stock fund
Anaesthesia Control and Fuzzy Data Analysis for Cardio-Anaesthesia

Adriano Cruz (UFRJ)

Introduction

2013/03/21

53 / 55

Commercial Products

Air conditioning, Mitsubish, Hitachi, Sharp. Avoids temperature


oscillations and saves energy.
Electronic fuel injection, Nissan. Injection based on throttle, O2 rate,
RPM etc.
Steel, Nippon Steel. Mix inputs and controls time and temperature.
Golf. Maruman Golf Club. Chooses golf clubs.
Lifts, Fujitec. Improves response time based on traffic.

Adriano Cruz (UFRJ)

Introduction

2013/03/21

54 / 55

The End

Adriano Cruz (UFRJ)

Introduction

2013/03/21

55 / 55

Você também pode gostar