Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Fuzzy Logic Control Systems: Examples and Applications, Cheat Sheet of Applied Computing

Soft computing notes from Chitkara university

Typology: Cheat Sheet

2020/2021

Uploaded on 05/07/2023

aman-kumar-90
aman-kumar-90 🇮🇳

1 / 5

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Examples on Mamdani FIS system
Ex1: Design a fuzzy lighting controller system, in which the control
system dim the bulb light automatically according to the
environmental Light. Assume that the inputs to the system are the
environmental light x1 and the changing rate of the environmental
light x2. While the output variable which represents the control value
to the dimmer is DM. Consider the following assumption:
Assume that x1 can be Dark (D), Medium (M), and Light (L) and its
range between 120 and 220, with three membership functions:
L(130,150), Π(130, 150 190,210), and (190, 210) for D, M, and L
respectively.
x2 ranges between -10 and +10 and is divided into Negative-Small
(NS),Zero (ZE), and Positive-Small (PS), with three membership
functions: Λ (-20, -10, 0), Λ (-10, 0, 10), and Λ (0,10,20) for NS, ZE,
and PS respectively.
The output DM ranges between 0 and 10 and is divided into Very-
small (VS), Small (S), Big(B), and Very-big (VB), with four
membership functions: L(2,4), Λ(2,4,6), Λ(4,6,8), and (6,8) for VS,
S, B, and VB respectively.
Evaluate the output for x1 = 125 and x2 = -6, having the following
fuzzy rule base:
x1
x2
D
M
L
PS
B
S
VS
ZE
B
B
S
NS
VB
B
B
Solution:
Sol Q3:
pf3
pf4
pf5

Partial preview of the text

Download Fuzzy Logic Control Systems: Examples and Applications and more Cheat Sheet Applied Computing in PDF only on Docsity!

Examples on Mamdani FIS system

Ex1: Design a fuzzy lighting controller system, in which the control system dim the bulb light automatically according to the environmental Light. Assume that the inputs to the system are the environmental light x1 and the changing rate of the environmental light x2. While the output variable which represents the control value to the dimmer is DM. Consider the following assumption: Assume that x1 can be Dark (D), Medium (M), and Light (L) and its range between 120 and 220 , with three membership functions: L(130,150), Π(130, 150 190,210), and (190, 210) for D, M , and L respectively. x2 ranges between - 10 and +10 and is divided into Negative-Small (NS) , Zero (ZE) , and Positive-Small (PS) , with three membership functions: Λ (- 2 0, - 10, 0), Λ (-10, 0, 10), and Λ (0,10,20) for NS, ZE , and PS respectively. The output DM ranges between 0 and 10 and is divided into Very- small (VS), Small (S), Big(B), and Very-big (VB ), with four membership functions: L(2,4), Λ(2,4,6), Λ(4,6,8), and (6,8) for VS, S, B, and VB respectively. Evaluate the output for x 1 = 125 and x 2 = - 6, having the following fuzzy rule base: x x

D M L

PS B S VS

ZE B B S

NS VB B B

Solution:

Sol Q3:

X1=125 then it is D X2= - 6 then it is ZE and NS Therefore two rules will be fired: IF X1 IS D AND X2 IS ZE THEN DM IS B IF X1 IS D AND X2 IS PS THEN DM IS VB For the first rule X1 = 1 and X2 = 0.4 thus, DM = 0. For the second rule X1 = 1 and X2 = 0.6 thus, DM = 0. Now, the control action will be: dm = {0, 0, 0, 0, .4, .4, .5, .6, .6, .6} Finally, we apply center of gravity (CoG) defuzzification in order to obtain final crisp output:

  1. 77
  2. 1
  3. 1 0 0 .... 4. 4. 5. 6. 6. 6 ( 0 * 0 ) ( 0 * 1 ) ... ( 0 * 4 ) (. 4 * 5 ) (. 4 * 6 ) (. 5 * 7 ) (. 6 * 8 ) ... (. 6 * 10 )                    DMEx2: Consider a fuzzy logic controller with two inputs x, y and a single output u, in which each of the inputs/output variables is quantified into three fuzzy sets with membership functions as illustrated in the table bellow. Suppose that the range of each variable is [0, 10] with number of intervals = 10.
  1. If (X is Z) and (Y is Z) then (U is H)  Z( x ) = .33 ; Z( y )= 1  ; M( u )=0.

 

N n n N n

In n

u

1 1

u=(0+0+0.3333+0.666(4+5+6)+0.333(7+8+9+10))/(0.3335+0.666*3)≈ 6 Ex3: Consider a fuzzy logic controller is used to control the speed of a motor by changing its input voltage (V) according to two input variables; speed (SP), and speed change rate SC. Let the fuzzy set of SP be { Slow (S), Normal (N), Fast (F)} , and the fuzzy set for SC be { Low (L), Medium (M), High (H)} , and for the control action be { Slow Down (DN), No Change (NC), Speed Up (Up) }, where, (SP [500, 1000]), (SC  [0, 10]), and (V  [2, 3]) with step = 0.1. The membership functions for the input/output variables are described in table 1. Find the control action if SP=910 And SC= 6.5 based on the fuzzy rules shown in table 2. Table 1 Table 2 SP SC V ^ S N F Term MF Term MF Term MF L Up NC NC S L(600,750 ) L L(2 ,4 ) DN L(2.2 ,2.5) M Up NC NC N

(600,750,900) M^ Π( 2,4 ,6,

NC (2.4,

H NC DN DN

F

(750,900 ) H^ (6 ,8 ) Up^ ( 2.5, 2.8 )

Solution: M(SC)= (8-6.5)/(8-6) = 0. H(SC)= (6.5-6)/(8-6) = 0. If SP is F AND SC is M Then V is NC; F(SP)=1, M(SC)= 0.75, NC(V)=0. IF SP is F AND SC is H Then V is DN; F(SP)=1, H (SC)= 0.25, DN(V)=0.    

N n n N n

In n

u

1 1

V= [0.25 * (2.1 +2.2+2.3+2.4)+ 0.752.5] / [0.254 + 0.75] = 4.125/1.75 = 2.**