SlideShare a Scribd company logo
EEE-8005 Industrial automation SDL
Module leader: Dr. Damian Giaouris
Email: Damian.Giaouris@ncl.ac.uk
Room: E3.16
Phone: 0191 222 -7327
Module Leader of: Digital Control (EEE 8007)
Degree Program Director of MSc: Automation and Control
Scopes / Objectives
Lecture Scope:
• To give a mathematical background on set theory
Lecture Outcomes:
• Syllabus outline
• Explain the SDL part of the course
• Boolean set theory – definition, intersection, union…
• Need for fuzzy logic
• Fuzzy logic set theory – membership functions: form, domain,
image
• Logical operators OR AND Min Max…
• Linguistic variables
Module Structure
Student Directed Learning
Student Directed Learning
Some lectures => Trigger further individual
individual study
Normal Lectures: 2hs/week
1h session/week: SDL
Provisional syllabus
Artificial Intelligence
Fuzzy Logic
Theory Matlab
Neural Networks
Genetic algorithms
Provisional syllabus
Week 1: Intro – Basic set theory
Week 2: Design of fuzzy logic controllers
Week 3: Design of fuzzy logic controllers II
Week 4: TS Fuzzy Logic
Weeks 5 - 7: Matlab programming
Week 8: ANN – Matlab
Week 9: ANN – Matlab II
Week 10: Genetic Algorithms
Week 11: Revision
Week 12: ???
Control strategy
Conventional
control Model of the actual plant
Deterministic Stochastic
Inaccurate
Complex methods
Human reasoning and experience
Complicated processes
Controlled by experienced
practical engineers
Have no idea
about the model
Use their knowledge &
experience
Human reasoning
No model needed
Satisfactory performance
Artificial Intelligence
Artificial Intelligence
•Expert Systems (ES)
•Fuzzy Logic (FL)
•Artificial Neural Networks (ANN)
•Genetic Algorithms (GAs)
•A combination of all these
Set theory I
Shape A Shape B Shape C Shape D
Shape E Shape F Shape G Shape H
 
H
Shape
F,
Shape
D,
Shape
C,
Shape

A
 
G
Shape
E,
Shape
B,
Shape
A,
Shape

B
 
H
Shape
G,
Shape
F,
Shape
E,
Shape
D,
Shape
C,
Shape
B,
Shape
A,
Shape

C
Set theory II
 
H
Shape
F,
Shape
D,
Shape
C,
Shape

A
 
G
Shape
E,
Shape
B,
Shape
A,
Shape

B
 
H
Shape
G,
Shape
F,
Shape
E,
Shape
D,
Shape
C,
Shape
B,
Shape
A,
Shape

C
Subset: A set that has some elements from another set
 
G
Shape
B,
Shape
A,
Shape

D B
D 
Union: A set that has all the elements of two other sets
 
G
Shape
B,
Shape
A,
Shape
H,
Shape
F,
Shape
D,
Shape
C,
Shape

 A
D
D
A
A
D 


Intersection: A set that has all the common elements of two other sets
 
G
Shape

 E
B  
H
Shape
G,
Shape

E
where
B
E
E
B 


Boolean Logic
 
es
Temperatur
A   
Hot
es
Temperatur
B
A
B 
 ,
 
25

 es
Temperatur
es
Temperatur
B
25 Temperature
Membership
Function
 100%
0%
Boolean and Fuzzy Logic (FL)
Temperature=24.99 ??? Not so Hot
Not so Hot
Temperature=25 100 %
Temperature=24 90 %
Temperature=15 0 %
Element Membership function, I.e.
How much an element
belongs to a set
 
Hot
Much
How
es
Temperatur
C ,

Fuzzy Logic
25 Temperature
Membership
Function

15
100%
0%
25 Temperature
Membership
Function
 100%
0%
Fuzzy Sets I
Triangular
Trapezoidal
Fuzzy Sets II
Gaussian
Sigmoidal
Polynomial
Fuzzy Sets III
Logical Operators
 
6
4,
2,
1,

A
1 2 3 4 5 6
Set A
Union
•For element 1: Is 1 a member of set A OR set B
Intersection
•For element 1: Is 1 a member of set A AND set B
 
6
5,
2,3,

B
1 2 3 4 5 6
Set B
Logical Operators Discrete Sets
 
6
3,4,5,
2,
1,

 B
A
1 2 3 4 5 6
Union
A B AND OR
1 0 0 1
0 1 0 1
1 1 1 1
0 0 0 0
 
6
2,

 B
A
1 2 3 4 5 6
Intersection
Logical Operators Continuous Sets
 
25

 es
Temperatur
es
Temperatur
A
 
30

 e
Temperatur
e
Temperatur
Inter
 
25

 e
temperatur
e
temperatur
Union
25 Temperature
30 25 Temperature
30
 
0
3

 es
Temperatur
es
Temperatur
B
Fuzzy sets & Logical Operators I
OR=MAX
AND=MIN
A B Min(A, B)
and
Max(A, B)
or
1 0 0 1
0 1 0 1
1 1 1 1
0 0 0 0
Fuzzy sets & Logical Operators II
Example – Matlab Exercise
Two fuzzy sets have the following membership functions
 
   
   




















35
,
30
,
7
5
1
30
,
25
,
5
5
1
35
25
,
0
x
x
x
x
x
x
x
or
x
x
A


  
   
   




















