Lect 05

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 33

Artificial Intelligence

Lect. (6)
Dr. Nader A. Mansour
naderabdelwahab@gmail.com
Mechanical Engineering Department
Outlines
Previous Lecture
Sugeno Type Fuzzy System
PID-Like Fuzzy Logic Controller (FLC)
Previous Lecture
 Defuzzification methods are;
Lambda-cut set.
Centroid method.
Weighted-average method
Mean of Max (MOM)
Smallest of Max (SOM)
Largest of Max (LOM)
Bisector of Area (BOA)
Previous Lecture
 Mamdani style inference system is performed in four steps:
Fuzzification of the input variables,
Rule evaluation,
Aggregation of the rule outputs, and
Defuzzification
Sugeno Fuzzy Inference System
 Sugeno style inference system is very similar to Mamdani
method except that Sugeno has changed only the rule
consequent.
 Sugeno suggested to use a single spike, fuzzy singleton, as the
membership function of the consequent.
 A fuzzy singleton is a fuzzy set with a membership function that
is unity at a single particular point on the universe of discourse
and zero everywhere else.
Sugeno Fuzzy Inference System
 The format of the Sugeno style inference system is

If x is A
AND y is B
THEN z is f ( x, y )

where x, y and z are linguistic variables. A and B are fuzzy sets on


universe of discourse X and Y respectively; and f( x, y ) is a
mathematical function
Sugeno Fuzzy Inference System
 The most used Zero-order Sugeno fuzzy model applies fuzzy
rules in the following form;

If x is A
AND y is B
THEN z is k

where k is a constant.
 In this case, the output of each fuzzy rule is a constant. All
consequent membership functions are represented by singleton
spikes
Sugeno Rule Evaluation
Sugeno Aggregation
Sugeno Defuzzification
 Weighted-average method
Mamdani Vs. Sugeno
Mamdani method is widely accepted for capturing expert
knowledge. It allows us to describe the expertise in more intuitive,
more human-like manner. However, Mamdani-type fuzzy
inferences entails a substantial computational burden.

On the other hand, Sugeno method is computationally effective


and works well with optimization and adaptive techniques, which
makes it very attractive in control problems, particularly for
dynamic nonlinear systems.
Mamdani Vs. Sugeno

MATLAB Demo
PID-like Fuzzy Logic
Controller
PID-Like Fuzzy Logic Controller (FLC)
PID controller is the most widely used control technique.
PID controller is considered as a hard computing technique
that is relatively hard to implement.
PID controller requires exact input data and provides precise
control actions.
Fuzzy logic controller is a good alternative for PID
controllers when precise mathematical formulations are not
possible.
Fuzzy logic controllers can work with less precise inputs.
PID-Like Fuzzy Logic Controller (FLC)
To construct the FLC, it’s needed to properly choose the
following;
The input variables (the process variable)
The output variables.
The rules of the controller.
PID-Like Fuzzy Logic Controller (FLC)

PID controller block diagram


PID-Like Fuzzy Logic Controller (FLC)
To construct the FLC, it’s needed to properly choose the
following;
The input variables (the process variable)
The rule antecedent (if-part of a rule) of the controller is
selected among;
Error signal
Change of error
Sum of error (∑e)
PID-Like Fuzzy Logic Controller (FLC)
To construct the FLC, it’s needed to properly choose the
following;
The output variables (the control output)
The rule consequent (then-part of a rule) of the controller
is selected among;
Control output u(t)
Change of control output
PD-Like (FLC)
The equation of the conventional PD controller is given
as;
PD-Like (FLC)

PD controller block diagram


PD-Like (FLC)
For any pair of error and change-of-error, it should work
out the control action.
The FLC consists of a set of rules with symbolic
description/ linguistic representation as follows;
if the value of error is <linguistic value> and the value of
change of- error is <linguistic value> then the value of
control output is <linguistic value>.
Linguistic values can be high, small, medium, positive,
negative, positive big, and so on.
PD-Like (FLC)
Positive, zero and negative linguistic
ysp
values are the most suitable to
represent the error and change of
error signals.
Since , then y(t)
positive error is the case when the
current process output y(t) has a value
below the set-point.
While, negative error is the case
when the current process output y(t)
has a value above the set point.
PD-Like (FLC)
Linguistic values of Δe with positive
sign means that the current process
output y(t) has decreased its value y(t)
when compared to y(t - 1).
While Δe with negative sign means
that the current process output y(t)
has increased its value when
compared to y(t - 1).
A linguistic value of zero for e(t)
means that the current process
output y(t) is about the set-point.
PD-Like (FLC)
The rules of the FLC are created based on the different
possibilities of the inputs and outputs.
These rules can be easily created in the rule table form.
The rule table form is suitable when we have two inputs
(error and change-of-error) and one output.
Let us consider the example where both inputs and an
output have a set of possible linguistic values {LN, MN,
SN, Z, SP, MP, LP} that stands for {Large Negative,
Medium Negative, Small Negative, Zero, Small Positive,
Medium Positive, Large Positive} respectively.
PD-Like (FLC)
The rule table is given as follows
PI-Like (FLC)
The equation of the conventional PI controller is given as;
PI-Like (FLC)
The corresponding block diagram is given as;
PI-Like (FLC)
The previous equation can be reformulated to be;
PI-Like (FLC)
In this case, to obtain the value of the control output
variable u(t), the change-of-control output Δu(t) is added
to u(t – 1).
PID-Like (FLC)
The equation of the conventional PID controller is given
as;

In this case, a number of three inputs are exist. The error,
the change of error and the sum/integral of error.
In case that each input has a number of 7 memberships,
then 7x7x7=343 rules has to be edited.
The PID-like fuzzy controller can be constructed as a
parallel structure of a PD-like fuzzy controller and a PI-
like fuzzy controller
PID-Like (FLC)
The block diagram of the parallel FLC can be as follows
PID-Like (FLC)

MATLAB Demo

You might also like