0% found this document useful (0 votes)
54 views63 pages

Fuzzy Logic Technique

Fuzzy logic, introduced by Professor L. A. Zadeh in 1965, allows for reasoning with degrees of truth rather than the binary true/false of classical logic. It is particularly useful in control systems, enabling approximate reasoning and handling of uncertainties, making it similar to human decision-making processes. Fuzzy logic is implemented through fuzzification, fuzzy inference, and defuzzification, allowing for more nuanced control in various applications.

Uploaded by

SOUDIP HAZRA
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
54 views63 pages

Fuzzy Logic Technique

Fuzzy logic, introduced by Professor L. A. Zadeh in 1965, allows for reasoning with degrees of truth rather than the binary true/false of classical logic. It is particularly useful in control systems, enabling approximate reasoning and handling of uncertainties, making it similar to human decision-making processes. Fuzzy logic is implemented through fuzzification, fuzzy inference, and defuzzification, allowing for more nuanced control in various applications.

Uploaded by

SOUDIP HAZRA
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 63

INTRODUCTION TO FUZZY

LOGIC

1
INTRODUCTION

1. The idea of fuzzy logic was invented by Professor L. A. Zadeh of the


University of California at Berkeley in 1965.
2. Zadeh proposed the idea of representing an incomplete state of
knowledge by means of a fuzzy set.
3. This invention was not well recognized until Dr. E. H. Mamdani,
who is a professor at London University, applied the fuzzy logic in a
practical application to control an automatic steam engine in 1974.

2
INTRODUCTION

4. Fuzzy logic control is the approximate reasoning methodology


proposed, that exploits formal models of common-sense reasoning.
5. Many applications of fuzzy control are related to simple control
algorithms, such as PID controllers.
6. In a natural way, nonlinearities and exceptions are included which
are difficult to realize with conventional controllers.
7. Fuzzy logic is better understood as fuzzy set-based methods for
approximate reasoning at large, and approximate reasoning is a
subtopic of Artificial Intelligence. 3
INTRODUCTION

8. Fuzzy logic idea is similar to the human being’s feeling and inference
process.
9. Unlike classical control strategy, which is a point-to-point control,
fuzzy logic control is a range-to-point or range-to-range control.
10. The output of a fuzzy controller is derived from fuzzifications of both
inputs and outputs using the associated membership functions.
11. A crisp input (an element is either a member of the set or not) will be
converted to the different members of the associated membership
functions based on its value. 4
INTRODUCTION

12. From this point of view, the output of a fuzzy logic controller is
based on its memberships of the different membership functions,
which can be considered as a range of inputs.
13. Fuzzy ideas and fuzzy logic are so often utilized in our routine life
that nobody even pays attention to them.
14. For instance, to answer some questions in certain surveys, most time
one could answer with 'Not Very Satisfied' or 'Quite Satisfied', which
are also fuzzy or ambiguous answers.
5
INTRODUCTION

15. Exactly to what degree is one satisfied or dissatisfied with some


service or product for those surveys?
16. These vague answers can only be created and implemented by human
beings, but not machines.
17. Is it possible for a computer to answer those survey questions directly
as a human being did? It is absolutely impossible. Computers can
only understand either '0' or '1', and 'HIGH' or 'LOW'.
18. Those data are called crisp or classic data and can be processed by all
machines. 6
INTRODUCTION

19. Fuzzy logic is a convenient way to map an input space to an output


space. This is the starting point for everything else, and the great
emphasis here is on the word “convenient.”
20. What do I mean by mapping input space to output space? Here are a
few examples:
1. You tell me how good your service was at a restaurant, and I’ll tell
you what the tip should be.
2. You tell me how far away the subject of your photograph is, and I’ll
focus the lens for you. 7
FUZZY HISTORY

1. Definition of fuzzy: Fuzzy – “not clear, distinct, or precise; blurred”


2. Fuzzy logic can be defined as a superset of conventional (Boolean)
logic that has been extended to handle the concept of partial truth -
truth values between “completely true” and “completely false”.
3. Fuzzy logic is a form of many-valued logic in which the truth values
of variables may be any real number between 0 and 1.

