0% found this document useful (0 votes)
16 views142 pages

Chapter 4-3 - Matlab FLC Toolbox FLC Applications

This document covers Fuzzy Logic Control (FLC) and its applications, particularly using the Matlab FLC Toolbox. It details the fuzzy inference system design process, including fuzzification, fuzzy inferencing, aggregation, and defuzzification, along with practical examples such as a tipping problem and industrial applications like water bath control. Additionally, it discusses various GUI tools available in Matlab for developing fuzzy logic systems.

Uploaded by

mukisasamuel2020
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)
16 views142 pages

Chapter 4-3 - Matlab FLC Toolbox FLC Applications

This document covers Fuzzy Logic Control (FLC) and its applications, particularly using the Matlab FLC Toolbox. It details the fuzzy inference system design process, including fuzzification, fuzzy inferencing, aggregation, and defuzzification, along with practical examples such as a tipping problem and industrial applications like water bath control. Additionally, it discusses various GUI tools available in Matlab for developing fuzzy logic systems.

Uploaded by

mukisasamuel2020
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/ 142

MEEM 1713

ARTIFICIAL INTELLIGENCE AND APPLICATIONS

Chapter 4:
Fuzzy Logic
Part 3 – Matlab FLC Toolbox & FLC Applications

Assoc. Prof. Ts. Dr. Herman Wahid


Department of Control & Mechatronics Engineering (CMED)
Faculty of Electrical Engineering
Universiti Teknologi Malaysia.
Chapter Outline

4.1 Review on Fuzzy Logic Control Design Process

4.2 Matlab Simulation Using Fuzzy Logic Control Toolbox

4.2.1 Matlab Simulation Example


• Tipping problem

4.3 Examples of FLC Projects


• FL real time approaches, water bath control, traffic lights control

4.4 Industrial/Commercial Applications of FLCS

www.utm.my
• Washing machine, rice cooker, refrigerator etc.

MEEM 1713 – ARTIFICIAL INTELLIGENCE 2


4.1
Review on Fuzzy Logic
Design Process

www.utm.my
MEEM 1713 – ARTIFICIAL INTELLIGENCE
3
Introduction
● A Fuzzy Inference System (FIS) is a way of mapping an
input space to an output space using fuzzy logic
● FIS uses a collection of fuzzy membership functions and
rules, instead of Boolean logic, to reason about data.
● The rules in FIS (sometimes may be called as fuzzy expert
system) are fuzzy production rules of the form:
− if p then q, where p and q are fuzzy statements.
● For example, in a fuzzy rule
− if x is low and y is high then z is medium.

www.utm.my
− Here x is low; y is high; z is medium are fuzzy statements; x and
y are input variables; z is an output variable, low, high, and
medium are fuzzy sets.

MEEM 1713 – ARTIFICIAL INTELLIGENCE 4


Cont…
● The antecedent describes to what degree the rule applies, while
the conclusion (consequence) assigns a fuzzy function to each of
one or more output variables.
● Most tools for working with fuzzy expert systems allow more than
one conclusion per rule.
● The set of rules in a fuzzy expert system is known as knowledge
base.
● The functional operations in fuzzy expert system proceed in the
following steps.
− Fuzzification

www.utm.my
− Fuzzy Inferencing (apply implication method)
− Aggregation of all outputs
− Defuzzification

MEEM 1713 – ARTIFICIAL INTELLIGENCE 5


Structure of a Fuzzy Expert System

www.utm.my
MEEM 1713 – ARTIFICIAL INTELLIGENCE 6
Fuzzification
● In the process of fuzzification, membership functions
defined on input variables are applied to their actual
values so that the degree of truth for each rule premise
can be determined.
● Fuzzy statements in the antecedent are resolved to a
degree of membership between 0 and 1.
− If there is only one part to the antecedent, then this is the
degree of support for the rule.
− If there are multiple parts to the antecedent, apply fuzzy logic
operators and resolve the antecedent to a single number

www.utm.my
between 0 and 1.
● Antecedent may be joined by OR; AND operators.
− For OR -- max
− For AND -- min
MEEM 1713 – ARTIFICIAL INTELLIGENCE 7
Fuzzy Inferencing
● In the process of inference
− Truth value for the premise of each rule is computed and
applied to the conclusion part of each rule.
− This results in one fuzzy set to be assigned to each output
variable for each rule.
● The use of degree of support for the entire rule is to
shape the output fuzzy set.
● The consequent of a fuzzy rule assigns an entire fuzzy set
to the output.
● If the antecedent is only partially true, (i.e., is assigned a

www.utm.my
value less than 1), then the output fuzzy set is truncated
according to the implication method.

MEEM 1713 – ARTIFICIAL INTELLIGENCE 8


Cont...
● If the consequent of a rule has multiple parts, then all
consequents are affected equally by the result of the
antecedent.
● The consequent specifies a fuzzy set to be assigned to
the output.
● The implication function then modifies that fuzzy set to
the degree specified by the antecedent.
● The following functions are used in inference rules.
● min or prod are commonly used as inference rules.

www.utm.my
− min: truncates the consequent's membership function
− prod: scales it.

MEEM 1713 – ARTIFICIAL INTELLIGENCE 9


Aggregation of all outputs
● It is the process where the outputs of each rule are combined
into a single fuzzy set.
● The input of the aggregation process is the list of truncated
output functions returned by the implication process for each
rule.
● The output of the aggregation process is one fuzzy set for each
output variable.
− Here, all fuzzy sets assigned to each output variable are
combined together to form a single fuzzy set for each output
variable using a fuzzy aggregation operator.
● Some of the most commonly used aggregation operators are

