Introduction Fuzzy Logic - Introduction

  

Adriano Cruz NCE e IM/UFRJ [email protected]



Computers are useless, they can only give you answers. Pablo Picasso

J. Yen, R. Langari, “Fuzzy Logic: Intelligence, Control and Information”, Prentice Hall, 1999



J. R. Jang, C. Sun, E. Mizutani, “Neuro-Fuzzy and Soft Computing: A Computational Approach to Learning and Machine Intelligence, Prentice Hall, 1997





C. von Altrock, “Fuzzy Logic & NeuroFuzzy Applications Explained”, Prentice Hall PTR, 1995

No. 3

Summary    



@2001 Adriano Cruz

NCE e IM - UFRJ

No. 4

Artificial Intelligence?

Introduction Fuzzy Sets Fuzzy Set Operations Fuzzy Systems

@2001 Adriano Cruz

No. 2

H. T. Nguyen, E. A. Walker, “A First Course in Fuzzy Logic”, Chapman & Hall/CRC, 2000 Bart Kosko, “Fuzzy Thinking”, Harper Collins Publishers, 1994, ISBN 0-00-654713-3 L. H. Tsoukalas, R. E. Uhig, “Fuzzy and Neural Approaches in Engineering”, John Wiley and Sons, Inc, 1997



Slides and notes: http://equipe.nce.ufrj.br/adriano/fuzzy/bibliogr-ic.htm

NCE e IM - UFRJ

NCE e IM - UFRJ

Bibliography 2



@2001 Adriano Cruz

Light travels faster than sound. That is the reason why some people look brighter until they start talking. Linux Journal

@2001 Adriano Cruz

Bibliography 1 

Adriano Cruz NCE-IM UFRJ [email protected]

NCE e IM - UFRJ

No. 5



“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 humans” (R. McLeod)



“AI is the study of agents that exist in an environment, perceive and act.” (S. Russel and P. Norvig)

@2001 Adriano Cruz

NCE e IM - UFRJ

No. 6

1

Artificial Intelligence? 

AI emphasizes symbolic processing



Acts on higher levels of intelligence



AI seeks to understand

@2001 Adriano Cruz

NCE e IM - UFRJ

Computational Intelligence   

No. 7

Computational Intelligence

Acts on lower levels of Intelligence Uses learning extensively Pattern recognition and heuristics play important roles

@2001 Adriano Cruz

NCE e IM - UFRJ

Computational Intelligence



Fuzzy Logic



Fuzzy Logic



Artificial Neural Networks



Artificial Neural Networks



Evolutionary Systems



Evolutionary Systems



Swarm Intelligence



Swarm Intelligence



Hybrid Systems



Hybrid Systems

@2001 Adriano Cruz

NCE e IM - UFRJ

No. 9

Fuzzy Logic

@2001 Adriano Cruz

NCE e IM - UFRJ

No. 10

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.

@2001 Adriano Cruz

No. 8

NCE e IM - UFRJ

No. 11



Used to alleviate difficulties in developing and analysing complex control systems.



Function approximator



Decision systems

@2001 Adriano Cruz

NCE e IM - UFRJ

No. 12

2

Fuzzy Logic

Computational Intelligence



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.

@2001 Adriano Cruz

NCE e IM - UFRJ

No. 13

Artificial Neural Networks 



ANN consist of many simple computing elements – usually simple nonlinear summing operations – highly connected by links of varying strength.

NCE e IM - UFRJ

No. 15



Artificial Neural Networks



Evolutionary Systems



Swarm Intelligence



Hybrid Systems

@2001 Adriano Cruz

NCE e IM - UFRJ

No. 14



ANNs are able to learn from examples.



Function approximators.



Solutions not always correct.



ANNs are able to generalize the acquired knowledge.

@2001 Adriano Cruz

NCE e IM - UFRJ

No. 16

Neural Networks

Neurons

@2001 Adriano Cruz

Fuzzy Logic

ANNs

Computational models that try to emulate the structure of the human brain wishing to reproduce at least some of its flexibility and power.

