FIND A SOLUTION AT Academic Writers Bay
ECTE441/841/941
Intelligent Control
Autumn 2020
Lecture 03
2
Subject Outline
Introduction to intelligent control and fuzzy sets
Fuzzy operations and rules
Fuzzy inference and PID control
Fuzzy controller design and tuning
Fuzzy extension
TSK fuzzy control
3
Objectives of the Lecture
Be able to use a fuzzy inference system.
Develop a better understanding of the fuzzy approach
by applying it to a specific example.
Be able to apply PID for fuzzy logic control
Mamdani Fuzzy Inference Systems
4
Structure of the lecture
Fuzzy inference system
Introduction
Graphic approach
Defuzzification
Example
PID control
Structure and function
Operation mechanism
Tuning
5
Tipping Problem
Problem: Given two numbers between 0 and 10 that
represents the quality of service and food at a restaurant
(when 10 is excellent for service and delicious for food)
what should the tip be for a specific visit?
This problem is based on a tipping custom in United
States which is on average 15% of the bill. This,
however, can change depending on the quality of the
service and food provided.
Rule 1: If service is poor or food is rancid then tip is cheap
Rule 2: If service is good then tip is average
Rule 3: If service is excellent or food is delicious then tip is generous
6
Repeat (1)~(3) for All Rules
Mark: Service =3, food=8
If service is poor or food is rancid then tip is cheap
7
1 Fuzzy Inference System
Fuzzy Inference System
Crisp
Input
Crisp
Output
8
Fuzzy Inference System
Aggregation
Method Defuzzify
4. 5.
Fuzzify
Inputs
Fuzzy
Operation
Implication
Operation
Fuzzify
Inputs
Fuzzy
Operation
Implication
Operation
…
1.
1.
2.
2.
3.
3.
For each fuzzy rule:
Rule 1: If service is poor or food is rancid then tip is cheap
Rule 2: If service is good then tip is average
Rule 3: If service is excellent or food is delicious then tip is generous
9
Fuzzy MFs
MF: Service MF: Food MF: Tip
Rule 1: If service is poor or food
is rancid then tip is cheap
Rule 2: If service is good then
tip is average
Rule 3: If service is excellent or
food is delicious then tip is
generous
Fuzzy Matrix
Each line for a rule
Each column for a fuzzy input
or output
Align each origin of fuzzy input
and output both vertically and
horizontally
10
(4) Aggregate All Outputs
11
(5) COA Defuzzify
i
A i
i
A i i
COA
Y
A
Y
A
COA
y
y y
y
y dy
y ydy
y
( )
( ).
( )
( )
12
MOM Defuzzification
1
A y
‘
‘
we have
‘
For
which the MF reach a maximum *.
average of the maximizing at
Mean of maximum is the
Y
Y
MOM
A
MOM
dy
ydy
y
Y y y
y
y
2
then
If ( ) reaches its maximum whenever
If ( ) has a single maximum at , then
left right
MOM
A left right
A MOM
y y
y
y y [y ,y ]
y y y* y y*.
13
More on Defuzzification
Definition
“It refers to the way a crisp value is extracted from a fuzzy
set as a representative value”
There are five methods of defuzzifying a fuzzy set A of a
universe of discourse Z
Centroid of area zCOA
Mean of maximum zMOM
Smallest of maximum zSOM
Largest of maximum zLOM
Bisector of area zBOA
14
More on Defuzzification
Bisector of area zBOA
this operator satisfies the following;
where = min z; z Z & = max z; z Z.
zBOA
zBOA
A (z)dz A (z)dz,
1
A y
15
Smallest of maximum zSOM
Amongst all z that belong to [z1, z2], the smallest is called zSOM
Largest of maximum zLOM
Amongst all z that belong to [z1, z2], the largest value is called
z
LOM
More on Defuzzification
16
Information Flow of Fuzzy Inference System
17
1. Fuzzify inputs:
Resolve all fuzzy statements in the antecedent to a degree of membership
between 0 and 1. If there is only one part to the antecedent, this is the degree
of support for the rule.
2. Apply fuzzy operator to multiple part antecedents:
If there are multiple parts to the antecedent, apply fuzzy logic operators and
resolve the antecedent to a single number between 0 and 1. This is the
degree of support for the rule.
3. Apply implication method:
Use the degree of support for the entire rule to shape the output fuzzy set.
The consequent of a fuzzy rule assigns an entire fuzzy set to the output. This
fuzzy set is represented by a membership function that is chosen to indicate
the qualities of the consequent. If the antecedent is only partially true, (i.e., is
assigned a value less than 1), then the output fuzzy set is truncated according
to the implication method.
4. Aggregation:
The combination of the consequents of each rule in preparation for
defuzzification.
5. Defuzzification.
Steps of FIS
18
Fuzzy Approach Essentials
It would be ideal if we could just capture the essentials
of this problem, leaving aside all the factors that could
be arbitrary. Let’s make a list of what really matters in
this problem:
If service is poor, then tip is cheap
If service is good, then tip is average
If service is excellent, then tip is generous
The order of rules is arbitrary. We might add two more
rules:
If food is rancid, then tip is cheap
If food is delicious, then tip is generous
19
Crisp Inference System
If a<-20 and b<10 then c=2
If -20<a<0 and b<10 then c=5
If 0<a<20 and b<10 then c=20
If a<-20 and b>10 then c=0
If -20<a<0 and b>10 then c=14
If 0<a<20 and b>10 then c=-5
Rules:
Given:
a=8, b=4 Find: c=?
Answer: c=20
Only one rule will be satisfied and contribute to the answer.
20
Fuzzy Inference System
If a is tall and b is old then c=ok
If a is short and b is old then c=no
If a is normal and b is old then c=kind of
If a is tall and b is young then c=very good
If a is short and b is young then c=ok
If a is normal and b is young then c=good
Rules:
Given:
a=height, b=age Find: c=go to basket ball team?
Answer: c=?
Fuzzy inference system is a democratic system.
21
FIS
22
Adding Rues Using Rule Editor
23
Fuzzy Rules
Create rules by selecting an item in each input and
output variable box, selecting one Connection item, and
clicking Add Rule. You can choose none as one of the
variable qualities to exclude that variable from a given
rule and choose not under any variable name to negate
the associated quality.
Delete a rule by selecting the rule and clicking Delete
Rule.
Edit a rule by changing the selection in the variable
box and clicking Change Rule.
24
FIS Editor
25
Rule viewer of Tipper-From the View menu, select Rules.
26
Surface Viewer of Tipper-Select surface from the View menu
27
2 Example: Fuzzy Inference
Consider a two input-one-output Mamdani fuzzy system that is
constructed from the following two rules
If x
1 is A1 and x2 is A2, THEN y is A1
If x
1 is A2 and x2 is A1, THEN y is A2
Where A
1 and A2 are fuzzy sets in R with membership functions:
otherwise
u if u
u
otherwise
u if u
u
A A
1 1 0 2
( )
1 1 1
( )
1 2
Suppose the input to the system is (x1, x2)=(0.3, 0.6). Determine the output
of the fuzzy systems in the following situations:
a)Max for aggregation and Mean of Maximum for defuzzification
b)Max for aggregation and Centroid for defuzzification
28
Example
-1 1
1
0 2
1
1
(x1, x2)=(0.3, 0.6)
A1 A2
-1 1
1
A1
2
1
1
A2
-1
1
1
A1
2
1
1
A2
If x1 is A1 and x2 is A2, THEN y is A1
If x1 is A2 and x2 is A1, THEN y is A2
29
Example
-1 1
1
0 2
1
1
(x1, x2)=(0.3, 0.6)
A1 A2
-1 1
1
A1
2
1
1
A2
-1
1
1
A1
2
1
1
A2
0.7
0.6
0.6
If x1 is A1 and x2 is A2, THEN y is A1
If x1 is A2 and x2 is A1, THEN y is A2
30
Example
-1 -1
1
0 2
1
1
(x1, x2)=(0.3, 0.6)
A1 A2
-1 -1
1
A1
2
1
1
A2
-1
-1
1
A1
2
1
1
A2
0.7
0.6
0.6
If x1 is A1 and x2 is A2, THEN y is A1
If x1 is A2 and x2 is A1, THEN y is A2
31
Example
-1 1
1
0 2
1
1
(x1, x2)=(0.3, 0.6)
A1 A2
-1 1
1
A1
2
1
-1
2
1
1
1
A2
0.4 0.3
A1
0.3
1
1
A2
0.7
0.6
0.6
If x1 is A1 and x2 is A2, THEN y is A1
If x1 is A2 and x2 is A1, THEN y is A2
32
Example
-1 1
1
0 2
1
1
(x1, x2)=(0.3, 0.6)
A1 A2
-1 1
1
A1
2
1
-1
2
1
1
1
0.4 0.3
A1
0.3
1
1
A2
A2
0.7
0.6
0.6
If x1 is A1 and x2 is A2, THEN y is A1
If x1 is A2 and x2 is A1, THEN y is A2
33
Example If x1 is A1 and x2 is A2, THEN y is A1 If x1 is A2 and x2 is A1, THEN y is A2
MOM:
COA:
-1
2
1
1
0.6
0.3
Centroid by geometric decomposition The centroid of a plane figure X can be computed by dividing it into a
finite number of simpler figures. , computing the centroid Ci and area
A
i of each part, and then computing
0.355
0.84 0.3 0.3 2 / 2 0.3 0.7
0.3 0.3 1.35 0.3 0.7 1.35
0.84 0.3 0.3 2 / 2 0.3 0.7
0.84 0 0.3 0.3 (3 0.3) / 2 0.3 0.7 1.35
0.84 0.3 0.3 2 / 2 0.3 0.7
0.84 0 (1 0.3/ 3) 0.3 0.3/ 2 0.3 0.7 1.35 (2 0.3 0.3/ 3) 0.3 0.3/ 2
C
34
Example
A B
A x B x
y A B
If x1 is A1 and x2 is A2, THEN y is A1
If x1 is A2 and x2 is A1, THEN y is A2
MOM: y=0
COA:
0.355
0.84 0.3
0.84 0 0.3 1.35
-1
2
1
1
0.6
0.3
y=0.335
35
Centroid
Centroid of a finite set of points
The centroid of a finite set of points
Centroid by geometric decomposition
The centroid of a plane figure X can be computed by dividing it into a finite number of simpler figures
, computing the centroid Ci and area Ai of each part, and then computing
36
A Control System
Objective of Control:
Make a dynamic system behave in a desired manner, according
some performance specifications.
Note:
Complex system (many inputs and many outputs, dynamic coupling,
nonlinear, etc.)
Unknown disturbances
Unknown dynamics
37
Basic Elements of Control System
Controller
(Actuator)
Plant
Output
Input + –
Feedback (from sensors)
Error
Ctrl. Signal
Plant: part of a control system to be controlled
Output: variable of the plant to be controlled
Input (reference/set point) — the desired output
Error signal: the difference between the set point and the output
Sensors: the eyes of control enabling one to see what is going
on
Controller (designed by the engineer): acts on the error signal
and issues a control signal to the plant in order to achieve the
desired output
38
Conventional Control
Methods for representing control systems
Transfer Functions
Block Diagrams
State Space Model
PID Control
In process control >90% controllers are of PI(D)-type
Good for linear process control
Relatively easy to understand (important reason for wide
popularity)
39
About Project 1
Controller
u(t)
Plant
y(t)
r(t) + e(t)
40
1. Linear Partition
x
x1
x2
3
x4
x5
a1 a2 a3 a4
y f (x)
Non-linear equation
a x
a x a
a x a
a x a
x a
k x x f x
k x x f x
k x x f x
k x x f x
k x x f x
y
4
3 4
2 3
1 2
1
5 5 5
4 4 4
3 3 3
2 2 2
1 1 1
( ) ( )
( ) ( )
( ) ( )
( ) ( )
( ) ( )
Represented by 5 linear
equations
41
PID Controller
1 ( )
( ) ( ( ) ( ) ) p d
i
de t
u t K e t e d T
T dt
Controller
u(t)
Plant
y(t)
r(t) + e(t) The idea continuos PID controller
K
p : proportional gain
T
i : integral time
T
d : derivative time
t
42
A Matlab PID Controller
1 ( )
( ) ( ( ) ( ) )
/
p d
i
i p i
d p d
de t
u t K e t e d T
T dt
K K T
K K T
t
43
Functions of P, I and D
P should be dominant for reducing large error
D should comes into play to slow the output down to
reduce overshoot
I comes into play to reduce steady
state error. Its effects on the
transient phase should be as
small as possible.
1 ( )
( ) ( ( ) ( ) ) p d
i
de t
u t K e t e d T
T dt
t
44
Poles at Origin in Open Loop TF
1/s
1/(s2+2s+1)
–
R(s) C(s)
+
B(s)
E(s)
U(s)
( ) 0
( ) 1( )
e
r t t
45
Poles at Origin in Open Loop TF
K
1/(s2+2s+1)
–
R(s) C(s)
+
B(s)
E(s)
U(s)
( ) 0
( ) 1( )
e
r t t
46
Proportional
High value of gain
makes system more
insensitive to load
disturbance
Too large gain makes
system more
sensitive to
measurement noise
Steady-state error
decreases when gain
increases
Oscillation however
often increases
K
P
47
Integral
Integral term removes
steady state error
Short integration time
often leads to oscillation
Long integration time
common in process
control
K
i
48
Derivative
Derivative term can
predict output
Fast and stable
response
Noise can make
derivative control
problematic
Also long delays are
problematic when using
derivative term
K
d
49
The Characteristics of P, I, and D controllers
A proportional controller (Kp) will have the effect of reducing the rise time and
will reduce, but never eliminate, the steady-state error.
An integral control (Ki) will have the effect of eliminating the steady-state error,
but it may make the transient response worse.
A derivative control (Kd) will have the effect of increasing the stability of the
system, reducing the overshoot, and improving the transient response.
50
Proportional Control
By only employing proportional control, a steady state error occurs.
Proportional and Integral Control
The response becomes more oscillatory and needs longer to settle, the
error disappears.
Proportional, Integral and Derivative Control
All design specifications can be reached.
The Characteristics of P, I, and D controllers
51
CL RESPONSE RISE TIME OVERSHOOT SETTLING TIME S-S ERROR
Kp
Decrease
Increase
Small Change
Decrease
Ki
Decrease
Increase
Increase
Eliminate
Kd
Small Change
Decrease
Decrease
Small Change
The Characteristics of P, I, and D controllers
52
Tips for Designing a PID Controller
1. Obtain an open-loop response and determine what needs to be improved
2. Add a proportional control to improve the rise time
3. Add a derivative control to improve the overshoot
4. Add an integral control to eliminate the steady-state error
5. Adjust each of Kp, Ki, and Kd until you obtain a desired overall response.
Lastly, please keep in mind that you do not need to implement all
three controllers (proportional, derivative, and integral) into a
single system, if not necessary. For example, if a PI controller
gives a good enough response, then you don’t need to
implement derivative controller to the system. Keep the
controller as simple as possible.
53
Filtered Derivatives
Fast changes in reference signal result high derivatives which
cause control signal saturation
Fixes:
Computing derivatives from process output
Using filtered derivative term (this is used often in real applications)
Benefits:
Easy to implement in practice
More insensitive to noise than normal derivative term
Corresponds with derivation of low pass filtered signal
By choosing small τ, system has same response as by using normal
derivation in low frequency band
54
Example: PID
sltank
sltank2
- Assignment status: Already Solved By Our Experts
- (USA, AUS, UK & CA PhD. Writers)
- CLICK HERE TO GET A PROFESSIONAL WRITER TO WORK ON THIS PAPER AND OTHER SIMILAR PAPERS, GET A NON PLAGIARIZED PAPER FROM OUR EXPERTS

QUALITY: 100% ORIGINAL PAPER – NO PLAGIARISM – CUSTOM PAPER