Upload
others
View
4
Download
0
Embed Size (px)
Citation preview
SC
2SS18 Georg Frey
Table of Contents
Computer Aided Methods in Automation Technology
• Expert Systems
Application: Fault Finding
• Fuzzy Systems
Application: Fuzzy Control (FC)
• Neural Networks (NN)
Application: Identification and Neural Control
• Genetic Algorithms (GA), Simulated Annealing (SA)
Application: Stochastic Optimization
• Basic Applications and Limitations of such Methods
Soft Control
SC
3SS18 Georg Frey
What is Soft Control?
Three classes of control methods
1. Conventional Control (Classical Control)
• PID controller
2. Modern Control
• State-Based Control
• Model Predictive Control
3. Soft Control (Intelligent Control)
• Fuzzy Control
• Neural Network
• Genetic Algorithms
Soft Control refers to those methods of control which use soft computing
and computational intelligence.
Soft Control = Intelligent Control = Knowledge-Based Scheme
SC
4SS18 Georg Frey
Problems of Conventional Control
• To design a conventional controller, a Macroscopic model of the controller
process is required
• The model may be based upon the empirical knowledge about the
dynamics of the controlled process
• This knowledge can be obtained from measurements on control and
controlled variables
• In practice, tuning of the control parameters is performed by the experts on
a running system
Example: Design of PID controller according to Ziegler and Nichols
Advantages:
Easy to use(few free parameters to configure, simple process model)
Robust
Problems:
Increased complexity of the requirements and constraints
Quality of control for complex controlled processes are often not sufficient
SC
5SS18 Georg Frey
Problems of Modern Control
• For the design of modern control, a microscopic model of the controlled
process is required.
• The model is determined through mathematical modeling
• Alternatively methods of identification can be used to ascertain the model
Example: Design of state-based control
Advantages:
Strong mathematical basis (stability, etc.)
High quality of control
Possible to include additional constraints
Problems:
Building a mathematical model of the controlled process is difficult and sometimes impossible
Detailed identification of process is often impossible or undesirable
Resulting controllers are complex and difficult to understand for the users
SC
6SS18 Georg Frey
Situation in the Industry
• Many conventional controllers at lower levels.
• Human as a controller at higher levels
• SCADA systems (Supervisory Control and Data Acquisition) provides
operators with all necessary information and access to the equipment
Advantages:
Operator can make intelligent decisions
Operator can learn by experience
Problems:
Quality of control depends on the experience of the operator
Interventions by the operator are subjective and often incomprehensive,
error-prone (especially under stress)
Under abnormal process conditions (alarm), the time delay in the decision-
making by the operator or the wrong decision by him can lead to disasters
(Chernobyl)
SC
7SS18 Georg Frey
Consequences
In modern complex systems, it is required that
• The operator performs the routine tasks that conventional
controllers are unable to solve
• The support of the decision-making process is provided, especially
in abnormal situations in which the operator is confronted often with
conflicting signals and objectives
In developing such systems
• Analytical process models are generally not available
• Objectives of the control scheme can often not be formulated
precisely
• In certain cases this results in formulation of conflicting goals
This requires intelligent controllers
SC
8SS18 Georg Frey
Artificial Intelligence (Künstliche Intelligenz)
• The biggest objective of Artificial intelligence is to emulate the
intelligent human behavior by means of computer programs.
• Symbolic and logic-based AI
Systems to solve problems
Systems for decision support
Knowledge-Based Systems
Formalisms for knowledge representation and AI programming languages
Knowledge acquisition and machine learning
• Intelligence through behavioral simulation
Turing Test
• Intelligence by symbol manipulation
Chinese Room
Philosophical discussion on the concepts of intelligence,
perception, awareness is not the aim of the lecture
Pragmatic approach
SC
9SS18 Georg Frey
Computational Intelligence (Soft Computing)
Artificial Intelligence
• Classical methods of artificial intelligence is based on the
processing of symbolic data
• Example: Expert systems
Computational Intelligence
• It refers to the methods that deal with numerical data
• Example: Fuzzy systems, Neuron Networks, Genetic algorithms
• Another denomination: Soft Computing
• Intelligent controllers are based on methods of soft computing, so
the name Soft Control
SC
10SS18 Georg Frey
Expert systems
• Core idea (Natural Model)
Human-like abstract thinking
• History
First expert systems began in 1970's (though faced the problem of high
computing expenses)
• Application in Automation Engineering
Today: Manifold industrial use higher levels of automation
• Examples
Expert systems to support process control
Expert systems for fault diagnosis
Training Systems (Simulators)
SC
11SS18 Georg Frey
Example of XPS: Diagnostic System in Process Control
Source: Polke 1994
SC
12SS18 Georg Frey
Fuzzy Systems
• Core Idea (Natural Model)
Dealing with fuzzy (non-crisp) knowledge
• History
In the mid-1960s Zadeh fuzzy logic
In the mid-1970s Mandani FuzzyControl
• Application in Automation Engineering
First industrial applications in the early 1980s
Fuzzy controller
• Examples
Drying processes
Gas heater
Fuzzy control of an inverted pendulum
Washing machine (AEG)
Fuzzy control of a hammer drill
SC
13SS18 Georg Frey
Example of Fuzzy: Control of a Hammer Drill
Task: Automatic control of optimum speed
and blow count with respect to
drill diameter and material hardness.
Solution: In total there are 20 IF-THEN rules for the determination of drill diameter and material hardness based on
four measured variables
Rule Nr. 11 as example:
IF Power=average AND Longitudinal acceleration=high AND
Transversal acceleration=high AND Longitudinal frequency=average
THEN Drill diameter=24mm
SC
14SS18 Georg Frey
Neural Networks
• Core Idea (Natural Model)
Connective approach for knowledge, storage and processing (neurons in the
brain)
• History
Beginning in the 1970s
Problems due to inadequate computing technology
New interest in the 1980s
• Application in Automation Engineering
Identification of complex processes
Control by inverse model
Prediction
• Examples
Identification of nonlinear systems
SC
15SS18 Georg Frey
Example of NN: Identification of a Two Tank System
h1
h2
qZu
L1
La
v12
va
)1(Zu -kq
)(ˆ1 kh
)2(Zu -kq
)2(1 -kh
)1(1 -kh
0 50 100 150 200 250 300 350 400 450 500-0.02
0
0.02
0.04
0.06
0.08
0.1
0.12
0.14
0.16
0.18
0 50 100 150 200 250 300 350 400 450 5000
0.002
0.004
0.006
0.008
0.01
0.012
0.014
0.016
0.018
0.02
(k)h
(k)h
1
1
ˆ
real
Model
SC
16SS18 Georg Frey
Genetic Algorithms
• Core Idea (Natural Model)
Stochastic Optimization (Evolution in Nature)
• History
Began in mid-1960s in Holland
• Application in Automation Engineering
From the mid-1990s for complex optimization problems (Offline)
• Examples
Optimizing control parameters especially with multiple degrees of freedom
(Fuzzy Controller)
SC
17SS18 Georg Frey
Interrelation Among the Methods
Fuzzy
Control
Neural
NetworksGenetic
Algorithms
Expert
systems
Adaptivity
Structure of Knowledge Processing
minimum
(not adaptive)
maximum
Unstructured
Structured
Populations Structure
Topology
of
Networks
Fuzzy
Rules
Control
SC
18SS18 Georg Frey
Classification into the Lecture
If you look at the systems presented so far, we can say that we
have looked at the intelligence from top-down :
• Expert Systems
(Abstract mathematical thinking)
are a further development of
• Fuzzy Systems
( "Natural" Fuzzy-Schlie sizes)
these could only develop on the basis
of the neural structures of the brain
• Neural Networks
(Learning and adaptation)
in the course of evolution arose from
much simpler structures by
• Genetic Algorithms
( "Survival of the fittest")
Tech
nic
al D
evelo
pm
en
t
Pro
ced
ure
in th
e le
ctu
re
Natu
ral
Deve
lop
me
nt
SC
19SS18 Georg Frey
Summary
• The problems of industrial domain require the use of "smart"
controllers
• The research in the field of artificial intelligence and in particular the
Computational Intelligence offers a number of methods
• The ideas are quite old
• Found its application only since a some years ( mainly due to
computing power)
• The skepticism of the users has been significantly decreased
SC
20SS18 Georg Frey
Outline of Lecture
1. Introduction to Soft Control: Definition and Limitations, Basics of
“Smart" Systems
2. Knowledge Representation and Knowledge Processing (Symbolic AI)
Application: Expert Systems
3. Fuzzy Systems: Dealing with Fuzzy Knowledge
Application: Fuzzy Control
4. Connective Systems: Neural Networks
Usage: Identification and Neural Control
5. Genetic Algorithms: Stochastic Optimization
Application: Optimization
6. Summary & Literature
SC
21SS18 Georg Frey
Literature (Sources Used)
General Information about the AI: Comprehensive Reference Book for the Interested Students
• Götz, Güntzer (Hrsg.): Handbuch der künstlichen Intelligenz. OldenbourgVerlag, 2000.
Expert Systems: Application Oriented Interpretation for the Use in Control Engineering:
• Polke, M.: Prozeßleittechnik. Oldenbourg Verlag, 1994.
• Ahrens, W.; Scheurlen, H.-J.; Spohr, G.-U.: InformationsorientierteLeittechnik. Oldenbourg Verlag, 1997.
Methods of Computational Intelligence for the Automation
Engineering :
• Fatikow, S.: Neuro- und Fuzzy- Steuerungsansätze in Robotik und Automation. Vorlesungsskript, Karlsruhe, 1994.
• King R.E.: Computational Intelligence in Control Engineering. Marcel Dekker, 1999
SC
22SS18 Georg Frey
Objectives of the Course
To know what is the meaning of Soft Control
To know the AI and specially Computational Intelligence for
Automation Engineering related areas:
Expert systems
Fuzzy Systems
Neural Networks
Genetic Algorithms
To know the application, advantages, and dis-advantages of each
method
To understand and apply the design methods; specially for Soft
Control
SC
24SS18 Georg Frey
2. Outline of the Lecture
1. Introduction to Soft Control: Definition, Limitations, Basics of
“SMART” Systems
2. Knowledge representation and knowledge processing
(Symbolic AI) Application: Expert Systems
3. Fuzzy-Systems: Dealing with Fuzzy Knowledge
Application: Fuzzy-Control
4. Connective Systems: Neural Networks
Usage: Identification and Neural Control
5. Genetic algorithms: Stochastic Optimization
Application: Optimization
6. Summary & Literature
SC
25SS18 Georg Frey
Contents of the 2nd Lecture
1. Expert Systems
1. Idea
2. Areas of applications
3. Compared with conventional programs
2. Basic Architecture of Expert Systems
Explanation of the components
Forms of knowledge base
Inference mechanism
3. Case Based Reasoning
4. Summary
SC
26SS18 Georg Frey
Expert Systems
• Core idea (Natural Model)
Human-like abstract thinking
• History
First expert systems began in 1970's (though faced the problem of high
computing expenses)
• Application in Automation Engineering
Today: Manifold industrial use at higher levels of automation
• Examples
Expert systems to support process control
Expert systems for fault diagnosis
Training Systems (simulators)
SC
28SS18 Georg Frey
Comparison: Conventional Programs vs. Expert Systems
In expert systems the knowledge & the problem-solving strategy
are separated, while in conventional programs knowledge and
problem-solving strategy are implicitly embedded in algorithms.
Algorithms
Data
Knowledge
Data
Troubleshooting
-strategy
Conventional Programs Expert Systems
SC
30SS18 Georg Frey
Knowledge Acquisition Components
• The knowledge of the system is changed or reviewed by introducing Interface to the expert systems
• Ideally, the interface is designed such that no programming knowledge is required
• Very often, there is a system developer (knowledge engineer) between the knowledge acquisition component and the expert system
• The knowledge engineer supports the experts in the command input or he usually asks the expert’s knowledge in interviews and prepares the input according to it.
• Most importantly, knowledge acquisition creates a bottleneck in the expert system creation
SC
31SS18 Georg Frey
Knowledge Base
• Here the existing knowledge in the system is suitable saved
• There are three different components of the knowledge base
1. Array based knowledge: The actual knowledge base, is the knowledge, that is
entered by knowledge engineer or expert
2. Specific case knowledge: knowledge about the current system problem, which
is entered by the user or automatically,
3. Interim results: Results that have been produced by individual rules of the
problem-solving components can serve in other rules and further processing
SC
32SS18 Georg Frey
Problem Solving Components
• Application neutral (application independent) part of the knowledge
Processing (also inference machine)
• Program system, the means of knowledge basis generation for
problem-solving
• Construction of the inference machine depends on the type of
knowledge base
Chain-rule (forward, backward) for production control systems
Derivation (resolution) for logic based systems
Comparison with case-based reasoning system
SC
33SS18 Georg Frey
Dialog Components
• Interface for users of the expert system
• Ask the problem from suitable
• Presentation and explanation of the solutions
• Explanation of the problem
System can be transparent, as it was concluded. (Useful for troubleshooting and
necessary confidence-building)
Deep explanations for "why" and “for which reason" a solution is possible or not
possible.
The XPS approaches in the deep structure of problems; that are still in their
infancy ( deep structure = the problem underlying technical, physical or
chemical relationships)
SC
34SS18 Georg Frey
Forms the Knowledge Base
• Control Based Systems
Production Control Systems
Logic Oriented Systems
• Case Based Reasoning Systems
• Object-Oriented Systems (are not discussed here)
SC
35SS18 Georg Frey
Production Control Systems
• Production rules as the smallest building blocks of knowledge base
• Construction:
IF certain conditions are met,
THEN will be closed on the following facts
• Example: failure diagnosis (syntax of the system Babylon)
SC
37SS18 Georg Frey
The General Approach to the Inference
Quelle: Lunze
• MATCH: It examines
which rules are
applicable in the
current problem state
conflict quantity =
quantity in all
applicable rules
• SELECT: selecting a
rule from the conflict
quantity
• ACT: application of
the selected rule to
the current problem
state new problem
state
SC
38SS18 Georg Frey
Inference: Forward Chaining vs. Backward Chaining
• Forward Chaining:
Carried out on the basis of known facts
Assumptions for these are new facts
Interruption, if no rule can fire more
Undirected (Untargeted) search
• Backward Chaining
Carried out on a hypothesis that would find the rule for re-check
A rule (to be found); that is conclusion to hypothesis
Then, with the assumption of this rule; proceed to the already known rules
• Mixed Strategy
Initially Hypothesis formation, (forward) = selection of the rule that is valid for
most of the assumptions
Then Hypothesis check (backward) = attempt the missing assumptions to verify
• For all chaining methods search may still exist between depth and
the breadth
SC
40SS18 Georg Frey
Example: Forward Chaining
• Rules are given in the form
of a decision tree
• Problem: Find reason for
low pressure
SC
41SS18 Georg Frey
Logic Based Systems
• Based on the statements or first order logic
• Use of variables is allowed
• Application e.g. Logic oriented programming PROLOGUE
• Knowledge base is developed from facts (statements) and rules
(implications)
• Example:
Statements:
A1 = stirrer runs
A2 = inert atmosphere is concerned
A3 = footway is off
A4 = dosage runs
A5 = dosage does not work
Implications
(A1 & A2 & A3) A4
A3 A4
Instructions
Be A1, A2, A3 TRUE then the value of A4 will also be derived to TRUE
SC
42SS18 Georg Frey
Logic Based Systems: Extended
• Default logic: For unknown assumptions are default values are (generally) TRUE
• Multi-logics: Z.B. tetravalent (TRUE, probably TRUE, FALSE Probably, FALSE)
• Modal logic: "It is possible that ... applies "
• Auto-epistemic logic: "I believe that ... applies "
• Temporal logic: the light temporal relations: "A, applies after B“
• Inclusion of probability statements in the logic
• Fuzzy Logic: details in the section of fuzzy systems
SC
43SS18 Georg Frey
Problems Rule-Based Systems
• Basic assumption that technical expertise expressed in rules can be
at least questionable
• Rules are often encroached, control logic in the system to encode
• In rules the context (scope) is often encoded
• In rules structural relations are often encrypted, for example,
specializations of some rules that other rules
• Rules can not be structured and organized
Mixing of knowledge (facts, context, control) means that expert
systems are not able to create their own system behavior that is
sufficient to explain .
Lack of structure leads to the technical applicability limits (generally
sensible systems have thousands of rules)
Way out: Case based reasoning and object-oriented approaches
SC
44SS18 Georg Frey
Case Based Reasoning Systems
Case Based Reasoning, CBR
• Case is some kind of experience in solving a problem .
• Use of the experience, or a case, the solution for a sufficiently similar problem to new current problem can be applied.
• Special development of knowledge-based systems
• Cases from other analogous or same area (different domains: the solar system and atomic model) Case Retrieval (solution unchanged over)
Close Case (Case adapt)
• Renunciation of truth, instead usefulness (optimization problem)
• Approach is based on dynamic memory (basic assumptions) Remembering and adjust (adaptation) are key in understanding mental
processes
Indexation is important for remembering
Understanding leads to the reorganization of memory, which is why this dynamic
The memory structure for the knowledge processing are the same as for the storage of knowledge
SC
45SS18 Georg Frey
CBR: Application Requirements
1. There must be sufficiently many experiences available
2. It is must be easier to use this experience as the problems may be
solved directly
3. The use of the solutions on the case by case basis should not
conflict with safety requirements
4. The available information is incomplete or vague and uncertain
5. A modeling within the meanings of traditional knowledge systems is
not easily available
• Frequently used in the area of diagnostics and electronic sales but
also configuring and planning
SC
47SS18 Georg Frey
CBR: Example
• Appropriate selection of similarities among cases
• How does one define similarity
1. Definition of similar dimensions for the individual attributes (local similarity
degree)
2. Summary of an overall dimensions (e.g. weighted sum)
SC
48SS18 Georg Frey
Summary and Learning of the 2nd Lecture
To know what Experts Systems are
Application areas of Expert Systems
To know basic architecture of Expert Systems and its components
To know basic types of Expert Systems and their functional
principle:
Production Control Systems
Logic Based Systems
Case based systems
SC
50SS18 Georg Frey
3. Outline of the Lecture
1. Introduction of Soft Control: definition and limitations, basics of
"smart" systems
2. Knowledge representation and knowledge processing (Symbolic AI)
Application: expert systems
3. Fuzzy systems: Dealing with Fuzzy knowledge
Application: Fuzzy Control
1. Fuzzy-quantities
4. Connective Systems: Neural Networks
Applications: Identification and neural control
5. Genetic algorithms: Stochastic optimization
Application: Optimization
6. Summary & Literature
SC
51SS18 Georg Frey
Fuzzy Systems
• Core Idea (Natural Model)
Dealing with fuzzy (non-crisp) knowledge
• History
In the mid-1960s Zadeh fuzzy logic
In the mid-1970s Mandani Fuzzy Control
• Application in Automation Engineering
First industrial applications in the early 1980s
Fuzzy controller
• Examples
Drying processes
Gas heater
Fuzzy control of an inverted pendulum
Washing machine (AEG)
Fuzzy control of a hammer drill
SC
52SS18 Georg Frey
Contents of the 3rd Lecture
1. Classical quantities
1. Definition and essential terms
2. Problems
2. Fuzzy-Quantities
Definition and terms
Operations on quantities and classical connection with the logic
Expansion of operations on fuzzy quantities
3. Summary
SC
53SS18 Georg Frey
The Classical Concept of Quantity
• A Quantity M is a Summary of wohlbestimmten and
wohlunterschiedenen Objects unserer Anschauung oder unseres
Denkens zu einem Ganzen.
• These objects are elements of so-called M.
• If an object belongs to M, The we write x M, if not, then x M
• Similar Quantities: M1 M2 (x M1 x M2)
• Dissimilar Quantities: M1 M2
• M1 is a Sub-set of quantity M2: M1 M2 (x M1 x M2)
• M1 is a genuine Sub-set of quantity M2: M1 M2, if M1 M2 und
M1 M2
• Blank Quantity:
SC
55SS18 Georg Frey
Problems in dealing with classical quantities
• Main problem is the binary decision on the affiliation of a quantity (elements are not always well-differentiated)
• Especially critical for continuous measurement (usually given in the Automatic Control)
• Example: for the interval of temperature from 0 ° C to 100 ° C following applies : "temperature is high"
• for T = 60,00°C "the temperature is high" valid
• for T = 59,99°C "the temperature is high" not valid
For use with control based systems, we have to give steps (jumps)
e.g.: R1: If temp. is high, then Heating-systems turns off
R2: if temp. is NOT high, then Heating system turns on
1
0
μ
T/°C60 100
μT=hoch
0
Solution: Fuzzy Quantity
SC
57SS18 Georg Frey
Affiliation Function (ZGF)
• The affiliation level is 0 or 1
• μ(x) = 1 means, that x completely belongs to Fuzzy-quantity
• μ(x) = 0 means, that x does not belong to Fuzzy-quantity
• Values from 0 to 1 mean that x partly belongs to the fuzzy quantity
• Finally, If G have many Elements discreet representation of ZGF
Indication of the value pairs {x, μ(x)}
• If there are many elements in G or G is a continuum, for example
cont. Measurement parametric representation of ZGF
Functions determined by a few parameters
Advantage: low memory consumption, fine resolution
Disadvantage may be complicated calculation
Function, every element X from a general basic numerical area, has a
G degree of belonging to a fuzzy-quantity, is assigned as μ(x)
(VDI/VDE 3550)
SC
58SS18 Georg Frey
Parametric Representation (1): step linear
• Indication of the interpolation function
Spezialfall: trapezoide
Funktionen
SC
59SS18 Georg Frey
Parametric Representation (2): trapezoid or triangular form
For Special case b=c
we obtain, triangular
form ZGF
SC
60SS18 Georg Frey
Parametric Representation (3): Normalized Gaussian function
SC
61SS18 Georg Frey
Parametric Representation (4): Sigmoid difference functions
SC
62SS18 Georg Frey
Parametric Representation (5): generalized bell function
SC
63SS18 Georg Frey
Parametric Representation (6): LR-Fuzzy-quantity
• Given the parametric presentation of their flanks (separately for right
and left flank)
Between the flanks (m1 <x <m2), μ (x) = 1
SC
64SS18 Georg Frey
Parametric Representation (7): Singleton (Also discreet)
SC
65SS18 Georg Frey
Terms for the description of fuzzy quantities
General adaptation of term Quantity
(for two quantities A and B over a basic quantity G)
• Equality of Fuzzy quantities: A = B μA(x) = μB(x) x G
• Blank quantity : μ(x) = 0 x G
• Universal quantity: μU(x) = 1 x G
Further terminologies
• High Normality
• Support
• Core
• -cut
• Fuzzy-subset
• Fuzzy-similarity
SC
66SS18 Georg Frey
High Normality
• A fuzzy-stock M is normal ,ifH(M) = 1 gilt,
• Otherwise subnormal
The amount of a fuzzy quantity is the maximum value of their affiliation
to function H(M) = max{μM(x) | x G}
Here and normally in practice, only normal fuzzy quantities are considered
SC
67SS18 Georg Frey
Support
• Synonym: Medium (VDI / VDE 3550), influence width
• English: support
• Calculation:
Let G is the basic quantity and M belongs to G, the support of M
defined as a fuzzy quantity by
supp(M) = {x G | μM(x) > 0}
given
The support of a fuzzy set is the part of the definition frame in which the
affiliation values greater than 0 are accepted
(VDI/VDE 3550)
1
0
μ
xa b c d
supp(M) = {x G | a < x < d}μM
supp(M)
SC
68SS18 Georg Frey
Core
• Synonyms: Tolerance (VDI/VDE 3550)
• English: core, tolerance
• Calculation:
Let G is the basic quantity and M belongs to G, then core of M is the
is defined as fuzzy quantity
core(M) = {x G | μM(x) = 1}
given
The core of a fuzzy set is the part of the definition frame in which the
affiliation function accepts the value 1
(VDI/VDE 3550)
1
0
μ
xa b c d
core(M) = {x G | b < x < c}μM
core(M)
SC
69SS18 Georg Frey
-cut
• Synonyms: -Cut (VDI/VDE 3550), -Level
• Englisch: cut
• Calculation:
Let G is the basic quantity and M belongs to G, then the -cut of M
is defined as fuzzy a quantity
-Schnitt(M) = {x G | μM(x) > }
given
Der - cut a fuzzy quantity is the part of the definition frame in which
the affiliation function values greater then 1 are accepted
(VDI/VDE 3550)
1
0
μ
xa b c d
½-Schnitt(M) = {x G | e < x < f}= {x G | (a+b)/2 < x < (d+c)/2 }
μM
½-Schnitt(M)
½
e f
SC
70SS18 Georg Frey
Basic Quantity
Support
Context: Support , -cut, Core, Basic quantity
• NOTE: basic quantity, support, core and -cut a lot of fuzzy quantities are classical quantities
• Venn-Diagram
-CutCore
SC
71SS18 Georg Frey
Fuzzy subset
A fuzzy quantity μ1 is called Fuzzy-Subset of a Fuzzy quantity μ2 on
the Basic quantity G (Notation: μ1 μ2 ), is valid if:
μ1(x) μ2(x) x G
1
0
μ
x
μ1
μ2
μ1 μ2
SC
72SS18 Georg Frey
Fuzzy Similarity
Two fuzzy quantities A and B are fuzzy-similar if
core (A) = core (B) and supp (A) = supp (B)
1
0
μ
x
a b c d
• Two Fuzzy quantities are exactly fuzzy-similar if they only differ in
their forms of left and right flank
• Conclusion 1: Major changes in the description of a fuzzy set
achieved by amendment of support.
• Conclusion 2: It is generally sufficient to use trapezoid or triangular
membership functions.
SC
73SS18 Georg Frey
Operations of classical set theory and relationship to the logic
• Average of quantities (AND):
x is part of the intersection of M1 and M2
x is part of M1 AND x is part of M2
• Association of quantities (OR):
x is part of the union of M1 and M2
x is part of M1 OR x element of M2
• Complement of quantities (NOT):
x is the element complementary set of M1
x is NOT the element of M1
SC
78SS18 Georg Frey
Problems with the NOT operator
• Classical:
A AND NOT A = 0
A OR NOT A = 1
SC
80SS18 Georg Frey
T-standard and S-standard
• T-Standard
Generalization of the logical AND links the membership degrees of
input sizes from the interval [0, 1] into the original size density of 0
to 1 membership degree, with the figure monotonous, associative
and commutative.
• S-Standard (Synonym: t-Conorm)
Generalization of the logical OR links the membership degrees of
input sizes from the interval [0, 1] into the original size density of 0
to 1 membership degree, with the figure monotonous, associative
and commutative.
• Operator pair
If a t-standard,and S-standard are applied together then De-Morgan'
laws are met, and they both together provide a Operator pair.
SC
82SS18 Georg Frey
Summary and learning of the 3rd Lecture
Know how of elementary notions of classical quantities
Why classical knowledge is problematic to describe quantities of
continuous partial facts
Fuzzy terminologies of quantities and possibilities to display them
Calculation of characteristic values of fuzzy quantities (support,
core, height, cut)
Know how of relationship between quantity and logic
Know how of elementary operators of fuzzy quantities and fuzzy
logic and how they can be applied
SC
84SS18 Georg Frey
4. Outline of the Lecture
1. Introduction to Soft Control: definition and limitations, basics of
"smart" systems
2. Knowledge representation and knowledge processing (Symbolic AI)
Application: expert systems
3. Fuzzy systems: Dealing with fuzzy knowledge
application: Fuzzy Control
1. Fuzzy-quantities
2. Fuzzy-Inference
4. Connective Systems: Neural networks
Application: Identification and neural control
5. Genetic algorithms: Stochastic optimization
application: Optimization
6. Summary & Literature
SC
85SS18 Georg Frey
Contents of the 4th Lecture
1. Relations
1. Logical Close
2. Fuzzy-logic Close
2. Fuzzy-Linguistics
1. Linguistic variables and Terms
2. Linguistic rules (fuzzy implication)
3. Fuzzy-Inference
1. Premise evaluation
2. Activation
3. Accumulation
4. Summary
SC
86SS18 Georg Frey
Logical Close (relations)
• Example: Relation between color and ripeness of a tomato:
Quantity of colors: X = (green, yellow, red)
vectors: green = (1 0 0); yellow = (0 1 0); red = (0 0 1)
Amount of maturity Grade: Y = (immature, half ripe, ripe)
vectors: immature = (1 0 0); half ripe = (0 1 0); ripe = (0 0 1)
Color ripeness ratio: R1 given by relations table or matrix
Relations are suitable for modeling of IF THEN rules
• Interpretation of Relationsmatrix:
IF a tomato is green, then it is immature (grün ◦ R1 = immature)
IF a tomato is yellow, then it is half ripe (yellow ◦ R1 = half ripe)
IF a Tomato is Red, then it is ripe (Red ◦ R1 = ripe)
100Red
010Yellow
001Green
MatureHalf
Mature
ImmatureR1: x \ y
normal Matrix
multiplication
100
010
001
R1
SC
87SS18 Georg Frey
Close Fuzzy logic (fuzzy relations)
• Example: Relation between color and ripeness of a tomato:
Color ripeness Relation: This is the fuzzy relationship as given by R2 relations
table or matrix
• Interpretation of Relation matrix:
IF a Tomato is Green,
THEN it is probably immature, but not exceeding half mature
Green ◦ R2 = (1 0,5 0)
IF a Tomato is Yellow,
THEN it is likely half mature , but may also be mature or immature
Yellow ◦ R2 = (0,3 1 0,3)
IF a Tomato is RED,
THEN it is probably ripe, but at least half mature
Red ◦ R2 = (0 0,6 1)
10,60Red
0,310,3Yellow
00,51Green
MatureHalf
mature
ImmatureR2: x \ y
16,00
3,013,0
05,01
R2
SC
88SS18 Georg Frey
Close fuzzy logic with fuzzy input values
• For example you can tell that an enhancement to fuzzy input values
is possible
• Assumption: A choice between green and yellow can not be taken :
• Color ranges from green to yellow: x = (0.5 0.5 0)
• (0,5 0,5 0) ◦ R2 = (0,5 0,5 0,3)
• The tomato is very likely half mature or immature, but it could also
be mature
Fuzzy implication
But first, some definitions
Fuzzy matrix multiplication
e.g.: Product = MIN, Summe = MAX
SC
89SS18 Georg Frey
Linguistic variables and Terms
• Objective: Problem, to transfer the verbal description, into algorithmic computation method.
• Conventional (sharp, exact) variable X Presentable form of X = numerical value * Unit
Example: Profit = 25 €; Temperature = 20.73 ° C; distance m = 0.73982625
The quantity of numerical values is generally not finally
• Linguistics Variable X Presentable form of X = linguistic Term
Beispiele: Profit = small; Temperature = medium; Distance = short
The amount of linguistic Term is final (even with unlimited basic quantity)
Each linguistic term could set out a fuzzy quantity
Linguistics Variables: Size, whose values are linguistic Terms
(VDI / VDE 3550)
Linguistic Term: Of course language has the properties to characterize size
(such as "high", "warm")
(VDI / VDE 3550)
SC
90SS18 Georg Frey
Example: Linguistic variable temperature
• Linguistic Variable: Temperature
• Linguistic Terms: Very low, low, medium, high , very high
1
0
μ
T/°C
50 1000
Very low low Very highhighmedium
SC
91SS18 Georg Frey
Definition of Linguistic variables
• In general, the fuzzy quantity at the bottom of the definition frame is
accepted as a trapezium
• In the intermediate area, Delta shaped fuzzy quantities are often
used
• The number of linguistic terms depends on the application case,
typical values range from 3 to 7
the less terms, the easier is the definition and the subsequent establishment of
rules
the more values, the more difficult is the determination, one must have more
knowledge about the system available (high granularity of knowledge)
• In general, the fuzzy quantities overlaps so that it comes a sharp
signal value can simultaneously belong to several quantities
• Reasonable way is that for each value there should be a exact
definition of the degree of affiliation with at least one fuzzy amount
greater than 0
• It is often also required that the sum of all membership levels for a
sharp value is always 1
SC
92SS18 Georg Frey
Linguistics Rules
Generally speaks at the closing of
• An Implication (IF-THEN-Rule)
• a given fact (current value of the assumption)
• a final (resulting value of the Conclusion)
Example
• Implication: IF the tomato is red then it is ripe
• Fact: given is that the tomato is red
• Conclusion: Tomato is ripe
IF THEN rule with assumption(condition IF part ) and Conclusion
(conclusion THEN-part ), at least the assumption must be linguistic
(VDI/VDE 3550)
SC
93SS18 Georg Frey
Fuzzy-Implication
General Description of the implication:
• IF the statement A, then is the statement B
Or
• A B
Required:
• Truth of the conclusion should not be greater than that of the
assumption
Membership function normally R : A B
• Discrete case:
μR(x, y) = μxy(x, y) = μ1(x) μ2(y) = μ1T(x) ◦ μ2(y) (x, y) G1 G2
This is a fuzzy matrices product (e.g. MIN MAX)
• Continuous case
μR(x, y) = μxy(x, y) = μ1(x) · μ2(y) (x, y) G1 G2
μR(x, y) = μxy(x, y) = min(μ1(x), μ2(y)) (x, y) G1 G2
SC
94SS18 Georg Frey
Linguistic rule (formal)
Generally speaks at the closing of
• An Implication (IF-THEN-Rule)
• a given fact (current value of the assumption)
• a final (resulting value of the Conclusion)
Formal (discrete)
• Implication: μR(x, y) = μxy(x, y) = μx(x) μy(y) = μxT(x) ◦ μy(y)
• Fact: μx‘(x)
• End:μy‘(y) = μx‘(x) ◦ μR(x, y) = Fuzzy-Inferenzbild
Formal (Continuous Bsp.: MIN-MAX)
• Implication: μR(x, y) = min(μx(x), μy(y))
• Fact: μx‘(x)
• End:μy‘(y) = max(min(μx‘(x), μR(x, y)))Maximum over all x
SC
95SS18 Georg Frey
Linguistic rule: For example heating water (1)
• For example, heating water according to the rule R
R: IF temperature T = low THEN W = high
0
μW
W/%
60 100
hoch
0,5
1
0
μT
T/°C
30 50
niedrig
0,5
1
8010
SC
96SS18 Georg Frey
Linguistic rule: For example heating water (2)
• Discretization of the basic quantities and the fuzzy-Terms:
G1 = {10, 20, 30, 40, 50} G2 = {60, 70, 80, 90, 100}
μT(T) = (0 0,5 1 0,5 0) μW(W) = (0 0,5 1 0,5 0)
• Relationsmatrix: μR(T, W) = μTT(T) ◦ μW(W) = min(μT(T), μW(W))
0000050
00,50,50,5040
00,510,5030
00,50,50,5020
0000010
10090807060T \ W
0
μW
W/%
60 100
hoch
0,5
1
0
μT
T/°C
30 50
low
0,5
1
8010
SC
97SS18 Georg Frey
Linguistic rule: For example heating water (3)
• Discretization of facts of G1 = {10, 20, 30, 40, 50}μT‘(T) = (1 0,5 0 0 0)
• Calculation of the results :
• μW‘(W) = μT‘(T) ◦ μR(T,W) = max(min(μT‘(T), μR(T,W))) = (0 0,5 0,5 0,5 0)Maximum of all T
0000050
00,50,50,5040
00,510,5030
00,50,50,5020
0000010
10090807060T \ W
0
μW
W/%
60 100
High
0,5
1
0
μT
T/°C
30 50
Low
0,5
1
8010
Incorrect
SC
98SS18 Georg Frey
Linguistic rule: For example heating water (4)
• Graphical Interpretation: The result of inference in a rule is the "truncated" fuzzy quantity of conclusion, the amount by which the degree of compliance of premise is given. (NOT α-cut)
• Let H is the degree of compliance with the premise, then
• μW‘(W) = H ◦ μW(W) = min(H, μW(W))
• Can we also constructed from the result?
0
μW
W/%
60 100
high
0,5
1
0
μT
T/°C
30 50
niedrig
0,5
1
8010
incorrect
0,3
H =
SC
99SS18 Georg Frey
Drawer: calculating the conclusion
Calculation of results:
μW‘(W) = μT‘(T) ◦ μR(T,W) = max( min(μT‘(T), μR(T,W)))über T
μW‘(W) = μT‘(T) ◦ (μTT(T) ◦ μW(W)) = max( min(μT‘(T), min(μT(T), μW(W)) ) )
über T
μW‘(W) = μT‘(T) ◦ μTT(T) ◦ μW(W) = max ( min(μT‘(T), μT(T), μW(W) ) )
über T
μW‘(W) = (μT‘(T) ◦ μTT(T)) ◦ μW(W) = min( max( min(μT‘(T), μT(T))), μW(W) )
über T
μW‘(W) = H ◦ μW(W) = min(H, μW(W))
H = μT‘(T) ◦ μTT(T) = max( min(μT‘(T), μT(T)))
über T
SC
100SS18 Georg Frey
Linguistic rule: For example heating water (6)
Limit for the reception of exact value: for example T = 20 ° C
Interesting:
• Various facts at the implication that lead to the same conclusion can be found
• It is only the degree of compliance with the premise that differs
0
μW
W/%
60 100
high
0,5
1
0
μT
T/°C
30 50
low
0,5
1
8010
0,3
H =
SC
101SS18 Georg Frey
Intermediate-state and the Way Forward
• So far achieved:
Figure, verbal statements and fuzzy logic
Possibility of processing easier IF THEN rules
Inputs and outputs are fuzzy variables
• Problems:
The simultaneous processing of several rules for the treatment of complex
issues
Some rules must also use the compound statements (IF A AND B AND C THEN
D)
The size of input and output of technical systems (Fuzzy Control) are exact (no
linguistic)
• Way Forward:
Extension of rules-processing
Fuzzy-Inference
Definition of Systems, the exact size and supply determination
Fuzzy-System
SC
102SS18 Georg Frey
Inference
• engl.: inference
Analysis of the rule base, allowing input of fuzzifizierten magnitudes, and
producing the output as a fuzzy quantity . The steps involved are the
inference, the premise evaluation, the activation and the accumulation
(VDI / VDE 3550)
Premise evaluation
(Aggregation)
Activation
(Composition)Accumulation
Inference
SC
103SS18 Georg Frey
Premise evaluation
• engl.: aggregation
• Synonym: Aggregation
Premise evaluation
(Aggregation)Activation
(Composition)Accumulation
Determining the degree of linguistic membership of a premise rule, by relating
the membership of all levels of linguistic premises using fuzzy operators
(VDI / VDE 3550)
SC
104SS18 Georg Frey
Linguistic premise and partial premise
• engl.: premise, linguistic condition
• Synonym: complex linguistic statement
• Example: Temperature is warm and pressure is high
Linguistic premise: condition (IF part) a of linguistic rule, can results from the
combination of several linguistic partial premises together
(VDI/VDE 3550)
• engl.: linguistic subcondition
• Synonym: linguistic Elementary declaration
• Example.: Temperatur is warm
Linguistic part premise: Partial statement in a premise is a linguistic rule, in
which only a linguistic variable and a linguistic term is present (VDI / VDE
3550)
SC
105SS18 Georg Frey
Several premises in a rule
IF A AND B THEN C
• Let HA be the degree of compliance of Part A premise and HB be
the degree of compliance of Part B premise then they can have a
connection through fuzzy AND operator to the degree of compliance
premise
• Example: MIN operator; the minimum levels of compliance provides
several premises in the event of the degree of compliance rule
IF A OR B C THEN
• Let HA be the degree of compliance of Part A premise and HB be
the degree of compliance of Part B premise then they can have a
connection through fuzzy OR operator to the degree of compliance
premise
• Example: MAX operator; The maximum levels of compliance
provides several premises in the event of the degree of compliance
rule
Simplification: rules whose premises are associated with OR will be split up
and can be used in several rules
SC
107SS18 Georg Frey
Activation
• engl.: activation, composition
• Synonym: Composition
• Common features: minimum, product
Determining the identity of a degree of linguistic rule concluded from the
degree of belonging and any weighting factor of premise
(VDI / VDE 3550)
Premise Evaluation
(Aggregation)
Activation
(Composition)Accumulation
SC
108SS18 Georg Frey
Example of activation
Let H be of the degree of compliance with the premise, then with MIN
• μW‘(W) = H ◦ μW(W) = min(H, μW(W))
Alternative: use of the product in the activation
• μW‘(W) = H ◦ μW(W) = H ·μW(W)
0
μW
W/%
60 100
high
0,5
1
0
μT
T/°C
30 50
low
0,5
1
8010
incorrect
0,3 0,3H =
0
μW
W/%
high
0,5
1
0
μT
T/°C
low
0,5
1incorrect
0,3 0,3H =
SC
109SS18 Georg Frey
Accumulation
• engl.: accumulation
• The accumulation, the conclusions of the individual rules (fuzzy
quantities) combined (association, OR) using one of the OR-defined
functions; usual:
Max
Algebraic Sum
Sum
(if after the conversion to a sharp value is, it is intolerable that the resulting
membership function may accept a higher values)
Summary of degree of belonging of the conclusions of all linguistic rules to the
output of fuzzy quantity
(VDI / VDE 3550)
Premise
Evaluation
(Aggregation)
Activation
(Composition)Accumulation
SC
110SS18 Georg Frey
Example of Accumulation
• Two Rules:
IF T = low THEN W= high
IF T = mittel THEN W = mittel
• Fact: T = 45 °C
SC
111SS18 Georg Frey
Rule base
• Synonym: Regulations (VDI / VDE 3550)
• engl.: rule base
• General form:
R1: IF x1 = A11... ...AND xn = A1n THEN y = B1
Rj: IF x1 = Aj1... ...AND xn = Ajn THEN y = Bj
Rm: IF x1 = Am1... ... AND xn = Amn THEN y = Bm
Input sizes: x1, ..., xn
Output Size: y
Terms linguistic input size xi: A1i, A2i ,..., Ami
Terms linguistic the original size y: B1, B2 ,..., Bm
The completeness of the linguistic rules, describes the existing knowledge to
achieve certain objectives
(VDI / VDE 3550)
SC
112SS18 Georg Frey
Analysis of the rule base
• General Form:
R1: IF x1 = A11... ...AND xn = A1n THEN y = B1
Rj: IF x1 = Aj1... ...AND xn = Ajn THEN y = Bj
Rm: IF x1 = Am1... ...AND xn = Amn THEN y = Bm
Input sizes: x1, ..., xn
Output Size: y
Terms linguistic input size xi: A1i, A2i ,..., Ami
Terms linguistic the original size y: B1, B2 ,..., Bm
• Let Hi is the degree of compliance of Rule Ri, then (MAX-MIN):
yi = min(Hi, Bi) degree of membership of Conclusion Ri
y = max(yi) degree of membership of output sizei = 1...m
y = max(min(Hi, Bi))i = 1...m
SC
113SS18 Georg Frey
Characterization of inference methods
• To describe an inference method in three steps premise evaluation,
aggregation and accumulation; operators to be used must be
determined
Premise evaluation: Operators for AND and OR
(T-standard and the S-standard)
Activation: operator for the conclusion of premise to conclusion (T-standard)
Accumulation: operator for the summary of the individual outputs (OR, the
standard)
• Simplification
In general, it is assumed that the premises are only linked by AND
Establishment of the OR operator for the premise evaluation is not applicable
t- standard is typically used in the evaluation for the AND operator, also used in
activation
• Conclusion
The determination of the operators for activation and accumulation is sufficient in
most cases
Common methods are MAX MIN inference, MAX-Prod-inference and Sum-Prod-
inference
SC
114SS18 Georg Frey
MAX-MIN-Inference
• Activation on MIN
• Accumulation on MAX
• y = max(min(Hi, Bi))i = 1...m
• Usually the minimum operator is used for the premise evaluation
• Maximum and minimum operator belonging together form a pair of t-
standard and the standard
Inference that the minimum operator is used in the activation and the
maximum operator is used in the accumulation
(VDI / VDE 3550)
SC
115SS18 Georg Frey
MAX-Prod-Inference
• Activation on Product
• Accumulation on MAX
• y = max(Hi ·Bi))i = 1...m
• Usually the product operator is used for the premise evaluation
• This is a combination of t-standard and the s-standard
• BUT maximum operator and product operator belonging together do
not form a pair of t-standard and the standard
Inference that the product operator is used in the activation and the maximum
operator is used in the accumulation used
(VDI / VDE 3550)
SC
116SS18 Georg Frey
Sum-Prod-Inference
• Activation on Product
• Accumulation on Sum
• y = Hi ·Bii = 1...m
• Usually the product operator is used for the premise evaluation
• the sum operator is not the s-standard
• However (anticipation of the application): A use of the Sum-Prod-
inference arises when appropriate choice of membership functions
and defuzzification method a piecewise linear characteristic, this
can be a benefit of fuzzy controller
Inference that the product operator is used in the activation and the sum
operator is used in the accumulation
(VDI / VDE 3550)
SC
117SS18 Georg Frey
Outlook
• The pros and cons of each inference methods are visible in the
application to concrete problems.
• Especially in fuzzy controllers, these can be illustrated by
determining a corresponding characteristic field
Introduction of fuzzy controllers in the next lecture
Comparison of different methods with a concrete example in the
next lecture (exercise)
SC
118SS18 Georg Frey
Summary and learning of the 4th Lecture
Familiar concepts of fuzzy linguistics
Can set up a rule base
Able to explain the procedure for the inference
Premise evaluation (aggregation)
Activation (composition)
Accumulation
Inference can apply different methods
MAX-MIN
MAX-PROD
SUM-PROD
SC
120SS18 Georg Frey
5. Structure of the lecture
1. Introduction Soft Control: Definition and delimitation, basic of 'intelligent'
systems
2. Knowledge representation and knowledge engineering (symbolic AI)
Application: Expert Systems
3. FuzzySystems: dealing with fuzzy knowledge
Application: Fuzzy control
1. Fuzzy-Quantity
2. Fuzzy-Relations, Fuzzy-Inference
3. Fuzzy-System, Fuzzy-Control
4. Connective Systems: Neural Networks
Application: Identification and neural control
5. Genetic algorithms, Simulated annealing, Differential evolution
Application: Optimization
6. Summary & References
SC
121SS18 Georg Frey
Contents of the Lecture 5.
1. Fuzzy Systems
1. Fuzzification
2. Defuzzyfying
3. Operation of the overall system
2. Fuzzy Control
1. Rules
2. Control
3. Fuzzy Control
4. Design Process
3. Summary
SC
122SS18 Georg Frey
Fuzzy System
• engl.: Fuzzy system
System, that used linguistic rules and with the help of the partial blocks
fuzzification, inference and defuzzyfying, mapped the numeric input variables
to numeric output variables
(VDI/VDE 3550)
Fuzzification Inference Defuzzyfication
SC
123SS18 Georg Frey
Fuzzification
• engl.: fuzzification
Conversion of a numeric size in a degree of membership to linguistic
expressions of a linguistic size
(VDI/VDE 3550)
Fuzzification Inference Defuzzyfication
SC
124SS18 Georg Frey
Fuzzification
• Transition from a sharp signal value X to a fuzzy signal value X*
• Assignment of the degrees of membership for all linguistic terms of the
corresponding linguistic variable
• For n linguistic terms, there is a n-tuples of degrees of membership
In the fuzzification, a sharp signal is not transferred in a fuzzy-quantity, but in a
vector of sharp degrees of memberships of fuzzy-quantities
1
0
μ
T/°C
50 1000
very low low very highhighmedium
T = 58°C T * = (0 0 0.5 0.15 0)
0.5
0.15
SC
125SS18 Georg Frey
Example for Fuzzification
• T1 = 28 °C T1*= (0 0,8 0 0 0) The temperature T1 = 28 °C is low
• T2 = 58°C T2*= (0 0 0,5 0,15 0) The temperature T2 = 58 °C isbetween medium and high, more medium
• T3 = 95°C T3*= (0 0 0 0 1) The temperature T3 = 95 °C is very high
0
μ
T/°C
50 1000
very low low very highhighmedium
T2 = 58°C
0.5
0.15
1
T3 = 95°CT1 = 28°C
0.8
SC
126SS18 Georg Frey
Defuzzyfication
• Engl.: defuzzyfication
Conversion of a fuzzy-quantity in a numeric output value (e.g. in a control
variable).
(VDI/VDE 3550)
Fuzzification Inference Defuzzyfication
SC
127SS18 Georg Frey
Thoughts about Defuzzyfication
• The output fuzzy-quantity represents a activation function
• Question: What exact value best describes the result of the inference?
• Basic Ideas:
Maxima of the function:
Value, that is the maximum in the fuzzy quantity
(Problem: Definition by multiple maxima)
"Middle" of the area
Center or median of the area under the curve
(Problem: complex calculation)
• Methods
Maximum-Defuzzyfication
gravity method
Area median method
• First an example
SC
128SS18 Georg Frey
Example: linguistic variables
1
0
μ
T/°C
50 1000
very low low very highhighmedium
1
0
μ
W/%
50 1000
very low low very highhighmedium
SC
129SS18 Georg Frey
Example: rule base and factum
Rule base
• R1: IF T = very low THEN W = very high
• R2: IF T = low THEN W = high
• R3: IF T = medium THEN W = medium
• R4: IF T = high THEN W = low
• R5: IF T = very high THEN W = very low
• Input Variable: T = 15 °C
1
0
μ
T/°C
50 1000
very low low very highhighmedium
1
0
μ
W/%
50 1000
very low low very highhighmedium
1
0
μ
W/%
50 1000
very low low very highhighmedium
0.75
0.25
Fuzzification: T * = (0.75 0.25 0 0 0)
SC
130SS18 Georg Frey
Example: Accumulation (MAX)
1
0
μ
W/%
50 1000
Very Low Low Very HighHighMedium
1
0
μ
W/%
50 1000
Very Low Low Very HighHighMedium
1
0
μ
W/%
50 1000
Very Low Low Very HighHighMedium
0.75
0.25
μ
W/%
50 100
Very HighHigh1
0
0.75
0.25
SC
131SS18 Georg Frey
Maximum-Defuzzyfication
• Where is the maximum ?
Mean-of-Maxima (mean value of the
Maxima)
Smallest-of-Maxima (first Maximum)
Largest of maxima (last peak)
μ
W/%
50 100
Very HighHigh1
0
0.75
0.25
μ
W/%
50 100
Very HighHigh1
0
0.75
0.25
μ
W/%
50 100
Very HighHigh1
0
0.75
0.25
μ
W/%
50 100
Very HighHigh1
0
0.75
0.25
MOM: YD = 93.75 SOM: YD = 87.5 LOM: YD = 100
Evaluation
Simple Calculation
Only rules with a maximum degree of fulfillment go to the result (usually one)
The degree of fulfillment of the rule is not taken into account (for MOM and
triangular-structured ZGF, others partially).
Range boundaries are not always possible (depends on ZGF)
Discontinuous output values
SC
132SS18 Georg Frey
Gravity method
• General
= Center of
gravity (COG)
μ
W/%
50 100
Very HighHigh1
0
0.75
0.25
Evaluation
All the rules are taken into account
Continuous output values
Levels of fulfillment are taken into account
Complex calculation
Range boundaries are not possible ( Advanced gravity method)
-
-
dyy
dyyy
yD
COG: YD =
• Simplified
or for Singletons
= Center of singletons
(COS), centroide
μ
W/%
50 100
Very HighHigh1
0
0.75
0.25
n
i
i
n
i
ii
D
y
yy
y
1
1
COS: YD = 85
SC
133SS18 Georg Frey
Area median method
• = Center of
area (COA)
μ
W/%
50 100
Very HighHigh1
0
0.75
0.25
Evaluation (almost like in gravity method)
All the rules are taken into account
Continuous output values
Levels of fulfillment are taken into account
Complex calculation (more complex than in gravity method)
Range boundaries are not possible
For singletons in output Fuzzy-Quantities unsuitable
-
D
D
y
y
D dyydyymity
COA: YD =
SC
134SS18 Georg Frey
Operation of a Fuzzy-System
1. FuzzificationDetermination of the degrees of membership of the sharp inputvariables to the Input-Fuzzy-Quantities
2. Aggregation (premise analysis)Determination of the levels of fulfillment of the single rule premises(Determination of active rules)
3. ActivationDetermination of the single Output-Fuzzy-Quantities (for each rule)
4. AccumulationOverlap of the single Output-Fuzzy-Quantities to an overall Output-Fuzzy-Quantity (function of attractiveness)
5. DefuzzyficationDetermination of the sharp output values from the function ofattractiveness
SC
135SS18 Georg Frey
Application: Fuzzy control
• Basics
Properties of a scheme
Properties of a control
Comparison of control (close loop and open loop)
• Fuzzy control
Application of a Fuzzy-System to control
• Design Methodology
SC
136SS18 Georg Frey
Block diagram of a control
Process variable
routeActuators
Sensors
Control element
Control output
reference variable w
-
Feedback variable
Comparing
element
Algorithm
Disturbances(incl. EMC, environment, ... )
Control
Characteristics
• Sphere of influence, where variables continuously retroact to themself
• Continuous values
• Standardized task: disturbance correction, tuning the reference variable
Example: Balancing of an inverted pendulum
SC
137SS18 Georg Frey
Control
Block Diagram
Output variablesControl Part
Control SignalsInput Variables
route
Actuator feedback
Actuators
SensorsFeedback variables
Disturbances(incl. EMF, environment, ...)
Algorithms
Characteristics
• Variables in the loop do NOTcontinously retroact themselves
• Binary values
• No standardized task
Example: Positioning of an inverted pendulum
SC
138SS18 Georg Frey
„Always restart, "not standardized bar: usually extensive
Rules can be applied“
„Always same“, standardized: „Controlled variable adjust the reference input“
Specification
Always several loops/mehrschleifig, i.e. several hundred sensors and actuators Complexity
>95% of control loops are one-loop/einschleifig (1 Sensor, 1 Actuator)
Number of signals
Variables in loop effects other variables
Variables in loop retroact themselves
Feedback variables
discretecontinousVariables
Boolean Algebra, Automata, Petri Nets
Differential equationsMathematics
Amplifier loop
Disturbances
Feedback system
No amplifier loopAmplification loop is defined Stability problem
only known in advance and trackabledisturbances can be corrected
unknown disturbances can be corrected
Asynchronous binary feedback variables( Events)
Permanently synchronised closed loop
ControlAutomation
Comparison of Automation and Control
SC
139SS18 Georg Frey
Fuzzy-Control
• Fuzzy controller (fuzzy controller) can be used for regulatory as well as for control tasks. Often combinations of the two are found.
• The resulting controller can be the described link between inputs and outputs
Characterstics curve
In general not-linear
Application of a fuzzy system for the control and automation
(Control)
Fuzzy controllers are not novel controller types.They belong to the class of nonlinear curves or
Characterstics diagram controller.
However, there are new design methods and the interpretation of results.
SC
140SS18 Georg Frey
m
1
negative-up positive-up
positive-downnegative-down
middle-up
180120900-90-120-180
0
negative-up
middle-
up
negative-
up
positive-
down
positive-
up
-30 30
Fuzzy Control in the example of inverted pendulum
Regel 1:
IF Pendulum angle
positiv-downAND
Angular acceleration negative
ANDWagon position
middle
THENacceleration should be
negative
SC
142SS18 Georg Frey
Static characteristics of fuzzy controllers
Control base:
R1: IF e = NG THEN u = NG
R2: IF e = NU THEN u = NU
R3: IF e = PG DANN u = PG
• Examples with mixed Degree of overlap Input fuzzy quantities
• Max-Min-Inference
• COS-Defuzzification
SC
143SS18 Georg Frey
Control and Variables characteristics
Control variale y Variable u
SC
145SS18 Georg Frey
Design parameters of a fuzzy controller
Fuzzification Inference Defuzzification
Control base
y
ZGFZGF Input variables Output variables
x
Problem orienteddesign parameters
Method oriented design parameters
Defuzzificationmethods
Inference-methods
(see 4. VL)
•Premise evaluation: Operators for AND and OR
(t-Norm und s-Norm)• Activation: Operator for
the closing of the Premise Conclusion (t-Norm)
• Accumulation: Operator for the
summary of single
control output (s-Norm)
SC
146SS18 Georg Frey
Design process of a fuzzy controller
Design process
1. Defining the parameters method
2. Defining the parameters problem
1. Define the linguistic variables and the number of terms
2. Defining the membership functions
3. Defining the rules (expertise)
3. Simulation using a model (if possible)
4. Implementation
Depending on the result of 3 (or 4): Optimization through interventions in 2 (or 1)
• Note: Even method parameters usually have not much influence on the behaviour
• method parameters will be partially used by the design tool set
Design process = method for determining the method and parameters of the problem
SC
147SS18 Georg Frey
Dynamic fuzzy controller
• Fuzzy controllers are initially static
• Dynamic behaviour can only be produced by external components are
Post-processing of output variables(integration)
pre-processing of input variables (Derivation)
• Example: Fuzzy-PID-Controller
SC
148SS18 Georg Frey
Summary and learning for 5th Lecture
To know the concept of fuzzy system
Fuzzification
Apply and describe the methods of De-fuzzification
Functionality of Fuzzy sytems
Concept of fuzzy controller with respect to with control and regulation
Design process of fuzzy controller
SC
150SS18 Georg Frey
1. Strucure of the lecture
1. Soft control: the definition and limitations, basics of "smart" systems
2. Knowledge representation and knowledge processing (Symbolische AI)
Application: Expert systems
3. Fuzzy Systems: Dealing with Fuzzy knowledge
Application: Fuzzy Control
1. Fuzzy-quantitity
2. Fuzzy-Relations, Fuzzy-Inference
3. Fuzzy-System, Fuzzy-Control
4. Design example
4. Connective Systems: Neural Networks
Application: Identification and neural control
5. Genetic algorithms, Simulated Annealing, Differential Evolution
Application: Optimization
6. Summary & Literature
SC
151SS18 Georg Frey
Contents of 1. exercise
1. Introduction of example
2. Design first fuzzy controller for the example
3. Variation of different design parameters
Definition of input-Fuzzy-Quantity
Definition Ouput-Fuzzy-Quantity
Selection of Inference method
Selection of De-fuzzification method
4. Demonstration of a complex example (inverted pendulum)
SC
152SS18 Georg Frey
Introduction of Example: Mixing valve with SISO-FC
To determine: Fuzzy-Controller, Adjustment of the nominal value of Temperatur from ist
to soll
u
ist
soll
Fuzzy-Controller
Stepper motor
drive
q
Heater Mixing valvel
inlet
outlet
1
2
Input range: =-25 °C ... +25 °C
Output range: u = -50 Steps/s ... +50 Steps/s
SC
153SS18 Georg Frey
Design process of a fuzzy controller (Repeat)
Design Process
1 Establishment of method-oriented parameters
2 Definition of the problem-oriented parameters Linguistic variables and definition of the number of terms
Establishing membership functions
Determining the rules (expert)
3 simulation using a model (if possible)
4 Commissioning
Depending on the result at 3 and 4: Optimization by interfering with one or two
Design process = method to determine the method-oriented and problem-oriented parameters
SC
154SS18 Georg Frey
Design parameters of a fuzzy logic controller (repeat)
Fuzzification Inference Defuzzyfication
Rule Base
y
ZGFZGF input variables output variables
x
Problem-orienteddesign parameters
Method-orientedDesign Parameters
Defuzzyficationmethod
InferenceMethod
(see 4. Lecture)
• Premise evaluation:Operators for AND and OR (s-and t-norm)• Activation:Operator for closing of on premise conclusion (t-norm)• Accumulation:Operator for summary individual control outputs (s-norm)
SC
155SS18 Georg Frey
Notations
inputs ofNumber ...1=i rules ofNumber ...1=j
Vector of the (sharp) input variables
Vector of degrees of membership of the i-th input to fuzzy setsthe associated linguistic input variables
Degree of fulfillment of the premise of the j-th rule
Produced by activation of the j-th rule output fuzzy set
Resulting output fuzzy set
Resulting (sharper) baseline
Fuzzifi-cation
Aggre-gation
Activ-ation
Accu-mulation
Defuzzy-fication
e Fi H j u
R
I n f e r e n c e
)(uj )(R u
e
iF
jH
)(uj
)(R u
Ru
SC
156SS18 Georg Frey
First fuzzy controller for the example "mixing valve"
Input (error signal) Output (step speed)
Problem-oriented parameters1 fuzzy sets
2 Rule bases rule 1: IF strong negative, THEN u quick downrule 2: IF negative, THEN u uprule 3: IF null, THEN u null.rule 4: IF positive, THEN u down
rule 5: IF strong positive, THEN u quick down
Method-oriented parametersOperator for activation: ...Operator for accumulation: ...Method for the defuzzyfication ...(Aggregation operator omitted, cause SISO system)
quickdown
down upQuick
up
0
0,5
1
()
/ °C–25 0 25
strong negative null positive strong
negative positive
(u)
0
0,5
1
u / (steps/s)–50 0 50
null
SC
157SS18 Georg Frey
Transfer characteristic of the first controller
Example: De-fuzzification with simplified centre of Gravity method (COS)
(an approach close to Active., Accum. and Defuzz.)
Graph:
/ °C
u / (Steps/s)
–50
50
–25 25
P-Controller with negative
gain
SC
158SS18 Georg Frey
Example „Mixing Valve“: Modification I
Specification of the regulatory tasks (part 1)
The output variable u should be at its maximum or minimum value at an offset of
± 20 ° C respectively, and this is the maximum offset to be maintained.
Solution:
Modification of the input fuzzy sets
Note:
Fuzzy ZGF set the "zero", as modified, so that the
Sum of all belongings/memberships is always 1.
(not necessarily, but customary)
0
0,5
1
()
/ °C–25 0 25
strong negativ null positiv strong
negativ positiv
SC
159SS18 Georg Frey
Example „Mixing Valve“: Modification I
Specification of the regulatory tasks (part 2)
The fuzzy controller close to the zero point is more sensitive to fluctuations and react
more significantly for large deviations.
Solution:
1. Possibility: 2. Possibility:
Change in input Fuzzy-Sets Change in output Fuzzy-Sets
(Output-Fuzzy-Sets Unchanged) (Input Fuzzy-Set as in Modification I)
u / (steps/s)–50 0 50
very negativ null positive very
negativ positivQuick
upwardUpwardDownQuick
down
0
0,5
1
()
/ °C
–25 0 25
0
0,5
1
null
SC
160SS18 Georg Frey
Important points about definition of fuzzy quantities
• Main points
Input Quantities
Plateaus lead to constant areas at the output
(Prev.: 100% overlap of input quantities ).
Adjustment in ZGF changes the slope of the curve (or Characteristic
Graph).
Lack of overlap produced hikes in the curve.
ZGF forms: Triangular and trapezoidal shapes are usually enough .
Output Quantities
Adjustment in ZGF changes the slope of the curve (or Characteristic
Graph). sense of reverse effect as with the input ZGF.
Effect of overlap less than that of input quantities
ZGF forms: triangles, trapezes and single tone are usually enough
SC
161SS18 Georg Frey
Important points about Inference method
• Main Points
Activation
MIN operator produce plateau as a resulting output fuzzy quantity.
Accumulation
By MAX-Operator a rule determines any point only;
with SUM-Operator several rules at same time can be used at any
point.
The accumulation can also be an unlimited sum.
)(R u
)(R u
)(R u
SC
162SS18 Georg Frey
Important points about De-fuzzification
• Main points
Strong influence on response characteristic
Maximum-De-fuzzification
With MAX-MIN-, MAX-PROD- and SUM-PROD-Inference
the response is un-steady.
(Steady response is only with SUM-MIN inference)
Centre of Gravity-Defuzzification
Output value range is not fully utilized .
Remedy: symmetry. Enlargement of the marginal output fuzzy sets
Steady Reponses
SC
163SS18 Georg Frey
Transfer characteristic of a SISO P-fuzzy controller (1)
Input-Fuzzy-Quantity Output-Fuzzy-Quantity
Membership Functions
Rule Base
Rule 1: IF input is negative, THEN output is negative.
Rule 2: IF input is null, THEN output is null.
Rule 3: IF input is positive, THEN output is positive.
SC
164SS18 Georg Frey
Transfer characteristic of a SISO P-fuzzy controller (2)
Sum-Min-MAX
Sum-Prod-MaxMax-Prod-MAXMax-Min-MAX
De-fuzzification: Maximum method
Activation: Minimum
Accumulation: Maximum
SC
165SS18 Georg Frey
Transfer characteristic of a SISO P-fuzzy controller (3)
Max-Min-COG Max-Prod-COG Sum-Prod-COG
Sum-Prod-COAMax-Prod-COAMax-Min-COA
SC
166SS18 Georg Frey
Transfer characteristic of a SISO P-fuzzy controller (4)
Max-Min-extCOA Max-Prod-extCOA Sum-Prod-extCOA
Sum-Prod-extCOGMax-Prod-extCOGMax-Min-extCOG
„ext“: symmetrisch erweiterte Ausgangs-Fuzzy-Mengen
SC
167SS18 Georg Frey
Transfer characteristic of a SISO P-fuzzy controller (5)
Input-Fuzzy-Quantity Graph (Max-Min-COG)
(Output-Fuzzy-Quantity and rule base is unchanged)
Reduced overlap of the input fuzzy quantities
SC
168SS18 Georg Frey
U5x
9
6
4
1
7
8
2
3
F
1 Servo amplifier 5 Metal rail
2 Motor 6 Cart/Trolley
3 Drive Roll 7 Pendulum Weight
4 Transmission band 8 Pulley
9 Suspension Rod
inverted pendulum
Example inverted pendulum
SC
169SS18 Georg Frey
Fuzzy-Controller for inverted Pendulum
Structure of Balance-Control
Positions-
control
Angle
Control
Pendulu
m incl.
Actuator
x solluF ~ F
ϑ
xd
u =soll
x ϑxs s
SC
170SS18 Georg Frey
Mathematical determination of the control algorithm
Procedure :
1. Mathematical description of actuator, controlled system, measuring
link (loop analysis)
2. Requirements of closed loop behaviour
3. Computation of the algorithm from 1 and 2 (Loop synthesis)
Problems:
1. Setting up of mathematical description
2. Formulation of the requirements
SC
171SS18 Georg Frey
Mathematical Description
Control Loop, regulation- and Error correction
d2
dt2
- -
-
( ) sin cos
cos sin cos
P g m
N
C m
N
d
dtP
Nu
K P
N
drdt
P
N
d
dt
012
012
012
012
2
012
2
- -
1 12
22( ) sinP
m P
d2r
dt2 - -
( ) sin cos cos
sin
Nu K
N
drdt
P g
N
P C
N
ddt
P
N
ddt
012
012
2
012
012
012
2
SC
172SS18 Georg Frey
Position control in Matlab / Simulink
Rule base Graph
SC
173SS18 Georg Frey
Angle Control in Matlab/Simulink
Rule base Graph
SC
174SS18 Georg Frey
Summary and learning of the 6th Lecture
How fuzzy controller can be develop
Know-how Development methodology
Know-how of Individual steps
Know-how of the effect of different design parameters on the
transfer characteristics of the controller
Input-Fuzzy-Quantities
Inference-Methods
De-fuzzification-Methods
Output-Fuzzy-Quantities
SC
176SS18 Georg Frey
6. Contents of 7th Lecture
1. Introduction to Soft Control: definition and limitations, basics of
"smart" systems
2. Knowledge representation and knowledge processing (Symbolic AI)
Application: expert systems
3. Fuzzy systems: Dealing with Fuzzy knowledge
Application: Fuzzy Control
4. Connective Systems: Neural networks
Application: Identification and neural control
1. Basics
5. Genetic algorithms: Stochastic optimization
Application: Optimization
6. Summary & Literature
SC
177SS18 Georg Frey
Contents of the 6th Lecture
1. Limitations of expert systems and fuzzy systems
2. Natural model
1. The human brain
2. The natural neuron
3. Properties/Characteristics of neural networks with respect to the
automation technology
4. Artificial neurons
5. Artificial Neural Networks
SC
178SS18 Georg Frey
Limitations of expert systems and fuzzy systems (1)
• A macroscopic view leads to
Expert Systems or Fuzzy
Control as the case may be.
• Here the modeling of intelligent
thinking by intelligent people is
done.
• The ability of the people to
deduce appropriate (possibly
vague) information from
conclusions should be emulated
• It aims to use the accumulated
knowledge (already learned) by
man to solve specific tasks
• A microscopic examination
leads to neural networks
• Here the modeling of human
intelligence sources (the nerve
cells and their mutual
networking) is done.
• The ability of the people to
deduce data connections or
information from Conclusions
should be emulated
• It aims to use the learning of the
functional units of the brain
Objective: Simulation of intelligent behavior
SC
179SS18 Georg Frey
Limitations of expert systems and fuzzy systems (2)
Neuronale
Networks (NN)unstructured
Fuzzy SystemExpert-systemsstructured
knowledge
Processing
numericalsymbolic
Processing
SC
180SS18 Georg Frey
The brain as a natural model
• approximately 100 billion neurons
• Each neuron is connected
approximately 1000
to 100,000 other
neurons.
• smallest functional unit
contains about 4000 neurons
• Subdivision in different
reaction locations
(sensory perceptions,
motor activities)
• In case of damage to parts of the brain, it may act in parts by other
bodies.
• The memory is not limited locally but distributed throughout the
cerebral cortex
• Response times from ms to sec
Nervenzellen in der Hirnrinde
SC
181SS18 Georg Frey
The natural neuron as the smallest element
Komponenten:
• Cellular body (Soma)
• Axon
• Dendriten
• Endknöpfchen
Link to other neurons
• Synapses
DendritenAxon
Endknöpfchen
Synapsen
SC
182SS18 Georg Frey
Function of a neuron
• The neuron receives signals from other neurons of the synapses
• The synapses determine how the incoming signal to the neuron
received (weight of connection, can also be negative)
• The dendrites are the input channels of the neuron, they direct the
signals from the synapses in the Soma
• The signals are added up in the Soma Neurons
• If neuron fires enough signal energy, then it sends a signal to other
neurons
• The axon is the channel of the neuron, it directs the signal
generated in Soma to the Endknöpfchen
• The Endknöpfchen, is the electrochemical connection to the
recipient neurons (synapses)
SC
183SS18 Georg Frey
Some features of neurons
• All transactions are electrochemical in nature and thus significantly
time afflicted (reproductive speed of a pulse of the axon is in the
range 0.5 - 100 m / s)
• The production of pulses output is based on the all-or-nothing
principle (fire)
• After triggering a pulse lasts a few milliseconds so that the neuron
can be excited again (refractory period)
• Synapses can be exciting or inhibiting
• Neurons adapt at a constant excitation to their sensitivity
• There are no natural NN Synchronization
SC
184SS18 Georg Frey
Learning of neurons level
Most famous Theory (Donald Hebb):
• If pairs of neurons are active at the same time, the connections
between them amplified (which means the network will be more
magnetized)
• Learning will be made by changing the connection strengths to
reach the synapses
• Possible changes :
Structurally = Form of Endknöpfchen, Form and size of Dendritenenden
Chemically = the number of receptor molecules , free quantity transferable of
materials
• Structural changes are found in the relatively early age
• In adults, chemical changes are made
SC
185SS18 Georg Frey
Properties of neural networks related to AT
• NN have nonlinear relationships and are therefore directly
responsible for nonlinear regulatory/Control problems
• NN have a MIMO structure
• NN are parallel structure, and robust against errors in individual
elements
• NN can be used to Generalization and interpolation
• NN relationships are based on information learned (without model)
• NN can continuously online (adaptation)
For application, a simplified mathematical model of a neuron is necessary
SC
186SS18 Georg Frey
Mathematical model of a neuron
• W. McCulloch und W. Pitts, 1943
SC
187SS18 Georg Frey
Capacity of a single neuron
• Example with ankle as activation function
SC
189SS18 Georg Frey
Border: XOR problem
• Solving these problems requires more neurons
• Solution with 3 neurons in two steps
SC
190SS18 Georg Frey
Neural networks (single-)
• Arrangement of the neurons in several layers
• Each neuron is connected to following-layer all the neurons
• Centralized networks
SC
191SS18 Georg Frey
Neural networks (multi)
• Multi-Layer-Perceptron
SC
192SS18 Georg Frey
First division of NN
• synchronous and asynchronous networks
with synchronous networks, the output of all neurons is simultaneously
calculated (condition: No feedback loops)
For multi-synchronous networks, it is generally calculated for each layer in the
order of the input layer to the output layer
in asynchronous networks, the calculation of output for each neuron is
independent of the other neurons
• static and dynamic networks
A neuron stores state without its output, purely because of the current input
static network
Neurons stored-state calculate the output as a function of input and the previous
state. For this state there must be transitional rules dynamic Netz
SC
193SS18 Georg Frey
Connection structures
• forward
• lateral
• backward
SC
195SS18 Georg Frey
Open problem: learning in NN
• Based on the above mathematical model of a neuron, any complex
NN could be formed
• The underlying idea for learning in such networks (adaptation of the
weights in the synapses or edges) is clear
• Problem: The model, there is no indication of how the learning
process should proceed
• Solution:
First of investigate all natural forms of learning
This principle derives the idea of a learning process
This algorithm fits to convert it to the mathematical model
• It should be noted :
Efficiency (time, implementation expenses)
Convergence (stability of the solution)
Quality (optimality of the solution)
SC
196SS18 Georg Frey
Summary and learning the 7th Lecture
Principal function of a neuron is describe d
natural
Artificial
Mathematical model of a single neuron is developed
Know-how of capabilities and limitations of individual neurons
Possibilities to set up networks
Synchronization
Dynamics
Shortcuts
Activation functions
Basic differences between natural and artificial NN
SC
198SS18 Georg Frey
Contents of the 8th lecture
1. Introduction of Soft Control: Definition and Limitations, Basics of
“Intelligent" Systems
2. Knowledge representation and Knowledge Processing (Symbolic AI)
Application: Expert Systems
3. Fuzzy-Systems: Dealing with Fuzzy Knowledge
Application : Fuzzy-Control
4. Connective Systems: Neuronale Networks
Application: Identification and neural Control
1. Basics
2. Learning
5. Genetic Algorithms: Stochastic Optimization
Application: Optimization
6. Summary & Literature References
SC
199SS18 Georg Frey
Contents of 7th Lecture
Learning in Neural Networks
Supervised (monitored) learning
Solid Learning Task:
Geg.: Input E, Output A
Un-Supervised (un-monitored)
learning
Free Learning Task :
Geg.: Input E
Example: Backpropagation Example: Competitive Learning
SC
200SS18 Georg Frey
Unsupervised Learning
Learning in Neural Networks
Supervised (monitored) learning
Solid Learning Task:
Geg.: Input E, Output A
Un-Supervised (un-monitored)
learning
Free Learning Task :
Geg.: Input E
Example : Backpropagation Example : Competitive Learning
Source: Carola Huthmacher
SC
201SS18 Georg Frey
Principle of Competitive Learning in the problem of clustering
Objectives of the clustering:
• Differences between
objects of a cluster are
minimal
• Differences between
objects of different
clusters are maximum
Learning through competition
• Competition principle
(Competition)
• Objective: Each group
will activate an output
neuron (binary)
SC
202SS18 Georg Frey
Architecture of a Competitive Learning Network
...
...
0 1 1 ) = x
0 )
Input
...
...
( 1 0 1 1 ) = x Rn
Output ( 1 0 ) = y Bm
Input Layer
Competitive Layer
31 2 n
SC
203SS18 Georg Frey
Processes in the Competitive Layer
j
( x1 x2 xn) = x Rn
wj1 wj2 wjn
• Measure of the distance (displacement/offset)
between input and weighting vector
Sj = i wij xi = |w||x|cos
S is large for small displacement
• Winner: Neuron j with
Sj > Sk for all k j
• Output:
y winner = 1
y loser = 0
(„winner takes all“)
SC
204SS18 Georg Frey
Unsupervised Learning Algorithms
• Initialization:
Early Random weighting (normalized weight
vectors)
Vectors from training inputs (normalized) as
initial weights
• Competitive process
• Learning:
Input is a Vector x
Recalculate the weightings of the winner
neuron :
wj(t+1) = wj(t) + (t) [x - wj(t)]
(t) is the Learning rate (0,01 -0,3)
in the process the learning is gradually
reduced
Normalization(Standardization)
• Termination:
At the end the fulfillment of a Termination criterion
wj (t)
wj (t+1)
x
(t) [ x – wj (t) ]
0 1
1
x – wj (t)
SC
205SS18 Georg Frey
Advantages and Dis-Advantages
• Disadvantages:
difficult to find good initialization
Unstable
Problem: # Neurons in Competitive
Layer
• Advantages:
good clustering
easier and faster algorithm
Building block for more complex
networks
SC
206SS18 Georg Frey
Supervised Learning
Learning in Neural Networks
Supervised (monitored) learning
Solid Learning Task:
Geg.: Input E, Output A
Un-Supervised (un-monitored)
learning
Free Learning Task :
Geg.: Input E
Example: Back propagation Example: Competitive Learning
Source: Dr. Van Bang Le
SC
207SS18 Georg Frey
The Back propagation-Learning algorithms
History
• Werbos (1974)
• Rumelharts, Hintons, Williams (1986)
• Very important and well-known supervised learning for forward
networks
Idea:
• Minimizing the error function by Gradient relegation (descend)
Consequences
• Back propagation is a Gradient base procedure
• Learning here is math, no biological motivation!
SC
208SS18 Georg Frey
Task and aims of back propagation-learning
• Learning Task:
Quantity of input / output examples (training set):
L = {(x1, t1), ..., (xk, tk)}, where:
xi = Input Example (input pattern)
ti = Solution (Desired task, target) with input xi
• Learning Objective:
Each task (x, t) from L should be from the network with as little error as
can be calculated. .
SC
209SS18 Georg Frey
BP general approach to learning
• Subdivision of existing data
in
Trainings data
Validation data
• Training to achieve desired
error
• Validation
• Problem: Optimal end point
for training
Underfitting
Overfitting
Trainings-Iterations
Error
Validation
Training
SC
210SS18 Georg Frey
The Back propagation-Learning algorithms
• Error measurement:
Let (x, t) L and y is actual output of the network when input is x.
• Error concerning the pair (x, t):
Ex,t = ( = ½ || t –y ||2)
• Total Error :
• Note: :
The factor ½ is not relevant (|| t –y ||2 is then exactly minimum, If ½
|| t –y ||2 is minimum), but later leads to simplify the formulas.
-L ) ,( i
2
ii
L ) ,(
, )y(tEE21
txtx
t x
-i
2
ii )yt(21
SC
211SS18 Georg Frey
The gradient method
1. Consider the error as
a function of weights
2. To the weight vector
w = (W11, W12, ...)
belongs to the point (w, E (w))
on the error surface
3 Since E is differentiable, so at point w the gradient of the error area
is possible, and the gradient descends at a fraction New weight
vector w ‘
4. Repeat the Procedure at the Point w´ ...
E(w)
w w´
Fehler
Gewichte
SC
212SS18 Georg Frey
Gradient
Let f : ℝn → ℝ eine real Value Function.
• f(x1, ..., xn) show ,,in the direction of the highest growth rate ‘‘
of f and instead (x1, ..., xn).
Towards the relegation : –f
Example: f(x1, x2) = ½ x12 – x2 , f(x1, x2) = (x1, –1)
• Partial derivative of f after xi :
• Gradient of f :
Towards the descent into xi-direction: −∂
∂ x i
f
f) ..., f, f,( fnx
2x
1x
fi
x
SC
213SS18 Georg Frey
BP to multiple networks
Designations:
The network with input x was completely broken into shares!
• A:= {i : i is Output neuron} the quantity of output neurons
For (x, t) L is then y =(oi)i A is the output when input is x
• Output of neuron i: oi
• Input for neuron j: netj :=
wij
i j
Viewing multiple-networks without abbreviation
(pure Feed-forward networks with connections between
Successive layers)
ji : i
iji wo
SC
214SS18 Georg Frey
BP to multiple networks: : Notation: Error Function
Error function:
f is differentiable, so is Ex,t and E is also differentiable, and gradient
relegation method can be applied!
• oj = f(netj), where f is the activation function of neurons.
• netj =
Offline-Version: Weight change after calculation of total error E (Batch
Learning)
Online-Version: Weight change under the current calculation error Ex,t
E = Ex,t =
ji : i
iji wo
L ) ,(
,Etx
t x
- A j
2
jj )ot(21
SC
215SS18 Georg Frey
Sigmoid as the activation function
Until now, the
Activation function f was
the staircase function
So not everywhere
differentiable :
1 1
As an activation function for all neurons is
Now the sigmoid function s (x) = s1 (x)
Everywhere differentiable
Function:
1
1+e− cxsc(x) =
It is: s´(x) = s(x)(1 – s(x))
s2
s1
SC
216SS18 Georg Frey
The Back propagation-Learning algorithm: Online-Version
(1) Initialize the weights with random values wij
(2) Choose a pair (x, t) L
(3) Calculate the output y when input is x
(4) Consider the error Ex,t as a function of weights :
Ex,t = ½ || t –y ||2 = Ex,t(w11, w12, ...)
(5) Fractionally change wij (Learning rate) in the steepest descent
direction of the error :
(6) If there is no termination then repeat from (2) criterion
wij := wij + ·( )−∂ E x , t
∂ w ij
SC
217SS18 Georg Frey
The Back propagation-Learning algorithm: Online-Version (2)
For a fixed pair i, j Ex,t is considered as a Function of wij
(all other weights are included in this calculation constant )
• Ex,t depends on network output y (i.e. oj, j A)
• oj, j A, depends on the input of neuron j , netj, ab
• netj depends on wkj and ok , for all Connections kj
• ...
Backpropagation
Calculation of wij
i j
−∂ E x , t
∂ w ij
So backward is determined by the network!−∂ E x , t
∂ w ij
SC
218SS18 Georg Frey
The Back propagation-Learning algorithm: Online-Version (3)
Dependency: Ex,t(wij) depends on net, netj depends on wij ab.
Application of the chain rule:
= oi
∂ net j
∂ w ijj := ,, Error Signal ‘‘ −
∂ E x , t
∂ net j
Calculation of wij
i j
−∂ E x , t
∂ w ij
ij
j
j
,
ij
,
w
net
net
E
w
E
txtx
SC
219SS18 Georg Frey
The Back propagation-Learning algorithm: Online-Version (4)
Dependency: Ex,t(netj) depends on oj , oj depends on netj .
Application of the chain rule:
• = f´(netj) = ...
For f = sigmoid Activation function s shall continue :
... = s´(netj) = s(netj)·(1 – s(netj)) = oj·(1 – oj)
j
j
j
,
j
,
net
o
o
E
net
E
txtx
j
)j
j
j
net
f (net
net
o
SC
220SS18 Georg Frey
The Back propagation-Learning algorithm: Online-Version (5)
wij
i j
Calculation of ∂ E x , t
∂ o j
Case 1: j is a output neuron.
= 2 ½ (tj – oj) (–1)
= – (tj – oj)
))(( A k
2
kk21
jj
,ot
oo
E
-
tx
SC
221SS18 Georg Frey
The Back propagation-Learning algorithm: Online-Version (6)
Case 2: j is not an output neuron.
wij
i j
Calculation of ∂ E x , t
∂ o j
Dependency: oj will be presented at all follow-up of neurons, k and j
redirected and Ex,t depends on!
Application of the chain rule :
j
k
kj k:k
,
j
,
o
net
net
E
o
E
txtx
jk
kj k:
k w-
SC
222SS18 Georg Frey
The Back propagation-Learning algorithm: Online-Version (7)
Summary:
Error signal: j
−∂ E x , t
∂ w ijRelegation(descend) direction wij : = oi · j
Correction for wij: wij = wij + · oi · j
j to be calculated, all k must be known for all connections
kj
Back propagation
-
--
sonst,w)o1(o
Aj ),ot()o1(o
jk
kj k:
kjj
jjjj
SC
223SS18 Georg Frey
The Back propagation-Learning algorithm: Online-Version (8)
• Initialize the weights with random values
• Determination of abort criterion for total failure (error) E
• Determination of maximum Epoch number emax
E:= 0; e:= 1
repeat
for all (x, t) L do
• compute
• E:= E + Ex,t
• calculate backward, layerwise starting with the
output layer of the error signals j
• wij = wij + · oi · j
endfor
e:= e + 1
until (E meets ) or (e > emax)
Ex,t =
-A j
2
jj )ot(21
SC
224SS18 Georg Frey
The Back propagation-Learning algorithm : Offline-Version
Offline means that the error for all input data
should also be minimized
In this mode, the weights after Presentation of all
tasks (x, t) L are modified:
)(ij
ijij wEww
-
))((ij
,
L ),(
ij w
Ew
-
tx
tx
L ),(
ijwtx
xx )(
j
)(
io
SC
225SS18 Georg Frey
Online vs. Offline
• When offline learning (Batch Learning) is in a corrective step, the
total error function (for all data) is optimized .
• There is a descent in the direction of the real Gradient direction the
total error function
• When online learning are the weights after the presentation of each
date adapt immediately.
• The direction of adjustment is in general not in agreement with the
Gradient direction.
• If the entries are selected in a random order, it is the middle of the
gradient that is followed.
• The online version is necessary, if not all pairs (x, t) at the beginning
of learning are known (adapting to new data, adaptive systems), or
if the offline version is too burdensome.
SC
226SS18 Georg Frey
Problems of Backpropagation: Symmetry Breaking
For complete layers, forward-affiliated networks, the weights may not give
equal value to be initialized. Otherwise, the weights between two layers
through back-propagation will always give the same values .
1
2
3
4
5
6
7
8
Ini: wij = a for all i, j
After the Forward-Phase:
o4 = o5 = o6 4 = 5 = 6
w14 = w15 = w16, w24 = w25 = w26,
w34 = w35 = w36, w47 = w57 = w67,
w48 = w58 = w68
This situation applies forward after each phase. Through such initialization
is therefore certain symmetry, which no longer be broken!
Solution: Small, random values for top weights.
Network input neti for all Neurons i is almost Null
s´(neti) size, and the Network adapts quickly.
SC
227SS18 Georg Frey
Problems of back propagation: Local minima
As with all gradient may be in back propagation
a local minimum area of error remains :
E
ww0w1w2w3
There is no guarantee that a global
minimum (optimal weights) will be
found .
With a growing number of connections ( the dimension of the weight room is
great ) the surface error greater jagged. In a local minimum is likely to land !
Way out:
• Learning rate not to be chosen too small
• Several different initialization of the weights to try
According to experience, the one minimum found for the concrete
application is acceptable solution
SC
228SS18 Georg Frey
Problems of Backpropagation: Leave (abandon) good minima
Leave good Minima:
• The size of the weight change depends on the amount of gradients .
• A good minimum is in a steep valley, the amount of the is gradient
so large that the good and minimize skipped in the vicinity of where
a worse minimum will be landed will:
E
wWay out:
• Learning rate not to be chosen very large
• Several different initialization of the weights to try
According to experience, the one minimum found for the concrete
application is an acceptable solution
SC
229SS18 Georg Frey
Problems of Backpropagation: Flat plateau
Flat plateau :
• At the very shallow surface, the error of the gradient is small and the
weights change according marginally .
• Especially many iteration step (high time for training)
• In extreme cases, do not fix the weights instead !
E
w
SC
230SS18 Georg Frey
Problems of Backpropagation: Oscillation
Oscillation
• In steep ravines (gorges), the procedure oscillate.
• At the edges of a steep ravine, the weight change cause from one
page to another is cracked, because the gradient is the same
amount but the reverse sign holds :
E
w
SC
231SS18 Georg Frey
Modification 0f Backpropagation
• There are many modifications to remedy the problems addressed.
All are based on heuristics: they cause in many cases, a rapid
acceleration of convergence .
• But there are cases where the adoption of heuristics is not present,
and a deterioration compared to the traditional procedure occurs
back propagation .
• Some popular modifications :
Momentum-Term (also conjugated Gradient relegation): The alleged problems
at the shallow plateaus and steep canyons. Idea: Increase the Learning rate to
shallow levels and reduction in the valleys. .
Weight Decay Large weights are neurobiological look implausible and cause
steep errors and rugged area. Error functions usually change at the same time
minimizing the weights (weight decay).
Quickprop Heuristic: A Valley of the fault surface (about a local minimum) may
be replaced by a top open parabolic approximate described. Idea: In a step
toward the vertex of the parabola (expected minimum of error function) jump .
SC
232SS18 Georg Frey
Summary and learning from the 8th Lecture
To know basic forms of learning in neural networks
Supervised
Unsupervised
To know the idea of learning without teachers based on the
concurrent learning
To know the idea of learning by minimizing errors (with "teacher")
Example Back propagation
To know Back propagation
Procedure
Possible Problems
9. Lecture
Neural Networks
Application in Automation
Engineering
Soft Control
(AT 3, RMA)
SC
234SS18 Georg Frey
Outline of the lecture
1. Introduction to Soft Control: definition and limitations, basics of
"smart" systems
2. Knowledge representation and knowledge processing (Symbolic AI)
Application: expert systems
3. Fuzzy systems: Dealing with fuzzy knowledge
Application: Fuzzy Control
4. Connective systems: Neural Networks
Application: Identification and neural control
1. Basics
2. Learning method
3. Application in Automation Engineering
5. Genetic algorithms: Stochastic Optimization
Application: Optimization
6. Summary & Literature
SC
235SS18 Georg Frey
Contents of 9th Lecture
• Modelling of Systems by NN
Preliminaries
Direct Model
Inverse Model
• Application
Control
“Virtual” Sensors
• Assessment of NN
• Comparison of NN und Fuzzy
• Possible combinations
• Application examples: Load forecasting
SC
236SS18 Georg Frey
Preliminaries
• Neural networks can model any non-linear relations among multiple
input and output variables of a system
• Pure feed-forward networks can only model static relationships
Solution 1: Recurrent Networks
- Training is difficult
Solution 2: External feedback i.e., processing of past values
+ Simple learning algorithm like backpropagation can be used
- The number of past values must be fixed
• Identification with past values: discrete model
SC
237SS18 Georg Frey
Generating the model of a process
• Objective:
Modeling of a process
Networks models the function yk = f(uk-1, yk-1)
For systems of higher order: yk = f(uk-1,uk-2,... ,yk-1,yk-2,...)
• Input:
Current and past values of the process input u
past values of the process output y
• Output:
Current process output yk
• Example
SC
238SS18 Georg Frey
Generating inverse process model
• Objective:
Modeling of inverse process model
Network models the function uk-1 = f(yk, yk-1) or uk-1 = f( yk ,yk-1,yk-2,... uk-2,uk-3,... )
• Inputs:
Current and past values of the process output y
Previous process inputs u
• output:
Current process input uk-1
• Example
SC
239SS18 Georg Frey
Application of the direct model
• Estimation of state variables which are not measurable online to use
in closed-loop controllers (virtual sensor, observers)
Controller Route
NN Model
w u ym
logical
interconnection
yNN
y
-
SC
240SS18 Georg Frey
Application of the inverse model (ideal)
• If the model is ideal it is possible to achieve open-loop control using
inverse model
But:
• Model is not ideal
• There are noises
Routeinverse NN Modellw u y
SC
241SS18 Georg Frey
Application of the inverse model (real)
• Use of a controller to remove the noises and to compensate for the
errors in the model
Routeinverse NN Modely
Lin. Controllerw u
-
SC
242SS18 Georg Frey
Summary of applications of NN in AT (Automation)
• Besides the "classical" tasks such as pattern recognition,
classification, etc. NN can also be used for performing core
functionalities of AT (Automation)
Observer or virtual Sensor
Closed-loop control (in combination with conventional control)
Combinations of the above are also possible
• In addition to the basic structures discussed, there could be many
other structures
SC
243SS18 Georg Frey
Evaluation of NN
• Neural networks can be trained on the basis of data
no modelling of the processes necessary
• Successful applications show the potential of the method
• Knowledge is encoded in the structure of the NN
A verification, interpretation of the calculated values is virtually
not possible (raises acceptance problems!)
• NN training is extensive
• Acquisition of "good" data can be problematic
• To fix the structural parameters, e.g.,
Number of hidden layers
Number of neurons in the hidden layers
Type of network
Type of activation functions
Learning parameters and criteria for stopping training
use of heuristics is preferable in most cases.
SC
244SS18 Georg Frey
Comparison NN vs. Fuzzy
- Often very long computing
times
- Convergence is not ensured
- Long computing
times during
training,
- Many competing
network structures
to choose from
- Extrapolation not
possible, i.e., good
results are achieved
only in the range of
training data
- Knowledge in the
network hardly
interpretable
- Difficult knowledge
acquisition phase
- Optimization phase
often slow
- Unusual way of
thinking
- Application to complex
processes very
cumbersome and
expensive
- Control specialists are
needed to write and
amend the algorithms
- There are scarce
standard tools for
implementing the
algorithms on standard
hardware (e.g., PLC)
+ Like NN but
+ Better interpretation of
knowledge,
+ Knowledge through learning
can gradually be
complemented
+ Adaptive and
adaptable to very
complex dynamic
processes,
+ Possible to retrain
when the process
undergoes changes
+ Simple and
comprehensive form of
algorithms,
+ Easily extensible rule-
base
+ Integration of
knowledge from more
than one source is
possible
+ In-depth process
understanding based on
process analysis
+ Generally the outcome
is very good and optimal
solutions can be
achieved
+ Stability proves are
possible
Neuro-FuzzyNeuronal NetworksFuzzy ControlClassic Method
SC
245SS18 Georg Frey
Approaches for the combination of NN and fuzzy
(A) Cooperative neuro-fuzzy systems: Fuzzy systems which can be trained by neural networks. A neural network connected serially with the fuzzy system can, for example, be used to learn the suitability of a rule in certain situations.
(B) Rule-based training of a simple neural network
(C) Hybrid Neuro-Fuzzy-systems: simple neural networks that uses "fuzzy neurons" (e.g., min-/max-Neurons) and "fuzzy weights". The structure of the fuzzy system can be recognized from the network topology.
(D) Neural networks that can be trained by fuzzy-learning method. The changes of the weights between the neurons is calculated by a fuzzy system at each step.
(E) topological configuration of a neural network, with more or less complex fuzzy systems as neurons.
(F) A mix of classic expert systems and one of the above approaches.
• Important approaches are A, B and C.
• Other approaches are not as widespread the previous ones.
SC
246SS18 Georg Frey
Cooperative neuro-fuzzy systems (2 approaches)
Fine-tuning a fuzzy controller by NN
• A fuzzy controller will be followed by a neural network
• The output of the fuzzy system will be immediately processed by the NN
• Thus based upon a basic knowledge (of the fuzzy system) a non-linear system can be built, which additionally renders adaptability to certain special situations which are not defined by the basic knowledge.
• Thus NN performs the "fine tuning" of output of the fuzzy system. The NN can learn which tuning is necessary for which input.
• The fuzzy system must not deliver defuzzyfied output this task can also be performed by the NN.
Preprocessing the input values of a fuzzy controller by NN
• fuzzy controller is preceded by a NN
• The output of the NN is fed to the fuzzy controller for processing.
• Thus, changes in the input data, which cannot be processed by the fuzzy system can be compensated by NN.
SC
247SS18 Georg Frey
Rule based training of NN
• NN can only be trained by numerical data
• Often a rough knowledge of the process is available in the form of
fuzzy rules
• Solution: mapping of linguistic rules (qualitative) to the training data
(quantitative)
The linguistic terms are mapped to values (according to the membership
functions)
The rules are then defined by the corresponding values
• During training NN interpolates among the values
• Example:
Three variables X1, X2 and Y with values of Small, Medium and Large within the
range of [0, 1] have to mapped to numeric values. It is given that small = 0;
resources = 0.5; Large = 1.
The rule IF X1=small AND X2 = large THEN Y = large
Results in the data set X = (0, 1); Y = 1
SC
248SS18 Georg Frey
Hybrid neuro-fuzzy systems
• Mapping of a fuzzy controller to a neural network
• Example:
1st Layer: input Fuzzy Sets
2nd Layer: evaluate the degree of fulfilment of the rules
3rd Layer: output fuzzy sets
4th Layer: De-fuzzyfication
• Other variants define the fuzzy sets in the weights
• Training with data
• Interpretation of the rules learned as weights (weights between
Layer 1 and 2 or 2 to 3)
SC
250SS18 Georg Frey
Example: Load forecast in electrical energy supply networks
• Motivation
• Last curve analysis
• Forecast with Artificial Neural Networks (ANN)
• Wavelet transformation
• Assessment of results
• Summary
SC
251SS18 Georg Frey
Motivation
Structure of an electric power supply network
Power PlantNetwork
(Low storing capacity)
Consumer
Logic
on/off
deterministic, knownnot deterministic,
only past behaviour known
PI PO
SC
252SS18 Georg Frey
Motivation
• Last curves forecast plays a major role in the operation of power
networks
Power is cost-effective
Electrical energy is difficult to save
• It should be possible to only produce as much electrical energy as
needed
PI=PO
• Therefore one needs to recorded consumption profiles based
Forecast
Under forecast leads to inadequate provision of spare capacity
Over forecast caused unnecessary spare capacity
SC
253SS18 Georg Frey
Last curve-Analysis
• Network load from 09.06.2003 to 29.06.2003 (individual than three weeks) in the control zone RWE's electricity transportation network
1. From Monday to Sunday, from 0 clock to 24 clock
2. Given are 15-minute averages
3. 4 * 24 = 96 test points per day, 96 * 7 = 672 measuring points per
week
MW
SC
254SS18 Georg Frey
Forecast with artificial neural networks (ANN)
• Forecast runoff
Last curve normalization
Forecast basic idea
KNN-Definition
• Structure, vector input, output vector, activation function
KNN training (with a whole week (this week 1))
• Back propagation-Algorithms
Learning rate
KNN-Application (with Week 2 oder 3)
Results Denormalization
KNN
Modell
( 1, 2,... 8)Lk k k- - - ( 4)L k
Fig 3 : Drei-Schichten-Feed-Forward-StrukturFig 2 : Einschicht-Neuron
SC
255SS18 Georg Frey
Forecast with artificial neural networks (ANN)
• Last curve-Normalization
SC
256SS18 Georg Frey
Forecast with artificial neural networks (ANN)
KNN
Modell
( 1, 2,... 8)Lk k k- - - ( 4)L k
Three layers feed forward structure
Monolayer neuron Forecast basic idea
1
2
......
8
L k
L k
L k
-
-
-
p 4a Lk
Last course (distribution) of
the last two hours
Last in an hour
SC
257SS18 Georg Frey
Forecast with artificial neural networks (ANN)
• Four-step forecast results
Training of KNN with Week 1
Target vector (SimT): Last curve Week 3
Output vector(Y): Forecast of Week 3
SC
258SS18 Georg Frey
Forecast with artificial neural networks (KNN)
• In many places, the relative error is greater than 10%
The accuracy must be improved
Idea: Installation of Wavelet transformation
Relativer Fehler
SC
259SS18 Georg Frey
Wavelet transformation
• Development of Wavelet transformation Fourier transformation
Transformation from Time- to Frequency Domain
Short-Time-Fourier transformation
Additional Information which Frequency in occurs which time frame
Continuous Wavelet transformation
Transformation of time in frequency and time domain
Discrete Wavelet transformation (DWT)
Realization in Computer
A Trous algorithm of Wavelet transformation
• Shift invariant
• Same in data length in different frequency domains
• suitable for real-time systems
f t Ff-
1 2
10
, ,...tt tt
t tt
ft Ff Ff
-
,f t Ff-
SC
260SS18 Georg Frey
Discrete Wavelet transformation (DWT) (implementation)
• Analysis of a signal
HP
TP
2
High pass filter
Low pass filter
Down sampling
f<fs/16fs/16<f<fs/8 f<fs/8fs/8<f<fs/4 f<fs/4fs/4<f<fs/2 f<fs/2Frequency response
N/8N/8N/4N/4N/2N/2NSampling points
a3d3a2d2a1d1x
SC
261SS18 Georg Frey
Discrete Wavelet transformation (DWT)
• Example
SC
262SS18 Georg Frey
Discrete Wavelet transformation (DWT)
• Synthesis of a signal
Upsampling
SC
263SS18 Georg Frey
Discrete wavelet transformation (DWT)
• Requirement of DWT in the analysis of real-time system
Localization time points in different scales
Shift invariance of the system
Move original
curve
Wavelet-
transformation
Wavelet-
Coefficient
Move
Coefficient
Wavelet-
transformation
Wavelet-
Coefficient
SC
264SS18 Georg Frey
Á-Trous algorithm of Wavelet transformation
d1
d2
d3
a3
• Properties of the A-Trous algorithm
Shift invariance
Same data length of all the different scales Wavelet coefficient
g[n] : Tiefpassfilter
h[n] : Hochpassfilter
SC
265SS18 Georg Frey
Wavelet transformation
• Example A-Trous algorithm
Week 1 load curve is split into 4 layers
a4: Approximations signal; d4, d3, d2, d1: detail signals
a4 has the largest amplitude and the lowest frequency
d1 is the smallest and the largest amplitude frequency
SC
266SS18 Georg Frey
Forecast: ANN + A Trous
• Forecast runoff with KNN and A-Trous
For each split signal, a ANN model
The more layers, the higher the accuracy of the load curve synthesis
d1 is the prognosis regarded as noise and neglected.
Recorded
load curves
a4
d4
d3
d2
d1
netA4
netD4
netD3
netD2
netD1
Predicted
Last curve
Wavelet
Re-
transformation
Ã-Trous
Wavelet
SC
267SS18 Georg Frey
Forecast: ANN + A Trous
• Four-step forecast results
Training with Week1
Target vector(SimT): Last curve Week3
Output vector(Y): Forecast of Week3
SC
268SS18 Georg Frey
Forecast: ANN + A Trous
• At the most points the relative error less than 2%
• The error is never greater than 6%
In comparison to ANN without A-Trous, the accuracy improved significantly
Relativer Fehler
SC
269SS18 Georg Frey
Summary and learning from the 9th Lecture
Know basic applications of NN in AT
Model shapes in the identification and their target
directly
Inverse
Neural networks with other approaches to (especially fuzzy) compare
Deduce reasons for neuro-fuzzy
Know possible ways of combining NN with fuzzy and can explain the basic idea
Use of neural networks has been shown to predict
Neural networks applied to isolated not bring satisfactory results in the load curve forecasting
In combination with wavelet transform results could be significantly improved
10. Lecture
Stochastic Optimization
Genetic Algorithms
Soft Control
(AT 3, RMA)
SC
271SS18 Georg Frey
10. Structure of the lecture
1. Soft control: the definition and limitations, basics of “expert"
systems
2. Knowledge representation and knowledge processing (Symbolic AI)
application: expert systems
3. Fuzzy Systems: Dealing with Fuzzy knowledge application: Fuzzy
Control
4. Connective systems: neural networks application: Identification and
neural controller
5. Genetic Algorithms: Stochastic Optimization
Genetic Algorithms
Simulated Annealing
Differential Evolution
Application: Optimization
6. Summary and Literarture reference
SC
272SS18 Georg Frey
Contents of 10th Lecture
• Classification in the lecture
Conjunction with the other methods
Overview of Evolutionary Algorithms
• The basic idea of genetic algorithms
Idea
Properties
• Genetic algorithms in detail
Development
Elements
Sample
• Applications in automation technology
• Genetic Programming
• Summary
SC
273SS18 Georg Frey
Classification in the lecture
Looking at the considered systems in the past lectures we can say
that we have had intelligent top-down views :
• Expert systems
(abstract mathematical thinking)
are a further development of
• Fuzzy-Systems
(„natural“ Fuzzy-Close)
This could only be developed on the basis
of the neural structure of the brain
• Neural Networks
(Learning and adaptation)
Originated from the course of evolution
of simpler structures
• Genetic Algorithms
(„survival of the fittest“)
Te
ch
nic
al D
eve
lop
me
nt
an
d p
roc
ed
ure
s in
the
lec
ture
Na
tura
l d
eve
lop
me
nt
SC
274SS18 Georg Frey
Overview of evolutionary algorithms
Genetische Programmierung Genetische Algorithmen Evolutionsstrategien
Evolutionäre Algorithmen
Typical features of the different algorithms:
Representation of
individuals
Operators used
Size of
individuals
Selection
Mechanism
Genetic Algorithms Bit-String Recombination*, Mutation
Constant Probabilistic
Genetic Programming
Syntax trees Recombination*, Mutation
Variable Probabilistic
Evolutions strategies
Floating point vector Mutation*, Recombination
Constant Deterministic
Operators marked with an * play the biggest role
SC
275SS18 Georg Frey
The basic idea of Genetic algorithms
• Genetic algorithms are numerical optimization algorithms on the basis
of two concepts of nature :
Genetic
Natural selection
• Initial ideas in 1950, a breakthrough in the 1960s with John Holland
• Basic concepts of GA
There are a large number population of possible solutions to a problem
There is a method to determine how well or bad a solution is
There is a recombination method, the elements of the good solutions connects to
generate new or better solutions
There is a mutation operator, to prevent the permanent loss of diversity within the
solutions
SC
276SS18 Georg Frey
Properties of GA
• Analogous to the evolution theory in biology
• Evolution is a successful, robust method for adaptation of biological
systems
• GA can search premises of hypotheses
The complex, interacting elements
where the influence of each part on the overall hypothesis is unclear
• GA can be easily parallelized
• GA are not deterministic
• GA does not optimize a single individual, but always a whole
population. It is possible to find several local optima and finish with the
selection of global optimum
SC
277SS18 Georg Frey
Cycle of GA
1. Define the coding
2. Defining a fitness function
3. Initialization of a population
4. Calculation of fitness for the population
5. Selection of elements for the recombination
6. Recombination
7. Mutation
8. Composition of the new generation of
1. The Offspring
2. Elements of the parent generation(not always Elitism)
9. Next up-to 4 to a termination criterion is reached
SC
278SS18 Georg Frey
Coding
• Most will use a binary encoding
• Bit strings are easy to manipulate (simple implementation of the genetic
operators)
• If there are problems in several variables, the bit strings hanged
together
• One speaks in analogy to the biology of genotype and phenotype
SC
279SS18 Georg Frey
Fitness function
• Describes the goodness of a solution
• Fitness function should differ well between individuals, otherwise the
only possibility of the search more or less randomly and converges to
bad genetic algorithm
• It would be desirable fitness function that individuals with significantly
similar characteristics also have similar fitness levels
• Should be easy to calculate, since they very often applied
SC
280SS18 Georg Frey
Tournament-Selection
Random choice of 2 (or more)
individuals, with predefined
takeover of better likely
Ranking-Selection
Selection on the basis of
seniority (the fitness value)
within the population
Monte-Carlo
(Roulette-Wheel-Selection)
Each individual will be
allocated sector of
Roulettrads proportional to
fitness
Selection methods
Selection
SC
281SS18 Georg Frey
Roulette-Wheel-Selection
• Build the sum of the individuals of all fitness levels Fsum
• Generate a random number R between 0 and Fsum
• Add the fitness values of individuals one by one until the sum exceeds
the value of R
• Select the most recently added individual
SC
282SS18 Georg Frey
Rank based Selection
• N individuals in the population will be sorted in accordance with their
fitness levels
• The best individual receives N Score, the next N-1, the worst 1 rating
point
• With those rating points instead of the actual fitness will be assessed in
accordance with the roulette wheel selection procedures
• Advantage in comparison to the roulette-wheel selection:
Strong preference for less capable individuals
Weaker deprivation of the most vulnerable individuals
• Simplified procedures: it is randomly chosen from individuals with a
high rank (fixed number) selected
Only the best x% allowed to participate in the recombination
SC
283SS18 Georg Frey
Example for comparison
1. 0.463469 6. 0.663489
2. 0.319661 7. 0.843871
3. 0.359034 8. 0.109689
4. 0.400036 9. 0.328695
5. 0.461150 10. 0.536460
1000-mal
Roulette-Wheel-Selection
1000-mal Rank based
Seletion
SC
284SS18 Georg Frey
Recombination or crossover
• From two previously selected individuals (parents) are two new
crossover individuals generated (descendants)
• It is coincidentally a certain position on the selected bit string
• At this point, the strings cut and the ends are swapped
• Variations with several crossover points are possible
SC
285SS18 Georg Frey
Mutation
• From the newly formed individuals; candidates with a low probability
are selected for mutations
• Mutation: There will be a randomly chosen bit inverted
• Caution: depending on the chosen coding different mutation has high
influence
• Take into consideration that variations are possible in the selection of
bits to be mutated
SC
286SS18 Georg Frey
Composition of the New Generation
• Basically you can specify whether a certain percentage of parents'
generation takes over to the next generation
• Often it renounces : the detriment that can happen is that the maximum
fitness in the new generation is lower
• Possible methods: Elitism
• A fixed proportion of the new generation consists of the best
representatives of parents' generation, the rest being regenerated
(selection, crossover, mutation)
• Another way: After the recombination the offspring are selected not
automatically but the best individuals are selected
SC
287SS18 Georg Frey
Applications in automation technology
• Optimization of controller parameters
• Optimization of parameters in models (approximation of curves)
• Optimization of controller structures (encoding is difficult Genetic
Programming)
• Optimization of many parameters in a fuzzy controller
Rules
Membership functions
• Optimization of many parameters in a neural network
Weights
Structure
SC
288SS18 Georg Frey
Genetic Programming
• Special case of a genetic algorithm
• Instead of bit strings the individuals are represented by trees
• The trees are syntax trees and provide programs which
+
x +2
x y
^si
n*8
x x
+
Represents the function:
yxxyxf 2 sin),(
Represents the function:
8 )( 2 xxf
SC
289SS18 Georg Frey
Genetic Programming
Mutation:
+8
x x
+
*8
x x
+
8 2 )( xxf8 )( 2 xxf
becomes
becomes
SC
290SS18 Georg Frey
Genetic Programming
Recombination:
+
x x2
^si
n
+8
x x
+
8
+
x2
^
+
x
si
n+
x x
E1: E2:
K1: K2:
SC
291SS18 Georg Frey
Genetic Programming with Block diagrarms
Recombination
Mutation
SC
292SS18 Georg Frey
Summary and learning from the 10th Lecture
Basic idea of GA
Comparison of GA‘s with other optimization methods
Individual elements of the GA and know their significance and may
illustrate exemplary:
Selection
Crossing
Mutation
Possible applications relating to automation technology
Relation to Neuro-fuzzy
Approach of genetic programming
11. Lecture
Stochastic Optimization
Simulated Annealing
Soft Control
(AT 3, RMA)
SC
294SS18 Georg Frey
11. Structure of the lecture
1. Soft control: the definition and limitations, basics of “expert"
systems
2. Knowledge representation and knowledge processing (Symbolic AI)
application: expert systems
3. Fuzzy Systems: Dealing with Fuzzy knowledge application: Fuzzy
Control
4. Connective systems: neural networks application: Identification and
neural controller
5. Genetic Algorithms: Stochastic Optimization
Genetic Algorithms
Simulated Annealing
Differential Evolution
Application: Optimization
6. Summary and Literarture reference
SC
295SS18 Georg Frey
• Simulated Annealing
Annealing: heating and subsequent slow cooling
Method inspired from the physics-
Model is the cooling process in crystal structures
Heat a substance with a lattice structure (e.g. silicon)
Observed effect
• It cools the substance particularly fast ( "quenching"), the result is very
uneven (impure) grid structure
• Leaving aside the substance to cool slowly, however, the result is
cooling at the end of a particularly uniform lattice structure
Simulated Annealing: Introduction 1/2
Heated substance
Lattice structure by quenching
Lattice structure by annealing
SC
296SS18 Georg Frey
Simulated Annealing: Introduction 2/2
• Explanation
Generally aspire body in the nature of a state with as low energy as
possible
The Chilling (cooling) corresponds to the quest for a lattice structure
with this property natural optimization methods
The warmer the body, the more agile the particles of the lattice structure
existing (not optimal) grid structures can be dissolved
The colder the body becomes, the more immovable, the particle in fixed
grids and forms grid structure
Worth noting: In the transition from a sub-optimal lattice structure to an
optimal grid structure often an intermediate state is still needed that is
more "sub-optimal" than the initial state
“bad" grid “Very bad" grid “Good” grid
SC
297SS18 Georg Frey
• Local optimization methods
Procedure to search local extrema within specific environment
Most popular example: gradient descent methods
• Find the minimum of a function at a given starting point
Problem: To view the global minimal need to find out from the starting
point iA local minima will be passed
Temporarily (but not permanently) must be worse than an
improved solution is acceptable
Simulated annealing: disadvantages of local optimization methods
Start point
0
1 23
End point of Search
Local Minimum
global Minimum
SC
298SS18 Georg Frey
• Simulated annealing allows overcoming local minima
• Basic algorithm
1. Assume an initial solution (Current solution to begin optimization)
Centre of local search area
2. Choose a candidate solution within a radius of the center (of local search)
3. Decision whether the candidate solution will be the new solution
4. If the candidate solution is accepted as the new solution, center moves into the
centre of new solution (adjustment of the local search)
5. Continue from 2 to termination criterion
Simulated annealing: Local Search with varying Search radius 1 / 2
SC
299SS18 Georg Frey
• Illustration
2-Dimensional search
Simulated annealing: Local Search with varying Search radius 1 / 2
global Search area
01
2 3
4
56
7
8
910
11
X1
X2
local Search area
History of Güte
This simplification ,
Goodness is only
Depending on X2
SC
300SS18 Georg Frey
• Metropolis-Algorithm (1953, Metropolis et al.)
Algorithm for choosing a test solution within the local search and to
determine whether a worse solution will be used as new center is called
Metropolis algorithm
Original purpose: creating a Boltzmann distribution
• Choosing a test solution
y: test solution
x: Center of the local search
: Radius of the local search
For practical choice of y ,a probability distribution is used
• Frequently used: Gaussian distribution
• Test of preferred solutions in the
Near the center
Selection of the test solution by chance
Simulated annealing: Stochastic elements of simulated annealing 1 / 2
}{ xy
x
x1 x2
SC
301SS18 Georg Frey
• Takeover of the tested solution
Determination of Energy (goodness) of the Center : E(x)
Determination of Energy (goodness) of the test solution: E(y)
Comparisons E (x) with E (y)
Is E (y) <E (x) y is the new center: x:=y
Otherwise investigate the energy difference ∆E=E(y)-E(x)
• The new (inferior) solution is assumed with exponential probability
distribution
• ∆E: Good difference (abstract energy difference)
• T: (abstract) Temperature
Simulated annealing: Stochastic elements of simulated annealing 2 / 2
TEeTEp /),( -
p(∆E)
∆E
1
p(T)
T
1
The lower the energy
difference and the higher
the temperature, the more
likely the adoption of a
worse solution
SC
302SS18 Georg Frey
• Interpretation of energy
For minimization problem, energy should be minimized
For maximization problem, energy should be maximized
• Transforming the problem into a minimization problem needed
• e.g. by inversion (1 / E), or by multiplying by -1 (-E)
• Note: 1/E is nonlinear
The energy is a metaphor for a good functionality
• Interpretation der Temperatur
High temperature high probability of acceptance
Low temperature low probability of acceptance
Temperature is a measure of likely acceptance
Description of heating followed by cooling
• Heat: initial temperature
• Cooling: lowering the temperature (e.g. exponential Cooling)
With decreasing temperature the likelihood of accepting worse solution
decreases
Simulated annealing: interpretation of energy and temperature
SC
303SS18 Georg Frey
1. Assume an Initial solution (solution at the beginning of the optimization)
2. Choose within a candidates solution from the radius of the center (local
search)
• For example, by Gauss distribution
3. Decision whether the candidate solution will be the new solution
• Calculating E(y) E should be easy to calculate
• Better solution in any is accepted
• Worse solution is likely to be accepted
4. Provision of the new center and cooling
• Shift of the center (or not)
• Cooling: T=α*T, α є [0,1), cooling coefficient
5. Continue from 2 to termination criterion
Simulated annealing: simulated annealing algorithm optimization
TEeTEp /),( -
SC
304SS18 Georg Frey
• Combined global and local search
Instead the extremum search takes place in a local search
But the center of the search moves
Local Search in the global search area
• Independence from initial solution
Initial solution must be given
Initial temperature is high enough, to leave a local extremum easily
With temperature decreases, however, then the probability for leaving a local
extremum drops
At the beginning of the optimization search of a maximum in local search
area
At the end of the optimization search of the minimum in the local search
area
• Hybrid optimization methods
Bit coding of the solution Discrete Optimization
Floating-Coding Solution continuous optimization
Simulated Annealing: Properties
SC
305SS18 Georg Frey
• Example of a typical search course
2-Dimensionaler Solution space (x1,x2)
Several local minima
Simulated Annealing: Typical search course
global search
X1
X2
Initial solution
Search for local minimum
Searching for minimum within a global environment
SC
306SS18 Georg Frey
• Traveling Salesman Problem
One of the hardest known discrete optimization problems
It belongs to the class of complete-NP problems
• Calculating expense increases with increasing size of the problem in more
than polynomials
OTSP> O(nk)
• SYMPTOMS
A traveller wants to be on round trip to different cties and offer his
products there
Start and end point are determined
Each city will be visited exactly once
The distance should be minimal (optimization problem)
• Solution with simulated annealing
Coding solution as a list of cities
Energy Total distance traveled (to be minimized)
Simulated Annealing: Application example 1/5
SC
307SS18 Georg Frey
• Global search
All possible routes with which all cities can be visited
Exact size of the search area:
Solutions
• 10 Cities: 181440 solutions
• 20 Cities: 60822550204416000 Solutions ≈ 6*1016 Solutions
Already in 20 cities, you can not search on all solutions, solutions at 106 per
second one expects more than 1902 years to guarantee the optimal solution
• Determining a candidate solution
Output solutions : 1,2,3,..,i,i+1,…,j-1,j,…,n
Copy output solution, Cut Segment i,…,j from a copy
Invert the Segment: i,i+1,…,j-1,j j,j-1,…,i+1,i
Initializing an inverted segment insead of original will provide derivatiopn
source
i, j be randomly determined (e.g. with normal distribution), where the chain
is understood as a ring, so the mean of the normal distribution can also be
moved
Simulated Annealing: Application example 2/5
2/)!1( -n
SC
308SS18 Georg Frey
• Example: Determination of the solution candidates (continued)
Initialize solution as a list of cities: 1,2,3,..,i,i+1,…,j-1,j,…,n
Simulated Annealing: Application example 3/5
1
…
2
i
i+1
…
j-1j
…
n
1
…
2
i
i+1
…
j-1j
…
n
Representation as ring
SC
309SS18 Georg Frey
• Demo Applet for TSP-Problem von TU Clausthal
http://www.math.tu-clausthal.de/Arbeitsgruppen/Stochastische-Optimierung/
• Example TSP
Problem
• 50 Cities
• Intial solution: E=11603
Parameter
• T0= 10
• α = 0,999
Number of solutions
• 3*1062
For comparison
• Sun consists of approx. 1057 Atoms (sourse: http://fma2.math.uni-
magdeburg.de/~bessen/krypto/krypto8.htm)
Simulated Annealing: Application example 4/5
SC
310SS18 Georg Frey
• Solution found within 60 seconds of CPU time
E = 2361
36188 Solution candidates were scanned
Optimal solution: Unknown!
Simulated Annealing: Application example 5/5
SC
311SS18 Georg Frey
• Simulated Annealing
Stochastic optimization methods
Global Optimization
• No guarantee of optimization
Practically is not guaranteed that the global optimum is found
I.A. However, in finite time quasi-optimal solutions
Through a formal evidence has shown that with infinite computing the global
optimum is found (almost irrelevant)
Even at low temperature and infinitely large good difference the probability
to change the local minimum is never 0
• Practicalities
The algorithm is very simple fast processing
Even easy to implement with scripting languages ideal for testing
whether the algorithm for a problem is applicable
Simulated Annealing: Assessment 1/2
SC
312SS18 Georg Frey
• Many variants
Determination of the solution candidates (probability distribution)
Remember the best solution (a kind of elitism)
Periodic partial Improve the temperature
Opportunity to leave a local extremum
• Successful application to many problems in practice
Travelling Salesman Problem
Controller-parameter optimization
• Coding for every problem must be re-elected
In the case of inappropriate coding the optimization methods is collapsed
In the coding of the user's knowledge (heuristics)
Simulated Annealing: Assessment 2/2
t
T
T0
T
t
T0
SC
313SS18 Georg Frey
Summary and learning from the 11th Lecture
The basic idea of simulated annealing
Model in physics
Problems of local optimization methods
Describe why simulated annealing can stochastically
Select of the solution candidates
Decide over assumed solution
Metropolis-Algorithm
Travelling Salesman-Problem
Describe
Complexity
Solution with simulated annealing
12. Lecture
Stochastic Optimization
Differential Evolution
Soft Control
(AT 3, RMA)
SC
315SS18 Georg Frey
12. Structure of the lecture
1. Soft control: the definition and limitations, basics of “expert"
systems
2. Knowledge representation and knowledge processing (Symbolic AI)
application: expert systems
3. Fuzzy Systems: Dealing with Fuzzy knowledge application: Fuzzy
Control
4. Connective systems: neural networks application: Identification and
neural controller
5. Genetic Algorithms: Stochastic Optimization
Genetic Algorithms
Simulated Annealing
Differential Evolution
Application: Optimization
6. Summary and Literarture reference
SC
316SS18 Georg Frey
• Differential Evolution (DE), as well as genetic algorithms, belong to the
population-based optimization methods
• DE has no natural model
• DE was founded and presented in 1996 by PricewaterhouseCoopers
and Storn
R. Storn, R. and K. Price, K. Differential Evolution - A Simple and Efficient
Heuristic for Global Optimization over Continuous Spaces, Journal of
Global Optimization, 11, (1997) pp. 341–359.
• Procedures can be applied directly on minimum and maximum applied
problems (see GA only Maximum-Problems)
• Scope
Optimization in multi search areas with floating
e.g. Controller design
Differential Evolution: Introduction
SC
317SS18 Georg Frey
• DE is used to search for a optimum in a multi-dimensional continuous
search space
A solution (x, optimum potential) is represented by a vector with the
dimension (D) of the search description
The elements of the vector are floating point numbers:
• The search comes with several solutions (vectors, individuals)
simultaneously searches (population-based)
The quantity of solutions called population (p), with N individuals
• The kindness of a solution is a function described
: The goodness of a solution is a function described
Differential Evolution: Basic idea
Dx
x
x
x2
1
ix
DiN xxxxp ,,,, 21
Dxf :)(
SC
318SS18 Georg Frey
• Initialising
create Initial Population (such as random solutions)
• Mutation
produce a new random solution by modifying an existing solution of the old
generation
• Recombination
Combine two solutions to a new solution
• Selection
Solution for identifying new generation
Differential Evolution: Basic algorithm 1/2
Initialisingg Mutation Recombination Selection
SC
319SS18 Georg Frey
Differential Evolution: Basic algorithm 2/2
4 Vectors of old
Generation
Mutation
Recombination
1 Donator-Vector (v)
Selection
3 Vectors (randomly chosen, xr1,xr2,xr3)
1 Vektor (x)
1 Test vector (u)
New Generation
New Vector (x+)
Each vector of
the old
generation is
exactly once this
vector
SC
320SS18 Georg Frey
• Each vector X of the old generation provides additional three vectors from
the old generation(xr1,xr2,xr3), that holds: x≠xr1≠xr2≠xr3
• Give the donor vector (v) as a linear combination of xr1,xr2,xr3
• Colorful interpretation
Create a new solution based on xr1 from the difference of xr2 and xr3
Enhances heterogeneity of the solutions
• v x, and together are the parents pair for recombination
Differential Evolution: Mutation
xr1xr2
xr3
xr2-xr3
F*(xr2-xr3)
v
2,0),(* 321 - FxxFxv rrr
SC
321SS18 Georg Frey
• Create a test vector (u) by mixing the elements of x and v
• The mixture of the element of x and v is randomly controlled
x,v,u sind Vectors of Dimension D
CR is the Cross-Over Rate:
y is a random number:
ri is a real random number:
• x and u are competitors in the selection
Differential Evolution: Recombination
DDD u
u
u
v
v
v
x
x
x
2
1
2
1
2
1
,,
1,0CR
Dj ,1
1,0ir
sonst,
oderfalls,
i
ii
ix
j iCR rvu
j sorgt dafür, dass
sich x und u in
mindestens einem
Element
unterscheiden
CR ist ein Parameter des
Optimierungsverfahrens
SC
322SS18 Georg Frey
• Choose one of the two vectors x, u for the new generation
• Selections are made solely on the basis of goodness (fitness) of an
individual (Vector)
Only the better of the two individuals is included in the new generation over
No dependence of random variables in the selection
f: to optimize Goodness function (fitness function)
By the same goodness through mutation and recombination results individual in the
new generation
Enhances heterogeneity across generations
• Selection in DE has implicit elitism
Only better or equally good individuals form the new generation
Differential Evolution: Selection
sonst ,
falls ,
x
f(x)f(u)ux
sonst ,
falls ,
x
f(x)f(u)ux
Minimization Maximization
SC
323SS18 Georg Frey
• Ackleys Function
2-dimensonale continuous function with several local minima and a global
minimum for (0.0)
Optimization problem: Minimize f (x1, x2)
Differential Evolution: Application example
))**2cos()**2*(cos(5.0)*(5.0*2,0
2121
22
21*2020),(
xxxxeeexxf
---
SC
324SS18 Georg Frey
• Parameter for Optimization
20 Individuals
CR: 50%
F: 0,8
• Initial population
Differential Evolution: Application example (Initializing)
Minimum: 4,355
SC
325SS18 Georg Frey
Differential Evolution: Application (1 new generation)
Minimum: 4,355
SC
326SS18 Georg Frey
Differential Evolution: Application (2nd new generation)
Minimum: 4,355
SC
327SS18 Georg Frey
Differential Evolution: Application (3rd new generation)
Minimum: 3,866
SC
328SS18 Georg Frey
Differential Evolution: Application (4. new generation)
Minimum: 1,664
SC
329SS18 Georg Frey
Differential Evolution: Application (5. new generation)
Minimum: 1,664
SC
330SS18 Georg Frey
Differential Evolution: Application (15. new generation)
Minimum: 0,348
SC
331SS18 Georg Frey
Differential Evolution: Application (50. new generation)
Minimum: 0,001
SC
332SS18 Georg Frey
Differential Evolution: Application (50. new generation)
Minimum: 0,001
SC
333SS18 Georg Frey
Summary and learning from the 12th Lecture
• Genetic Algorithms and Genetic Programming
Optimization through mutation and selection on the model of evolution in
biological systems
Parallel browsing for the search areas
Well suited for new computer structures with multi-core processors
When floats cost high for encoding the solution
• Simulated Annealing
Optimization methods inspired by the emergence of lattice structures in crystals
Only one solution is to use scanning
No speed advantage through multi-core processors
Feature: temporary deterioration is understood as an improvement
• Differential Evolution
Artificial population-based optimization methods
Well suited for new computer structures with multi-core processors
Procedures for the optimization of floating point numbers
SC
334SS18 Georg Frey
Literature (additional / continuing) 1/2
Chapter 1 or entire lecture: General information on methods of AI Götz, Güntzer (Hrsg.): Handbuch der künstlichen Intelligenz. Oldenbourg Verlag, 2000.
"Umfassendes Nachschlagewerk für Interessierte.„
King R.E.: Computational Intelligence in Control Engineering. Marcel Dekker, 1999
"Sehr schöne Übersicht zu Soft-Control.„
Chapter 2: Expert Systems Polke, M.: Prozeßleittechnik. Oldenbourg Verlag, 1994.
"Einige Ideen für die Anwendung in der Leittechnik in Kapitel 13.„
Ahrens, W.; Scheurlen, H.-J.; Spohr, G.-U.: Informationsorientierte Leittechnik. Oldenbourg Verlag,
1997.
"Einführung in XPS für leittechnische Aufgaben (und etwas Fuzzy) in Kapitel 9.„
Lunze, J.: Künstliche Intelligenz für Ingenieure I und II. Oldenbourg Verlag, 1994/1995.
"Sehr Ausführliche Behandlung von XPS.„
SC
335SS18 Georg Frey
Literature (additional / continuing) 2/2
Chapter 3: Fuzzy Kiendl, H.: Fuzzy Control methodenorientiert. Oldenbourg Verlag, 1997.
"Ausführliche Darstellung mit kurzer Einführung in die Regelungstechnik und sehr sehr
ausführlichem Beispiel.„
Chapter 4: Neuro Zakharian, S.; Ladewiw-Riebler, P.; Thoer, S.: Neuronale Netze für Ingenieure. Vieweg Verlag,
1998.
"Kompakte und gut verständliche Darstellung mir Anwendungen in der Regelungstechnik."
Chapter 5: Genetic Algorithms Goley, D.A.: An Introduction to Genetic Algorithms for Scientists and Engineers. World Scientific
Publishing, 1999.
"Sehr ausfürliche Darstellung."
Fleming, P.J.; Purshouse, R.C.: Genetic algorithms in control systems engineering. IFAC
PROFESSIONAL BRIEF.
"Sehr gute Übersicht.„
SC
336SS18 Georg Frey
Acknowledgements
Thank you for your interest during the semester