@2001 Adriano Cruz



NCE e IM - UFRJ

No. 17

@2001 Adriano Cruz

NCE e IM - UFRJ

No. 18

3

Structure

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. NCE e IM - UFRJ No. 20 @2001 Adriano Cruz 

Inputs

Input layer

Weight Hidden layer

Matrix 1

@2001 Adriano Cruz

Weight Matrix 2

Output layer

Outputs

NCE e IM - UFRJ

No. 19

Computational Intelligence

Evolutionary Systems 



Fuzzy Logic



Artificial Neural Networks



Evolutionary Systems



Swarm Intelligence



Hybrid Systems

 

@2001 Adriano Cruz

NCE e IM - UFRJ

 No. 21

@2001 Adriano Cruz

The Metaphor 



NCE e IM - UFRJ

NCE e IM - UFRJ

No. 22

Adaptation

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.

@2001 Adriano Cruz

ES are global search and optimization algorithms modelled from natural genetic principles such as natural selection. 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.

No. 23



The sets of characteristics of an individual, that distinguishes from everybody else, defines its survival capacity.



These characteristics are determined by its genetic material.

@2001 Adriano Cruz

NCE e IM - UFRJ

No. 24

4

Mechanisms

GA Flux begin

The competition for scarce resources makes the apts 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 adpated individuals.







@2001 Adriano Cruz

NCE e IM - UFRJ

No. 25

Randomly Initial Population

Mutation

Current generation



Artificial Neural Networks



Evolutionary Systems



Swarm Intelligence



Hybrid Systems

@2001 Adriano Cruz

NCE e IM - UFRJ

  

@2001 Adriano Cruz

NCE e IM - UFRJ

NCE e IM - UFRJ

No. 26

Swarm Intelligence



No. 27

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.

@2001 Adriano Cruz

NCE e IM - UFRJ

No. 28

Motivations

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

@2001 Adriano Cruz

Next Generatio

OK?

Characteristics of a swarm 

Generates Sons

No



Fuzzy Logic

Selects Parents

Crossing

Computational Intelligence 

Evaluates

No. 29



Robust nature of animal problem-solving – simple creatures exhibit complex behaviour; – behaviour modified by dynamic environment.



Emergent behaviour observed in: – bacteria – ants – bees – ...

@2001 Adriano Cruz

NCE e IM - UFRJ

No. 30

5

Computational Intelligence

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.

@2001 Adriano Cruz

NCE e IM - UFRJ

No. 31

Hybrid Systems 



NCE e IM - UFRJ

Fuzzy Logic



Artificial Neural Networks



Evolutionary Systems



Swarm Intelligence



Hybrid Systems

@2001 Adriano Cruz

NCE e IM - UFRJ

No. 32

History

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.

@2001 Adriano Cruz



No. 33

40s 50s 60s 70s

AI

ANNs

47 Cybernetics

43 Neuron Model

56 AI

57 Perceptron Adaline Madaline 74 Back80Propagation Self orgazing map 82 Hopfield 83 Boltzmann Mach

60 Lisp Expert Systems

80s 90s

@2001 Adriano Cruz

FL

EA

65 Fuzzy Sets 74 Fuzzy Control Genetic Algorithm 85 Fuzzy modelling (TSK model)‫‏‬

Neuro-Fuzzy modelling

NCE e IM - UFRJ

Immune modelling Genetic programming

No. 34

Aristotle  

Why do we reason as we do?

    

@2001 Adriano Cruz

NCE e IM - UFRJ

No. 35

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.

@2001 Adriano Cruz

NCE e IM - UFRJ

No. 36

6

Aristotle X Buddha

Limitations of the Aristotle’ Aristotle’s Logic 



 

Objects are separated on very clear categories One object either belongs to a category or another Either you are or not Helps to separate objects into well defined categories.

@2001 Adriano Cruz

NCE e IM - UFRJ

No. 37



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

@2001 Adriano Cruz

Why fuzzy logic?  



NCE e IM - UFRJ

No. 38