www.utm.my
− the maximum : point-wise maximum over all of the fuzzy sets
− the sum : (point-wise sum over all of the fuzzy
− the probabilistic sum.

MEEM 1713 – ARTIFICIAL INTELLIGENCE 10


Defuzzification
● In Defuzzificztion, the fuzzy output set is converted to a crisp
number.
● Some commonly used techniques are the centroid and
maximum methods.
− In the centroid method, the crisp value of the output
variable is computed by finding the variable value of the
centre of gravity of the membership function for the fuzzy
value.
− In the maximum method, one of the variable values at
which the fuzzy set has its maximum truth value is chosen
as the crisp value for the output variable.

www.utm.my
● Some other methods for defuzzification are:
− bisector, middle of maximum mom (the average of the
maximum value of the output set), largest of maximum
(lom), and smallest of maximum (som), etc.
MEEM 1713 – ARTIFICIAL INTELLIGENCE 11
4.2
Matlab Simulation Using
Fuzzy Logic Control

www.utm.my
Toolbox
MEEM 1713 – ARTIFICIAL INTELLIGENCE
12
Introduction
● MATLAB fuzzy logic toolbox provides facility for the development
of fuzzy-logic systems using
− graphical user interface (GUI) tools
− command line functionality
● There are five primary GUI tools
− Fuzzy Inference System (FIS) Editor
− Membership Function Editor
− Rule Editor

www.utm.my
− Rule Viewer
− Surface Viewer

MEEM 1713 – ARTIFICIAL INTELLIGENCE 13


GUI Tools
Fuzzy Logic
Designer

Dynamically
Linked!
• changes in one

www.utm.my
GUI will
automatically
affect the other
GUIs.

MEEM 1713 – ARTIFICIAL INTELLIGENCE 14


Fuzzy Inference System (FIS) Editor

www.utm.my
MEEM 1713 – ARTIFICIAL INTELLIGENCE 15
Fuzzy Inference System (FIS) Editor

www.utm.my
MEEM 1713 – ARTIFICIAL INTELLIGENCE 16
Membership Function Editor

Select & edit


attributes of
membership
function

Display & edit Name & edit


values of current parameters of
variable membership

www.utm.my
function

MEEM 1713 – ARTIFICIAL INTELLIGENCE 17


Membership Function Editor

www.utm.my
MEEM 1713 – ARTIFICIAL INTELLIGENCE 18
Rule Editor

Rules –
automatically
updated

Create and edit


rules

www.utm.my
MEEM 1713 – ARTIFICIAL INTELLIGENCE 19
Rule Editor

www.utm.my
MEEM 1713 – ARTIFICIAL INTELLIGENCE 20
Rule Viewer

Shows how input


variable is used in
rules

Shows how output

www.utm.my
variable is used in
rules; shows output
of fuzzy system

MEEM 1713 – ARTIFICIAL INTELLIGENCE 21


Rule Viewer

www.utm.my
MEEM 1713 – ARTIFICIAL INTELLIGENCE 22
Surface Viewer

Shows output surface


for any system output
versus any one (or
Specify input and two) inputs
output variables

www.utm.my
MEEM 1713 – ARTIFICIAL INTELLIGENCE 23
Surface Viewer

www.utm.my
MEEM 1713 – ARTIFICIAL INTELLIGENCE 24
3.2.1
An Example of Matlab
Simulation

www.utm.my
 Tipping problem

MEEM 1713 – ARTIFICIAL INTELLIGENCE


25
www.utm.my
MEEM 1713 – ARTIFICIAL INTELLIGENCE 26
Solution:

● Two inputs : Quality of food and Service at a


restaurant rated at scale from 0-10
● One output: Amount of tip to be given
● Tip should reflect the quality of the food
and service.
● The tip might be in the range 5-15% of total

www.utm.my
bill paid.

MEEM 1713 – ARTIFICIAL INTELLIGENCE 27


I/O Variables

● Input variables
− Service : represented by poor, good,
excellent
− Food : represented by bad, delicious
● Output Variable:
− Tip : represented by cheap, average,
generous

www.utm.my
MEEM 1713 – ARTIFICIAL INTELLIGENCE 28
Bad taste

www.utm.my
MEEM 1713 – ARTIFICIAL INTELLIGENCE 29
www.utm.my
MEEM 1713 – ARTIFICIAL INTELLIGENCE 30
www.utm.my
MEEM 1713 – ARTIFICIAL INTELLIGENCE 31
www.utm.my
MEEM 1713 – ARTIFICIAL INTELLIGENCE 32
www.utm.my
MEEM 1713 – ARTIFICIAL INTELLIGENCE 33
www.utm.my
MEEM 1713 – ARTIFICIAL INTELLIGENCE 34
www.utm.my
MEEM 1713 – ARTIFICIAL INTELLIGENCE 35
www.utm.my
MEEM 1713 – ARTIFICIAL INTELLIGENCE 36
www.utm.my
MEEM 1713 – ARTIFICIAL INTELLIGENCE 37
www.utm.my
MEEM 1713 – ARTIFICIAL INTELLIGENCE 38
www.utm.my
MEEM 1713 – ARTIFICIAL INTELLIGENCE 39
www.utm.my
MEEM 1713 – ARTIFICIAL INTELLIGENCE 40
www.utm.my
MEEM 1713 – ARTIFICIAL INTELLIGENCE 41
www.utm.my
MEEM 1713 – ARTIFICIAL INTELLIGENCE 42
www.utm.my
MEEM 1713 – ARTIFICIAL INTELLIGENCE 43
Aggregate Conclusions

www.utm.my
MEEM 1713 – ARTIFICIAL INTELLIGENCE 44
Defuzzification

16.7

www.utm.my
MEEM 1713 – ARTIFICIAL INTELLIGENCE 45
All Steps Together looks like

www.utm.my
MEEM 1713 – ARTIFICIAL INTELLIGENCE 46
4.3
Example of FLC Projects

www.utm.my
Fuzzy Logic Real-time Control Approaches
Project #1: Fuzzy control of a water bath
Project #2: Fuzzy control of traffic lights

MEEM 1713 – ARTIFICIAL INTELLIGENCE


47
Fuzzy Logic Real-time Control
Approaches
 Application using a personal computer
(online tuning system)

Interface Card
(Adclone, NS, etc.)

(Fuzzy Control Algorithm)

Sensor
Personal
Computer
Process

www.utm.my
Actuator High-level
Languages
(C++, Pascal,
Visual Basic, Matlab etc.)

MEEM 1713 – ARTIFICIAL INTELLIGENCE 48


 Application using a microprocessor/microcontroller
(offline method)

Fuzzy control
Personal development
Computer system or LLL

(Download)

www.utm.my
Sensor Micro-
A/D
Process Controller
(DSP, Fuzzy Chip,
D/A
MC68HC11, Arduino, Raspberry Pi, etc.)
Actuator

MEEM 1713 – ARTIFICIAL INTELLIGENCE 49


Some Popular µC boards

Raspberry Pi

BeagleBone Black
MSP 430

www.utm.my
Arduino Nano
Arduino Mega Arduino Uno
MEEM 1713 – ARTIFICIAL INTELLIGENCE 50
Arduino IDE

www.utm.my
MEEM 1713 – ARTIFICIAL INTELLIGENCE 51
Arduino FIST

www.utm.my
+ Arduino Fuzzy Library
MEEM 1713 – ARTIFICIAL INTELLIGENCE 52
Project #1:
Water-Bath Temperature Control System
Objectives and Applications

• To control precisely the


temperature of the water/liquid
materials in the vessel
• Industrial applications involve
experimental production of drink
products, chocolates, sauces, etc.
• Industries include Yeo Hiap Seng,

www.utm.my
Nestle, F&N, Drinho, etc.

MEEM 1713 – ARTIFICIAL INTELLIGENCE 53


Schematic diagram of the Water-bath
temperature control system

A/D and D/A


Interface

Control Signal

Sensor
Stirrer

www.utm.my
AC ~
Coil
(Heater)

MEEM 1713 – ARTIFICIAL INTELLIGENCE 54


Block diagram of the water-bath
temperature control system

Disturbance

Control signal (Heater)


Error signal

Reference + Output
Fuzzy Logic Water Bath
(Desired Temp.) Temp.
Controller
-

www.utm.my
Sensor

MEEM 1713 – ARTIFICIAL INTELLIGENCE 55


Some Facts on the System

Math-model of system:

Practical system complexity


• Non-linearity in sensors and relays
y (k + 1) = 0.998 y (k ) + 0.222u (k ) • Noise
• Disturbance
• Non-adiabatic
The performance of the system can
• Controller Limits: 0V(min)-5V(max)

www.utm.my
be measured from the error between
the output and the reference signals • (However, these characteristics are
not present in the above math-model
except for controller limits)

MEEM 1713 – ARTIFICIAL INTELLIGENCE 56


Q: Design a fuzzy controller for the
Water Bath Temperature Control System

• First identify the fuzzy


variables: 2 inputs and 1
output

www.utm.my
MEEM 1713 – ARTIFICIAL INTELLIGENCE 57
Configuration of the fuzzy controller

Error
e
Change in
FLC Control Signal
∆u
Derivative
of Error
∆e

• Two input variables:


– Error in temperature of the liquid, e(k) = r(k) - y(k)

www.utm.my
– Rate of change of error, ∆e(k) = e(k) - e(k-1)
• One output variable:
– Change in the control signal, ∆u(k)

MEEM 1713 – ARTIFICIAL INTELLIGENCE 58


Quantization of the Fuzzy Variables

For simplicity the 3 fuzzy variables can be broken into 3 fuzzy subsets
and the membership functions can be overlapped as follows:

e, ∆e, and ∆u µe N Z P
Linguistic Term Label
Negative N e
Zero Z µ∆e N Z P
Positive P

∆e

www.utm.my
µ∆u
N Z P
The universe for the 3 variables can be
set accordingly through observation.

∆u

MEEM 1713 – ARTIFICIAL INTELLIGENCE 59


Scaling the universes of discourse

• We need to quantify each universe of discourse correctly within


the range of the respective variables.
• Scaling factors can be used to scale the universes of discourse.
• They act like gain control.

Ge
Error
e Change in

www.utm.my
G∆u Control Signal
FLC
Derivative ∆u
of Error
∆e G∆e

MEEM 1713 – ARTIFICIAL INTELLIGENCE 60


Determining the rule base
• Every fuzzy logic system must have a rule base.
• The rule base is used to infer the actions that need to be
taken based on the current conditions.
• Example the centre rule which is the steady-state rule can be
written as follows:
IF Error in Temperature is about Zero
AND the Derivative of Error is about Zero
THEN the Change in Control Input is about Zero
(IF e=Z AND ∆e=Z THEN ∆ u=Z)
• A rule can be written in triple form such as this: Error, e
(Z, Z; Z)
N Z P

www.utm.my
N
e Derivative
∆e ∆u of Error, ∆e Z z
• A matrix of the rule base can be set up as shown.
P
• The 1st row and the 1st column are the antecedents
and the boxes in the matrix are the consequents.

MEEM 1713 – ARTIFICIAL INTELLIGENCE 61


Determining the rules

• The choice of the consequents is based on observation and engineering


experience.
• A simple way to fill up the rule base matrix is to use the information given in
Chapter 2-3.
• Fill up the matrix such that the rule base is complete.

Error, e

N Z P

www.utm.my
Derivative
of Error, ∆e
Z

MEEM 1713 – ARTIFICIAL INTELLIGENCE 62


Example 3.1
Determining the encoding technique

• In many control application the


Mamdani’s max-min composition
technique is largely used.
µe N Z P
• An error reading that is observed
0.6
will fire the appropriate rule or rules
in the rule base. e(k) e
• Example 3.1 shows how the µ∆e N Z P
minimum encoding technique 0.7
determines the output suppose the
rule (Z,Z;Z) is fired. ∆e(k) ∆e
• Max composition is used to µ∆u N Z P
determine if more than 1 of the 0.6

www.utm.my
same consequent resulted. This
occurs when several rules are fired. ∆u
• A defuzzification technique will be
Determined output ∆u(k)
used to give a crisp output value.

MEEM 1713 – ARTIFICIAL INTELLIGENCE 63


Defuzzification

µc
• Defuzzification is required to produce the actual
signal that the plant can use. Z
• Thus, the fuzzy output value need to be
defuzzified.
• The output of the fuzzy controller is usually the
change in the control signal.
• The actual control signal to the plant is thus:
Max defuzzification

u(k+1) = u(k) + ∆u(k)


µc

• In Example 3.1 suppose only one rule is fired (Z,


Z; Z) as shown, if the max defuzzification Z

www.utm.my
technique is used, the output crisp value is:
µc(z*) ≥ µc(z) for all z ∈Z
• For centroid defuzzification, the value is given as
follows:
z* =
∑ µ C ( z ).z Centroid defuzzification
∑ µ C ( z)
MEEM 1713 – ARTIFICIAL INTELLIGENCE 64
Example 3.2

• Suppose the following rules are fired:


Rule1=(P,Z;P), Rule 2= (P,N;Z), Rule 3=(N,P;Z) and Rule 4=(Z,P;P).
• In this case the max-min composition would be computed.
• First the min computation is used to obtain the consequents from each of
rules fired which are: Rule 1=P, Rule 2=Z, Rule 3=Z and Rule 4=P.
• This shows that there are 2 consequents for “P” from Rules 1 and 4 and 2
consequents for “Z” from Rules 2 and 3.
• Now the max computation is used for obtaining only 1 “P” consequent and
1 “Z” consequent.
• Then any of the defuzzification technique can be used to get the crisp

www.utm.my
output value.

• In this example we show how the centroid defuzzification strategy is used


to solve this problem.

MEEM 1713 – ARTIFICIAL INTELLIGENCE 65


P, Z; P Z, P; P

µe N Z P N Z P
µe
0.75
0.8
e e
µ∆e N Z P
µ∆e N Z P
0.3 0.4
∆e ∆e
µ∆u N Z P
µ∆u Z P
N
0.3
0.4
∆u
∆u at µP =0.3 ∆u at µP =0.4 ∆u

• Consider the first 2 rules fired:

www.utm.my
Rule1=(P,Z;P) and Rule 4=(Z,P;P), this means that (e, ∆e; ∆u).
• Suppose Rule 1: µP=0.75, µZ =0.3, thus, min (µP, µZ) --> µP at 0.3

MEEM 1713 – ARTIFICIAL INTELLIGENCE 66


• Suppose Rule 4: µZ =0.8, µP=0.4, thus, min (µZ, µP) --> µP at 0.4

• Since the consequent P is fired twice having 2 membership values, 0.3 and 0.4
thus, we need to use the max compositional operator to obtain only 1 P value of
the consequent.

• Thus, max (µP=0.3, µP=0.4) will give µP=0.4.

• Similarly for Rules 2 and 3, the same computation will be done to obtain only 1 N
consequent (see next slide).

• Consider the next 2 rules fired:

www.utm.my
Rule2=(P,N;Z) and Rule 3=(N,P;Z)
• Suppose Rule 2: µP=0.5, µN =0.6, thus, min (µP, µN) --> µZ at 0.5
• Suppose Rule 3: µN =1.0, µP=0.4, thus, min (µN, µP) --> µZ at 0.4

MEEM 1713 – ARTIFICIAL INTELLIGENCE 67


P, N; Z N, P; Z

N Z P µe
µe N Z P
1.0
0.5

e e
µ∆e N Z P
µ∆e N Z P
0.6
0.4
∆e ∆e
µ∆u N Z P
µ∆u Z P
N
0.5
0.4
∆u ∆u
∆u at µZ =0.5 ∆u at µZ =0.4

• As the consequent N is fired twice having 2 membership values, 0.5

www.utm.my
and 0.4 thus, we need to use the max compositional operator to obtain
only 1 N value of the consequent.
• Thus, max (µZ=0.5, µZ=0.4) will give µZ=0.5.
• Suppose we use the centroid defuzzification strategy. The next slide
will show how this is done to get the crisp output.

MEEM 1713 – ARTIFICIAL INTELLIGENCE 68


• For the example given, suppose the centroid µ∆u N Z P
defuzzification technique is used to calculate
the crisp output.
0.4

∆u
• Graphically this can be shown as follows. ∆u at µP =0.4
• The first consequent P was obtained at µP
µ∆u N Z P
=0.4 and the second consequent Z at µZ
0.5
=0.5.
∆u
• The centroid defuzzification algorithm will
∆u at µZ =0.5
calculate the crisp value of ∆u from the
following equation:
µ∆u Z P

www.utm.my
N

where k is the sample


∆u =
∑ µ (k across
number∆u
).k the
universe for ∆u. ∑ µ (k )
∆u
∆u
Crisp value of ∆u

MEEM 1713 – ARTIFICIAL INTELLIGENCE 69


Exercise Based on Simulations

• Study the output of the water bath fuzzy control system at the
particular sampling interval.

• Note down the sampling interval, the setpoint (r), the output
(y), error (e), and del_error (∆e).

• By studying the rule-base matrix, write down the rules that are
fired at this interval in triple form, eg. (P, Z; N), etc..

• Study the membership functions table of e and ∆e and indicate

www.utm.my
the appropriate alpha cut-set (firing angle) based on the input
values of e and ∆e.

MEEM 1713 – ARTIFICIAL INTELLIGENCE 70


(continued)
• Supposing the controller is designed using the
max-min inference algorithm, show in the graph
the firing angles of all the consequents based on
the rules fired. Plot the resultant waveform at this
sampling interval on a graph paper.

• Using the centroid defuzzification strategy,


calculate the output ∆u. (Approximately divide
the waveform into discrete samples of 0.5). Show

www.utm.my
how ∆u is calculated.

MEEM 1713 – ARTIFICIAL INTELLIGENCE 71


Membership Function Table of e, ∆e and ∆u
of Water Bath Fuzzy Controller

µe N Z P
1.0

0.5

-50 -25 0 25 +50 e


µ∆e N Z P
1.0

0.5

-50 -25 0 25 +50 ∆e


µ∆u

www.utm.my
1.0
N Z P

0.5

-5 -2.5 0 +2.5 +5 ∆u

MEEM 1713 – ARTIFICIAL INTELLIGENCE 72


Project #2:
Fuzzy Traffic Lights Control

• Objective: To control traffic lights that


can respond to density of vehicles in an
efficient manner.

• At CAIRO a traffic lights control


simulator has been developed which can
use:

www.utm.my
– a fuzzy logic controller
– conventional preset timer

MEEM 1713 – ARTIFICIAL INTELLIGENCE 73


Fuzzy Traffic Lights Control

Simulation Objectives
• Understanding fuzzy logic application for traffic lights control
• Understanding the components of a fuzzy logic controller
• Able to set up rules for controlling traffic conditions
• Able to compare and understand the advantages of fuzzy logic
controller over fixed-time controller of traffic lights

Control Objectives
• To control traffic flow optimally at an isolated junction

www.utm.my
• To minimise waiting time
• To reduce fuel costs
• To reduce waste of man-hours

MEEM 1713 – ARTIFICIAL INTELLIGENCE 74


Comparison between Conventional and Fuzzy traffic controllers

Conventional traffic lights controller


• use a preset cycle time to change lights
• combine preset cycle time with proximity sensors

Fuzzy traffic lights controller


• mimic human intelligence for control of traffic conditions
• example of a traffic lights control rule

www.utm.my
IF traffic from the north of the city is HEAVY
AND the traffic from the west is LESS
THEN allow movement of traffic from the north LONGER.

MEEM 1713 – ARTIFICIAL INTELLIGENCE 75


Fuzzy Traffic Lights Control

Simulation of Traffic Lights Control

Control signal

Sensor Readings
Fuzzy Logic Relays/ Traffic
Controller Switches Lights
Traffic Flow

Configuration of the Fuzzy Controller

Traffic Condition
(Arrival) Lights

www.utm.my
R
FLC Switches Y
G
(Queue)
Traffic Condition

MEEM 1713 – ARTIFICIAL INTELLIGENCE 76


Traffic
Lights

Sensors
State
Machine
Traffic
Counter
Light
- Queue -
Arrival
FLC Interface

www.utm.my
Block diagram of the fuzzy
traffic lights controller

MEEM 1713 – ARTIFICIAL INTELLIGENCE 77


Fuzzy Traffic Lights Control

CAIRO’s Fuzzy Traffic Lights Simulator


Design Assumptions
• Traffic conditions are considered in 4 directions but
constraint to two: (1) Arrival and (2) Queue
• Also North and South are assumed as one direction
whereas East and West as another
• Only straight traffic flow is considered (no turnings)
• Fuzzy controller has 2 inputs (Quantity of Traffic at
Arrival and Queue) and 1 output (Extension of Green
Lights of the Arrival Traffic Lights (Green))
• All fuzzy variables are quantized into 4 fuzzy subsets
• The shape of membership functions are trapezoidal at
the sides and triangular in the middle.

www.utm.my
N
• Flow density of cars can be controlled for each
direction. W E

MEEM 1713 – ARTIFICIAL INTELLIGENCE 78


Fuzzy Traffic Lights Control

Fuzzy Controller Design

Quantization of Fuzzy Variables


For simplicity, we quantize all the three fuzzy variables in a similar way,
i.e. into four fuzzy subsets:

Fuzzy Input Variables


Arrival Queue
LinguisticTerm Label LinguisticTerm Label
Too Many TM Large L
Many MY Many M
Few F Small S
Almost None AN Very Small VS

Fuzzy Output: Variable:


Extension of Green Lights

www.utm.my
LinguisticTerm Label
Longer L
Medium M
Short S
Zero Z

MEEM 1713 – ARTIFICIAL INTELLIGENCE 79


Membership Functions

µArrival ARRIVAL
• For simplicity, triangular AN F MY TMY
membership functions are used
for each variable.
• In this case, the cardinals for
No. of Cars

µQueue QUEUE
the universes of discourse are S M L
VS
integers.
• The membership functions are
overlapped by about 25% to No. of Cars

allow smooth transition from 1 µE.Time EXTENSION TIME (Green)

www.utm.my
fuzzy subset to another. Z S M L

Extension Time (Secs)

MEEM 1713 – ARTIFICIAL INTELLIGENCE 80


Determining the rules

• A rule base can be developed in the following


manner.
• Two examples of rules:
IF there are too many cars (TMY) at the arrival
side
Rule#1 AND very small number of cars (VS) queueing
THEN extend the green light longer (L).
Arrival
IF there are few cars (F) at the arrival side
AN F MY TMY
Rule#2 AND very small number of cars (VS) queueing
THEN extend the green light short (S). VS

www.utm.my
• Fill up the rule base matrix as shown: Queue
• In this application the centroid defuzzification is used. M

MEEM 1713 – ARTIFICIAL INTELLIGENCE 81


Simulation procedure for Traffic Lights Simulation

• Get into Windows Environment


• Execute the Fuzzy Traffic Control Software (FTC)
• Select fuzzy controller and configure your fuzzy controller
appropriately as have been discussed in the class
• You need to select BOTH from the controller menu
• You need to configure the density of cars for each direction. Try:
N=90, W=50, S=80, E=40
• Then select <GO>
• Fixed-time controller mode will operate first for 2 minutes
• Observe the traffic conditions until the fixed-time controller operation

www.utm.my
is completed

MEEM 1713 – ARTIFICIAL INTELLIGENCE 82


• Write down the maximum number of cars you observed stopping at
the junction (any direction)
• After the fixed-time cycle has finished, the fuzzy controller mode wil
automatically run for 2 minutes
• Observe traffic conditions and write down the maximum number of
cars you observed stopping at the junction (any direction)
• Highlight Graph and Plot:
– (1). Flow density
– (2). Wait Time
– (3). Cost Function
• Your fuzzy controller should show better results

www.utm.my
• If not, you need to reconfigure your fuzzy controller
• Try simulating other conditions

MEEM 1713 – ARTIFICIAL INTELLIGENCE 83


4.4
Industrial/Commercial

www.utm.my
Applications of FLCS

MEEM 1713 – ARTIFICIAL INTELLIGENCE


84
Industrial/Commercial Examples of Fuzzy
Logic Systems

• Due to the advancement of the microprocessor, many


commercial applications of fuzzy logic have been
successful since the 1980s.

• In this part of the module, we discuss some examples of


industrial/commercial applications of fuzzy logic systems.

• Fuzzy washing machine


• Fuzzy Rice Cooker

www.utm.my
• Fuzzy Vacuum Cleaner
• Fuzzy Air Conditioner
• Fuzzy Blood Pressure Meter

MEEM 1713 – ARTIFICIAL INTELLIGENCE 85


Example #1: Fuzzy
logic washing
machine

www.utm.my
MEEM 1713 – ARTIFICIAL INTELLIGENCE 86
Fuzzy logic washing machine

• In 1990 Matsushita (National) produced the first automatic


controlled fuzzy logic washing machine - “Aisai Go (Beloved
Wife) Day Fuzzy”.

• In 1990, the sales were so successful in Japan that it resulted


in an explosion of fuzzy logic home consumer’s products such
as rice cookers, camcorders, televisions, refrigerators, etc.

www.utm.my
MEEM 1713 – ARTIFICIAL INTELLIGENCE 87
Example of a fuzzy
logic washing machine
Samsung SW-5AI(S)

www.utm.my
MEEM 1713 – ARTIFICIAL INTELLIGENCE 88
Example of the Samsung’s
SW-5AI(S) Fuzzy logic
washing machine

Fuzzy course will


select the best
washing mode
automatically with
one touch of the
button based on
load, dirt, type of

www.utm.my
fabric, etc.

MEEM 1713 – ARTIFICIAL INTELLIGENCE 89


Principle of the fuzzy washing machine

• The fuzzy logic washing machine


operates based on the principle of
laundering :
“When dirt has been removed, then
washing is stopped”

• Using fuzzy inference, the optimum


washing time is determined from a
wash sensor.

www.utm.my
• The wash sensor measures the
dirtiness (turbidity) of the water
through an optical sensor which is
installed near the drain valve.

MEEM 1713 – ARTIFICIAL INTELLIGENCE 90


A photo-transistor is used as a sensor to
measure dirtiness of the water.

Infrared Light Receptor


sensor (infrared
emitting Drained out water
diode)

www.utm.my
MEEM 1713 – ARTIFICIAL INTELLIGENCE
• The wash sensor consists of an infrared light-emitting diode
(LED) and a photo-transistor.

• The light beam generated by the infra-red LED, passing through


the wash water in the pipe, enters the phototransistor.

www.utm.my
Wash sensor output
change over time.

MEEM 1713 – ARTIFICIAL INTELLIGENCE 92


• The photo-transistor produces a voltage in proportion to the
intensity of the light.
• If the clothes are dirty, the wash water being drained out will be
darker, thus less light will be passed.
• The previous figures show the light transmittance over time due to
the different types of dirt.
• The change of the output of the wash sensor over time is shown in
the previous page.
• When washing started, the dirt in the clothes is gradually washed
out and the wash water becomes dirty, causing the transmittance

www.utm.my
of wash water to decrease as shown in (a).
• The rate of decrease of the transmittance depends on the quality
of the dirt:
– Fast
MEEM 1713 – ARTIFICIAL for muddy dirt
INTELLIGENCE 93
• This is because muddy dirt is removed easily by the mechanical
force of the water flow produced by the rotation of the pulsator,
while oily dirt is not adequately removed until the detergent effect
takes place.
• When most of the dirt in the clothes has been removed, the
transmittance of the wash water approaches a state of saturation.
• The transmittance at saturation becomes lower when the clothes
are dirtier, and the transmittance becomes higher when the

www.utm.my
clothes are less dirty.

MEEM 1713 – ARTIFICIAL INTELLIGENCE 94


Fuzzy inference in the washing machine
• It is difficult to obtain the optimum relation between dirtiness and washing time
experimentally.
• This is because there are many kinds of dirtiness of clothes which gives different
wash sensor output patterns, thus collection through experiments are rather
impossible.
• Also the relation between the dirtiness and wash time is not linear.
• Hence, fuzzy inference technique would be suitable for such application.

www.utm.my
MEEM 1713 – ARTIFICIAL INTELLIGENCE 95
• Using fuzzy inference, linguistic rules can be used to solve the washing problem
and the nonlinear property of the relation is approximated by an interpolation
function of the fuzzy inference
• In order to provide the inference 2 inputs are suitable:
– saturation time, Ts
– light transmittance, Vs
• and 1 output
– Washing time, Wt
• Saturation time is chosen because it is related to the quality of the dirt and light
transmittance is chosen because it is related to the amount of dirt and example of
the membership functions are given as follows:

www.utm.my
MEEM 1713 – ARTIFICIAL INTELLIGENCE 96
• The washing machine can sense the following types of dirt:
– Muddy dirt (faster to be washed away)
– Oily dirt (need detergent and more time to be washed away)

• When most of dirt has been washed away the washing machine
approaches a state of saturation:
– Lower transmittance (heavy dirt)
– Higher transmittance (light dirt)

Fuzzy Vs

www.utm.my
rule base Low Middle High
Short T1 T2 T3
Ts
Long T4 T5 T6

MEEM 1713 – ARTIFICIAL INTELLIGENCE 97


• Examples of rules (2 rules are given here). A table of rules can be
set as shown.
If transmittance (Vs) is Low and Saturation time (Ts) is Long
Then Wash time (Wt) is Longer

If transmittance (Vs) is High and Saturation time (Ts) is Short


Then Wash time (Wt) is Shorter

• For simplicity, the consequents of the fuzzy rules are expressed by


real numbers, T1 - T6 which are the washing times.

www.utm.my
MEEM 1713 – ARTIFICIAL INTELLIGENCE 98
Advantages of the fuzzy logic
washing machine:
• It would be very difficult to design a
rule base system without using fuzzy
logic concepts.
• Thus, with fuzzy logic it reduces
amount of required memory.
• Rules are acquired from skilled
launderers (experts).
• Nonlinear relationship between
degree of dirtiness and wash time can
be overcome by the nonlinear fuzzy
logic controller.
• Excessive or inadequate washing can

www.utm.my
be avoided.
• Many fuzzy logic washing machine
consists of one-touch button system
for the fuzzy wash.
MEEM 1713 – ARTIFICIAL INTELLIGENCE 99
Example #2: The
Fuzzy Rice
Cooker

www.utm.my
MEEM 1713 – ARTIFICIAL INTELLIGENCE 100
General Overview

 A Rice Cooker is an everyday used electrical


appliance which is an excellent example of a
temperature control system.

 Its objective is to control the rate of heating to


have evenly cooked rice , avoid over burned rice

www.utm.my
and most importantly minus the hassle of stove
rice cooker.

MEEM 1713 – ARTIFICIAL INTELLIGENCE 101


Historical Overview

 The rice cooker is a simple device began with a trivial


on-off switch in the 1960s, then evolved to power
control, electric timer, induction heating, and now a
neuro-fuzzy controller in which the heat application
is finely controlled, with the temperature at each
stage of the cooking process and period of time at
each stage controlled by information such as the
preferred rice stiffness, amount of cooked rice

www.utm.my
(deduced from the temperature rise and the power
consumption).

MEEM 1713 – ARTIFICIAL INTELLIGENCE 102


• There have been at least three generations in the
production of rice cooker.

1. The first generation with bi-metalic controls


(electric foot warmer),
2. 2nd generation with sensors and micro CPU
(electric rice cooker and electric jar), and
3. 3rd generation with sensors, fuzzy, and neural
networks (induction heating rice cooker). The

www.utm.my
next generation will use sensors as well as even
more general kinds of nonlinear information
processing.
MEEM 1713 – ARTIFICIAL INTELLIGENCE 103
Fuzzy Rice Cookers in the Market

• Sanyo Neuro-Fuzzy Deluxe Rice


Cooker (Model ECJ-5205SN, ECJ-
AC4E…)

www.utm.my
• Panasonic National Neuro-Fuzzy
Rice Cooker (Model SRMK10 …)

MEEM 1713 – ARTIFICIAL INTELLIGENCE 104


• National Fuzzy Rice Cooker (SR-
MM10NW, SR-MM18NW…)

• Zojirushi Neuro ”Fuzzy Logic”

www.utm.my
Rice Cooker (Model NS-MYC- 18,
NS-JCC-18 …)

MEEM 1713 – ARTIFICIAL INTELLIGENCE 105


Components of a Fuzzy Rice
Cooker

www.utm.my
MEEM 1713 – ARTIFICIAL INTELLIGENCE 106
 The diagram shows the basic components of a
rice cooker.
 The main component is the rice container and is
heated directly by a heating coil.
 The heat sensor, which reads the temperature
of the rice container, sends the reading as an
input to the fuzzy controller.
 The fuzzy controller then control the heating coil
to obtain the desired heating of rice.

www.utm.my
MEEM 1713 – ARTIFICIAL INTELLIGENCE 107
Input/Output Variables

• Two Input Variables


1. Amount of Rice
2. Temperature of Rice Container

• One Output Variable

www.utm.my
Rate of Heating
(Change in the control signal)

MEEM 1713 – ARTIFICIAL INTELLIGENCE 108


• Amount of rice in the container is not read by a
weight sensor since it is not economical.
• If the same amount of power is supplied to the
heating coil, the temperature rise time and rising
rate will vary according to the amount of rice in the
rice container. With this basic concept, the amount
of rice can be estimated.
• The temperature of the rice container is obtained
from a temperature sensor.

www.utm.my
• The rate of heating is controlled by sending the
correct control signal to the heating coil.

MEEM 1713 – ARTIFICIAL INTELLIGENCE 109


Fuzzification
(Membership Functions of the I/O Variables)

Amount of Rice (Input)

LOW MEDIUM HIGH


1

0.8

0.6 LOW
MEDIUM
0.4 HIGH

www.utm.my
0.2

Amount of Rice
in Container

MEEM 1713 – ARTIFICIAL INTELLIGENCE 110


Temperature of Rice Container (Input)
LOW MEDIUM HIGH
1

0.8

0.6 LOW
MEDIUM
0.4 HIGH

0.2

0
Temperature in
Container
Rate of Heating (Change in the control signal) (Output)
LOW MEDIUM HIGH
1

www.utm.my
0.8

0.6 LOW
MEDIUM
0.4 HIGH

0.2
Rate of
0
MEEM 1713 – ARTIFICIAL INTELLIGENCE Heating 111
Design of Fuzzy Control Rules

• IF amount of rice is HIGH


AND temperature of rice container is LOW
THEN rate of heating is HIGH.
• IF amount of rice is LOW
AND temperature of rice container is HIGH
THEN rate of heating is LOW.
• IF amount of rice is MEDIUM
AND temperature of rice container is MEDIUM

www.utm.my
THEN rate of heating is MEDIUM.

MEEM 1713 – ARTIFICIAL INTELLIGENCE 112


Fuzzy Rule Matrix

Amount of Rice

L M H
Temperature
of L M H H
Rice

www.utm.my
Container
M M M M
H L L M
MEEM 1713 – ARTIFICIAL INTELLIGENCE 113
When is the Rice Cooked?

 A sudden surge of temperature will occur at the


end of the cooking process if substantial amount
of water in the rice cooker has evaporated.
 The rice is assumed to be cooked when the
sudden surge of temperature is detected.
 It will then switch itself into the keep warm mode.

www.utm.my
MEEM 1713 – ARTIFICIAL INTELLIGENCE 114
Fuzzy vs. Traditional Rice Cooker
 A fuzzy rice cooker is so much faster than a traditional
rice cooker. It can reduce cooking time to
approximately 20 minutes.

 A fuzzy rice cooker is not a cooker anymore, it is a


combination of cooker, steamer and warmer. A
traditional rice cooker could serve only as a cooker.

 A fuzzy rice cooker also offers a variety of cooking

www.utm.my
possibilities which can not be achieved by traditional
rice cookers, such as the cooking of porridge and sushi
rice.

MEEM 1713 – ARTIFICIAL INTELLIGENCE 115


Advantages of Fuzzy Rice Cooker

 Fuzzy controlled rice cooker


offers a different rate of heating
at different stages of the cooking
process rather than just the
same heating rate for the whole
Traditional Rice Cooker cooking process.

 This enable more even heating for smooth and

www.utm.my
fluffy rice.
 Fuzzy controller also makes continuous keep
warm feature possible.
MEEM 1713 – ARTIFICIAL INTELLIGENCE 116
Disadvantages of Fuzzy Rice Cooker

• The capacity of a fuzzy rice cooker is usually smaller


than conventional rice cooker

• Fuzzy models found in the market are usually 5 cups and


10 cups while conventional models usually have models
up to 33 cups.

www.utm.my
• The price of a fuzzy rice cooker is higher then the
conventional rice cookers.

MEEM 1713 – ARTIFICIAL INTELLIGENCE 117


Conclusions
• Although a fuzzy rice cooker is more expensive then conventional
models, the features and benefits provided by it will still worth the
price.

• This new trend of fuzzy rice cooker design which will eventually take
place in the market and replace the conventional models.

www.utm.my
MEEM 1713 – ARTIFICIAL INTELLIGENCE 118
Example #3:
A FUZZY AIR-CONDITIONER

www.utm.my
MEEM 1713 – ARTIFICIAL INTELLIGENCE 119
Introduction to the Fuzzy Air-
Conditioner System

Air conditioning systems are essential in most of our daily lives.

Our expectations of such systems have been raised to demand


more than just temperature control, and it is increasingly
desirable to apply these systems in varying situations and
environments.

This fuzzy air-conditioner system serves to replace the


conventional systems for comfort and simplicity.

www.utm.my
MEEM 1713 – ARTIFICIAL INTELLIGENCE 120
Introduction to the Fuzzy Air-
Conditioner System

The system is designed to control the temperature as well as


the humidity of the environment.
It is also known as the modified fuzzy air-conditioner, due to
its birth after the basic fuzzy air-conditioner was introduced
to the consumer market.

www.utm.my
Air
Fuzzy Air-cond ROOM

Temperature and humidity level detected by


sensors
MEEM 1713 – ARTIFICIAL INTELLIGENCE 121
The Fuzzy Air-Conditioner Design
Basically the design components consists of ;

2 Sensors Cooling Valve

2 Inputs 3 Outputs

www.utm.my
Heating Valve Humidifying Valve

MEEM 1713 – ARTIFICIAL INTELLIGENCE 122


Component Function in the Design

2 Sensors are required in the design, 1 sensor to


detect temperature variations and 1 sensor to
detect humidity/moisture level of the environment.

3 Control Elements: cooling valve, heating valve,


and humidifying valve, are required to adjust the
temperature and humidity of the air supply.

2 Inputs to the controller are measured

www.utm.my
temperature and humidity.

3 Outputs generate control signals that is


feedback to the 3 valves for adjustments.

MEEM 1713 – ARTIFICIAL INTELLIGENCE 123


Structure of the Fuzzy Control System

Error
Fuzzy Controller
Output Air from
Cooling Valve
the Fuzzy Air-

Defuzzification
Fuzzification
Air Supply +
Rule Heating Valve Conditioner
- Base Humidifying Valve
Fan

temperature
Sensors

www.utm.my
humidity

MEEM 1713 – ARTIFICIAL INTELLIGENCE 124


Fuzzy Logic Control System

The input variables are transformed into fuzzy sets by


the fuzzification process. TEMPERATURE
cold
cool
warm
hot

HUMIDITY
low
medium
high

The fuzzy system outputs the optimal air circulation level by adjusting the
cooling valve, heating valve and humidifying valve in the air conditioner. The

www.utm.my
combined results are sent to the fan to be propagated to the environment.The
amount of the valves openings depends on these output variables:
zero
low
medium
high
MEEM 1713 – ARTIFICIAL INTELLIGENCE 125
Membership Functions

TEMPERATURE
ùt
cold cool warm hot

Area weather
condition

ùh HUMIDITY
low med high

www.utm.my
Area weather
condition
MEEM 1713 – ARTIFICIAL INTELLIGENCE 126
Rule Base System

Rules for this controller can be formulated by adding rules for


humidity control to those already formulated for temperature
control in the basic model.

Additional rules must take the interference between temperature


and humidity into account.

For example, in the winter, when we use heat to raise


temperature, humidity is usually reduced. The air thus becomes
too dry. To address this condition, a rule statement similar to the

www.utm.my
following is appropriate: (Note: Cooling valve is abbreviated with
CV, heating valve with HV and humidifying valve with UV )

MEEM 1713 – ARTIFICIAL INTELLIGENCE 127


Rule Base System
IF temperature is cold AND humidity is high THEN CV is zero AND HV is high AND UV is low
IF temperature is cool AND humidity is high THEN CV is low AND HV is med AND UV is low
IF temperature is warm AND humidity is high THEN CV is med AND HV is low AND UV is low
IF temperature is hot AND humidity is high THEN CV is high AND HV is zero AND UV is low

IF temperature is cold AND humidity is med THEN CV is zero AND HV is high AND UV is med
IF temperature is cool AND humidity is med THEN CV is low AND HV is med AND UV is med
IF temperature is warm AND humidity is med THEN CV is med AND HV is low AND UV is med
IF temperature is hot AND humidity is med THEN CV is high AND HV is zero AND UV is med

IF temperature is cold AND humidity is low THEN CV is zero AND HV is high AND UV is high

www.utm.my
IF temperature is cool AND humidity is low THEN CV is low AND HV is med AND UV is high
IF temperature is warm AND humidity is low THEN CV is med AND HV is low AND UV is high
IF temperature is hot AND humidity is low THEN CV is high AND HV is zero AND UV is high

MEEM 1713 – ARTIFICIAL INTELLIGENCE 128


Rule Base System
temperature
cold cool warm hot
low zero low med high
humidity medium zero low med high
high zero low med high

Cooling valve (CV)

temperature temperature
cold cool warm hot cold cool warm hot
low high med low zero low low low low low
humidity

www.utm.my
medium high med low zero medium med med med med
high high med low zero high high high high high

Heating valve (HV) Humidifying valve (UV)

MEEM 1713 – ARTIFICIAL INTELLIGENCE 129


OPERATION

RULES INTERFERENCE COMPOSITIONS DEFUZZIFICATION

www.utm.my
MEEM 1713 – ARTIFICIAL INTELLIGENCE 130
RULES

Take the interference between temperature & humidity

When heat is used to raise temperature, humidity is usually


reduced

When air becomes dry :

www.utm.my
If temperature is LOW then open humidifying valve
SLIGHTLY
Act as predictor of humidity & also designed to prevent
overshoot in the output humidity curve
MEEM 1713 – ARTIFICIAL INTELLIGENCE 131
INTERFERENCE

Suppose the air conditioning system has measured


temperature & moisture levels & mapped them to the fuzzy
value of 0.7 & 0.1 respectively

The system need to infer the truth of each fuzzy rule

A myriad of difference inference technique exist but the

www.utm.my
simplest method is called the MAX-MIN

MEEM 1713 – ARTIFICIAL INTELLIGENCE 132


COMPOSITIONS

In MAX-MIN method, it uses the max fuzzy value of


inference conclusion as the final conclusion

Select a fuzzy value 0.7 since this was the highest


fuzzy value

www.utm.my
MEEM 1713 – ARTIFICIAL INTELLIGENCE 133
DEFUZZIFICATION

Convert the fuzzy output 0.7 into one of the air


circulation level

Fuzzy output of 0.7 indicates that the circulation should

www.utm.my
be set to HIGH

MEEM 1713 – ARTIFICIAL INTELLIGENCE 134


DIFFERENCES

CONVENTIAL METHOD FUZZY METHOD


A less flexible control method An alternative design methodology
which is simpler & faster
non-linearity Reduces the design development
cycle
Dead time Simplifies design complexity
External disturbances Improve time to market

Does not result in the satisfactory A better alternative solution to non-


temperature control linear control

www.utm.my
Improves control performances

Simplifies implementation

Reduces hardware costs


MEEM 1713 – ARTIFICIAL INTELLIGENCE 135
Example #4: Blood Pressure Meter

• Designed by National, Matsushita Electric Co., Japan


• By using fuzzy logic technology, measurements taken are
more reliable and accurate
• Measure both systolic and diastolic blood pressure

www.utm.my
MEEM 1713 – ARTIFICIAL INTELLIGENCE 136
Importance of Maintaining Normal Blood Pressure

• What is blood pressure?


• Blood pressure is the pressure exerted by blood pumped from the heart on the walls
of the blood vessels.
• Systolic pressure is the pressure exerted when the heart contracts and pumps blood
into the arteries, while diastolic pressure is the pressure exerted when the heart
expands.

• Blood pressure can vary according to a variety of factors including age, sex, and
physical condition.

www.utm.my
• It is lower during sleep and higher when working.

MEEM 1713 – ARTIFICIAL INTELLIGENCE 137


• Abnormal blood pressure can indicate a number of illnesses such
as:
– Cardiovascular problems
– Hypertensions
– Diabetes
– Liver disorder
• Blood pressure will be higher than usual when:
– Excited or tense
– Taking a bath
– Exercising
– Cold

www.utm.my
– Immediately after eating
– Smoking tobacco, drinking coffee
• Blood pressure will be lower than usual when
– After drinking alcohol
– After taking a bath
MEEM 1713 – ARTIFICIAL INTELLIGENCE 138
Fuzzy Logic measurement in the Blood Pressure meter

• Blood flow in the veins give pulse-type


waveforms. This allows measurement of
blood pressure possible using pulse
meters such as these.
• A number of factors affect blood pressure
measurements such as:
– Condition of the blood vessels
– Structure of arm

www.utm.my
• Thus making using conventional methods difficult.
• National employs fuzzy logic technology which double checks the
strength and shape of the pulse wave and then determine the blood
pressure.
MEEM 1713 – ARTIFICIAL INTELLIGENCE 139
Fuzzy logic inference engine
Pulse wave

Pulse wave Shape


strength

Pressure
Pressure Time

Pulse wave shape and its Pulse wave strength and


rate of change its rate of change

www.utm.my
Fuzzy Inference

Determination of Actual Blood Pressure


MEEM 1713 – ARTIFICIAL INTELLIGENCE 140
Advantages of Fuzzy logic

• Measurement reliability has been improved for


people with the following problems whose blood
pressure was difficult to measure:
– People with weak pulse
– People with irregular pulse
– People with unstable pulse

www.utm.my
• Error in measurement is detected

MEEM 1713 – ARTIFICIAL INTELLIGENCE 141


End of Chapter 4

www.utm.my
MEEM 1713 – ARTIFICIAL INTELLIGENCE
142

You might also like