8
WHAT IS FUZZY LOGIC?

1. Fuzzy logic has two different meanings.


2. In a narrow sense, fuzzy logic is a logical system, which is an
extension of multivalued logic.
3. However, in a wider sense fuzzy logic (FL) is almost synonymous
with the theory of fuzzy sets, a theory which relates to classes of
objects with unsharp boundaries in which membership is a matter of
degree.

9
WHAT IS FUZZY LOGIC?

1. Why Fuzzy
1. As Zadeh said, the term is concrete, immediate and descriptive;
we all know what it means. However, many people in the West
were repelled by the word fuzzy, because it is usually used in a
negative sense.
2. Why Logic
1. Fuzziness rests on fuzzy set theory, and fuzzy logic is just a small
part of that theory.
10
11
HOW FUZZY WORKS?

1. Fuzzy logic works on the concept on deciding the output on the basis
of assumptions.
2. It works on the basis of sets.
3. Each set represents some linguistic variable defining the possible
state of the output.
4. Each possible state of the input and the degrees of change of the state
are a part of the set, depending upon which the output is predicted.
5. It basically works on the principle of If-else-then, i.e. If A AND B
Then Z. 12
HOW FUZZY WORKS?

1. Operates similar to humans.


1. Humans base their decisions on conditions

13
HOW FUZZY WORKS?

14
15
HOW FUZZY LOGIC IS IMPLEMENTED

16
CONVENTIONAL vs. FUZZY

Components of a ...
conventional expert fuzzy
system system
precise value
physical physical
device device
fuzzy
fuzzifier value
precise
precise precise
value
value value
fuzzy
model
knowledge
model
fuzzy defuzzifier 17
value
CONVENTIONAL vs. FUZZY

1. Compared with a conventional (classical) set, a fuzzy set allows


members to have a smooth boundary.
2. In other words, a fuzzy set allows a member to belong to a set to
some partial degree.

18
CONVENTIONAL vs. FUZZY

1. For example, the temperature can be divided into three categories:


LOW (0 ~30 °F), MEDIUM (30 °F ~ 70 °F) and HIGH (70 ~ 120 °F)
from the point of view of the classical set.
2. In the classical set, any temperature can only be categorized into one
subset, either LOW, MEDIUM or HIGH, and the boundary is crystal
clear.
3. But in the fuzzy set, these boundaries becomes vague or smooth.
4. One temperature can be categorized into two or maybe even three
subsets simultaneously. 19
CONVENTIONAL vs. FUZZY

1. For example, the temperature 40 °F can be considered to belong to


LOW to a certain degree, say 0.5 degree, but at the same time it can
belong to MEDIUM to about 0.7 degree.
2. Another interesting thing is the temperature 50 °F, which can be
considered to belong to LOW and HIGH to around 0.2 degree and
belong to MEDIUM to almost 1 degree.
3. The dash-line represents the classical set boundary

20
LOGICAL VALUES IN BOOLEAN AND
FUZZY LOGIC

0 01 0 1 1 0 0 0.2 0.4 0.6 0.8 1 1


(a) Boolean Logic. (b) Multi-valued Logic.

21
FUZZY SET OPERATION

1. The basic fuzzy set operations also include intersection, union and
complement.

A-fuzzy subset with element x, membership function-µA(x). 22


FUZZY SET OPERATION

1. A fuzzy set union operation is exactly equivalent to select the


maximum member from those members in the sets.
2. The intersection operation is selecting the minimum member from the
sets.
3. Fuzzy Complement defines as the collection of all elements in the
universe that do not reside in the set A.

23
LINGUISTIC VARIABLES

1. Linguistic variables allow us to interpret linguistic expressions in