Why fuzzy logic?

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.



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

Bertrand Russel @2001 Adriano Cruz

NCE e IM - UFRJ

No. 39

@2001 Adriano Cruz

How to classify?      

NCE e IM - UFRJ

No. 40

To be or not to be? 

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

@2001 Adriano Cruz

NCE e IM - UFRJ





No. 41

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 isn't, i.e. his statement is false. If his statement is false, then he isn't lying when he tells us he is, and so his statement is true.

@2001 Adriano Cruz

NCE e IM - UFRJ

No. 42

7

Answer: To be and not to be.

The Detractors



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.



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

@2001 Adriano Cruz

NCE e IM - UFRJ

No. 43

@2001 Adriano Cruz

The Detractors 

NCE e IM - UFRJ

No. 45

Fuzzy Thinking

Lotfy Zadeh. “Fuzzy Sets”, Information na 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 @2001 Adriano Cruz





Yes

Yes





@2001 Adriano Cruz

NCE e IM - UFRJ

NCE e IM - UFRJ

No. 46

Fuzzy Thinking No

No

No. 44

The Beginning

“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

@2001 Adriano Cruz

NCE e IM - UFRJ

No. 47

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 busses If the tyre skids then loose the brake a bit If the soil is very dry then water it for very long time

@2001 Adriano Cruz

NCE e IM - UFRJ

No. 48

8

Fuzzifying M easure Temp = 35º Temp = 48º Age = 35 Grade = 10.0 Grade = 8.5

Fuzzy Systems

Fuzzified Measure Tem p = high, µ high (t)=0.8 Tem p = high, µ high (t)=1.0 Idade = middle, µm iddle (i)=0.8 Grade = A, µA (t)=1.0 Grade = A, µA (t)=0.87

Y=F(X)‫‏‬ Y=F(X)‫‏‬

X

Function F(x) is unknown @2001 Adriano Cruz

NCE e IM - UFRJ

No. 49

Approximation of Functions Y

NCE e IM - UFRJ

@2001 Adriano Cruz

No. 50

Fuzzy Aproximation Theorem

patches







Patches are pieces of knowledge about a problem Every patch corresponds to a rule or proposition If the speed is high then step on the break

X

NCE e IM - UFRJ

No. 51

Fuzzy Aproximation Theorem An additive fuzzy system F:X->Y uniformly approximates f:X->Y if X is compact and f is continuous. Bart Kosko

@2001 Adriano Cruz

NCE e IM - UFRJ

No. 52

Fuzzy Systems Rules

No. 53

Sets

Operators

Data Management Fuzzyfier



NCE e IM - UFRJ

@2001 Adriano Cruz

@2001 Adriano Cruz

Inference Engine

NCE e IM - UFRJ

Deffuzzifier

@2001 Adriano Cruz

No. 54

9

Advantages       

Disadvantages

Use 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 NCE e IM - UFRJ

@2001 Adriano Cruz

No. 55

Commercial Products  

  

NCE e IM - UFRJ

No. 57

Products



Do not learn easily



Difficult to establish correct rules



Lack of precise mathematical model

@2001 Adriano Cruz

NCE e IM - UFRJ

No. 56

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 NCE e IM - UFRJ No. 58 @2001 Adriano Cruz 

Questions?

Air conditioning

Mitsubishi, Hitachi, Sharp

Avoids temperature oscillations and saves energy

Electronic fuel injection

NOK/Nissan

Injection based on throttle, O2 tax, water temperature, RPM, etc

Steel

Nippon Steel

Mix inputs and controls time and temperature

Golf

Maruman Golf Club

Chooses clubs

Lifts

Fujitec

Improves response time based on traffic

@2001 Adriano Cruz

Need more tests and simulation

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.

@2001 Adriano Cruz



NCE e IM - UFRJ

No. 59



Is fuzzy logic probability ?



Find a fuzzy product description.



Find fuzzy development tools.



Fuzzy Logic is a multi values logic. Find other examples.

@2001 Adriano Cruz

NCE e IM - UFRJ

No. 60

10