40
,
35
,
8
5
1
35
,
30
,
6
5
1
40
30
,
0
x
x
x
x
x
x
x
or
x
x
B



Plot the two sets
Find the union and the intersection of them,
and explain the results through the min, max operator
Linguistic variables
The room is cold lets switch on the heater
Not The temperature is 17.5 degrees
)
(x

es
Temperatur
1
15
10 20
cold
Lecture 1
Lecture scope
Lecture Scope:
• To define advanced concepts on FL set theory
• Connection between classical and FS theory
Lecture Outcomes:
• Notation
• Definitions like support, height…
• Union, intersection, max and min
• Negation, bounded sums
• Cartesian products on crisp and FS
• Extension principle
• Fuzziness
Lecture Outcomes
Lecture Scope:
• Basic steps in the design of a Fuzzy Logic Controller
Lecture Outcomes:
• Basic Control strategy
• Fuzzification
• Fuzzy Inference System
• Multiple Inputs – And/Or operators
• Overlapping Fuzzy Sets
• Defuzzyfication
Design of a FLC - Basic Concept
FL mimics Human Reasoning:
If … Then…
IF THEN RULES
R1: If the room is very cold then switch on the heater to full
R2: If the room is cold then switch on the heater to medium
R3: If the room is normal then switch off the heater
If part: premise - Then part: conclusion
Design of a FLC - Fuzzification I
)
(x

Temperatures
1
15
10 20
Very
Cold
Cold Warm Hot
1. Cover I/O the universe of discourse with FS
2. Assign to every real input a membership function at each set
This process is called Fuzzyfication
Design of a FLC - Fuzzification II
)
(x

Temperatures
1
15
10 20
Very
Cold
Cold Warm Hot
11
0.7
0.5
With this way every real input is mapped to a fuzzy set
The value of the membership function that will be assigned depends
on the shape of the membership function
Design of a FLC – If… Then…
1. If … Then … Rules
2. Input Fuzzy Sets (Fuzzification)
3. Output Fuzzy Sets
Associate
If Then Rules
Input
Linguistic
Variable
Output
Linguistic
Variable
If … Then … Rules associate the input fuzzy sets to the output fuzzy sets
If … Then … Rules associate the input fuzzy sets to the output fuzzy sets
Design of a FLC – If… Then…
)
(x

e
Temperatur
0
Very Cold Cold Normal
35 100
50 80
)
(x

%
Heater
0
Max
Med
Off
35 100
50 80
R1: If temp is Very Cold Then Heater is Max
R2: If temp is Cold Then Heater is Med
R3: If temp is Normal Then Heater is Off
Design of a FLC - Degree of Support Boolean sets
Assume an IF THEN rule with Boolean sets:
R1: IF student fails THEN his/her parents are Sad
Hence if a student x fails 100% then his/her parents
will be 100% sad.
Therefore how much truth is the premise defines
how much truth is the conclusion
The value of 100% or 0% is called degree of support of R1
Design of a FLC - Degree of Support Fuzzy sets I
Exactly the same stands for fuzzy sets
R1: If temp is Cold Then Heater is Med
)
(x

1
50
30 80
Cold
)
(x

1
50%
35% 80%
Med
Assume temp=35o
C
Design of a FLC - Degree of Support Fuzzy sets II
So the degree of support is 0.7
So the output “Med” is true 0.7
)
(x

1
50
30 80
Cold
35
0.7
???
R1: If temp is Cold Then Heater is Med
Design of a FLC - Degree of Support Fuzzy sets III
I have to take 70% of the output
)
(x

1
50
30 80
Cold
35
0.7
)
(x

1
50%
35% 80%
Med
0.7
Design of a FLC - Degree of Support Fuzzy sets IV
)
(x

1
50%
35% 80%
Med
0.7
)
(x

1
50%
35% 80%
Med
0.7
Min method Product method
Design of a FLC - 2nd
example
)
(x







hour
miles
Speed
0
Slow Normal Fast
35 100
50 80
)
(x

%
Level
Brake
0
Min Med Max
35 100
50 80
R1: If speed is Slow Then Brake is Min
R2: If speed is Normal Then Brake is Med
R3: If speed is Fast Then Brake is Max
Design of a FLC - Degree of Support Fuzzy sets II
85 miles/hour -> Input: Max 0.5
Hence Output: 0.5
)
(x







hour
miles
Speed
0.5
90
80 100
Fast
85
)
(x

0.5
90%
80% 100%
Maximum
Brake level
Design of a FLC - Degree of Support Fuzzy sets III
85 miles/hour -> Input: High 0.5
Hence Output: 0.5
)
(x

0.5
90%
80% 100%
High
Brake level
)
(x







hour
miles
Speed
0.5
90
80 100
Fast
85
Design of a FLC – Number of Inputs
Has the previous controller a satisfactory performance?
No, what about if the speed is medium and there is a car in 5m
We need another input, the distance from the front car.
Hence the rules will have the following form:
R1: If Speed is High OR/AND the Distance is Small Then Brake is Max
Hence we have to use logical operators: Max & Min
Design of a FLC – Or / AND I
The problem now is the degree of support of this rule
since there are two fuzzy sets that are activated
High Speed and Small Distance
)
(x

h
km
Speed /
,
1
90
80 100
High
)
(x

m
,
distance
1
20
10 30
Close
Design of a FLC – Or / AND II
Assume that the actual speed is 85
and the actual distance is 18 meters:
)
(x

h
km
Speed /
,
1
90
80 100
High
85
0.5
)
(x

m
,
distance
1
20
10 30
Close
0.6
18
Degree from input 1=0.5
Degree from input 2=0.6
Design of a FLC – Or / AND III
Since the OR operator was used then the overall
degree of support is found by the max operation:
Degree of Support for rule 1: max(0.5,0.6)=0.6
If the operator was the AND then we would use min:
Degree of Support for rule 1: min(0.5,0.6)=0.5
)
(x

0.6
90%
80% 100%
Maximum
Brake level
)
(x

0.6
90%
80% 100%
High
Brake level
Maximum
Design of a FLC – Multiple Input FS I
The universe of discourse must be fully covered by FS
Hence now the controller could be:
)
(x

h
km
Speed /
,
90
80 100
High
60
50
40
30
Med
Low
Input Output
)
(x

scale
Brake
90
80 100
Full
60
50
40
30
Some
Little
If Speed==Low Then Brake==Little
If Speed==Some Then Brake==Some
If Speed==High Then Brake==Full
Design of a FLC – Multiple Input FS II
Hence if input=35km/h:
Input Output
)
(x

h
km
Speed /
,
90
80 100
High
60
50
40
30
Med
Low
0.5
)
(x

scale
Brake
90
80 100
60
50
40
30
Little
Design of a FLC – Overlapping Input FS I
What about if speed is 50km/h?
The controller will do nothing!!!
For this reason we overlap the FS:
)
(x

h
km
Speed /
,
90
80 100
70
50
40
30
20
10
0 60
Very
Low
Low High
Very
High
)
(x

h
km
Speed /
,
90
80 100
70
50
40
30
20
10
0 60
Nothing Little Some Full
Brake scale %
Design of a FLC – Overlapping Input FS II
1. If Speed==Very Low Then Brake==Nothing
2. If Speed==Low Then Brake==Little
3. If Speed==High Then Brake==Some
4. If Speed==Very High Then Brake==Full
Speed=25 km/h
Very Low 0.8
Low 0.2
Hence degree of support for R1 is 0.8 and for R2 is 0.2
Design of a FLC – Overlapping Input FS III
)
(x

h
km
Speed /
,
90
80 100
70
50
40
30
20
10
0 60
Nothing
Brake scale
%
)
(x

h
km
Speed /
,
90
80 100
70
50
40
30
20
10
0 60
Little
Brake scale
%
Aggregation Method
Aggregation Method
1. Max (Maximum)
2. Prodor (Probabilistic Or)
3. Sum
)
(x

h
km
Speed /
,
90
80 100
70
50
40
30
20
10
0 60
Nothing
Brake scale %
Design of a FLC – Overlapping Input FS V
Brake scale %
)
(x

h
km
Speed /
,
90
80 100
70
50
40
30
20
10
0 60
Nothing
Brake scale %
)
(x

h
km
Speed /
,
90
80 100
70
50
40
30
20
10
0 60
Nothing
)
(x

h
km
Speed /
,
90
80 100
70
50
40
30
20
10
0 60
Nothing
Design of a FLC – Defuzzification
)
( x

0.5
90%
80% 100%
Maximum
)
( x

0.5
90%
80% 100%
Mean Of Maxima
Max Of Maxima
Least Of Maxima
)
( x

0.5
90%
80% 100%
Centre of area (COA)
Design of a FLC – Defuzzification
  max
: 
 y
y
out 
Maximum
Mean Of Maxima (MOM)   max
:
1
1

 

j
m
j
j y
y
m
out 
Centre of area (COA)
 
 




 m
i
j
m
i
j
j
y
y
y
out
1
1

 Largest of maximum
Smallest of maximum
Design of a FLC – Summary
The first step is to Fuzzify the real inputs:
Appropriate cover the universe of discourse with FS
The second step is to create the FIS:
Create the IF THEN rules using AND/OR operator
Aggregate all the FLR to get the final output FS
Initially choose the number of inputs/outputs and
their universe of discourse
The last step is to defuzzify the output fuzzy sets
to a real value
Lecture 3
Artificial Neural Networks (ANNs)
Human Brain:
Memory Processor
Small “computing” element: Neuron
Nucleus
Cell body
Axon/Nuerous dendritic links
Synapses
1010
to 1012
Adaptive connections
Structure of ANNs
Σ f(net)
net y
w1
w2
w3
w
n
x1
x2
x3
xn
Activation
function
Inputs
1
b
Inputs: x1
,x2
,x3
,…,xn Weights w1
,w2
,w3
,…,wn
b
x
w
x
w
x
w
x
w
b
x
w
net n
n
n
i
i
i 








.......
3
3
2
2
1
1
1
  









 

b
x
w
f
net
f
y
n
i
i
i
1
Activation function
  









 

b
x
w
f
net
f
y
n
i
i
i
1
Linear activation function
y
net
Threshold activation function
y
net
+1
-1
Activation function…cont
  









 

b
x
w
f
net
f
y
n
i
i
i
1
net
+1
0.5
y
Sigmoid function
Tansigmoid function
y
net
+1
-1
Architecture of ANNs
Combinations of ANNs
y1
x2
x3
x1
y2
y3
+1 +1
Threshold Threshold
b1
1
b1
2
w11
1
w11
2
w43
1
w34
2
Input
Layer
Output
Layer
Hidden
Layer
o1
o2
o3
o4
Multi-layer feedforward
Σ f(net)
net y
w1
w2
w3
w
n
x1
x2
x3
xn
Activation
function
Inputs
1
b
3 inputs x
4 outputs from o
3 outputs y
 
 
  T
T
T
y
y
y
o
o
o
o
x
x
x
3
2
1
4
3
2
1
3
2
1



y
o
x
Multi-layer feedforward
 
 
  T
T
T
y
y
y
o
o
o
o
x
x
x
3
2
1
4
3
2
1
3
2
1



y
o
x


























1
4
1
3
1
2
1
1
1
43
1
42
1
41
1
33
1
32
1
31
1
23
1
22
1
21
1
13
1
12
1
11
,
b
b
b
b
w
w
w
w
w
w
w
w
w
w
w
w
1
1
b
w
y1
x2
x3
x1
y2
y3
+1 +1
Threshold Threshold
b1
1
b1
2
w11
1
w11
2
w43
1
w34
2
Input
Layer
Output
Layer
Hidden
Layer
o1
o2
o3
o4
1st
Layer
Hidden Layer
 
1
1
3
1
13
2
1
12
1
1
11
1
1 b
x
w
x
w
x
w
f
o 



 
2
1
4
2
14
3
2
13
2
2
12
1
2
11
2
1 b
o
w
o
w
o
w
o
w
f
y 




Recurrent neural networks
y1
x2
x1
y2
y3
w11
1
w11
2
w43
1
w34
2
Delay
External
Inputs
Delay
Classification of ANN
Supervised Learning:
Unsupervised Learning
Teacher Input/ Target data
Network weight correction Learning algorithm
Minimize an error function
Mean-squared error (MSE)
Learning algorithm
Back propagation
Non-Linear
Function
Neural
Network
Learning
Algorithm
x
Input
y
y
^
+
-
error
    )
