760 likes | 1.08k Views
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:
E N D
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 Normal Lectures: 2hs/week 1h session/week: SDL Student Directed Learning Trigger further individual study Some lectures =>
Provisional syllabus Artificial Intelligence Fuzzy Logic Neural Networks Genetic algorithms Theory Matlab
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: ???
Model of the actual plant Deterministic Stochastic Inaccurate Complex methods Control strategy Conventional control
Controlled by experienced practical engineers Human reasoning and experience Complicated processes 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 II Subset: A set that has some elements from another set Union: A set that has all the elements of two other sets Intersection: A set that has all the common elements of two other sets
Element Boolean and Fuzzy Logic (FL) Temperature=24.99 ??? Not so Hot 100 % Temperature=25 Temperature=24 90 % Temperature=15 0 % Membership function, I.e. How much an element belongs to a set
Triangular Trapezoidal Fuzzy Sets I
Gaussian Sigmoidal Fuzzy Sets II
Polynomial Fuzzy Sets III
Logical Operators • 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
A B AND OR 1 0 0 1 0 1 0 1 1 1 1 1 0 0 0 0 Logical Operators Discrete Sets
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 I OR=MAX AND=MIN
Example – Matlab Exercise Two fuzzy sets have the following membership functions 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 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 • Cover I/O the universe of discourse with FS • Assign to every real input a membership function at each set • This process is called Fuzzyfication
Design of a FLC - Fuzzification II 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
If Then Rules Design of a FLC – If… Then… • If … Then … Rules • Input Fuzzy Sets (Fuzzification) • Output Fuzzy Sets Associate Input Linguistic Variable Output Linguistic Variable If … Then … Rules associate the input fuzzy sets to the output fuzzy sets
Design of a FLC – If… Then… 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 Assume temp=35oC
Design of a FLC - Degree of Support Fuzzy sets II R1: If temp is Cold Then Heater is Med So the degree of support is 0.7 So the output “Med” is true 0.7 ???
Design of a FLC - Degree of Support Fuzzy sets III I have to take 70% of the output
Design of a FLC - Degree of Support Fuzzy sets IV Product method Min method
Design of a FLC - 2nd example 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
Design of a FLC - Degree of Support Fuzzy sets III 85 miles/hour -> Input: High 0.5 Hence Output: 0.5
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
Design of a FLC – Or / AND II Assume that the actual speed is 85 and the actual distance is 18 meters: Degree from input 1=0.5 Degree from input 2=0.6
Maximum 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
Design of a FLC – Multiple Input FS I The universe of discourse must be fully covered by FS Hence now the controller could be: Input Output 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
Brake scale % 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:
Design of a FLC – Overlapping Input FS II • If Speed==Very Low Then Brake==Nothing • If Speed==Low Then Brake==Little • 3. If Speed==High Then Brake==Some • 4. If Speed==Very High Then Brake==Full Very Low 0.8 Low 0.2 Speed=25 km/h Hence degree of support for R1 is 0.8 and for R2 is 0.2
Brake scale % Brake scale % Design of a FLC – Overlapping Input FS III
Brake scale % Aggregation Method • Max (Maximum) • Prodor (Probabilistic Or) • Sum
Design of a FLC – Defuzzification Maximum Mean Of Maxima Max Of Maxima Least Of Maxima Centre of area (COA)