terms of fuzzy mathematical quantities, translates linguistic terms in to
fuzzy sets.
2. Linguistic terms are composed of two parts.
1. A fuzzy predicate – such as young, smart, small, tall and low
2. Modifiers or Hedges – such as likely, unlikely, extremely.
3. Hedges are interpreted as a composition between a given function and
a basic membership function. The room is hot – linguistic value
How much it is hot – linguistic variable
24
DETERMINING A FUZZY MODEL

1. A fuzzy model can be obtained by using a priori knowledge about the


system provided as rules by system designers and system operators.
2. Knowledge acquisition is, however, sometimes cumbersome, costly,
and time-consuming.
3. A fuzzy model can be obtained by using available measurements and
using identification methods, e.g., clustering methods to find the
parameters and fuzzy terms of the rules describing the system.
4. This method provide good results and be interpreted in a linguistic
way, providing a means for evaluating and validating the final model25
FUZZY SETS

1. Several fuzzy sets


representing
linguistic concepts
such as low,
medium, high, and
so one are often
employed to define
states of a variable,
called a fuzzy
26
variable.
FUZZY CONTROL SYSTEM

1. A Fuzzifier which transforms the measured or the input variables in


numerical forms into linguistic variables.
2. A Controller which performs the fuzzy logic operation of assigning
the outputs based on the linguistic information. It performs
approximate reasoning based on human way of interpretation to
achieve the control logic. The controller consists of the knowledge
base and the inference engine. The knowledge base consists of the
membership functions and the fuzzy rules, which are obtained by
knowledge of the system operation according to the environment. 27
FUZZY CONTROL SYSTEM

3. The Defuzzifier converts this fuzzy output to the required output to


control the system.

28
FUZZIFICATION

1. Fuzzification is the operation that translates a crisp data input to a


membership degree (also called α level).
2. However, they should be first normalized to meet the range of
universe of discourse (X) suitable for the controller input.
3. The membership degree depends on the shape of membership
function used.
4. There are two commonly-used methods to evaluate membership
functions.
29
FUZZIFICATION

1. Memory oriented approach - This approach applies to the cases


where the membership functions do not change at run time, and the
total numbers of input and membership functions are limited.
2. The alpha values for each input and output are evaluated off-line and
stored in memory as discrete values.
3. Computation oriented approaches - The evaluation of the
membership degree is made on-line. In this case, we only need to
store the parameters of membership functions.
30
FUZZY INFERENCE (CONTROLLER)

1. Fuzzy Inference is the operation that uses the rule base and the alpha
values to deduce the fuzzy output.
2. The fuzzy inference involves two steps: finding the output of each of
rule, and aggregating the individual rule outputs to obtain the overall
system output.
3. The algorithm of FLC is based on three paradigms:
1. The AND operation between the antecedents of the rules
2. The OR operator between the individual rules
3. The fuzzy implication interpreted as an ADD operation. 31
FUZZY INFERENCE (CONTROLLER)

1. A common set of interpretations for the three operators is: min for
AND, max for OR, and min for ADD. This becomes the min-max
method.
2. Another commonly used interpretation of these operator is to use
multiplicative operation for ADD and/or AND operator. This results
in the max-dot method.
3. The Mamdani model (1974) – Employs either the max-min method
or the max-dot method, which generate an inferred conclusion by
suppressing the membership function of the consequence. 32
FUZZY INFERENCE (CONTROLLER)

1. Larsen's strategy - Larsen's fuzzy reasoning method is based on


PRODUCT operator inferencing.
2. Tsukamoto's strategy - Tsukamoto's fuzzy reasoning method is based
on a simplification of Mamdani's method, although all membership
functions (antecedents and conclusions) are monotonic.
3. Takagi-Sugeno’s-Kang (TSK) strategy - Takagi and Sugeno's fuzzy
reasoning method is based on a distinct model description. In this
model the control variables are characterized by the functions of the
process state variables. 33
DEFUZZIFICATION

1. Defuzzification translates the fuzzy output to a crisp output.


2. The most commonly used methods of defuzzification are:
1. The center of gravity (COG) method
2. The mean of maximum method (MOM)
3. The height method (HM).
3. The COG method defines the defuzzified value of a fuzzy set as its
fuzzy centroid:

34
DEFUZZIFICATION

1. The MOM method determine the defuzzified value as a mean of all


values of the universe of discourse, having maximum membership
grades: T is the set of elements which attain
the maximum value of µ(y)

2. The HM is based on the center of gravity of each rule, weighted by


the matching levels of each rule:

where fi is the center of gravity of


each output membership function.
35
FUZZY LOGIC REPRESENTATION

1. For every problem must represent in terms of fuzzy sets.

36
FUZZY LOGIC MEMBERSHIP
FUNCTION

Triangle (x; 20, 60, 80);


Trapezoid (x; 10, 20, 60, 95);
Gaussian (x; 20, 50);
Bell (x; 20, 4, 50)

37
38
FUZZY LOGIC MAPPING RULES

1. Fuzzy mapping rules provide a functional mapping between the input


and the output using linguistic variables.
2. The foundation of a fuzzy mapping rule is a fuzzy graph, which
describes the relationship between the fuzzy input and the fuzzy
output.
3. Sometimes, in real applications, it is very hard to derive a certain
relationship between the input and the output, or the relationship
between those inputs and outputs are very complicated even when
that relationship is developed. 39
FUZZY LOGIC MAPPING RULES

1. Fuzzy mapping rules are a good solution for those situations.


2. Fuzzy mapping rules work in a similar way to human intuition or
insight.
3. Each fuzzy mapping rule only approximates a limited number of
elements of the function, so the entire function should be
approximated by a set of fuzzy mapping rules.
4. In air conditioner system as an example, a fuzzy mapping rule can be
derived as IF the temperature is LOW, THEN the heater motor
should be rotated FAST. 40
FUZZY LOGIC MAPPING RULES

1. The rows and columns represent two inputs, the temperature input
and the change rate of the temperature input, and those inputs are
related to IF parts in IF-THEN rules.

41
FUZZY LOGIC MAPPING RULES

1. The conclusion or control output can be considered as a third


dimensional variable that is located at the cross point of each row
(temperature) and each column (change rate of the temperature), and
that conclusion is associated with the THEN part in IF-THEN rules.
2. When the current temperature is LOW, and the current change rate of
the temperature is also LOW, the heater motor’s speed should be
FAST to increase the temperature as soon as possible.

42
FUZZY LOGIC MAPPING RULES

1. In fuzzy expert systems, linguistic variables are used in fuzzy rules.


For example:
IF wind is strong
THEN sailing is good
IF project duration is long
THEN completion risk is high
IF speed is slow
THEN stopping distance is short
43
FUZZY LOGIC PROCEDURE

1. Step One
1. Define the control objectives and criteria.
2. Consider question like
1. What is trying to be controlled?
2. What has to be done to control the system?
3. What kind of response is needed?
4. What are the possible (probable) system failure modes?
2. Step Two
1. Determine input and output relationships
2. Determine the least number of variables for inputs to the fuzzy
44
logic system
FUZZY LOGIC PROCEDURE

3. Step Three
1. Break down the control problem into a series of IF X AND Y,
THEN Z rules based on the fuzzy logic rules.
2. These IF X AND Y, THEN Z rules should define the desired
system output response for the given systems input conditions.
4. Step Four
1. Create a fuzzy logic membership function that defines the
meaning or values of the input and output terms used in the rules
45
FUZZY LOGIC PROCEDURE

5. Step Five
1. After the membership functions are created, program everything
then into the fuzzy logic system
6. Step Six
1. Finally, test the system, evaluate results and make the necessary
adjustments until a desired result is obtain

46
ADVANTAGES OF FUZZY LOGIC

1. Developing a fuzzy logic controller is cheaper than developing model


based or other controller with comparable performance.
2. Fuzzy logic controller are more robust than PID controllers because
they can cover a much wider range of operating conditions.
3. Fuzzy logic controller are customizable.

47
LIMITATIONS OF FUZZY LOGIC

1. It is not useful for programs much larger or smaller than the