(
1 k
w
k
w
k
w ij
ij
ij 



ij
ij
w
E
w




 
n: Learning Rate
   
)
1
(
)
(
1








k
w
k
w
k
w
k
w
ij
ij
ij
ij

ANNs Strategy
1.Assemble the suitable training data
2.Create the network object
3.Train the network
4.Simulate the network response to new inputs
Application of ANNs
1. Classification and diagnostic
2. Pattern recognition
3. Modelling
4. Forecasting and prediction
5. Estimation and Control
Revision
Σ f(net)
net y
w1
w2
w3
w
n
x1
x2
x3
xn
Activation
function
Inputs
1
b
y1
x2
x3
x1
y2
y3
+1 +1
Threshold Threshold
b1
1
b1
2
w11
1
w11
2
w43
1
w34
2
Input
Layer
Output
Layer
Hidden
Layer
o1
o2
o3
o4
Non-Linear
Function
Neural
Network
Learning
Algorithm
x
Input
y
y
^
+
-
error
Matlab
net= newff ([-4 3; -5 5], [4,1], {‘tansig’,’purelin’},’traingda’ )
net.trainParam.lr
net.trainParam.epochs
net.trainParam.goal
  5
6
2
.
0
03
.
0 2
3




 x
x
x
x
f
y x=0-20 input=x
target=f(x)
>> net=newff([0,20],[10,1],{'tansig','purelin'},'trainlm');
>> net.trainParam.goal=1e-5;
>> net.trainParam.epochs=500;
>> [net,tr]=train(net,p,t);
>> a=sim(net,x)

More Related Content

PPTX
Fuzzy Logic Seminar with Implementation
PPT
fuzzy-logic nit-Bharat.ppt
PPT
CH1.ppt
PPTX
Fuzzy logic member functions
PPT
Fuzzy logic’s main concept is to improve the precision/accuracy
DOCX
1_Introduction.pdf1 Dynamics and Control Topic .docx
PPTX
Fuzzy logic
PPTX
Module-1.pptxbdjdhcdbejdjhdbchchchchchjcjcjc
Fuzzy Logic Seminar with Implementation
fuzzy-logic nit-Bharat.ppt
CH1.ppt
Fuzzy logic member functions
Fuzzy logic’s main concept is to improve the precision/accuracy
1_Introduction.pdf1 Dynamics and Control Topic .docx
Fuzzy logic
Module-1.pptxbdjdhcdbejdjhdbchchchchchjcjcjc

Similar to Industrial Automation SEQUENTIAL FLOW CHARTSDL.ppt (20)

PDF
Fuzzification of College Adviser Proficiency Based on Specific Knowledge
PDF
Optimization
PDF
Optimization
PPTX
Daa unit 1
PPT
PPT
Fuzzy Logic
PPTX
Greedy method
PPT
Design and analysis of algorithm in Computer Science
PPTX
Speed control of dc motor by fuzzy controller
PPTX
santosh kumar fuzzy logic presentation
PPTX
Fuzzy logicintro by
PPTX
C# Loops
PPT
Speedcontrolofdcmotorbyfuzzycontroller 120320013939-phpapp01
PDF
Lecture 11 Neural network and fuzzy system
PDF
CH05.pdf
PDF
Determination of Thesis Preceptor and Examiner Based on Specification of Teac...
PDF
Data Structure - Lecture 1 - Introduction.pdf
PPTX
Fuzzy Logic and Neural Network
PPTX
Fuzzy logic system
PDF
OS Process synchronization Unit3 synchronization
Fuzzification of College Adviser Proficiency Based on Specific Knowledge
Optimization
Optimization
Daa unit 1
Fuzzy Logic
Greedy method
Design and analysis of algorithm in Computer Science
Speed control of dc motor by fuzzy controller
santosh kumar fuzzy logic presentation
Fuzzy logicintro by
C# Loops
Speedcontrolofdcmotorbyfuzzycontroller 120320013939-phpapp01
Lecture 11 Neural network and fuzzy system
CH05.pdf
Determination of Thesis Preceptor and Examiner Based on Specification of Teac...
Data Structure - Lecture 1 - Introduction.pdf
Fuzzy Logic and Neural Network
Fuzzy logic system
OS Process synchronization Unit3 synchronization
Ad

More from JemimaA1 (10)

PPTX
digitial crime studies in digital and mobile forensic subject.pptx
PPTX
5_Introduction_to_digital_forensics.pptx
PPTX
767659167-digital and mobile forensic laboratory THE-SLEUTH-KIT.pptx
PPT
insyruction set architecture-digital principles and computer organization
PPTX
INTRODUCTION TO INDUSTRIAL AUTOMATION FULL SRM.pptx
PPT
Digital principles and computer organisation -Addressing modes.ppt
PPT
Digital principles and computer organisation -Instruction set architecture.ppt
PPTX
UNIT-5 computer architecture and instruction set .pptx
PPT
Digital principles and computer organisation -dataHazard.ppt
PDF
23634082-INDUSTRIAL-AUTOMATION-CLASS-Notes.pdf
digitial crime studies in digital and mobile forensic subject.pptx
5_Introduction_to_digital_forensics.pptx
767659167-digital and mobile forensic laboratory THE-SLEUTH-KIT.pptx
insyruction set architecture-digital principles and computer organization
INTRODUCTION TO INDUSTRIAL AUTOMATION FULL SRM.pptx
Digital principles and computer organisation -Addressing modes.ppt
Digital principles and computer organisation -Instruction set architecture.ppt
UNIT-5 computer architecture and instruction set .pptx
Digital principles and computer organisation -dataHazard.ppt
23634082-INDUSTRIAL-AUTOMATION-CLASS-Notes.pdf
Ad

Recently uploaded (20)

PPTX
Microbial diseases, their pathogenesis and prophylaxis
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
Anesthesia in Laparoscopic Surgery in India
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PPTX
GDM (1) (1).pptx small presentation for students
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PDF
01-Introduction-to-Information-Management.pdf
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PPTX
PPH.pptx obstetrics and gynecology in nursing
PPTX
Institutional Correction lecture only . . .
PDF
Pre independence Education in Inndia.pdf
Microbial diseases, their pathogenesis and prophylaxis
Microbial disease of the cardiovascular and lymphatic systems
102 student loan defaulters named and shamed – Is someone you know on the list?
Final Presentation General Medicine 03-08-2024.pptx
Anesthesia in Laparoscopic Surgery in India
STATICS OF THE RIGID BODIES Hibbelers.pdf
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
GDM (1) (1).pptx small presentation for students
FourierSeries-QuestionsWithAnswers(Part-A).pdf
O5-L3 Freight Transport Ops (International) V1.pdf
human mycosis Human fungal infections are called human mycosis..pptx
Renaissance Architecture: A Journey from Faith to Humanism
01-Introduction-to-Information-Management.pdf
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Pharmacology of Heart Failure /Pharmacotherapy of CHF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PPH.pptx obstetrics and gynecology in nursing
Institutional Correction lecture only . . .
Pre independence Education in Inndia.pdf

Industrial Automation SEQUENTIAL FLOW CHARTSDL.ppt

  • 1. EEE-8005 Industrial automation SDL Module leader: Dr. Damian Giaouris Email: Damian.Giaouris@ncl.ac.uk Room: E3.16 Phone: 0191 222 -7327 Module Leader of: Digital Control (EEE 8007) Degree Program Director of MSc: Automation and Control
  • 2. Scopes / Objectives Lecture Scope: • To give a mathematical background on set theory Lecture Outcomes: • Syllabus outline • Explain the SDL part of the course • Boolean set theory – definition, intersection, union… • Need for fuzzy logic • Fuzzy logic set theory – membership functions: form, domain, image • Logical operators OR AND Min Max… • Linguistic variables
  • 3. Module Structure Student Directed Learning Student Directed Learning Some lectures => Trigger further individual individual study Normal Lectures: 2hs/week 1h session/week: SDL
  • 4. Provisional syllabus Artificial Intelligence Fuzzy Logic Theory Matlab Neural Networks Genetic algorithms
  • 5. Provisional syllabus Week 1: Intro – Basic set theory Week 2: Design of fuzzy logic controllers Week 3: Design of fuzzy logic controllers II Week 4: TS Fuzzy Logic Weeks 5 - 7: Matlab programming Week 8: ANN – Matlab Week 9: ANN – Matlab II Week 10: Genetic Algorithms Week 11: Revision Week 12: ???
  • 6. Control strategy Conventional control Model of the actual plant Deterministic Stochastic Inaccurate Complex methods
  • 7. Human reasoning and experience Complicated processes Controlled by experienced practical engineers Have no idea about the model Use their knowledge & experience Human reasoning No model needed Satisfactory performance Artificial Intelligence
  • 8. Artificial Intelligence •Expert Systems (ES) •Fuzzy Logic (FL) •Artificial Neural Networks (ANN) •Genetic Algorithms (GAs) •A combination of all these
  • 9. Set theory I Shape A Shape B Shape C Shape D Shape E Shape F Shape G Shape H   H Shape F, Shape D, Shape C, Shape  A   G Shape E, Shape B, Shape A, Shape  B   H Shape G, Shape F, Shape E, Shape D, Shape C, Shape B, Shape A, Shape  C
  • 10. Set theory II   H Shape F, Shape D, Shape C, Shape  A   G Shape E, Shape B, Shape A, Shape  B   H Shape G, Shape F, Shape E, Shape D, Shape C, Shape B, Shape A, Shape  C Subset: A set that has some elements from another set   G Shape B, Shape A, Shape  D B D  Union: A set that has all the elements of two other sets   G Shape B, Shape A, Shape H, Shape F, Shape D, Shape C, Shape   A D D A A D    Intersection: A set that has all the common elements of two other sets   G Shape   E B   H Shape G, Shape  E where B E E B   
  • 11. Boolean Logic   es Temperatur A    Hot es Temperatur B A B   ,   25   es Temperatur es Temperatur B 25 Temperature Membership Function  100% 0%
  • 12. Boolean and Fuzzy Logic (FL) Temperature=24.99 ??? Not so Hot Not so Hot Temperature=25 100 % Temperature=24 90 % Temperature=15 0 % Element Membership function, I.e. How much an element belongs to a set   Hot Much How es Temperatur C , 
  • 13. Fuzzy Logic 25 Temperature Membership Function  15 100% 0% 25 Temperature Membership Function  100% 0%
  • 17. Logical Operators   6 4, 2, 1,  A 1 2 3 4 5 6 Set A Union •For element 1: Is 1 a member of set A OR set B Intersection •For element 1: Is 1 a member of set A AND set B   6 5, 2,3,  B 1 2 3 4 5 6 Set B
  • 18. Logical Operators Discrete Sets   6 3,4,5, 2, 1,   B A 1 2 3 4 5 6 Union A B AND OR 1 0 0 1 0 1 0 1 1 1 1 1 0 0 0 0   6 2,   B A 1 2 3 4 5 6 Intersection
  • 19. Logical Operators Continuous Sets   25   es Temperatur es Temperatur A   30   e Temperatur e Temperatur Inter   25   e temperatur e temperatur Union 25 Temperature 30 25 Temperature 30   0 3   es Temperatur es Temperatur B
  • 20. Fuzzy sets & Logical Operators I OR=MAX AND=MIN A B Min(A, B) and Max(A, B) or 1 0 0 1 0 1 0 1 1 1 1 1 0 0 0 0
  • 21. Fuzzy sets & Logical Operators II
  • 22. Example – Matlab Exercise Two fuzzy sets have the following membership functions                               35 , 30 , 7 5 1 30 , 25 , 5 5 1 35 25 , 0 x x x x x x x or x x A                                  40 , 35 , 8 5 1 35 , 30 , 6 5 1 40 30 , 0 x x x x x x x or x x B    Plot the two sets Find the union and the intersection of them, and explain the results through the min, max operator
  • 23. Linguistic variables The room is cold lets switch on the heater Not The temperature is 17.5 degrees ) (x  es Temperatur 1 15 10 20 cold Lecture 1
  • 24. Lecture scope Lecture Scope: • To define advanced concepts on FL set theory • Connection between classical and FS theory Lecture Outcomes: • Notation • Definitions like support, height… • Union, intersection, max and min • Negation, bounded sums • Cartesian products on crisp and FS • Extension principle • Fuzziness
  • 25. Lecture Outcomes Lecture Scope: • Basic steps in the design of a Fuzzy Logic Controller Lecture Outcomes: • Basic Control strategy • Fuzzification • Fuzzy Inference System • Multiple Inputs – And/Or operators • Overlapping Fuzzy Sets • Defuzzyfication
  • 26. Design of a FLC - Basic Concept FL mimics Human Reasoning: If … Then… IF THEN RULES R1: If the room is very cold then switch on the heater to full R2: If the room is cold then switch on the heater to medium R3: If the room is normal then switch off the heater If part: premise - Then part: conclusion
  • 27. Design of a FLC - Fuzzification I ) (x  Temperatures 1 15 10 20 Very Cold Cold Warm Hot 1. Cover I/O the universe of discourse with FS 2. Assign to every real input a membership function at each set This process is called Fuzzyfication
  • 28. Design of a FLC - Fuzzification II ) (x  Temperatures 1 15 10 20 Very Cold Cold Warm Hot 11 0.7 0.5 With this way every real input is mapped to a fuzzy set The value of the membership function that will be assigned depends on the shape of the membership function
  • 29. Design of a FLC – If… Then… 1. If … Then … Rules 2. Input Fuzzy Sets (Fuzzification) 3. Output Fuzzy Sets Associate If Then Rules Input Linguistic Variable Output Linguistic Variable If … Then … Rules associate the input fuzzy sets to the output fuzzy sets If … Then … Rules associate the input fuzzy sets to the output fuzzy sets
  • 30. Design of a FLC – If… Then… ) (x  e Temperatur 0 Very Cold Cold Normal 35 100 50 80 ) (x  % Heater 0 Max Med Off 35 100 50 80 R1: If temp is Very Cold Then Heater is Max R2: If temp is Cold Then Heater is Med R3: If temp is Normal Then Heater is Off
  • 31. Design of a FLC - Degree of Support Boolean sets Assume an IF THEN rule with Boolean sets: R1: IF student fails THEN his/her parents are Sad Hence if a student x fails 100% then his/her parents will be 100% sad. Therefore how much truth is the premise defines how much truth is the conclusion The value of 100% or 0% is called degree of support of R1
  • 32. Design of a FLC - Degree of Support Fuzzy sets I Exactly the same stands for fuzzy sets R1: If temp is Cold Then Heater is Med ) (x  1 50 30 80 Cold ) (x  1 50% 35% 80% Med Assume temp=35o C
  • 33. Design of a FLC - Degree of Support Fuzzy sets II So the degree of support is 0.7 So the output “Med” is true 0.7 ) (x  1 50 30 80 Cold 35 0.7 ??? R1: If temp is Cold Then Heater is Med
  • 34. Design of a FLC - Degree of Support Fuzzy sets III I have to take 70% of the output ) (x  1 50 30 80 Cold 35 0.7 ) (x  1 50% 35% 80% Med 0.7
  • 35. Design of a FLC - Degree of Support Fuzzy sets IV ) (x  1 50% 35% 80% Med 0.7 ) (x  1 50% 35% 80% Med 0.7 Min method Product method
  • 36. Design of a FLC - 2nd example ) (x        hour miles Speed 0 Slow Normal Fast 35 100 50 80 ) (x  % Level Brake 0 Min Med Max 35 100 50 80 R1: If speed is Slow Then Brake is Min R2: If speed is Normal Then Brake is Med R3: If speed is Fast Then Brake is Max
  • 37. Design of a FLC - Degree of Support Fuzzy sets II 85 miles/hour -> Input: Max 0.5 Hence Output: 0.5 ) (x        hour miles Speed 0.5 90 80 100 Fast 85 ) (x  0.5 90% 80% 100% Maximum Brake level
  • 38. Design of a FLC - Degree of Support Fuzzy sets III 85 miles/hour -> Input: High 0.5 Hence Output: 0.5 ) (x  0.5 90% 80% 100% High Brake level ) (x        hour miles Speed 0.5 90 80 100 Fast 85
  • 39. Design of a FLC – Number of Inputs Has the previous controller a satisfactory performance? No, what about if the speed is medium and there is a car in 5m We need another input, the distance from the front car. Hence the rules will have the following form: R1: If Speed is High OR/AND the Distance is Small Then Brake is Max Hence we have to use logical operators: Max & Min
  • 40. Design of a FLC – Or / AND I The problem now is the degree of support of this rule since there are two fuzzy sets that are activated High Speed and Small Distance ) (x  h km Speed / , 1 90 80 100 High ) (x  m , distance 1 20 10 30 Close
  • 41. Design of a FLC – Or / AND II Assume that the actual speed is 85 and the actual distance is 18 meters: ) (x  h km Speed / , 1 90 80 100 High 85 0.5 ) (x  m , distance 1 20 10 30 Close 0.6 18 Degree from input 1=0.5 Degree from input 2=0.6
  • 42. Design of a FLC – Or / AND III Since the OR operator was used then the overall degree of support is found by the max operation: Degree of Support for rule 1: max(0.5,0.6)=0.6 If the operator was the AND then we would use min: Degree of Support for rule 1: min(0.5,0.6)=0.5 ) (x  0.6 90% 80% 100% Maximum Brake level ) (x  0.6 90% 80% 100% High Brake level Maximum
  • 43. Design of a FLC – Multiple Input FS I The universe of discourse must be fully covered by FS Hence now the controller could be: ) (x  h km Speed / , 90 80 100 High 60 50 40 30 Med Low Input Output ) (x  scale Brake 90 80 100 Full 60 50 40 30 Some Little If Speed==Low Then Brake==Little If Speed==Some Then Brake==Some If Speed==High Then Brake==Full
  • 44. Design of a FLC – Multiple Input FS II Hence if input=35km/h: Input Output ) (x  h km Speed / , 90 80 100 High 60 50 40 30 Med Low 0.5 ) (x  scale Brake 90 80 100 60 50 40 30 Little
  • 45. Design of a FLC – Overlapping Input FS I What about if speed is 50km/h? The controller will do nothing!!! For this reason we overlap the FS: ) (x  h km Speed / , 90 80 100 70 50 40 30 20 10 0 60 Very Low Low High Very High ) (x  h km Speed / , 90 80 100 70 50 40 30 20 10 0 60 Nothing Little Some Full Brake scale %
  • 46. Design of a FLC – Overlapping Input FS II 1. If Speed==Very Low Then Brake==Nothing 2. If Speed==Low Then Brake==Little 3. If Speed==High Then Brake==Some 4. If Speed==Very High Then Brake==Full Speed=25 km/h Very Low 0.8 Low 0.2 Hence degree of support for R1 is 0.8 and for R2 is 0.2
  • 47. Design of a FLC – Overlapping Input FS III ) (x  h km Speed / , 90 80 100 70 50 40 30 20 10 0 60 Nothing Brake scale % ) (x  h km Speed / , 90 80 100 70 50 40 30 20 10 0 60 Little Brake scale %
  • 48. Aggregation Method Aggregation Method 1. Max (Maximum) 2. Prodor (Probabilistic Or) 3. Sum ) (x  h km Speed / , 90 80 100 70 50 40 30 20 10 0 60 Nothing Brake scale %
  • 49. Design of a FLC – Overlapping Input FS V Brake scale % ) (x  h km Speed / , 90 80 100 70 50 40 30 20 10 0 60 Nothing Brake scale % ) (x  h km Speed / , 90 80 100 70 50 40 30 20 10 0 60 Nothing ) (x  h km Speed / , 90 80 100 70 50 40 30 20 10 0 60 Nothing
  • 50. Design of a FLC – Defuzzification ) ( x  0.5 90% 80% 100% Maximum ) ( x  0.5 90% 80% 100% Mean Of Maxima Max Of Maxima Least Of Maxima ) ( x  0.5 90% 80% 100% Centre of area (COA)
  • 51. Design of a FLC – Defuzzification   max :   y y out  Maximum Mean Of Maxima (MOM)   max : 1 1     j m j j y y m out  Centre of area (COA)          m i j m i j j y y y out 1 1   Largest of maximum Smallest of maximum
  • 52. Design of a FLC – Summary The first step is to Fuzzify the real inputs: Appropriate cover the universe of discourse with FS The second step is to create the FIS: Create the IF THEN rules using AND/OR operator Aggregate all the FLR to get the final output FS Initially choose the number of inputs/outputs and their universe of discourse The last step is to defuzzify the output fuzzy sets to a real value Lecture 3
  • 53. Artificial Neural Networks (ANNs) Human Brain: Memory Processor Small “computing” element: Neuron Nucleus Cell body Axon/Nuerous dendritic links Synapses 1010 to 1012 Adaptive connections
  • 54. Structure of ANNs Σ f(net) net y w1 w2 w3 w n x1 x2 x3 xn Activation function Inputs 1 b Inputs: x1 ,x2 ,x3 ,…,xn Weights w1 ,w2 ,w3 ,…,wn b x w x w x w x w b x w net n n n i i i          ....... 3 3 2 2 1 1 1                b x w f net f y n i i i 1
  • 55. Activation function                b x w f net f y n i i i 1 Linear activation function y net Threshold activation function y net +1 -1
  • 56. Activation function…cont                b x w f net f y n i i i 1 net +1 0.5 y Sigmoid function Tansigmoid function y net +1 -1
  • 57. Architecture of ANNs Combinations of ANNs y1 x2 x3 x1 y2 y3 +1 +1 Threshold Threshold b1 1 b1 2 w11 1 w11 2 w43 1 w34 2 Input Layer Output Layer Hidden Layer o1 o2 o3 o4 Multi-layer feedforward Σ f(net) net y w1 w2 w3 w n x1 x2 x3 xn Activation function Inputs 1 b 3 inputs x 4 outputs from o 3 outputs y       T T T y y y o o o o x x x 3 2 1 4 3 2 1 3 2 1    y o x
  • 58. Multi-layer feedforward       T T T y y y o o o o x x x 3 2 1 4 3 2 1 3 2 1    y o x                           1 4 1 3 1 2 1 1 1 43 1 42 1 41 1 33 1 32 1 31 1 23 1 22 1 21 1 13 1 12 1 11 , b b b b w w w w w w w w w w w w 1 1 b w y1 x2 x3 x1 y2 y3 +1 +1 Threshold Threshold b1 1 b1 2 w11 1 w11 2 w43 1 w34 2 Input Layer Output Layer Hidden Layer o1 o2 o3 o4 1st Layer Hidden Layer   1 1 3 1 13 2 1 12 1 1 11 1 1 b x w x w x w f o       2 1 4 2 14 3 2 13 2 2 12 1 2 11 2 1 b o w o w o w o w f y     
  • 60. Classification of ANN Supervised Learning: Unsupervised Learning Teacher Input/ Target data Network weight correction Learning algorithm Minimize an error function Mean-squared error (MSE)
  • 61. Learning algorithm Back propagation Non-Linear Function Neural Network Learning Algorithm x Input y y ^ + - error     ) ( 1 k w k w k w ij ij ij     ij ij w E w       n: Learning Rate     ) 1 ( ) ( 1         k w k w k w k w ij ij ij ij 
  • 62. ANNs Strategy 1.Assemble the suitable training data 2.Create the network object 3.Train the network 4.Simulate the network response to new inputs
  • 63. Application of ANNs 1. Classification and diagnostic 2. Pattern recognition 3. Modelling 4. Forecasting and prediction 5. Estimation and Control
  • 64. Revision Σ f(net) net y w1 w2 w3 w n x1 x2 x3 xn Activation function Inputs 1 b y1 x2 x3 x1 y2 y3 +1 +1 Threshold Threshold b1 1 b1 2 w11 1 w11 2 w43 1 w34 2 Input Layer Output Layer Hidden Layer o1 o2 o3 o4 Non-Linear Function Neural Network Learning Algorithm x Input y y ^ + - error
  • 65. Matlab net= newff ([-4 3; -5 5], [4,1], {‘tansig’,’purelin’},’traingda’ ) net.trainParam.lr net.trainParam.epochs net.trainParam.goal   5 6 2 . 0 03 . 0 2 3      x x x x f y x=0-20 input=x target=f(x) >> net=newff([0,20],[10,1],{'tansig','purelin'},'trainlm'); >> net.trainParam.goal=1e-5; >> net.trainParam.epochs=500; >> [net,tr]=train(net,p,t); >> a=sim(net,x)