fuzzy control
DESCRIPTION
Fuzzy Control. Jan Jantzen [email protected] www.inference.dk 2013. Summary. Configuration of controller Design choices The Takagi- Sugeno controller. End-user. Controller. Rule. Ref. Deviations. Actions. Outputs. base. Plant. Inference. engine. Direct Control Configuration. - PowerPoint PPT PresentationTRANSCRIPT
![Page 2: Fuzzy Control](https://reader036.vdocuments.us/reader036/viewer/2022062501/568163f4550346895dd580cb/html5/thumbnails/2.jpg)
2
Summary
• Configuration of controller• Design choices• The Takagi-Sugeno controller
![Page 3: Fuzzy Control](https://reader036.vdocuments.us/reader036/viewer/2022062501/568163f4550346895dd580cb/html5/thumbnails/3.jpg)
3
Direct Control Configuration
Deviations Actions OutputsRef
Controller
End-user
Inferenceengine
Rulebase
Plant
Could be a multi-input-multi-output controller
![Page 4: Fuzzy Control](https://reader036.vdocuments.us/reader036/viewer/2022062501/568163f4550346895dd580cb/html5/thumbnails/4.jpg)
4
Example: Tank Level ControlV1
Control valve
Inlet stream
Outlet stream
Tank
![Page 5: Fuzzy Control](https://reader036.vdocuments.us/reader036/viewer/2022062501/568163f4550346895dd580cb/html5/thumbnails/5.jpg)
5
Control Rules
1. If the level is low, then open V1
2. If the level is high, then close V1
Actually, a single rule might be sufficient. Which?
![Page 6: Fuzzy Control](https://reader036.vdocuments.us/reader036/viewer/2022062501/568163f4550346895dd580cb/html5/thumbnails/6.jpg)
6
High Level
This requires a level sensor, which is able to measure how full the tank is. Ultrasound, for instance.
![Page 7: Fuzzy Control](https://reader036.vdocuments.us/reader036/viewer/2022062501/568163f4550346895dd580cb/html5/thumbnails/7.jpg)
7
High And Low Levels
![Page 8: Fuzzy Control](https://reader036.vdocuments.us/reader036/viewer/2022062501/568163f4550346895dd580cb/html5/thumbnails/8.jpg)
8
Choice of Rule Base
1. If error is Neg and change in error is Neg then output is NB2. If error is Neg and change in error is Zero then output is NM3. If error is Neg and change in error is Pos then output is Zero4. If error is Zero and change in error is Neg then output is NM5. If error is Zero and change in error is Zero then output is Zero6. If error is Zero and change in error is Pos then output is PM7. If error is Pos and change in error is Neg then output is Zero8. If error is Pos and change in error is Zero then output is PM9. If error is Pos and change in error is Pos then output is PB
Two inputs with three values each (Neg, Zero, Pos) results in nine rules.Two inputs with two values each (Neg, Pos) results in four rules.
![Page 9: Fuzzy Control](https://reader036.vdocuments.us/reader036/viewer/2022062501/568163f4550346895dd580cb/html5/thumbnails/9.jpg)
9
Choice of Connectives
)(),(max
)(),(minxxBAxxBA
BA
BA
)()()()()()(
xxxxBAxxBA
BABA
BA
minimum
maximum
product
probabilistic sum
Choose product and probabilistic sum, if you wish to achieve linearity.
![Page 10: Fuzzy Control](https://reader036.vdocuments.us/reader036/viewer/2022062501/568163f4550346895dd580cb/html5/thumbnails/10.jpg)
10
Choice Of Primary Sets
Classical set
Singleton
Universal setTrapezoidalTriangular
An input family
![Page 11: Fuzzy Control](https://reader036.vdocuments.us/reader036/viewer/2022062501/568163f4550346895dd580cb/html5/thumbnails/11.jpg)
11
Inference in a Fuzzy PD Controller
Input error enters here
Input change in error enters here
Membership of input error of this set
Membership of input change in error of this set
The AND of the two memberships is carried forward as a weight on the control signal singleton
All rules contribute, and the final control signal is the weighted average of the contributions from the rules.
Sugeno type of rule base with singleton outputs
![Page 12: Fuzzy Control](https://reader036.vdocuments.us/reader036/viewer/2022062501/568163f4550346895dd580cb/html5/thumbnails/12.jpg)
12
Singleton Output
1. If error is Pos then control is 102. If error is Zero then control is 03. If error is Neg then control is -10
Equivalent to a singleton placed in the position -10 in the universe. It is simpler than a full membership function, and more intuitive too.
![Page 13: Fuzzy Control](https://reader036.vdocuments.us/reader036/viewer/2022062501/568163f4550346895dd580cb/html5/thumbnails/13.jpg)
13
Sugeno Inference
1. If error is Pos then control is 102. If error is Zero then control is 03. If error is Neg then control is -10
Rule 3
Rule 2
Rule 1
The weighted average
![Page 14: Fuzzy Control](https://reader036.vdocuments.us/reader036/viewer/2022062501/568163f4550346895dd580cb/html5/thumbnails/14.jpg)
14
First Order Output
1. If error is Large then control is a1*error + b1
2. If error is Small then control is a2*error + b2
The equation for a line L2, which depends on the coefficients a2 and b2.
![Page 15: Fuzzy Control](https://reader036.vdocuments.us/reader036/viewer/2022062501/568163f4550346895dd580cb/html5/thumbnails/15.jpg)
15
Interpolation (Takagi-Sugeno)
Line 1
Line 2
Interpolant
![Page 16: Fuzzy Control](https://reader036.vdocuments.us/reader036/viewer/2022062501/568163f4550346895dd580cb/html5/thumbnails/16.jpg)
16
Rule Base to Table
Choose discrete values, for instance one for every 10 %
Same
Calculate the result for every combination of the two inputs
![Page 17: Fuzzy Control](https://reader036.vdocuments.us/reader036/viewer/2022062501/568163f4550346895dd580cb/html5/thumbnails/17.jpg)
17
Look-Up TableChange in error
-100 -50 0 50 100
Error
100 0 40 100 100 200
50 -40 0 61 121 160
0 -100 -61 0 61 100
-50 -100 -121 -61 0 40
-100 -200 -160 -100 -40 0
Five discrete points were chosen in each input universe, resulting in 25 pre-calculated values of the control signal
![Page 18: Fuzzy Control](https://reader036.vdocuments.us/reader036/viewer/2022062501/568163f4550346895dd580cb/html5/thumbnails/18.jpg)
18
Control Surface
1. If E is Neg and CE is Neg then u = -2002. If E is Neg and CE is Pos then u = 03. If E is Pos and CE is Neg then u = 04. If E is Pos and CE is Pos then u = 200
Neg PosA mesh plot of the control table
![Page 19: Fuzzy Control](https://reader036.vdocuments.us/reader036/viewer/2022062501/568163f4550346895dd580cb/html5/thumbnails/19.jpg)
19
Linear Rule Base
![Page 20: Fuzzy Control](https://reader036.vdocuments.us/reader036/viewer/2022062501/568163f4550346895dd580cb/html5/thumbnails/20.jpg)
20
Linear Control Surface
![Page 21: Fuzzy Control](https://reader036.vdocuments.us/reader036/viewer/2022062501/568163f4550346895dd580cb/html5/thumbnails/21.jpg)
21
Conditions For Linearity• Triangular sets, crossing at = 0.5• Rules: complete -combination• Define as multiplication (×)• Use conclusion singletons, positioned at sum of input
peak positions• Calculate the control signal as the weighted average
These five conditions settle many design choices. Very easy!
![Page 22: Fuzzy Control](https://reader036.vdocuments.us/reader036/viewer/2022062501/568163f4550346895dd580cb/html5/thumbnails/22.jpg)
22
Summary Of Choices• Rule-base related choices (# of inputs and outputs,
rules, universes, continuous or discrete, # of membership functions, their overlap and width, singleton conclusions)
• Inference engine choices (connectives, modifiers)• Pre- and postprocessing (scaling, quantization, sampling
time)
![Page 23: Fuzzy Control](https://reader036.vdocuments.us/reader036/viewer/2022062501/568163f4550346895dd580cb/html5/thumbnails/23.jpg)
23
ADVANCED SECTION*
![Page 24: Fuzzy Control](https://reader036.vdocuments.us/reader036/viewer/2022062501/568163f4550346895dd580cb/html5/thumbnails/24.jpg)
24
Building Blocks
Fuzzy controller
Inferenceengine
Rulebase Defuzzi
-ficationPostpro-cessing
Fuzzi-fication
Prepro-cessing
![Page 25: Fuzzy Control](https://reader036.vdocuments.us/reader036/viewer/2022062501/568163f4550346895dd580cb/html5/thumbnails/25.jpg)
25
Nonlinear Input Scaling
-5 0 5
-100
-50
0
50
100
measured input
scal
ed in
put
![Page 26: Fuzzy Control](https://reader036.vdocuments.us/reader036/viewer/2022062501/568163f4550346895dd580cb/html5/thumbnails/26.jpg)
26
Relational Rule FormatError Change in error ControlPos Pos PBPos Zero PMPos Neg ZeroZero Pos PM Zero Zero ZeroZero Neg NMNeg Pos ZeroNeg Zero NMNeg Neg NB
![Page 27: Fuzzy Control](https://reader036.vdocuments.us/reader036/viewer/2022062501/568163f4550346895dd580cb/html5/thumbnails/27.jpg)
27
Tabular Rule Format
Change in error
Neg Zero Pos
Neg NB NM Zero
Error Zero NM Zero PM
Pos Zero PM PB
![Page 28: Fuzzy Control](https://reader036.vdocuments.us/reader036/viewer/2022062501/568163f4550346895dd580cb/html5/thumbnails/28.jpg)
28
Defuzzification
0 50 1000
0.5
1
RM
BOA
COGMOM
LM
![Page 29: Fuzzy Control](https://reader036.vdocuments.us/reader036/viewer/2022062501/568163f4550346895dd580cb/html5/thumbnails/29.jpg)
29
FLS I/O Families
-1 -0.5 0 0.5 10
0.5
1
Input
Mem
bers
hip
-1 -0.5 0 0.5 10
0.5
1
Output
Mem
bers
hip
NegZero
Pos
![Page 30: Fuzzy Control](https://reader036.vdocuments.us/reader036/viewer/2022062501/568163f4550346895dd580cb/html5/thumbnails/30.jpg)
30
Inference And TerminologyAND
Aggregation
Accumulation
Defuzzification
Activation
a 4
a 5
![Page 31: Fuzzy Control](https://reader036.vdocuments.us/reader036/viewer/2022062501/568163f4550346895dd580cb/html5/thumbnails/31.jpg)
31
Rule Base To Table
![Page 32: Fuzzy Control](https://reader036.vdocuments.us/reader036/viewer/2022062501/568163f4550346895dd580cb/html5/thumbnails/32.jpg)
32
Rule Based Controllers
1. If error is Neg then control is Neg2. If error is Zero then control is Zero3. If error is Pos then control is Pos
![Page 33: Fuzzy Control](https://reader036.vdocuments.us/reader036/viewer/2022062501/568163f4550346895dd580cb/html5/thumbnails/33.jpg)
33
Mamdani Inference
-100 0 1000
0.5
1error
-100 0 1000
0.5
1control
-100 0 1000
0.5
1
-100 0 1000
0.5
1
-100 0 1000
0.5
1
-100 0 1000
0.5
1-100 0 1000
0.5
1
u = -25.7
![Page 34: Fuzzy Control](https://reader036.vdocuments.us/reader036/viewer/2022062501/568163f4550346895dd580cb/html5/thumbnails/34.jpg)
34
FLS Inference
-100 0 1000
0.5
1error
-100 0 1000
0.5
1control
-100 0 1000
0.5
1
-100 0 1000
0.5
1
-100 0 1000
0.5
1
-100 0 1000
0.5
1-100 0 1000
0.5
1
u = -29.7
![Page 35: Fuzzy Control](https://reader036.vdocuments.us/reader036/viewer/2022062501/568163f4550346895dd580cb/html5/thumbnails/35.jpg)
35
Simplification of 4 rules1. If error is Neg and change in error is Neg then control is NB3. If error is Neg and change in error is Pos then control is Zero7. If error is Pos and change in error is Neg then control is Zero9. If error is Pos and change in error is Pos then control is PB
PBPosPos CEEu )1(
is
![Page 36: Fuzzy Control](https://reader036.vdocuments.us/reader036/viewer/2022062501/568163f4550346895dd580cb/html5/thumbnails/36.jpg)
36
Simplification of 9 rules1. If error is Neg and change in error is Neg then output is NB2. If error is Neg and change in error is Zero then output is NM3. If error is Neg and change in error is Pos then output is Zero4. If error is Zero and change in error is Neg then output is NM5. If error is Zero and change in error is Zero then output is Zero6. If error is Zero and change in error is Pos then output is PM7. If error is Pos and change in error is Neg then output is Zero8. If error is Pos and change in error is Zero then output is PM9. If error is Pos and change in error is Pos then output is PB
is
PBNegPosNegPos CECEEEu 21