historical data.
2. It requires a lot of data.
3. The estimators must be familiar with the historically developed
programs.

48
EXAMPLE

Parameter / Level Symbol Level I Level 2 Level 3


Cutting speed A
227 256 285
(m/min)
Feed rate (mm/rev) B 0.432 0.318 0.203
Depth of cut (mm) C 0.30 0.45 0.60
Approach angle (°) D 95 75 45

49
EXAMPLE

Trial Cutting Speed Feed Rate Depth of Cut Approach


No (m/min) (mm/rev) (mm) Angle (°)
1 227 0.432 0.30 95
2 227 0.318 0.45 75
3 227 0.203 0.60 45
4 256 0.432 0.45 45
5 256 0.318 0.60 95
6 256 0.203 0.30 75
7 285 0.432 0.60 75
8 285 0.318 0.30 45
9 285 0.203 0.45 95
50
EXAMPLE

Trial Flank wear Surface roughness Material Removal Rate


No (mm) (µm) (g/min)
1 0.228 1.2 0.368
2 0.301 2.5 0.26
3 0.179 2.1 0.433
4 0.099 1.9 0.341
5 0.098 2.7 0.218
6 0.115 0.6 0.311
7 0.329 3.4 0.207
8 0.222 1.7 0.312
9 0.350 1.6 0.209
51
EXAMPLE

Normalized sequence Deviation sequence


Trial No
Flank Wear Roughness MRR Flank Wear Roughness MRR

1 0.484 0.786 0.712 0.516 0.214 0.288


2 0.194 0.321 0.235 0.806 0.679 0.765
3 0.679 0.464 1.000 0.321 0.536 0.000
4 0.996 0.536 0.593 0.004 0.464 0.407
5 1.000 0.250 0.049 0.000 0.750 0.951
6 0.933 1.000 0.460 0.067 0.000 0.540
7 0.083 0.000 0.000 0.917 1.000 1.000
8 0.508 0.607 0.465 0.492 0.393 0.535
9 0.000 0.643 0.009 1.000 0.357 0.991

52
EXAMPLE

Grey Relational Coefficient Grey Relational


Trial No Roughness Grade Rank
Flank wear MRR
1 0.492 0.700 0.635 0.609 4
2 0.383 0.424 0.395 0.401 8
3 0.609 0.483 1.000 0.697 2
4 0.992 0.519 0.551 0.687 3
5 1.000 0.400 0.345 0.582 5
6 0.881 1.000 0.481 0.787 1
7 0.353 0.333 0.333 0.340 9
8 0.504 0.560 0.483 0.516 6
9 0.333 0.583 0.335 0.417 7
53
EXAMPLE

54
EXAMPLE

55
EXAMPLE

Sl. No Range of values Condition Membership function


1 [-0.25 0 0.25] Very Low (VL)
2 [0 0.25 0.50] Low (L)
3 [0.25 0.5 0.75] Medium (M) Triangular function
4 [0.5 0.75 1] High (H)
5 [0.75 1 1.25] Very high (VH)

56
57
EXAMPLE

58
EXAMPLE

Trial Grey relational Grey-fuzzy reasoning %


Order
No grade grade Improvement
1 0.609 0.617 1.31 4
2 0.401 0.434 8.23 8
3 0.697 0.757 8.61 2
4 0.687 0.746 8.59 3
5 0.582 0.591 1.55 5
6 0.787 0.808 2.67 1
7 0.340 0.404 18.82 9
8 0.516 0.539 4.46 6
9 0.417 0.460 10.31 7
59
EXAMPLE

60
EXAMPLE

Main Effects Plot for Grey Fuzzy Reasoning Grade


Data Means
Cutting Speed (m/min) Feed Rate (mm/rev)
0.70
0.65
0.60
0.55
0.50
Mean

227 256 285 0.203 0.318 0.432


Depth of Cut (mm) Approach Angle (Degrees)
0.70
0.65
0.60
0.55
0.50

0.30 0.45 0.60 45 75 95 61


THANK YOU

62

You might also like