catatan kuliah fuzzy.pdf

60
 MATERI PERKULIAHAN Dosen Pengampu : Drs. Sri Mulyana, M.Kom Editor: MULYANTO PROGRAM PASCA SARJANA ILMU KOMPUTER FAKULTAS MATEMATIKA DAN ILMU PENGETAHUAN ALAM UNIVERSITAS GADJAH MADA  YOGYAKART A 2012 

Upload: kania-khairunnisa

Post on 04-Mar-2016

63 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Catatan Kuliah Fuzzy.pdf

7/21/2019 Catatan Kuliah Fuzzy.pdf

http://slidepdf.com/reader/full/catatan-kuliah-fuzzypdf 1/60

 

MATERI PERKULIAHAN

Dosen Pengampu : Drs. Sri Mulyana, M.Kom

Editor:

MULYANTO 

PROGRAM PASCA SARJANA ILMU KOMPUTERFAKULTAS MATEMATIKA DAN ILMU PENGETAHUAN ALAM

UNIVERSITAS GADJAH MADA YOGYAKARTA

2012 

Page 2: Catatan Kuliah Fuzzy.pdf

7/21/2019 Catatan Kuliah Fuzzy.pdf

http://slidepdf.com/reader/full/catatan-kuliah-fuzzypdf 2/60

1

Pertemuan 2

12/9/2012

Bentuk lain inferensi

p v q

p .

q

Cerita: Ada fakta-fakta:

Telah terjadi pembunuhan

Terdapat banyak jejak di seluruh ruang

Tidak ada barang yang hilang

Apa motif pembunuhan ? (Politik, pencurian, other)

Asumsi:

p : motif politik

q : motif pencurian

r : other motif

s : ada barang hilangt : pembunuh segera pergi

u : banyak jejak kaki

Rule:

1. 

q s

2. 

p t

3. 

t u

Inferensi

1. 

p v q v r (kesimpulan)

2. q  ss q (MP)  p v r

q

r

3. t u

(u) t (MT)  p

t

p  t

Himpunan Klasik & Himpunan Fuzzy

Himpunan: kmpulan obyek dengan syarat keanggotaan tertentu.

Penyajian:- 

list A = {a, b, c, d, e}

Syarat A = {x | x 5 abjad pertama}

Disimbolkan: x  A x anggota A

Y  A y bukan anggota A

Page 3: Catatan Kuliah Fuzzy.pdf

7/21/2019 Catatan Kuliah Fuzzy.pdf

http://slidepdf.com/reader/full/catatan-kuliah-fuzzypdf 3/60

2

Universe (Semesta pembicaraan) , dilambangkan dengan V atau X : himpunan yang memuat semua

obyek yang dibicarakan.

Operasi Dasar Himpunan: A & B himpunan dalam semesta X

1. 

Union : A B = {x  X | x  A atau x  B}

2. 

Irisan: A

 B = {x

 X | x

 A dan x

 B}

3. 

Complemen : Ac = {{x| x  X dan x  A} - Ac = X – A

4. 

Differensi: A | B atau A – B = {x | x  A dan x  B}

5. 

Selisih simetri: A B = (A B) – (A B) atau

A B = (A – B) (B – A)

Derajat Keanggotaan A (x) {1, 0}

Dimana: A (x) = 1, x  A

0, x  A

Sifat-sifat operasi himpunan setara dengan logika

^   

v   

  C

deMorgan

(p ^ q) = p vq not(A B) = not(A)  not(B)

(p v q) = p ^q (AB)c = Ac  Bc 

p ^ p = 0 A Ac = Ø 

p v  p = 1 A Ac = X(S) tidak berlaku di fuzzy

Pembuktian A B

A B = (A B) – (A B)

= (A B)  (A B)c 

= (A B)  (Ac  Bc) 

= {(A B)  Ac} {(A B) Bc}

= {(A Ac) (B Ac) }  {(A Bc) (B Bc)}

= (B Ac) (A Bc)

= (B – A) (A – B)

= (A – B) (B – A)

Gambar himpunan keanggotaan

1 , a  x  b

A (x) =

0, x < a atau x > b

A (x) : fungsi keanggotaan x pada himpunan A (membership function)

Contoh:

1. 

X = {1, …, 8} 

1

a b

x

Page 4: Catatan Kuliah Fuzzy.pdf

7/21/2019 Catatan Kuliah Fuzzy.pdf

http://slidepdf.com/reader/full/catatan-kuliah-fuzzypdf 4/60

3

A = {x | x  4}  {1, 2, 3, 4} = 1

1+

1

2+

1

3+

1

4+

0

5+

0

6+

0

7+

0

B = {x | x genap}  {2, 4, 6, 8} = 0

1+

1

2+

0

3+

1

4+

0

5+

1

6+

0

7+

1

A B = 1

1+

1

2+

1

3+

1

4+

0

5+

1

6+

0

7+

1

Himpunan FuzzyX = semesta pembicaraan

Himpunan fuzzy A (A), suatu himpunan dengan A (x)  [0, 1]

Contoh:

2 4 6 80

1

 A

 Penyajian:

1. 

A =   

1

1 +   

2

2 +⋯ =      diskritKalo pak Yoyo nulisnya: A = {(x1, A (x1)), (x2, A (x2)), … } 

Kalo kontinu : A = ∫   ()  

Fungsi keanggotaan yang biasa dipakai:

0, x < a

A (x) =−−   a  x < b

1, x  b

1, x < a

A (x) =−−  a  x < b

0, x  b

1

 

1

 Inti dari membership function  nilai maksimum 1, nilai minimum 0.

Di Buku Wang ada membershift function “number close to zero”  gaussion function 

a b

1

a b

1

0

 = e-x2

Page 5: Catatan Kuliah Fuzzy.pdf

7/21/2019 Catatan Kuliah Fuzzy.pdf

http://slidepdf.com/reader/full/catatan-kuliah-fuzzypdf 5/60

4

0 , x <-1 atau x  1

A (x) = x + 1 , -1  x < 0

1 – x , 0  x < 1

Operasi Himpunan Fuzzy

Himpunan semesta X

Didefinisikan himpunan fuzzy A, B pada X.

1.  A B (x) = A(x) B(x) = min( A(x), B(x))

2.  AB (x) = A(x)  B(x) = max( A(x), B(x))

3. 

  = 1 - A(x)

Grafiknya:

1 A B

1 A B

1  A A

 

Yang tidak berlaku Fuzzy, tapi berlaku di klasik.

A Ac 

A Ac 

Kalau pada klasik

A  Ā = X

A  Ā = Ø

Kalau pada Fuzzy

 A Ac  X

A AC  Ø 

Contoh:

x = {1, 2, 3, 4, 5}

Didefinisikan A = 1

2+

0,5

3+

0,3

4+

0,2

B = 0,5

2+

0,7

3+

0,2

4+

0,4

Tentukan :  , , AB, AB, A – B, B – A, AB, A  , A   , B    , (A B)C, (A B)c 

0-1 1

1

A B A B

1

1

Page 6: Catatan Kuliah Fuzzy.pdf

7/21/2019 Catatan Kuliah Fuzzy.pdf

http://slidepdf.com/reader/full/catatan-kuliah-fuzzypdf 6/60

5

Jawab:   = 1

1+

0

2+

0,5

3+

0,7

4+

0,8

5   = 1

1+

0,5

2+

0,3

3+

0,8

4+

0,6

AB = 0

1 +

0,5

2 +

0,5

3 +

0,2

4 +

0,2

5  bisa ditulis 0,5

2 +

0,5

3 +

0,2

4 +

0,2

5  AB = 1

2+

0,7

3+

0,3

4+

0,4

5  A – B = A Bc = 0,5

2+

0,3

3+

0,3

4+

0,2

B – A = B Ac = 0,5

2+

0,5

3+

0,2

4+

0,4

A B = (A – B) (B – A) = 0,5

2+

0,5

3+

0,3

4+

0,4

A   = 0,5

2+

0,3

3+

0,3

4+

0,2

A   = 1

1+

1

2+

0,5

3+

0,8

4+

0,6

   =

0,5

3+

0,2

4+

0,4

5

 

(A B)C

  = 1 – 1

2 +0,7

3 +0,3

4 +0,4

5  = 1

1 +0

2 +0,3

3 +0,7

4 +0,6

5  = Ac  Bc = 1

1+

0

2+

0,3

3+

0,7

4+

0,6

5   (prove)

(A B)c  = 1 - 0

1+

0,5

2+

0,5

3+

0,2

4+

0,2

5 = 1

1+

0,5

2+

0,5

3+

0,8

4+

0,8

= Ac  Bc =1

1+

0,5

2+

0,5

3+

0,8

4+

0,8

Pembuktian bahwa A Ac  Ø

A Ac = 0,5

3+

0,3

4+

0,2

5  Ø

A Ac = 1

1+

1

2+

0,5

3+

0,7

4+

0,8

5   X = 1

1+

1

2+

1

3+

1

4+

1

Contoh untuk yang kontinu

1

10 15 45 50 60

anak   muda tua

usia

 1 , x < 10

A (x) =15−

5  , 10  x < 15

0 , x  15

0 , x < 10

   (x) = −105

  , 10  x < 15

1 , x  15

0 , x < 10 atau x  50  (x) =−10

5  , 10  x < 15

1 , 15  x < 4550−

5  , 45  x < 50

Page 7: Catatan Kuliah Fuzzy.pdf

7/21/2019 Catatan Kuliah Fuzzy.pdf

http://slidepdf.com/reader/full/catatan-kuliah-fuzzypdf 7/60

6

1 , x < 10 atau x  50  (x) =15−

5  , 10  x < 15

0 , 15  x < 45−45

5  , 45  x < 50

0 , x < 45

T (x) = −45

15  , 45  x < 60

1 , x  60

1 , x < 45  (x) =60−

15  , 45  x < 60

0 , x  60

0 , x < 10 atau x  15

AM (x) =−10

5  , 10  x < 12,5

15−5

  , 12,5  x < 15

0 , x < 10

MT (x) =−10

5  , 10  x < 15

1 , 15  x < 4550−

5  , 45  x < 48,75−45

15  , 48,75 x < 60

1 , x  60

Fuzzy Relations

Relasi fuzzy melibatkan dua buah himpunan yang saling berelasi. Misal usia dengan kekuatan.

Konsep-konsep dasar himpunan Fuzzy

Support dari himpunan A adalah yang memiliki fungsi keanggotaan A (x) > 0.

Supp (A) = { x   U | A (x) > 0 }

Contoh : (di Wang) several = 0,5

3+

0,8

4+

1

5+

1

6+

0,8

7+

0,5

Supp (several) = { 3, 4, 5, 6, 7, 8 }

Konsep lain: alpha cut (cut)

cut (A) = { x  U | A (x)   }

Misalnya: untuk  = 0,7 maka several  = {4, 5 , 6 ,7}

1

10 15 45 50 60

anak   muda tua

usia

1

10 15 45 50 60

anak   muda tua

usia

Page 8: Catatan Kuliah Fuzzy.pdf

7/21/2019 Catatan Kuliah Fuzzy.pdf

http://slidepdf.com/reader/full/catatan-kuliah-fuzzypdf 8/60

7

Pada fuzzy yang kontinu.

Jika  = 0,1 maka A = [-0,9 ; 0,9]

Jika  = 0,9 maka A = [-0,1 ; 0,1]

0-1 1

1

Page 9: Catatan Kuliah Fuzzy.pdf

7/21/2019 Catatan Kuliah Fuzzy.pdf

http://slidepdf.com/reader/full/catatan-kuliah-fuzzypdf 9/60

8

Pertemuan 3 (19 September 2012)

Standard Zadeh

µAB (x) = max (µA (x), µB (x))

µAB (x) = min (µA (x), µB (x))

   = 1 - µA (x)

Operator-operator yang lain:

Fuzzy Complement, yang penting memenuhi 2 syarat pokok. Fuzzy complement merupakan komplemen

 jika memenuhi aksioma-aksioma:

i) 

C(0) = 1 dan C(1) = 0 (boundary condition)

ii)  a, b  [0, 1] jika a ≤ b maka C(a) ≥ C(b) (non increasing condition)

Contoh:

µA (x1) = 0,5 , x2 < x1 

µA (x2) = 0,2   2 >   1   

1

 = 0,5

  2 = 0,8

Berdasarkan aksioma di atas, berikut termasuk complement:

1. 

Sugeno Complement

C (a) =1−

1+   ,   (-1, )

Kalau: a = 0,2 =1−0,2

1+0,2 

b = 0,4 =1−0,4

1+0,4 

2. 

C (a) =1−+1−  ,   [0, 1]

Jika: a = 0

=

1−00+

1

−0

 = = 1

a = 1 = 1−11+1−1 = 01 = 0

3. 

Yager Complement

C(a) = (1 – a)1/  ,   (0, )

a = 0   = (1 – 0)1/ = 1

a = 1   = (1 – 1)1/ = 0

Contoh:

Page 10: Catatan Kuliah Fuzzy.pdf

7/21/2019 Catatan Kuliah Fuzzy.pdf

http://slidepdf.com/reader/full/catatan-kuliah-fuzzypdf 10/60

9

1. 

x : {1, 2, 3, 4, 5}

A = 0

1+

1

2+

0,5

3+

0,3

4+

0,2

B = 0

1+

0,5

2+

0,7

3+

0,2

4+

0,4

Tentukan A-B, B-A, dengan menggunakan C Sugeno  = 2! (standard himpunan)

    = (1−0)/(1+2.0)1

+ (1−1)/(1+2.1)2

+ (1−0,5)/(1+2.0,5)3

+ (1−0,3)/(1+2.0,3)4

+ (1−0,2)/(1+2.0,2)5  = 1

1+

0

2+

0,25

3+

0,44

4+

0,57

B  = (1−0)/(1+2.0)

1+

(1−0,5)/(1+2.0,5)

2+

(1−0,7)/(1+2.0,7)

3+

(1−0,2)/(1+2.0,2)

4+

(1−0,4)/(1+2.0,4)

= 1

1+

0,25

2+

0,125

3+

0,57

4+

0,33

A – B = A Bc = min (0,1)

1+

min (1,0.25)

2+

min (0.5,0.125)

3+

min (0.3,0.57)

4+

min (0.2,0.33)

= 0

1+

0,25

2+

0,125

3+

0,3

4+

0,2

B – A = B Ac  = min (0,1)

1+

min (0.5,0)

2+

min (0.7,0.25)

3+

min (0.2,0.44)

4+

min (0.4,0.57)

=

0

1 +

0

2 +

0,25

3 +

0,2

4 +

0,4

5  

Untuk yang gabungan (union), misalkan akan diperiksa apakah hukum de Morgan berlaku jika

menggunakan Sugeno Complement dengan  = 2?

Contoh:

(A B)c = Ac  Bc 

A = 0

1+

1

2+

0,5

3+

0,3

4+

0,2

B = 0

1+

0,5

2+

0,7

3+

0,2

4+

0,4

Ac = 1

1+

0

2+

0,25

3+

0,44

4+

0,57

Bc =

1

1+

0,25

2+

0,125

3+

0,57

4+

0,33

5

 

(A B) = 0

1+

1

2+

0,7

3+

0,3

4+

0,4

5  (A B)c  = (1−0)/(1+2.0)

1+

(1−1)/(1+2.1)

2+

(1−0,7)/(1+2.0,7)

3+

(1−0,3)/(1+2.0,3)

4+

(1−0,4)/(1+2.0,4)

= 1/1

1+

0/3

2+

0,3/2,4

3+

0,7/1,6

4+

0,6/1,8

= 1

1+

0

2+

0,125

3+

0,44

4+

0,33

Ac  Bc  = min (1,1)

1+

min (0,0.25)

2+

min (0.25,0.125)

3+

min (0.44,0.57)

4+

min (0.57,0.33)

= 1

1+

0

2+

0,125

3+

0,44

4+

0,33

Dengan menggunakan komplemen Sugeno dan union/intersection standard, hukum de Morgan tetap

berlaku.

(A B) = 0

1+

0,5

2+

0,5

3+

0,2

4+

0,2

(A B)c  = (1−0)/(1+2.0)

1+

(1−0,5)/(1+2.0,5)

2+

(1−0,5)/(1+2.0,5)

3+

(1−0,2)/(1+2.0,2)

4+

(1−0,2)/(1+2.0,2)

= 1/1

1+

0,5/2

2+

0,5/2

3+

0,8/1,4

4+

0,8/1,4

= 1

1+

0,25

2+

0,25

3+

0,57

4+

0,57

Page 11: Catatan Kuliah Fuzzy.pdf

7/21/2019 Catatan Kuliah Fuzzy.pdf

http://slidepdf.com/reader/full/catatan-kuliah-fuzzypdf 11/60

10

Ac  Bc  = max (1,1)

1+

max (0,0.25)

2+

max (0.25,0.125)

3+

max (0.44,0.57)

4+

max (0.57,0.33)

= 1

1+

0,25

2+

0,25

3+

0,57

4+

0,57

Relasi / Fungsi

C : [ 0, 1 ]   [ 0, 1 ] complement

Union (S-Norm)

S : [ 0, 1 ] x [ 0, 1 ]   [ 0, 1 ]

Union dari himpunan fuzzy dengan himpunan fuzzy menghasilkan sebuah himpunan fuzzy.

µA (x) dan µB (x)   µAB (x)

Pemetaan fungsi keanggotaan himpunan A dan himpunan B ke fungsi keanggotaan A  B dinyatakan:

S (µA (x), µB (x)) = µAB (x)

Suatu fungsi S merupakan fungsi union (S-norm) jika memenuhi aksioma-aksioma sebagai berikut:

1. 

S(1, 1) = 1, S(0, a) = S(a, 0) = a (boundary condition)

2. 

S(a, b) = S(b, a) (comutative condition)

3. 

Jika a ≤ a’ dan b ≤ b’ maka S(a, b) ≤ S(a’, b’)  (non decreasing condition)4.

 

S(S(a, b), c) = S(a, S(b, c)) (assosiative condition)

Beberapa fungsi yang memenuhi S-Norm

1. 

Dombi Class

S(a, b) =1

1+1−1−+1−1− −1   ,   [ 0, ]

2. 

Dubois-Prade Class

S(a, b) =+−−min ( , ,1−)

max (1−,1−,)  ,   [ 0, 1]

3. 

Yager Class

S (a, b) = 1, + 1

  ,   [ 0, ]

4. 

Drastic Sum

a, jika b = 0

SDS (a, b) = b, jika a = 0

1, others

5. 

Einstein Sum

SES (a, b) =+

1+  

6. 

Algebraic Sum

S AS (a, b) = a + b –  ab

7. 

Zadeh – Standard

S (a, b) = max (a, b)

Contoh:

x = {1, 2, 3, 4, 5}

A = 0

1+

1

2+

0,5

3+

0,3

4+

0,2

B = 0

1+

0,5

2+

0,7

3+

0,2

4+

0,4

Page 12: Catatan Kuliah Fuzzy.pdf

7/21/2019 Catatan Kuliah Fuzzy.pdf

http://slidepdf.com/reader/full/catatan-kuliah-fuzzypdf 12/60

11

Drastic Sum

SDS (x) = 0

1+

1

2+

1

3+

1

4+

1

Algebraic Sum

SAS (x) =

0+0−(0∗0)

1+1+0,5−(1∗0,5)

2+0,5+0,7−(0,5∗0,7)

3+0,3+0,2−(0,3∗0,2)

4+0,2+0,4−(0,2∗0,4)

5

 

= 0

1 +

1

2 +

0,85

3 +

0,44

4 +

0,52

5  Pertemuan 4 (26 September 2012)

Untuk sembarang S-norm, berlaku:

max (a, b) ≤  S (a, b) ≤  SDS (a, b)

Pembuktian:

1. 

Max (a, b) ≤ S (a, b)

Menurut aksioma 1 dan 3

S (a, b) ≥ S (a, 0) = a

Juga

S (a, b) = S (b, a) ≥ S (b, 0) = b

Dari (1) dan (2) diperoleh: S (a, b) ≥ max (a, b) 

Atau max (a, b) ≤  S (a, b)

2. 

Drastic Sum menyatakan a jika b = 0, b jika a = 0, 1 untuk yang lain.

S (a, b) ≤  SDS (a, b)

Di matematika, dikenal dengan pembuktian berdasarkan kasus:

Jika b = 0, S(a, b) = S (a, 0) = a, sehingga S(a, b) = SDS (a, b) = a

Jika a = 0, S(a, b) = S (0, b) = b, sehingga S(a, b) = SDS (a, b) = b

Jika a  0, b  0, sehingga SDS (a, b) = 1 ≥ S (a, b)

Dari ketiga kondisi di atas, diperoleh S (a, b) ≤ SDS (a, b)

Fuzzy Intersection (T-Norm) 

t : [ 0, 1 ] x [ 0, 1 ]   [ 0, 1 ]

Pemetaan fungsi keanggotaan fuzzy A dan B ke fungsi keanggotaan himpunan fuzzy A B

t (µA (x), µB (x)) = µAB (x)

Yang sudah dikenal sebelumnya (standard Zadeh)

µAB (x) = min (µA (x), µB (x))

Aksioma-aksioma pada t-norm

1. 

t(0, 0) = 0, t(1, a) = t(a, 1) = a (boundary condition)

2. 

t(a, b) = t(b, a) (comutative condition)

3. 

Jika a ≤ a’ dan b ≤ b’ maka t(a, b) ≤ t(a’, b’)  (non decreasing condition)4.

 

t(t(a, b), c) = t(a, t(b, c)) (assosiative condition)

Page 13: Catatan Kuliah Fuzzy.pdf

7/21/2019 Catatan Kuliah Fuzzy.pdf

http://slidepdf.com/reader/full/catatan-kuliah-fuzzypdf 13/60

12

Beberapa fungsi yang memenuhi t-norm

1. 

Dombi Class

t(a, b) =1

1+1−1+1−1 1   ,   [ 0, ]  pembuktian pake pendekatan limit

2. 

Dubois-Prade Class

t(a, b) = .max ( , ,)  ,   [ 0, 1]

3. 

Yager Class

Tw (a, b) = 1−1, 1− + 1− 1/  ,   [ 0, ]

4. 

Drastic Product

a, jika b = 1

tDS (a, b) = b, jika a = 1

0, others

5. 

Einstein Product

tEP (a, b) = .2−(+− ) 

6. 

Algebraic Product

tAP (a, b) = a.b

7. 

Zadeh – Standard

t (a, b) = min (a, b)

Untuk sembarang t-norm, berlaku:

tDP (a, b) ≤ t (a, b) ≤ min (a, b)

Bukti:

1. 

tDP (a, b) ≤ t (a, b)

Jika b = 1, t (a, b) = t (a, 1) = a sehingga t (a, b) = tDP (a, b) = a

Jika a = 1, t (a, b) = t (1, b) = b sehingga t (a, b) = tDP (a, b) = b

Jika a  1, b  1 sehingga tDS (a, b) = 0 ≤ t (a, b)

2. 

t (a, b) ≤ min (a, b)

Menurut aksioma 1 dan 3

t (a, b) ≤ t (a, 1) = a (1)

Juga

t (a, b) = t (b, a) ≤ t (b, 1) = b (2)

Dari (1) dan (2) diperoleh: t (a, b) ≤ min (a, b)

Atau min (a, b) ≥ t (a, b)

Contoh:

x = {1, 2, 3, 4, 5}

A = 0

1+

1

2+

0,5

3+

0,3

4+

0,2

B = 0

1+

0,5

2+

0,7

3+

0,2

4+

0,4

Page 14: Catatan Kuliah Fuzzy.pdf

7/21/2019 Catatan Kuliah Fuzzy.pdf

http://slidepdf.com/reader/full/catatan-kuliah-fuzzypdf 14/60

13

Standard Zadeh

µAB (x) = min (0,0)

1+

min (1,0.5)

2+

min (0.5,0.7)

3+

min (0.3,0.2)

4+

min (0.2,0.4)

= 0

1+

0,5

2+

0,5

3+

0,2

4+

0,2

Algebraic Product

µAB (x) = 0∗01 + (1∗0,5)2 + (0,5∗0,7)

3 + (0,3∗0,2)4 + (0,2∗0,4)

5  = 0

1+

0,5

2+

0,35

3+

0,06

4+

0,08

Drastic Product

µAB (x) = 0

1+

0,5

2+

0

3+

0

4+

0

Hukum de Morgan  ∪  =   ∩  

Jika diterjemahkan dalam bentuk Fuzzy

,

=

,

 

Contoh: Buatlah , dengan Yager Class dan Algebraic Sum/Product menggunakan C Standar

Yager Class : Sw (a, b) = 1, + 1 

tw (a, b) = 1 −1, 1− + 1− 1/  , = ,  = 1 – 1, + 1 

Algebraic Sum : SAS (a, b) = a + b – ab

Product : tAP (a, b) = a.b

C(a) = 1 – a

C(b) = 1 – b

, = (1 – a) (1 – b) = 1 – a – b + ab,   = 1 – (a + b – ab) = 1 – a – b + ab

Contoh:

Buatlah , = , dengan Algebraic Sum/Product menggunakan C Standard.

tAP (a, b) = a.b,  = 1 – a.b

C(a) = 1 – a

C(b) = 1 – b

,

 = (1 – a) + (1 – b) – (1 – a) * (1 – b)

= 2 – a – b – (1 – a – b + ab)= 1 – ab

Page 15: Catatan Kuliah Fuzzy.pdf

7/21/2019 Catatan Kuliah Fuzzy.pdf

http://slidepdf.com/reader/full/catatan-kuliah-fuzzypdf 15/60

14

Relasi Fuzzy

Relasi : cara mengkawankan

 A B  

Cartesian Product untuk dua himpunan A dan B

A x B = { (x, y) |  x  A,  y  B }

Pada keanggotaan biner, relasi dari A ke B = subset dari A x B

Misal: A = {1, 2}, B = {a, b}

A x B = { (1, a), (1, b), (2, a), (2, b) }  R = { (1, a), (2, b)

B x A = { (a, 1), (a, 2), (b, 1), (b, 2) }  S = { (a, 2), (b, 1)

A x A = A2 = { (1, 1), (1, 2), (2, 1), (2, 2)}

Jika A  B maka A x B  B x A

Syarat keanggotaan klasik  µR (x, y)  { 0 , 1 }

Ditulis: 1 , (x, y)  R

µR (x, y) =

0 , (x, y)  R

Misal:

A = {1, 2, 3}, B = {a, b, c}

R = { (1, b), (3, b), (2, c) }

= 1

(1,)+

1

(3,)+

1

(2,) 

Dalam bentuk gambar:

 A B

1

2

a

b

c3

 Kalau di Fuzzy  µR (x, y)  [ 0, 1 ]

Tidak hanya pada semesta yang diskrit, bisa juga didefinisikan pada semesta yang kontinu.

Sembarang relasi biner A ke A atau B ke B

UA = A x A (univers semesta pembicaraan)

IA = { (x, y) | x = y,  x, y  A }  I : Identitas

Misal : A = {0, 1, 2}

UA = { (0, 0), (0, 1), (0, 2), (1, 0), (1, 1), (1, 2), (2, 0), (2, 1), (2, 2) }

IA = { (0, 0), (1, 1), (2, 2) }

Page 16: Catatan Kuliah Fuzzy.pdf

7/21/2019 Catatan Kuliah Fuzzy.pdf

http://slidepdf.com/reader/full/catatan-kuliah-fuzzypdf 16/60

15

Misalkan suatu relasi : S = { (x, y) | y ≥ 2x, x, y  R }

Semua sifat pada himpunan juga berlaku pada relasi.

Misalkan R dan S adalah relasi. Maka berlaku:

R S, R S, Rc, Sc 

Sifat-sifat relasi:

Didefinisikan relasi R, S pada X, Y.

R  X x Y (subset dari X x Y)

S  X x Y (subset dari X x Y)

Maka:

R S µRS (x, y) = S (µR (x, y), µS (x, y)) = max (µR (x, y), µS (x, y)) (standard zadeh)

R S µRS (x, y) = t (µR (x, y), µS (x, y)) = min (µR (x, y), µS (x, y)) (standard zadeh)

Rc =   ,= C (µR (x, y)) = 1 - µR (x, y) (standard zadeh)

Contoh:

A = {1, 2, 3}, B = {a, b, c}

R = { (1, b), (3, b), (2, c) }

S = { (1, a), (2, b), (1, b), (3, e) }

R S = { (1, a), (1, b), (2, b), (2, c), (3, b), (3, e) }

R S = { (1, b) } = semua anggota semesta yang bukan relasi R. (Semesta = U = A x B)

Komposisi Relasi 

 A B

1

2

a

b

c3

C

x

y

z

 Relasi langsung dari A ke C   T = R  S

Misalkan kita mempunyai R : relasi dari semesta X ke Y dan

S : relasi dari semesta Y ke Z

Maka relasi T yang merealisasikan dari X ke Z disebut komposisi relasi.

Contoh :

R = { (x1, y1), (x1, y3), (x2, y4) }

S = { (y1, z2), (y3, z2) }

Apa relasi T dari X ke Z ?

T = R  S

Kita bisa menggunakan 2 buah metode:

1. 

Max-Min Komposisi relasi

2. 

Max – Product komposisi relasiX Y

1

2

1

2

33

Z

1

2

4

R S

Page 17: Catatan Kuliah Fuzzy.pdf

7/21/2019 Catatan Kuliah Fuzzy.pdf

http://slidepdf.com/reader/full/catatan-kuliah-fuzzypdf 17/60

16

Jika digambarkan secara membership function1 2 3 4  1 2 

R =

12

3

 1 0 1 0

0 0 0 1

0 0 0 0

  S =

123

4

 0 1

0 0

0 1

0 0

 T (x1, z1) =1 ,, , 1 

= 1,0,0,0,1,0,0,0 

= 0,0,0,0 = 0

T (x1, z2) =1 ,, , 2 

= 1,1,0,0,1,1,0,0 

= 1,0,1,0 = 1

Dan seterusnya, sehingga diperoleh:

1

T =123

 0 10 0

0 0 

Page 18: Catatan Kuliah Fuzzy.pdf

7/21/2019 Catatan Kuliah Fuzzy.pdf

http://slidepdf.com/reader/full/catatan-kuliah-fuzzypdf 18/60

17

Pertemuan 5 (3 Oktober 2012)

Pada logika Crisp

T = R  S

µT (x, z) =

,

∧ ,

∈    max – min

µT (x, z) = , ∘ ,∈    max – product

Relasi Fuzzy

Relasi crisp tidak akan dapat merepresentasikan dengan baik untuk kasus sebagai berikut:

X = {SF, HK, TKY} , Y = { Boston, HK }

R : x R sangat jauh (very var)

Misal :    

R =

  0,3 0,9

1 00,95 0,1

 Kalau di crisp  relasi adalah subset dari A x BKalau di fuzzy  relasi adalah A x B itu sendiri

Relasi Fuzzy: Q = { ((u1, u2, ..., un), µQ  (u1, u2, ..., un)) | (u1, u2, ..., un)  U1 x U2 x ... x Un }

Dimana µQ  (u1, u2, ..., un)  [0, 1]

Misal: A : himpunan fuzzy pada semesta X

B : himpunan fuzzy pada semesta Y

Jadi R : A B adalah A x B maknanya A x B = R (X x Y), dengan µR (x, y) = min (µA (x), µB (y))

Contoh:

X = {x1, x2, x3}, Y = {y1, y2}

A =0,2

1

+0,5

2

+1

B =0,31

+0,92

  1   2 

R = 

123

 min (0.2,0.3) min (0.2,0.9)

min (0.5,0.3) min (0.5,0.9)

min( 1,0.3) min (1,0.9)

 1   2 

=

123

 0,2 0,2

0,3 0,50,3 0,9

   Relasi Fuzzy

Komposisi Relasi Fuzzy

Misal: diberikan 2 relasi S (x, y) dan T (y, z) maka komposisi relasi dinyatakan S  T adalah relasi pada X x

Z dengan fungsi keanggotaan µST (x, z) = max t (µS (x, y), µT (y, z)), dimana t = t-norm.

Contoh:

X = {x1, x2, x3}, Y = {y1, y2}, Z = { z1, z2 }

A =0,21

+0,52

+13

 

B =0,31

+0,92

 

Page 19: Catatan Kuliah Fuzzy.pdf

7/21/2019 Catatan Kuliah Fuzzy.pdf

http://slidepdf.com/reader/full/catatan-kuliah-fuzzypdf 19/60

18

C =11

+0,52

 

R1 : A  B

R2 : B C1   2  

R1 = 1

23 

0,2 0,2

0,3 0,50,3 0,9 1   2 

R2 =12

 0,3 0,3

0,9 0,5 

µR1R2 (x1, z1) = max (min (µR1 (x1, y1), µR2 (y1, z1) ), min (µR1 (x1, y2), µR2 (y2, z1) ))

R1   R2 = 0,2 0,2

0,3 0,5

0,3 0,9  0,3 0,3

0,9 0,5 

= max

min

0.2,0.3

,min

0.2,0.9

max

min

0.2,0.3

,min

0.2,0.5

maxmin0.3,0.3,min0.5,0.9 maxmin0.3,0.3,min0.5,0.5maxmin0.3,0.3,min0.9,0.9 maxmin0.3,0.3,min0.9,0.5 = 0,2 0,2

0,5 0,5

0,9 0,5 

Diketahui:

R : A A Tentukan R  R

A =0,21

+0,52

+13

 

R  R = 0,2 0,2 0,2

0,2 0,5 0,50,2 0,5 1   0,2 0,2 0,2

0,2 0,5 0,50,2 0,5 1  = 0,2 0,2 0,2

0,2 0,5 0,50,2 0,5 1 =  

Contoh di Wang    

P (very far) : U V

0,3 0,9

1 00,95 0,1

     

Q (very near) : V W

0,95 0,1

0,1 0,9 

P  Q = ?  Max – Min     0.3,0.95,0.9,0.1   0.3,0.1,0.9,0.91,0.95,0,0.1   1,0.1,0,0.90.95,0.95,0.1,0.1   0.95,0.1,0.1,0.9 

Page 20: Catatan Kuliah Fuzzy.pdf

7/21/2019 Catatan Kuliah Fuzzy.pdf

http://slidepdf.com/reader/full/catatan-kuliah-fuzzypdf 20/60

19

   

=

0,3 0,9

0,95 0,1

0,95 0,1 

  Max – Product

    0.285,0.09   0.03,0.810.95,0   0.1,00.9025,0.01   0.095,0.09     

=

0,285 0,81

0,95 0,1

0,9025 0,095

 Sifat-Sifat Relasi pada Himpunan Crisp

Diberikan A : himpunan.

Didefinisikan Relasi R : A  A (A2). Berikut sifat-sifat relasi:

1. 

Reflektif, x  A, x R x

a b c d

a 1

b 1

c 1

d 1

2. 

Simetris, x, y  A, jika x R y maka y R x

a b c da 1 1 1

b 1

c 1 1

d 1 1

3. 

Transitif, x, y, z  A, jika x R y dan y R z maka x R z

Jika hanya memenuhi (a) refleksif dan (b) simetris maka disebut relasi tolerans, sedangkan jika

ditambahkan (c) transitif maka disebut relasi ekuivalensi .

Page 21: Catatan Kuliah Fuzzy.pdf

7/21/2019 Catatan Kuliah Fuzzy.pdf

http://slidepdf.com/reader/full/catatan-kuliah-fuzzypdf 21/60

20

Relasi tolerans bisa diekuivalensikan dengan melakukan komposisi relasi terhadap dirinya sendiri

maksimum (n-1) kali.   R1(n-1)

 = R1   R1   ...   R1 (sebanyak n-1 kali) 

Contoh:1 2 3 4 5 

R1 = 1

2

345

 1 1 0 0 0

1 1 0 0 1

0 0 1 0 00 0 0 1 0

0 1 0 0 1 

Sifat: reflektif, simetris, tetapi tidak transitif

(x1, x2)  R dan (x2, x5)  R tetapi (x1, x5)  R tidak transitif

R1  R1 =

1 1 0 0 0

1 1 0 0 10 0 1 0 0

0 0 0 1 0

0 1 0 0 1

   

1 1 0 0 0

1 1 0 0 10 0 1 0 0

0 0 0 1 0

0 1 0 0 1

 

=

1 1 0 0 11 1 0 0 10 0 1 0 0

0 0 0 1 0

1 1 0 0 1 = R1

2  ekuivalens.

Bagaimana pada relasi fuzzy?

Relasi fuzzy merupakan relasi ekuivalensi jika:

1. 

Reflektif : (xi, xi)  R, µR (xi, xi) = 1

2. 

Simetris : µR (xi, x j) = µR (x j, xi)

3. 

Transitif : µR (xi, x j) = 1 dan µR (x j, xk) = 2 maka µR (xi, xk) =  dengan  ≥ min (1, 2)

Seperti pada relasi crisp, jika relasi fuzzy bersifat reflektif dan simetris (toleran), maka dapat dibawa ke

ekuivalensi :

R1(n-1) = R1  R1  ...  R1 

Contoh:

Diberikan R =

1 0,8 0 0,1 0,2

0,8 1 0,4 0 0,9

0 0,4 1 0 00,1 0 0 1 0,5

0,2 0,9 0 0,5 1  

Refleksif & simetris tetapi tidak transitif.

µR (x1, x2) = 0,8

µR

 

(x2, x5) = 0,5µR

 (x1, x5) = 0,2 ≥ min (0.8; 0.5)  salah, tidak transitif.

R  R =

1 0,8 0 0,1 0,2

0,8 1 0,4 0 0,9

0 0,4 1 0 00,1 0 0 1 0,5

0,2 0,9 0 0,5 1    

1 0,8 0 0,1 0,2

0,8 1 0,4 0 0,9

0 0,4 1 0 00,1 0 0 1 0,5

0,2 0,9 0 0,5 1  

Page 22: Catatan Kuliah Fuzzy.pdf

7/21/2019 Catatan Kuliah Fuzzy.pdf

http://slidepdf.com/reader/full/catatan-kuliah-fuzzypdf 22/60

21

=

1 0,8 0,4 0,2 0,8

0,8 1 0,4 0,5 0,9

0,4 0,4 1 0 0,4

0,2 0,5 0 1 0,5

0,8 0,9 0,4 0,5 1  

µR (x1, x2) = 0,8µR

 (x2, x4) = 0,5

µR (x1, x4) = 0,2 ≥ min (0.8; 0.5)  salah, tidak transitif.

R  R =

1 0,8 0,4 0,2 0,8

0,8 1 0,4 0,5 0,9

0,4 0,4 1 0 0,4

0,2 0,5 0 1 0,5

0,8 0,9 0,4 0,5 1    

1 0,8 0,4 0,2 0,8

0,8 1 0,4 0,5 0,9

0,4 0,4 1 0 0,4

0,2 0,5 0 1 0,5

0,8 0,9 0,4 0,5 1  

= 1 0,8 0,4 0,5 0,8

0,8 1 0,4 0,5 0,9

0,4 0,4 1 0,4 0,40,5 0,5 0,4 1 0,5

0,8 0,9 0,4 0,5 1  µR

 (x1, x2) = 0,8

µR (x2, x3) = 0,4

µR (x1, x3) = 0,4 ≥ min (0.8; 0.4)  benar, transitif.

Page 23: Catatan Kuliah Fuzzy.pdf

7/21/2019 Catatan Kuliah Fuzzy.pdf

http://slidepdf.com/reader/full/catatan-kuliah-fuzzypdf 23/60

22

Pertemuan 6 (10 Oktober 2012)

VARIABEL LINGUISTIK DAN ATURAN FUZZY

Variabel Linguistik: variabel yang bisa dinyatakan dengan bahasa alami. Contoh: suhu, tekanan udara,

berat.

Variabel linguistik merupakan dasar representasi pengetahuan.

Zadeh : (X, T, U, M)

X : nama variabel linguistik

T : Himpunan Fuzzy linguistik

U : Domain variabel linguistik

M : Aturan bagi masing-masing fuzzy-nya (membership function untuk T )

Contoh:

X : kecepatan mobil

T : { lambat, sedang, cepat }

U : [ 0, Vmax] = [ 0, 120 ]

M : { µlambat (x), µsedang (x), µcepat (x) }

1 , x ≤ 40 

µlambat (x) =60−

20  , 40 ≤ x ≤ 60 

0 , x ≥ 60

0 , x ≤ 40 atau x ≥ 80

µsedang (x) =−40

20  , 40 ≤ x ≤ 60 

80−20

  , 60 ≤ x ≤ 80 

0 , x ≤ 60

µcepat (x) =

−60

20  , 60 ≤ x ≤ 80 

1 , x ≥ 80 

Istilah-istilah pada variabel linguistik:

Primary term: lambat, sedang, cepat

Combination term: lambat dan sedang, lambat dan tidak cepat, sedang atau cepat 

Hedges term (penyangatan): sangat (very), agak (rather) 

  Sangat/very (x)   2 

 

Agak / rather     Ada juga yang mendefinisikan fungsi tersendiri untuk ‘sangat’ dan ‘agak’. 

40 60 80 120x

y

lambat cepat

Sangat

lambat

Sangat

cepat

 

40 60 80 120x

y

lambat sedang cepat

Page 24: Catatan Kuliah Fuzzy.pdf

7/21/2019 Catatan Kuliah Fuzzy.pdf

http://slidepdf.com/reader/full/catatan-kuliah-fuzzypdf 24/60

23

Kombinasi:

sangat lambat dan agak cepat  2,    

Tidak sangat cepat

1 -

 2

 

Contoh:

U = { 1, 2, 3, 4, 5 }

µkecil (x) = 1

1+

0,8

2+

0,6

3+

0,4

4+

0,2

µ agak kecil (x) = 1

1+

0,89

2+

0,77

3+

0,63

4+

0,45

µ tidak kecil (x) = 0

1+

0,2

2+

0,4

3+

0,6

4+

0,8

µsangat tidak kecil (x) = 0

1+

0,04

2+

0,16

3+

0,36

4+

0,64

Aturan Fuzzy

IF < proposisi fuzzy > THEN < proposisi fuzzy >

Proposisi fuzzy :

Atomic : bisa dieksekusi secara langsung dengan atomic function

X is A

µA (x) = ?

Compound/majemuk :

  Jika pake AND (intersection) gunakan membership function t-norm

  Jika pake OR (union) gunakan membership function s-norm

  Jika pake NOT gunakan fuzzy complement

Untuk proposisi fuzzy yang compound bisa berasal dari linguistik / domain yang berbeda.

Misal: kecepatan angin + kelembaban udara  curah hujan.Misalkan: x, y variabel linguistik pada V dan W

A, B himpunan fuzzy pada V dan W

AND : x is A and y is B  A B

µAB (x, y) = t (µA (x), µB (y))

OR : x is A or y is B  A B

µAB (x, y) = S (µA (x), µB (y))

NOT :   , = 1 - µA (x, y)

Contoh:

             

µFP (x) = S 1− , , 1−                

µFP (x) = S 1− , 2 , 1−              ℎ   

Page 25: Catatan Kuliah Fuzzy.pdf

7/21/2019 Catatan Kuliah Fuzzy.pdf

http://slidepdf.com/reader/full/catatan-kuliah-fuzzypdf 25/60

24

µFP (x) = S 1− , 2 , 1−               ℎ  

µFP (x) = S

1

,

2

,

1

− 

 

Interpretasi Sebuah Aturan Fuzzy IF-THEN

  p q   ∨ 

  p q   ∧ ∨   ∨ ∧ ∨   1 ∧ ∨   ∨  

Beberapa interpretasi fuzzy IF – THEN (Bentuk umum: IF <FP1> THEN <FP2>

1. 

Implikasi Dienes – Rescher, = 1 − 1, 2  2.

 

Implikasi Lukasiewicz

, = 1, 1− 1+ 2  3. 

Implikasi Zadeh, = 1,2, 1− 1  4.

 

Implikasi Godel

1 , 1 ≤ 2 , =  2 , yang lain

5. 

Implikasi Mamdani

  Min, = 1,2 

  Product

, = 1 ∘  2 Contoh:

U = {1, 2, 3, 4}

V = {1, 2, 3}

Large :0

1+

0,1

2+

0,5

3+

1

4  , pada U

Small :1

1+

0,4

2+

0,2

3  , pada V

Rule : IF x is Large THEN y is ‘agak not small’  

Tentukan µQ  (x, y) dengan metode Dienes – Rescher dan Zadeh

Jawab:

Not Small :0

1

+0,6

2

+0,8

3

 

Agak not small :0

1+

0,77

2+

0,89

Metode Dienes – Rescher

R :Agak not

small

Large 

1 2 3

0 0,77 0,89

1 0 1 1 1

2 0,1 0,9 0,9 0,9

Page 26: Catatan Kuliah Fuzzy.pdf

7/21/2019 Catatan Kuliah Fuzzy.pdf

http://slidepdf.com/reader/full/catatan-kuliah-fuzzypdf 26/60

25

3 0,5 0,5 0,77 0,89

4 1 0 0,77 0,89

µQD (x, y) =11,1 +

11,2 +11,3 +

0,92,1 +0,92,2 +

0,92,3 +0,53,1 +

0,773,2 +0,893,3 +

04,1 +0,774,2 +

0,894,3 Metode Zadeh

R :Agak not

small

Large 

1 2 3

0 0,77 0,89

1 0 1 1 1

2 0,1 0,9 0,9 0,9

3 0,5 0,5 0,5 0,5

4 1 0 0,77 0,89

µQD (x, y) =11,1 +

11,2 +11,3 +

0,92,1 +0,92,2 +

0,92,3 +0,53,1 +

0,53,2 +0,53,3 +

04,1 +0,774,2 +

0,894,3 Contoh 2:

U = {1, 2, 3, 4}V = {1, 2, 3}

W = {1, 2, 3, 4}

Large :0

1+

0,1

2+

0,5

3+

1

4  , pada U

Small :1

1+

0,4

2+

0,2

3  , pada V

Middle :0,2

1+

0,8

2+

0,8

3+

0,2

4 , pada W

Rule : IF x is large AND x is middle THEN y is tidak kecil.

Tentukan µQ  (x, y) dengan metode Dienes – Rescher

Jawab:

Tahap penyelesaian: Selesaikan dulu FP1 compound

x is large AND x is middle t-Norm

Misalkan digunakan t-Norm standard Zadeh

FP1 :min (0,0.2)

1+

min (0.1,0.8)

2+

min (0.5,0.8)

3+

min (1,0.2)

4 =

0

1+

0,1

2+

0,5

3+

0,2

FP2 :1−1

1+

1−0,4

2+

1−0,2

3 =

0

1+

0,6

2+

0,8

FP2

FP1 1 2 3

0 0,6 0,8

1 0 1 1 1

2 0,1 0,9 0,9 0,9

3 0,5 0,5 0,6 0,8

4 0,2 0,8 0,8 0,8

µQD (x, y) =11,1 +

11,2 +11,3 +

0,92,1 +0,92,2 +

0,92,3 +0,53,1 +

0,63,2 +0,83,3 +

0,84,1 +0,84,2 +

0,84,3 Contoh untuk fungsi kontinu

Misalkan:

x1 : kecepatan [0, 100]

x2 : akselerasi [0, 30]

Page 27: Catatan Kuliah Fuzzy.pdf

7/21/2019 Catatan Kuliah Fuzzy.pdf

http://slidepdf.com/reader/full/catatan-kuliah-fuzzypdf 27/60

26

y : kekuatan akselerator [0, 3]

Rule: IF x1 is slow AND x2 is small THEN y is large

35 55

slow

x1

1

 10

small

x2

1

3

large

y

1

1 2 

1 , x1 ≤ 35

µslow (x1) =55−1

20  , 35 ≤ x1 ≤ 55 

0 , x1 ≥ 55 

µsmall (x2) =10−2

10  , x2 ≤ 10

0  , x2 ≥ 10 

0 , y ≤ 1

µlarge (y) = − 1  , 1 ≤ y ≤ 2 1 , y ≥ 2 

Tentukan µQ  (x1, x2, y), dimana intersection (AND) menggunakan aljabar product, dan IF-THEN

menggunakan Dienes-Rescher?

Jawab

FD1 = µslowsmall (x1, x2) menggunakan algebraic product

0 , x1 ≥ 55 or x2 ≥ 10

FD1 = µslowsmall (x1, x2) =55−1

20

∗10−2

10, 35 ≤ x1 ≤ 55 and x2 ≤ 10

10−2

10, x1 ≤ 35 and x2 ≤ 10

Implikasi Dienes – Rescher, = 1− 1,2  1 , x1 ≥ 55 or x2 ≥ 10

1− 1, = 1− 55−110−2200

, 35 ≤ x1 ≤ 55 and x2 ≤ 10

1 -10

−2

10

 = 

2

10

, x1 ≤ 35 and x2 ≤ 10

35 55

slow

10

x1

x2

small

Page 28: Catatan Kuliah Fuzzy.pdf

7/21/2019 Catatan Kuliah Fuzzy.pdf

http://slidepdf.com/reader/full/catatan-kuliah-fuzzypdf 28/60

27

(x1, x2)

1

y

2

3

1

1

111

x1 ≥ 55 or

x2 ≥ 10

35 ≤ x1 ≤

55 and

x2 ≤ 10

x1 ≤ 35

and

x2 ≤ 10  

1 , x1 ≥ 55 or x2 ≥ 10 or y ≥ 2 

1− 55−110−2200

, 35 ≤ x1 ≤ 55 and x2 ≤ 10 and y ≤ 1, = 2

10, x1 ≤ 35 and x2 ≤ 10 and y ≤ 1

max 1− 55−110−2200

, − 1 , 35 ≤ x1 ≤ 55 and x2 ≤ 10 and 1 ≤ y ≤ 2

max 2

10 , − 1, x1 ≤ 35 and x2 ≤ 10 and 1 ≤ y ≤ 2

Page 29: Catatan Kuliah Fuzzy.pdf

7/21/2019 Catatan Kuliah Fuzzy.pdf

http://slidepdf.com/reader/full/catatan-kuliah-fuzzypdf 29/60

28

Latihan Soal:

Untuk semua soal menggunakan operator    = 1−   , µAB (x) =  ,,µAB (x) =  , 1.

 

Diketahui himpunan semesta U = {1, 2, 3} dan V = {a, b, c, d}

R1 =0,1

1,

+

0,3

1,

+

0,6

1,

+

0,8

1,

+

0,1

2,

+

0

2,

+

0,1

2,

+

0,5

2,

+

1

3,

+

0,8

3,

+

0,5

3,

+

0,1

3,

 

R2 = 0,1 ,1 + 0,8 ,2 + 0,4 ,3 + 0,2 ,1 + 0 ,2 + 0,4 ,3 + 0,1 ,1 + 0,3 ,2 + 0,5 ,3 + 0,6 ,1 + 0,2 ,2 + 0 ,3 Dengan menggunakan max-product  tuliskan himpunan:

a. 

R1  R2c 

b. 

R2  R1c 

Jawab:        

R1 =1

2

3

0,1 0,3 0,6 0,8

0,1 0 0,1 0,51 0,8 0,5 0,1

  R1c = 0,9 0,7 0,4 0,2

0,9 1 0,9 0,50 0,2 0,5 0,9

 1 2 3

R2 = 0,1 0,8 0,4

0,2 0 0,40,1 0,3 0,5

0,6 0,2 0  R2

c = 0,9 0,2 0,6

0,8 1 0,60,9 0,7 0,5

0,4 0,8 1 

Relasi Fuzzy menggunakan max-product

a. 

R1  R2c = 0,1 0,3 0,6 0,8

0,1 0 0,1 0,5

1 0,8 0,5 0,1  ° 0,9 0,2 0,6

0,8 1 0,60,9 0,7 0,5

0,4 0,8 1

 1 2 3

=1

2

3 0,54 0,64 0,8

0,2 0,4 0,5

0,9 0,8 0,6 

b. 

R2  R1c = 0,1 0,8 0,4

0,2 0 0,4

0,1 0,3 0,5

0,6 0,2 0

 ° 0,9 0,7 0,4 0,2

0,9 1 0,9 0,50 0,2 0,5 0,9

         

=

 0,72 0,8 0,72 0,4

0,18 0,14 0,2 0,36

0,27 0,3 0,27 0,45

0,54 0,42 0,24 0,12

 2.

 

Sebuah variabel linguistik ‘Kecepatan’ mempunyai fungsi keanggotaan sebagai berikut:

Tentukan fungsi keanggotaan dari proposisi

berikut serta gambarkan grafiknya!

a. 

P1 = ( x is S or x is Not F ) and x is M, dan

tentukan P1(70)

b. 

P2 = ( x is M and x is not F ) or x is S dan

tentukan P2 (42)35 55 75 Vmax

1Slow (S) Fast (F)Medium (M)

Page 30: Catatan Kuliah Fuzzy.pdf

7/21/2019 Catatan Kuliah Fuzzy.pdf

http://slidepdf.com/reader/full/catatan-kuliah-fuzzypdf 30/60

29

Jawab:

1 , x ≤ 35 

µs (x) =55−

20  , 35 ≤ x ≤ 55 

0 , x ≥ 55 

0 , x ≤ 35 or x ≥ 75 

µm (x) =−35

20  , 35 ≤ x ≤ 55 

75−20

  , 55 ≤ x ≤ 75 

0 , x ≤ 55 

µf  (x) =−55

20  , 55 ≤ x ≤ 75 

1 , x ≥ 75 

 x is Not F  

1 , x ≤ 55 

 =

75

−20

  , 55 ≤ x ≤ 75 

0 , x ≥ 75 

 x is S or x is Not F

35 55 75 Vmax

1Slow (S) Not F

 

0,1

 , x ≤ 35  1 , x ≤ 55 

∪ = 55−20 , 1 , 35 ≤ x ≤ 55  75−20 , 55 ≤ x ≤ 75 0,75−

20 , 55 ≤ x ≤ 75  0, x ≥ 75 0,0, x ≥ 75 

( x is S or x is Not F ) and x is M

, x ≤ 35 or x ≥ 75 −35

20 , 35 ≤ x ≤ 55 

75−20

 , 55 ≤ x ≤ 75 

P1 (70) =75

−70

20  = 0,25

 x is M and x is not F ( x is M and x is not F ) or x is S 

35 55 75 Vmax

1

35 55 75 Vmax

1

35 55 75 Vmax

1

 

35 55 75 Vmax

1 ∪∩ = 

Page 31: Catatan Kuliah Fuzzy.pdf

7/21/2019 Catatan Kuliah Fuzzy.pdf

http://slidepdf.com/reader/full/catatan-kuliah-fuzzypdf 31/60

30

Menentukan titik potong 35 ≤ x ≤ 55 55−

20 =−35

20   55 – x = x – 35

  2x = 90

  x = 45

1 , x ≤ 35 55−20

  , 35 ≤ x ≤ 45 ∩∪ = −35

20  , 45 ≤ x ≤ 55

75−20

  , 55 ≤ x ≤ 75 

0 , x ≥ 75 

P2 (42) =55−

20 = 

55−42

20  =

13

20 = 0,65

3. 

Diberikan himpunan U = {1, 2, 3, 4}, V = {a, b, c} dan W = {#, *}. Untuk sembarang x  U, y  V, z  W

diberikan aturan Fuzzy sebagai berikut:

Q = IF x is A and Y is not B THEN z is very C . Masing-masing himpunan fuzzy didefinisikan sebagai

berikut: A =0,3

1 +0,5

2 +0,7

3 +1

4, B =1

+0,4

+0,1

, dan C =0,75

# +0,25

∗  a.

 

Tentukan µQD (x, y, z) Implikasi Fuzzy Dienes-Rescher

b. 

Tentukan µQZ (x, y, z)  Implikasi Fuzzy Zadeh

Jawab:

FP1 = x is A and Y is not B  t-Norm

Not B =0 +

0,6 +0,9  

Y is not B

x is A a b c

0 0,6 0,9

1 0,3 0 0,3 0,3

2 0,5 0 0,5 0,53 0,7 0 0,6 0,7

4 1 0 0,6 0,9

µFD1 (x, y) =01, +

0,31, +0,31, +

02, +0,52, +

0,52, +03, +

0,63, +0,73, +

04, +0,64, +

0,94, FP2 = z is very C ..... hedges

C =0,75

#+

0,25∗  

Very C =0,5625

#+

0,0625

∗ 

Implikasi Fuzzy Dienes-RescherFP2

FP1 # *

0,5625 0,0625

(1,a) 0 1 1

(1,b) 0,3 0,7 0,7

(1,c) 0,3 0,7 0,7

(2,a) 0 1 1

Page 32: Catatan Kuliah Fuzzy.pdf

7/21/2019 Catatan Kuliah Fuzzy.pdf

http://slidepdf.com/reader/full/catatan-kuliah-fuzzypdf 32/60

31

(2,b) 0,5 0,5625 0,5

(2,c) 0,5 0,5625 0,5

(3,a) 0 1 1

(3,b) 0,6 0,5625 0,4

(3,c) 0,7 0,5625 0,3

(4,a) 0 1 1(4,b) 0,6 0,5625 0,4

(4,c) 0,9 0,5625 0,1

µQD (x, y, z) =11, ,# +

11, ,∗ +0,71, ,# +

0,71, ,∗ +0,771, ,# +

0,71, ,∗ +12, ,# +

12, ,∗ +0,56252, ,# +

0,52,,∗ +0,56252,,# + 

0,52,,∗ +13, ,# +

13, ,∗ +0,56253, ,# +

0,43,,∗ +0,56253, ,# +

0,33, ,∗ +14, ,# +

14, ,∗ +0,56254, ,# +

0,44, ,∗ + 

0,56254, ,# +0,14,,∗ 

Implikasi Fuzzy Zadeh

FP2FP1  # *

0,5625 0,0625

(1,a) 0 1 1

(1,b) 0,3 0,7 0,7

(1,c) 0,3 0,7 0,7

(2,a) 0 1 1

(2,b) 0,5 0,5 0,5

(2,c) 0,5 0,5 0,5

(3,a) 0 1 1

(3,b) 0,6 0,5625 0,4

(3,c) 0,7 0,5625 0,3

(4,a) 0 1 1

(4,b) 0,6 0,5625 0,4

(4,c) 0,9 0,5625 0,1

µQZ (x, y, z) =11, ,# +

11, ,∗ +0,71,,# +

0,71, ,∗ +0,71, ,# +

0,71, ,∗ +12, ,# +

12, ,∗ +0,52, ,# +

0,52, ,∗ +0,52, ,# + 

0,52,,∗ +13, ,# +

13, ,∗ +0,56253, ,# +

0,43,,∗ +0,56253, ,# +

0,33, ,∗ +14, ,# +

14, ,∗ +0,56254, ,# +

0,44, ,∗ + 

0,56254, ,# +0,14,,∗ 

Page 33: Catatan Kuliah Fuzzy.pdf

7/21/2019 Catatan Kuliah Fuzzy.pdf

http://slidepdf.com/reader/full/catatan-kuliah-fuzzypdf 33/60

32

Pertemuan 8 (7/11/2012)

FORMULA LOGIKA (Logic Formula)

Logika: studi tentang metode/prinsip penalaran.

Penalaran: bisa menemukan proposisi baru dari proposisi-proposisi yang sudah ada.

Rule formula logika:

1.  Nilai kebenaran [0, 1] adalah logic formula

2.  Jika p = proposisi, maka p dan  logic formula

3.  Jika p, q = proposisi, maka ∧  dan ∨  juga logic formula.

4. 

Logic formula hanya dinyatakan dengan 1, 2, atau 3.

Inferensi hakikatnya menggunakan bentuk-bentuk tautologi (selalu benar).

Contoh-contoh tautologi:

1.  ⇢ ⟺ ∨ 2.

  ⇢ ⟺ ∧ ∨  

Semua bentuk tautologi, dapat digunakan untuk inferensi deduktif biasa dikenal: inference rule.

Ada tiga aturan yang sering dikenal:

1. 

Modus Ponens (MP)

∧ → →  

Dapat ditulis:

Premis 1 :  x is A

Premis 2 : IF x is A THEN y is B 

Conclusion : y is B 

2. 

Modus Tollens (MT)

∧ → →  Dapat ditulis:

Premis 1 : y is not B

Premis 2 : IF x is A THEN y is B 

Conclusion :  x is not B 

3.  Hypothetical Syllogism (HS)

→ ∧ → ⟺ →  Dapat ditulis:

Premis 1 : IF x is A THEN y is B 

Premis 2 : IF y is B THEN z is C  Conclusion : IF x is A THEN z is C  

Prinsip dasar inferensi pada logika Fuzzy

Dikenal: GMP (Generalized Modus Ponens)

GMT (Generalized Modus Tollens)

GHS (Generalized Hypothetical Syllogism)

1.  GMP

Premis 1 : x is A’  

Premis 2 : IF x is A THEN y is B 

Conclusion : y is B’  

Page 34: Catatan Kuliah Fuzzy.pdf

7/21/2019 Catatan Kuliah Fuzzy.pdf

http://slidepdf.com/reader/full/catatan-kuliah-fuzzypdf 34/60

33

Kriteria x is A’ (premis 1)  y is B’ (conclusion) 

P1   x is A y is B

P2  x is very A y is very B

P3  x is very A y is B

P4   x is agak A y is agak B

P5   x is agak A y is BP6   x is not A Tidak tahu / unknown

P7   x is not A y is not B

2. 

GMT

Premis 1 : y is B’  

Premis 2 : IF x is A THEN y is B 

Conclusion : x is A’  

Kriteria y is B’ (premis 1)  x is A’ (conclusion) 

t1  y is not B y is not A

t2 y is not very B y is not very At3 y is not more or less B x is not more or less A

t4  y is B Tidak tahu / unknown

t5  y is B x is A

3. 

GHS

Premis 1 : IF x is A THEN y is B 

Premis 2 : IF y is B’  THEN z is C  

Conclusion : IF x is A THEN y is C’  

GMP

Diberikan himpunan fuzzy A’ dalam U (untuk x is A’ )

Aturan fuzzy : IF x is A THEN y is B 

Relasi fuzzy A B dalam U x V

Suatu himpunan Fuzzy B’ dalam V didefinisikan: ′ = ∈   ′ , →, 

 →,  : sembarang interpretasi fuzzy IF-THEN

t : sembarang t-Norm

Contoh: U = {x1, x2, x3), V = {y1, y2}

Didefinisikan aturan fuzzy: IF x is A THEN y is B 

Dengan: A = 0.5/x1 + 1/x2 + 0.6/x3 dan

B = 1/y1 + 0.4/y2 

Diberikan fakta: 0.6/x1 + 0.9/x2 + 0.7/x3 

Tentukan: B’ a.  Implikasi Dienes Rescher dan t min

Page 35: Catatan Kuliah Fuzzy.pdf

7/21/2019 Catatan Kuliah Fuzzy.pdf

http://slidepdf.com/reader/full/catatan-kuliah-fuzzypdf 35/60

34

, = 1 − , 

y1

1

y2 

0.4

x1 = 0.5 1 0.5

x2 = 1.0  1 0.4

x3 = 0.6  1 0.4

Untuk y1  µB’ (y1) = Sup (min(0.6; 1), min(0.9;1), min(0.7;1))

= Sup (0.6; 0.9; 0.7)

= 0.9

Untuk y2  µB’ (y2) = Sup (min(0.6; 0.5), min(0.9;0.4), min(0.7;0.4))

= Sup (0.5; 0.4; 0.4)

= 0.5

B’ = 0.9/y1 + 0.5/y2 

b. 

Implikasi Mamdani Product dan t Aljabar Product

,  = 1 ∙ 2 y1

1

y2 

0.4

x1 = 0.5 0.5 0.2

x2 = 1.0  1.0 0.4

x3 = 0.6  0.6 0.24

Untuk y1  µB’ (y1) = Sup (0.6  0.5, 0.9  1, 0.7  0.6)

= Sup (0.3; 0.9; 0.42)

= 0.9

Untuk y2  µB’ (y2) = Sup (0.6  0.2, 0.9  0.4, 0.7  0.24)

= Sup (0.12; 0.36; 0.168)= 0.36

B’ = 0.9/y1 + 0.36/y2 

Misal diberikan fakta :

1. 

A’= A 

2.  A’ = Sangat A 

3.  A’ = Agak A 

Dicoba dengan :

a.  Implikasi Zadeh dan t Einstein Product

b.  Implikasi Mamdani min dan Drastic Product

Jawab.1.

 

A’ = A 

Implikasi Zadeh dan t Einstein Product

µQZ (x, y) = 1,2, 1 − 1 y1

1

y2 

0.4

x1 = 0.5 0.5 0.5

x2 = 1.0  1.0 0.4

x3 = 0.6  0.6 0.4

tEP (a, b) = .

2−+−  

Untuk y1  µB’ (y1) = 0.5; 0.5, 1.0; 1.0, 0.6; 0.6  

Page 36: Catatan Kuliah Fuzzy.pdf

7/21/2019 Catatan Kuliah Fuzzy.pdf

http://slidepdf.com/reader/full/catatan-kuliah-fuzzypdf 36/60

35

= 0.2; 1; 0.31 = 1.0

Untuk y2  µB’ (y2) = 0.5; 0.5, 1.0; 0.4, 0.6; 0.4  = 0.25; 0.4; 0.19 = 0.4

B’ = 1.0/y1 + 0.4/y2  (sama dengan B)

Implikasi Mamdani min dan t - Drastic Product

µQM (x, y) = 1,2 

y1

1

y2 

0.4

x1 = 0.5 0.5 0.4

x2 = 1.0  1.0 0.4

x3 = 0.6  0.6 0.4

a, jika b = 1

tDP (a, b) = b, jika a = 10, others

Untuk y1  µB’ (y1) = 0.5; 0.5, 1.0; 1.0, 0.6; 0.6  = 0;1;0 = 1.0

Untuk y2  µB’ (y2) = 0.5; 0.4, 1.0; 0.4, 0.6; 0.4  = 0;0.4;0 = 0.4

B’ = 1.0/y1 + 0.4/y2  (sama dengan B)

2. 

A’ = sangat A = 0.25/x1 + 1/x2 + 0.36/x3 Implikasi Zadeh dan t Einstein Product

Untuk y1  µB’ (y1) = 0.25; 0.5, 1.0; 1.0, 0.36; 0.6  = 0.09; 1; 0.17 = 1.0

Untuk y2  µB’ (y2) = 0.25; 0.5, 1.0; 0.4, 0.36; 0.4  = 0.09; 0.4; 0.10 = 0.4

B’ = 1.0/y1 + 0.4/y2  (sama dengan B)

Implikasi Mamdani min dan t - Drastic Product

Untuk y1  µB’ (y1) = 0.25; 0.5, 1.0; 1.0, 0.36; 0.6  = 0;1;0 = 1.0

Untuk y2  µB’ (y2) = 0.25; 0.4, 1.0; 0.4, 0.36; 0.4  = 0;0.4;0 = 0.4

B’ = 1.0/y1 + 0.4/y2  (sama dengan B)

3.  A’ = agak A = 0.71/x1 + 1/x2 + 0.77/x3 

Implikasi Zadeh dan t Einstein Product

Untuk y1  µB’ (y1) =

0.71; 0.5

,

1.0; 1.0

,

0.77; 0.6

 

 

= 0.31; 1; 0.42 = 1.0

Page 37: Catatan Kuliah Fuzzy.pdf

7/21/2019 Catatan Kuliah Fuzzy.pdf

http://slidepdf.com/reader/full/catatan-kuliah-fuzzypdf 37/60

36

Untuk y2  µB’ (y2) = 0.71; 0.5, 1.0; 0.4, 0.77; 0.4  = 0.31; 0.4; 0.27 = 0.4

B’ = 1.0/y1 + 0.4/y2  (sama dengan B)

Implikasi Mamdani min dan t - Drastic ProductUntuk y1  µB’ (y1) = 0.71; 0.5, 1.0; 1.0, 0.77; 0.6  

= 0;1;0 = 1.0

Untuk y2  µB’ (y2) = 0.71; 0.4, 1.0; 0.4, 0.77; 0.4  = 0;0.4;0 = 0.4

B’ = 1.0/y1 + 0.4/y2  (sama dengan B)

Page 38: Catatan Kuliah Fuzzy.pdf

7/21/2019 Catatan Kuliah Fuzzy.pdf

http://slidepdf.com/reader/full/catatan-kuliah-fuzzypdf 38/60

37

Pertemuan 9 (14/11/2012)

GMT

Didefinisikan himpunan fuzzy B’ (untuk y is B’ ) dan relasi A  B dalam U x V (untuk representasi)

Aturan fuzzy : IF x is A THEN y is B

Maka himpunan fuzzy A’ dalam U didefinisikan:  ′ = ∈  ′ , →, 

Sembarang tautologi bisa digunakan untuk inferensi deduktif.

Contoh:

U ={x1, x2, x3}, V = {y1, y2}

Fuzzy IF-THEN

IF x is A THEN y is Bi

Dengan A = 0.5/x1 + 1/x2 + 0.1/x3 

B = 1/y1 + 0.4/y2 

Jika faktanya diberikan:B’ = 0.1/y1 + 0.7/y2 

Tentukan A’ = ? 

Gunakan:

a. 

t Norm standard dan implikasi Dienes Rescher

y1

1

y2 

0.4

x1 = 0.5 1 0.5

x2 = 1.0  1 0.4

x3 = 0.1  1 0.9

µA’ (x1) = ∈  ′ 1,   → 1,1 ,′ 2,   → 1,2 

= 0.1, 1,0.7, 0.5 

= Sup (0.1, 0.5)

= 0.5

µA’ (x2) = ∈  ′ 1,   → 2,1 ,′ 2,   → 2 ,2 

= 0.1, 1,0.7, 0.4 

= Sup (0.1, 0.4)

= 0.4

µA’ (x3) = ∈  ′ 1,   → 3,1 ,′ 2,   → 3 ,2 

= 0.1, 1,0.7, 0.9 

= Sup (0.1, 0.7)

= 0.7

A’ = 0.5/x1 + 0.4/x2 + 0.7/x3 

b. 

t Norm Algebra Product dan implikasi Mamdani - Min

y1

1

y2 

0.4

x1 = 0.5 0.5 0.4

x2 = 1.0  1 0.4

x3 = 0.1  0.1 0.1

Page 39: Catatan Kuliah Fuzzy.pdf

7/21/2019 Catatan Kuliah Fuzzy.pdf

http://slidepdf.com/reader/full/catatan-kuliah-fuzzypdf 39/60

38

µA’ (x1) = 0.1 × 0.5 , 0.7 × 0.4 = Sup (0.05, 0.28)

= 0.28

µA’ (x1) = 0.1 × 1 , 0.7 × 0.4 = Sup (0.1, 0.28)

= 0.28

µA’ (x1) = 0.1 × 0.1 , 0.7 × 0.1 = Sup (0.01, 0.07)

= 0.07

A’ = 0.28/x1 + 0.28/x2 + 0.07/x3 

GHS 

Diberikan relasi fuzzy A  B (IF x is A THEN y is B) dalam U x V

Dan relasi fuzzy B’  C (IF y is B’ THEN z is C ) dalam V x W

Didefinisikan:

 →  ′ , = ∈   →,,′→  ,  

Contoh:

Diberikan U = {x1, x2, x3}, V = {y1, y2}, W = {z1, z2, z3}

Diketahui himpunan fuzzy A pada U dengan:

A = 0.2/x1 + 0.5/x2 + 0.8/x3 

Didefinisikan himpunan fuzzy B pada V dengan:

B = 0.9/y1 + 0.4/y2 

Dan C pada W dengan:

C = 0.9/z1 + 0.6/z2 + 0.3/z3 

Jika diketahui fakta B’ = 0.8/y1 + 0.5/y

Tentukan:  → ′ , !Aturan: t standard Zadeh dan implikasi Dienes Rescher

A By1

0.9

y2 

0.4

x1 = 0.2 0.9 0.8

x2 = 0.5  0.9 0.5

x3 = 0.8  0.9 0.4

B’ Cz1

0.9

z2 

0.6

z3

0.3

y1 = 0.8 0.9 0.6 0.3

y2 = 0.5  0.9 0.6 0.5

µAC’ (x1, z1) = 0.9, 0.9,0.8, 0.9 = Sup (0.9, 0.8) = 0.9

µAC’ (x2, z1) = 0.9, 0.9,0.5, 0.9 = Sup (0.9, 0.5) = 0.9

µAC’ (x3, z1) = 0.9, 0.9,0.4, 0.9 = Sup (0.9, 0.4) = 0.9

µAC’ (x1, z2) = 0.9, 0.6,0.8, 0.6 = Sup (0.6, 0.6) = 0.6

µAC’ (x2, z2) = 0.9, 0.6,0.5, 0.6 = Sup (0.6, 0.5) = 0.6

µAC’ (x3, z2) = 0.9, 0.6,0.4, 0.6 = Sup (0.6, 0.4) = 0.6

µAC’ (x1, z3) =

0.9, 0.3

,

0.8, 0.5

 = Sup (0.3, 0.5) = 0.5

µAC’ (x2, z3) = 0.9, 0.3,0.5, 0.5 = Sup (0.3, 0.5) = 0.5

µAC’ (x3, z3) = 0.9, 0.3,0.4, 0.5 = Sup (0.3, 0.4) = 0.4

Page 40: Catatan Kuliah Fuzzy.pdf

7/21/2019 Catatan Kuliah Fuzzy.pdf

http://slidepdf.com/reader/full/catatan-kuliah-fuzzypdf 40/60

39

A C’ z1

0.9

z2 

0.6

z3

0.3

x1 = 0.2 0.9 0.6 0.5

x2 = 0.5  0.9 0.6 0.5

x3 = 0.8 0.9 0.6 0.4

Jika A’ = Sangat A, tentukan µC’ (z) !

A = 0.2/x1 + 0.5/x2 + 0.8/x3

Sangat A = 0.04/x1 + 0.25/x2 + 0.64/x3 

µC’ (z1) = ∈ 0.04,0.9,0.25,0.9,0.64,0.9 

= sup (0.04, 0.25, 0.64)

= 0.64

µC’ (z2) = ∈ 0.04,0.6,0.25,0.6,0.64,0.6 

= sup (0.04, 0.25, 0.6)

= 0.6µC’ (z3) = ∈ 0.04,0.5,0.25,0.5,0.64,0.4 

= sup (0.04, 0.25, 0.4)

= 0.4

Jadi C’ = 0.64/z1 + 0.6/z2 + 0.4/z3 

Kalo pake Modus Tollens, bisa ditanyakan:

Jika C’ = sangat C, tentukan µA’ (x) ! 

C = 0.9/z1 + 0.6/z2 + 0.3/z3 

Sangat C = 0.81/z1 + 0.36/z2 + 0.09/z3

µA’ (x1) = ∈ 0.81,0.9,0.36,0.9,0.09,0.9 = sup (0.81, 0.36, 0.09)

= 0.81

µA’ (x2) = ∈ 0.81,0.6,0.36,0.6,0.09,0.6 

= sup (0.6, 0.36, 0.09)

= 0.6

µA’ (x3) = ∈ 0.81,0.5,0.36,0.5,0.09,0.4 

= sup (0.5, 0.36, 0.09)

= 0.5

A’ = 0.81/x1 + 0.6/x2 + 0.5/x3 

Sifat-sifat Khusus

Akan dilihat nilai µA’(x), µB’(y), µAC’ (x, z) dengan berbagai variasi A’ dan B’. 

1.  GMP

Dipilih t-Norm : min dan implikasi: Mamdani Product  

A : normal (ada nilai x yang membershift function = 1, ∈    = 1)

Beberapa tipe A:

a. 

A’ = A (seperti pada konvensional) 

µB’ (y) = ∈  

,

  ∙  

= Sup (µA (x), µB(y)) karena ∈    = 1 

Page 41: Catatan Kuliah Fuzzy.pdf

7/21/2019 Catatan Kuliah Fuzzy.pdf

http://slidepdf.com/reader/full/catatan-kuliah-fuzzypdf 41/60

40

= µB (y)

b.  A’ = very A 

µB’ (y) =

∈  2

,  ∙  

 jika   >  = Sup (µA (x), µB(y))

= µB (y)

Contoh:

A = 0.5/x1 + 1/x2 + 0.4/x3

B = 1/y1 + 0.5/y2

A’ = A 

A By1

1.0

y2 

0.5

x1 = 0.5 0.5 0.25

x2 = 1.0  1.0 0.5

x3 = 0.4  0.4 0.2

Untuk y1  µB’ (y1) = 0.5,0.5,1.0,1.0,0.4,0.4  = 0.5,1.0,0.4 = 1.0

Untuk y2  µB’ (y2) = 0.5,0.25,1.0,0.5,0.4,0.2  = 0.25,0.5,0.2 = 0.5

B’ = B = 1/y1 + 0.5/y2 

A’ = very A = 0.25/x1 + 1/x2 + 0.16/x3 

Untuk y1  µB’ (y1) = 0.25,0.5,1.0,1.0,0.16,0.4  = 0.25,1.0,0.16 = 1.0

Untuk y2  µB’ (y2) = 0.25,0.25,1.0,0.5,0.16,0.2  = 0.25,0.5,0.16 = 0.5

B’ = B = 1/y1 + 0.5/y2 

c.  A’ = more or less A 

µB’ (y) = ∈     ,  ∙              ∙  Jadi:

µB’ (y) = sup   ∙  = µB (y)

d. 

A’ = not A = 0.5/x1+ 0/x2 + 0.6/x3 

Untuk y1  µB’ (y1) = 0.5,0.5,0,1.0,0.6,0.4  = 0.5,0.0,0.4 = 0.5

Untuk y2  µB’ (y2) = 0.5,0.25,0,0.5,0.6,0.2  = 0.25,0,0.2 = 0.25

Page 42: Catatan Kuliah Fuzzy.pdf

7/21/2019 Catatan Kuliah Fuzzy.pdf

http://slidepdf.com/reader/full/catatan-kuliah-fuzzypdf 42/60

41

B’ = B = 0.5/y1 + 0.25/y2 

∈    terjadi apabial 1 - µA (x) = µA (x) . µB (y)

µA (x) . µB (y) + µA (x) = 1

µA  (x) (µB (y) + 1) = 1

µA (x) =1

+1 

=1 −     

′ = +1

  (titik potong)

Page 43: Catatan Kuliah Fuzzy.pdf

7/21/2019 Catatan Kuliah Fuzzy.pdf

http://slidepdf.com/reader/full/catatan-kuliah-fuzzypdf 43/60

42

Pertemuan 10 (21/11/2012)

1.  GMP

Syarat:

-  T Norm = min

µAB (x, y) = mamdani productJika:

a.  A’ = A 

b. 

A’ = very A  µB’ (y) = µB (y)

c. 

A’ = more or less A 

Contoh: fungsi kontinu

Misal: kita punya rule: if x is A then y is B 

Contoh: jika harga tinggi maka stock rendah.

25 50 75Harga

1

100

Harga tinggi

 5 10 15

Stock

1

20

Stock rendah

 0 , x  50 1 , y  5

µA (x) =−50

25  , 50  x  75 µB (y) =

15−10

  , 5  y  15

1 , 75  x  100 0 , 15  y  20

Buat µAB (x, y) dengan mamdani product.

50

75

100

0

0

0

00

5 15 20

1

m A(x)

mB(y)

m A(x)

.

mB(y)

 0 , x  50 atau 15  y  20−50

25

  , 50  x  75 dan y  5

µAB (x, y) =15−

10  , 75  x  100 dan 5  y  15

−50

25  15−

10  , 50  x  75 dan 5  y  15

1 , 75  x  100 dan y  5

Misalkan diberikan A’ sbb: 

0 , x  25

µA’ (x) =−25

50  , 25  x  75

1 , 75  x  100

Harus fuzzy bukan crisp

25 50 75

1

100

A’

Page 44: Catatan Kuliah Fuzzy.pdf

7/21/2019 Catatan Kuliah Fuzzy.pdf

http://slidepdf.com/reader/full/catatan-kuliah-fuzzypdf 44/60

43

µB’ (y) = ∈   ′ , →,  

1.  y  5 µB’  (y) =  ′ , 0, ′ , , ′ , 1 

0    x    50 50    x    75 75    x    100 

= 0, , 1 = 1

2.  5  y  15  

µB’ (y) =  ′, 0, ′,  . ,1, 

   x    50 50    x    75 75    x    100 

= 0, ., =  

3. 

15  y  20 

µB’ (y) =  ′, 0, ′, 0, ′, 0 

0  x 50 50 x 75 75  x 100 

= 0,0,0 = 0

1 , 0  y  5

µB’ (y) =15−

10  , 5  y  15

0 , 15  y  20

2.  GMT

Fakta: IF x is A THEN y is B

y is B’  

 x is A 

Syarat:

T Norm = min

µAB (x, y) = mamdani product- 

Sup µB (y) = 1

µA’ (y) = ∈  ′ , →,  

Misalkan: Diberikan B’ =  

µA’ (y) = ∈  1 − , . 

Nilai ∈  minimum terjadi di y0  V, dimana:

1 −  =  .  

.

+

 = 1

  + 1 = 1

=1

1 +   mA’ (x) = 1 - mB (y) = mA (x) . mB (y)

= mA (x) .1

1+     m B (y) substitusi dari hasil yg diperoleh sebelumnya

=  

1+    

Contoh 2:

Misalkan: Diberikan B’ = B 

µA’ (x) = ∈  , . 

Page 45: Catatan Kuliah Fuzzy.pdf

7/21/2019 Catatan Kuliah Fuzzy.pdf

http://slidepdf.com/reader/full/catatan-kuliah-fuzzypdf 45/60

44

= ∈  , . 

= ∈   .   µB(y) maksimal bernilai 1 sesuai dengan asumsi  

= µA(x)

Contoh: fungsi kontinu di GMP1.  B’ = B 

50

75

100

0

0

0

00

5 15 20

1

m A(x)

mB(y)

m A(x)

.

mB(y)

 Diberikan B’ = B 

5 10 15Stock

1

20

Stock rendah

 

µA’ (x) = ∈  , →,  

a.  0  x  50 

µA’ (x) = 1,0,, 0,0,0 0    y    5 5    y    15 15    y    20 

= 0,0,0 = 0

b.  50  x  75 

µA’ (x) = 1, ,, .,0,0 

0    y    5 5    y    15 15    y    20 

=  , ., 0 =   

c. 

75  x  100 

µA’ (x) = 1,1,,,0,0 0 y 5 5  y 15 15 y 20 

= 1,, 0 = 1

0 , 0  x  50

µA’ (x) = µA (x) =−50

25  , 50  x  75

1 , 75  x  100

Page 46: Catatan Kuliah Fuzzy.pdf

7/21/2019 Catatan Kuliah Fuzzy.pdf

http://slidepdf.com/reader/full/catatan-kuliah-fuzzypdf 46/60

45

2.  B’ =  

50

75

100

0

0

0

00

5 15 20

1

m A(x)

mB(y)

m A(x)

.mB(y)

 Diberikan B’ =  

0 , 0  y  5

µB’ (y) =−5

10  , 5  y  15

1 , 15  y  20

µA’ (x) = ∈  ′, →,  

a.  0  x  50 

µA’ (x) = 0,0,′ , 0,1,0 0    y    5 5    y    15 15    y    20 

= 0,0,0 = 0

b.  50  x  75 

µA’

 (x) =

0,

 ,

′ ,

 .

,

1,0

 

0    y    5 5    y    15 15    y    20

= 0,−5

10,−50

25×

15−10

, 0 

=  −5

10,−50

25×

15−10

 

=−50−25 

Nilai Supy  V  min dicapai ketika:′ =  . −5

10 = 

−50

25×

15−10

 

− 5 =−5015−

25 

25

−5

15− = − 50 25 (y – 5) = (x – 50) (15 – y)

25y – 125 = 15x – 750  – xy + 50y

-25y = 15x – xy – 625

xy – 25y = 15x – 625

y(x – 25) = 15x – 625

y =15−625

−25 

µA’ (x) = ′  =

−5

10 

=

15−625

−25−5

10

 =15−625−5+125

10−25 =

10−500

10−25 =

10−5010−25

 =−50−25

 

Atau bisa juga menggunakan rumus [Wang, 1997, p.84]:

5 10 15

1

20

Page 47: Catatan Kuliah Fuzzy.pdf

7/21/2019 Catatan Kuliah Fuzzy.pdf

http://slidepdf.com/reader/full/catatan-kuliah-fuzzypdf 47/60

46

mA’ (x) =  

1+    =−50

25

1+−50

25

 =

−50

2525+−50

25

 =−50

−25 

c. 

75  x  100 

µA’ (x) =

0,1,

,,

1,0

 

0 y 5 5 y 15 15  y 20 = 0,′ , , 0 =  ′, 

Sup minimum terjadi pada ′ =   − 5

10=

15 − 10

 

y – 5 = 15 – y

2y = 20

y = 10

µA’ (x) = ′10 = 10−5

10 =

5

10 = 0.5

0 , 0  x  50

µA’ (x) = −50−25  , 50  x  75

0,5 , 75  x  100

3.  B’ = not very B 

50

75

100

0

0

0

00

5 15 20

1

m A(x)

mB(y)

m A(x)

.

mB(y)

 Diberikan B’ = not very B 

0 , 0  y  5

µB’ (y) = 1 − 15−10

2

  , 5  y  15

1 , 15  y  20

µA’ (x) = ∈  ′, →,  a.  0  x  50 

µA’ (x) = 0,0,′, 0,1,0 0    y    5 5    y    15 15    y    20 

= 0,0,0 = 0

b.  50  x  75 

µA’ (x) = 0, ,′, .,1,0 

0    y    5 5    y    15 15    y    20

= 0,′, ., 0 

=  ′, . 

5 10 15

1

20

Page 48: Catatan Kuliah Fuzzy.pdf

7/21/2019 Catatan Kuliah Fuzzy.pdf

http://slidepdf.com/reader/full/catatan-kuliah-fuzzypdf 48/60

47

Nilai Supy  V  min dicapai ketika:′ =  . Dengan menggunakan rumus [Wang, 1997, p.84]

µA’ (x) = µA(x) . µB(y)

=

       2 +4−  2 2  

=

−50

25   −50

252

+4−−50

252

=−50

50   −50

252

+ 4 − 1

2−50

252

 

c. 

75  x  100 

µA’ (x) = 0,1,′ , ,1,0 

0 y 5 5 y 15 15  y 20 

=

0,

,

, 0

 

Sup minimum terjadi pada ′ =  1 − 15−10

2 =15−10

 

100−225+30− 2

100=

150−10100

 

y2  – 30y – 10y + 150 + 125 = 0

y2  – 40y + 275 = 0

y1,2 =−±2−4

2  

=40±   −402−4.1.275

2.1 

=40±     500

=40±22,36

2  

y1 =66,36

2 = 33,18  µA’ (x) =

15−33,18

10 = -1,818 (tidak memenuhi karena negatif)

y2  =17,64

2 = 8,82  µA’  (x) =

15−8,82

10 = 0,618

0 , 0  x  50

µA’ (x) =−50

50   −50

252

+ 4 − 1

2−50

252

  , 50  x  75

0,618 , 75  x  100

Page 49: Catatan Kuliah Fuzzy.pdf

7/21/2019 Catatan Kuliah Fuzzy.pdf

http://slidepdf.com/reader/full/catatan-kuliah-fuzzypdf 49/60

48

Pertemuan 11

(28/11/2012)

FUZZY RULE BASED DAN FUZZY INFERENCE ENGINE

Fuzzy rule Based System Fuzzy Fuzzy Inference EngineArsitektur Sistem Fuzzy secara umum:

Fuzzifikasi:

1.  Fuzzy singleton Tsukamoto ketika x=1

2. 

Fuzzy Segitiga (triangular)3.  Fuzzy Norm.

Yang kompleks:

U-nya banyak, misal:

U = U1 x U2 x ... x Un  Rn 

x = (x1, x2, ..., xn)  Rn , y  R  multiple input, single output.

Struktur Basis Aturan Fuzzy 

Secara umum bentuknya:

 Rul : IF x1 is  1

 and x2 is  2  and ... and xn is    THEN y is B

l  

dengan:    dan Bl   suatu himpunan fuzzy dalam U i R dan V  R.

( x1 , x2 , ... , xn)T   U = U1  U2  ...  Un dan y  V .

Misal:

-   M  : banyaknya aturan

-   L = 1, 2, ..., M .

Aturan Fuzzy IF ... THEN dapat berbentuk:

a.  Partial rules

 IF x1 is  1  and ... and xm is    THEN y is B

l  , dimana m < n 

Contoh:

Harga Stok Permintaan

Rendah Banyak Naik

Tinggi Sedikit Turun

Jika harga rendah dan stock banyak permintaan naik

Fuzzifier

Fuzzy

Inference Engine

DefuzzifierFuzzy Rule BasedInput

 x U

(crisp)

Output

y V

(crisp)

Fuzzy set di U   Fuzzy set di V  

Page 50: Catatan Kuliah Fuzzy.pdf

7/21/2019 Catatan Kuliah Fuzzy.pdf

http://slidepdf.com/reader/full/catatan-kuliah-fuzzypdf 50/60

49

Kalo parsial:

Jika harga tinggi maka permintaan turun.

b.  Formula OR

IF (x 1 is

 1

 and ... and x m is

   ) OR (x m+1 is

 +1

 and ... and x n is

  ) THEN y is Bl  

c. 

Pernyataan tunggal

 y is Bl

d.  Aturan Gradual

The smaller the x, the bigger the y

e.  Aturan Non Fuzzy convensional production rules.

Properties Himpunan Rule

a. 

Completeness (lengkap)

Suatu himpunan Fuzzy IF THEN disebut lengkap jika ada paling sedikit 1 aturan dari basis

aturan dimana   () ≠ 0, untuk semua i = 1, 2, ..., n. Contoh Komplet:

U 1  U 2  V

Harga Stock Permintaan

Rendah Banyak Naik

Rendah Sedikit Turun

Tinggi Banyak Naik

Tinggi Sedikit Turun

IF x 1 is Rendah and x  2 is Banyak THEN y is B1 

IF x 1 is Rendah and x  2 is Sedikit THEN y is B 2 

IF x 1 is Tinggi and x  2 is Banyak THEN y is B3 

IF x 1 is Tinggi and x  2 is Sedikit THEN y is B4 

b.  Consistent

Jika x-nya sama, maka y-nya tidak boleh beda.

FUZZY INFERENCE ENGINE

Rule based: himpunan m buah rule.

Prinsip: mengkombinasikan semua aturan/rule tersebut sehingga menjadi 1 rule dalam U  V.

Yang perlu diketahui: intuitively antar rule bagaimana?

Misal:

IF X1 is A1 THEN y is B1 

IF X2 is A2 THEN y is B2

IF X1 is A1 and X2 is A2 THEN y is B3    saling bergantungan

Mamdani saling independen  pakai S-Norm

Godel saling bergantung  pakai t-Norm

Apa makna dari aturan-aturan tersebut (secara intuitif)

1. 

Aturan-aturan tersebut merupakan pernyataan kondisional yang independen.

 union (s-norm) mamdani

2. 

Semua aturan merupakan satu kesatuan (saling memberi dampak pada kesimpulan) interseksi (t-norm)  godel

independen

Page 51: Catatan Kuliah Fuzzy.pdf

7/21/2019 Catatan Kuliah Fuzzy.pdf

http://slidepdf.com/reader/full/catatan-kuliah-fuzzypdf 51/60

50

Misal: Rnl relasi fuzzy pada U x V sebagai representasi fuzzy IF ... THEN (rule).

Rnl =  1 ×  2

× ⋯×      Bl  

U = U1  U2  ...  Un

Didefinisikan:

 1 × 2 ×⋯×  →1,2,⋯ , =  1 1

   Dimana merepresentasikan sebarang operator t-norm.

Untuk sudut pandang Union, diperoleh relasi fuzzy QM dalam U  V adalah:

=

=1

 

Kombinasi ini dikenal sebagai Kombinasi Mamdani, ditulis: , = 1,+                 2,+                 ⋯+                 , Dengan +                  sebarang s-norm.

Untuk sudut pandang irisan, diperoleh relasi fuzzy QG dalam U  V adalah:

=

=1

 

Kombinasi ini dikenal sebagai Kombinasi Godel, ditulis: , = 1,2,⋯ , Dengan +                  sebarang t-norm.

Misal: A’ sebarang himpunan fuzzy dalam U (sebagai input) 

′ = ∈   ′ ,,  Union (Mamdani)

atau

′ = ∈   ′ ,,   Irisan (Godel)

Contoh: A = { x1, x2, x3}B = { y1, y2}

Diberikan aturan:

  IF x1 is A2 THEN y is B1 

  IF x2 is A1 THEN y is B2 Dengan : A1 = 0.6/ x1 + 1/ x2 + 0.4/ x3  B1 = 1/ y1 + 0.4/ y2 

A2 = 0.4/ x1 + 0.8/ x2 + 0.7/ x3 B2 = 0.8/ y1 + 0.5/ y2 Jika A’ = 0.5/ x1 + 0.9/ x2 + 0.6/ x3 tentukan B’ ! Misal, dipakai: mamdani min, t-norm min, s-norm maxMetode: komposisional dan individual

Jawab:Individual rule based inference 2→1

, B1 

R 1   y1  y2 1 0.4

 x1 = 0.4 0.4 0.4A2  x2 = 0.8  0.8 0.4

 x3 = 0.7 0.7 0.4

Page 52: Catatan Kuliah Fuzzy.pdf

7/21/2019 Catatan Kuliah Fuzzy.pdf

http://slidepdf.com/reader/full/catatan-kuliah-fuzzypdf 52/60

51

 1→2, 

B2 

R 2   y1  y2 

0.8 0.5

 x1 = 0.6 0.6 0.5

A1  x2 = 1  0.8 0.5 x3 = 0.4 0.4 0.4

Untuk individual masing-masing rule akan diberikan input terhadap A’ akan didapat B1’ dan B2’. B’tinggal dipandang sebagai minimum/intersection.

1′ =

∈   ′ , 2→1, 

1′ 1 =

∈  0.5, 0.4,0.9, 0.8,0.6, 0.7 = 0.8

1′ 2 =

∈  0.5, 0.4,0.9, 0.4,0.6, 0.4 = 0.4

1′  = 0.8/ y1 + 0.4/ y2

2′ = ∈   ′ , 1→2

, 2

′ 1 = ∈  0.5, 0.6,0.9, 0.8,0.6, 0.4 = 0.8

2′ 2 =

∈  0.5, 0.5,0.9, 0.5,0.6, 0.4 = 0.5

2′  = 0.8/ y1 + 0.5/ y2  = 0.8/1  + 0.5/2 

′  = ?

= 0.8/1  + 0.4/2 

Komposisional

, = 1,+                 2,   Mamdani

, = 1,2,   Godel

Mamdani  y1  y2 R

 x1  0.6 0.5 x2  0.8 0.5

 x3  0.7 0.4

′1 = ∈  0.5, 0.6,0.9, 0.8,0.6, 0.7 = 0.8

′2 = ∈  0.5, 0.5,0.9, 0.5,0.6, 0.4 = 0.5

′ = 0.8/1  + 0.5/2 

Godel  y1  y2 R

 x1  0.4 0.4 x2  0.8 0.4

 x3  0.4 0.4

′1 = ∈  0.5, 0.4,0.9, 0.8,0.6, 0.4 = 0.8

Page 53: Catatan Kuliah Fuzzy.pdf

7/21/2019 Catatan Kuliah Fuzzy.pdf

http://slidepdf.com/reader/full/catatan-kuliah-fuzzypdf 53/60

52

′2 = ∈  0.5, 0.4,0.9, 0.4,0.6, 0.4 = 0.4

′ = 0.8/1  + 0.4/2 

Hasilnya sama baik yang menggunakan metode individual maupun komposisional.

Beberapa fuzzy inference engine

1.  Product Inference Engine

-  Individual union

-  Implikasi Mamdani product

-  S-Norm  max

-  T-Norm  algebraic product

2.  Minimum Inference Engine

-  Individual union

-  Implikasi Mamdani min

-  S-Norm  max

T-Norm  min

3.  Lukasiewicz Inference Engine

-  Individual intersection

-  Implikasi Lukasiewicz

-  T-Norm  min

4.  Zadeh Inference Engine

-  Individual intersection

-  Implikasi Zadeh

-  T-Norm  min

5.  Dienes-Rescher Inference Engine

Individual intersection

-  Implikasi Dienes-Rescher

-  T-Norm  min

Jika A’ adalah fungsi singleton, maka fuzzy inference engine diperoleh: 1.  Product ′ =  ∗. 2.  Min ′ = min ∗,  3.  Lukasiewicz

= min

1, 1

−  ∗

+

 

4. 

Zadeh

′ = min ∗, ,  1 −  ∗ 5.  Dienes-Rescher ′ = max1 −  ∗,  

Catatan:

Fuzzy set A’ merupakan fuzzy singleton, apabila 1, jika x = x

*  ′ =

0, selain itu

Page 54: Catatan Kuliah Fuzzy.pdf

7/21/2019 Catatan Kuliah Fuzzy.pdf

http://slidepdf.com/reader/full/catatan-kuliah-fuzzypdf 54/60

53

Contoh: diberikan ruleIF x1 is A1 and x2 is A2 and ... and xn is An THEN y is B

1 - | y | , -1   y  1Dimana B =

0, yang lain

Jika A’ merupakan fuzzy singleton, tentukan ′  ?Misal, diperoleh: µA ( x1, x2, ... , xn)

= min 11

∗, 22

∗,⋯ ,  ∗ 

=   ∗ 

 ∗ =   ∗

=1

 

Case 1 :   ∗ ≥ 0,5 

1

0 1-1y

mAp( x p*)

 

1

y

mA( x*)

 Mamdani-Min Mamdani-Product

1

0 1-1y

1-mAp( x p*)

1

0 1-1y

1-mAp( x p*)

mA p( x p*)

 Lukasiewicz Zadeh

1

0 1-1y

1-mAp( x p*)

 

Dienes-Rescher

Case 2 :   ∗ < 0,5 

1

0 1-1y

mAp( x p*)

1

0 1-1y

mAp( x p*)mA( x*)

 Mamdani-Min Mamdani-Product

1

0 1-1y

Page 55: Catatan Kuliah Fuzzy.pdf

7/21/2019 Catatan Kuliah Fuzzy.pdf

http://slidepdf.com/reader/full/catatan-kuliah-fuzzypdf 55/60

54

1

0 1-1y

1-mAp( x p*)

1

0 1-1y

1-mAp( x p*)

 Lukasiewicz Zadeh

1

0 1-1y

1-mAp( x p*)

 Dienes-Rescher

Jika tidak singleton, maka pada product inference engine, rumusnya menjadi:

Bernilai 1 jika singleton

Pertemuan 12 (5/12/2012)

Pemetaan titik x*  U ( x

* : bilangan real) ke suatu himpunan fuzzy A’ dalam U. 

Beberapa yang dikenal:

1. 

Singleton Fuzzifier

Yaitu memetakan  x*

  U ke himpunan fuzzy A’ dalam U dengan nilai keanggotaan 1 pada  x*

 dan 0 untuk yang lain.

1, x = x*

µA’ ( x) =

0, yang lain

2.  Gaussian Fuzzifier

Yaitu memetakan x*  U ke himpunan fuzzy A’ dalam U dengan fungsi keanggotaan sebagai

berikut:

 ′ = −1−1∗

12

⋯−−∗ 2

 

Dimana ai adalah parameter positif, dan t-norm

 biasanya menggunakan algebraic productatau min. 

3.  Triangular Fuzzifier

Yaitu memetakan  x*    U ke himpunan fuzzy A’ dalam U dengan fungsi keanggotaan

triangular sebagai berikut:

1 − 1−1∗

1⋯ 1 − −∗ 1

, jika − ∗  bi, i = 1, 2, ..., n 

 ′ = 

0, yang lain

Dimana bi adalah parameter positif, dan t-norm biasanya menggunakan algebraic product

atau min.

1

 x*

Page 56: Catatan Kuliah Fuzzy.pdf

7/21/2019 Catatan Kuliah Fuzzy.pdf

http://slidepdf.com/reader/full/catatan-kuliah-fuzzypdf 56/60

55

Defuzzifier

Memetakan dari suatu himpunan fuzzy di dalam U sebagai output dari fuzzy inference engine ke

dalam sebuah titik y* dalam V dimana y adalah crisp.

Ada 4 cara untuk melakukan defuzzifier, yaitu:

1.  Center of gravity defuzzifier (centroid) : biasanya untuk fungsi yang kontinu.

 y*

 adalah titik berat dari area yang dibatasi oleh fungsi-fungsi B.

∗ = ′.  ′ 

 

2.  Center average

∗ =  . =1  =1

 

3.  Maximum membership principal  terlalu kasar, optimistik

µB’ ( y*)  µB’ ( y), untuk semua y  V.

 y* = w1 

4. 

Min-Max membership (middle of maxima)

 y* =

1+2

 y1   y2

w1

w2

 y1   y2

w1

w2

Page 57: Catatan Kuliah Fuzzy.pdf

7/21/2019 Catatan Kuliah Fuzzy.pdf

http://slidepdf.com/reader/full/catatan-kuliah-fuzzypdf 57/60

56

Contoh: Suatu survey memberikan 3 buah B’ (output) 

Tentukan z * ?

a. 

Center of average

 y* =2,5 . 0,3 + 5 . 0,5 + 6,5 . 1

0,3+0,5+1  =

9,75

1,8 = 5,42

b.  Middle of maxima

 y* =6+7

2  =

13

2 = 6,5

c. 

Centroid−3

2= 0,3    y = 3,6

− 5 = 0,5   y = 5,5

Pembilang = ′ .   

= 0,3.  + 0,3. 3,6

1+ −3

2. 4

3,6

1

0+ 0,5 . 5,5

4+ 

− 5 . 6

5,5+  7

6+ 8 − . 8

= 1

3.0,33

0

1+  1

2.0,32

1

3,6+  1

63 − 3

42

3,6

4+  1

42

4

5,5+  1

33 − 5

22

5,5

6+ 

1

22

6

7+  42 − 1

33

7

= 0,1 + 1,794 + 0,611 + 3,5625 + 2,167 + 6,5 + 3,667= 18,4005

Penyebut = ′    

= 0,3  + 0,3 3,6

1+ −3

2 4

3,6

1

0+ 0,5 5,5

4+ − 5 6

5,5 

+ 7

6+ 8 − 8

= 1

2.0,32

0

1+  0,313,6

+  1

42 − 3

2

3,6

4+  1

2

4

5,5+  1

22 − 5

5,5

6+  67 + 

8 − 1

22

7

= 0,15 + 0,78 + 0,16 + 0,75 + 0,375 + 1 + 0,5

= 3,715

 y*= 18,4005

3,715=4,953 

Page 58: Catatan Kuliah Fuzzy.pdf

7/21/2019 Catatan Kuliah Fuzzy.pdf

http://slidepdf.com/reader/full/catatan-kuliah-fuzzypdf 58/60

57

Contoh 2:

Diberikan sistem fuzzy 2 input 1 output. Didefinisikan aturan fuzzy:

IF x1 is A1 and x 2 is A2 THEN y is A1

IF x 1 is A2 and x 2 is A1 THEN y is A2 

dengan A1 dan A2 = himpunan fuzzy dalam R dengan fungsi keanggotaan:

µA1 ( x) = 1 −   ,−1 ≤ ≤ 10 , yang lain  

µA2 ( x) = 1 − 1 −   , 0 ≤ ≤ 2

0 , yang lain 

Inputan : 1∗, 2

∗= (0.3, 0.6) dengan singleton fuzzifier.

Tentukan output sistem fuzzy, dengan: product inference engine dan center of average.′ =  ∗. ′ =  1

1∗. 2

2∗. 1

, 21

∗. 12

∗. 2 

=  10,3. 2

0,6. 1, 2

0,3. 10,6. 2

 =

0,7.0,6.

 1, 0,3.0,4.

 2 

= 0,42. 1, 0,12. 2 

-1 1

1

0 2

1

0 1

A1   A2

0 2

1

1

0,42

0,12

-1

 Center of average

 y* =

0,42.0+0,12.1

0,42+0,12 =

0,12

0,54 = 0,222

Khusus untuk fungsi semacam ini:  Center of average

 y* = 2

1+2 

  Centroid

Penyebut = luas area = luas area 1 + luas area 2 + irisan

= w1 + w2 -1

2  1∙21+2

 

= 0,42 + 0,12 - 1

2 0,42 . 0,12

0,42+0,12 

= 0,4933

Pembilang =

1

1 +

0

−1

+

1

1

11+2

0+

2

1 1

1+2

+

2

2

− 2

= −1

61+2+

16

 1

3

1+22 

= −1

60,42+0,12+

16

 0,423

0,42+0,122 

= 0,0923

 y* =

0,0923

0,4933 = 0,1872

Bentuk-bentuk implementasi fuzzy logic

Inference engine yang sering dijumpai:

1. 

Mamdani min  singleton fuzzifier

2. 

Sugeno (TSK)3.  Tsukamoto

0 2

1

1

w1

-1

w2

w1

w1+w2

Page 59: Catatan Kuliah Fuzzy.pdf

7/21/2019 Catatan Kuliah Fuzzy.pdf

http://slidepdf.com/reader/full/catatan-kuliah-fuzzypdf 59/60

58

Mamdani Min

-  Singleton fuzzifier

-  µB’( y) = min (µA’ ( x) . µB ( y))

 

Karena singleton=1

µB’( y) = µB ( y)

 x1

mA( x1)

 x2

mA( x2)   mA( x2)mB’( y)

 Contoh:

Suatu perusahaan makanan kaleng akan memproduksi makanan jenis ABC. Dari data 1 bulan

terakhir, permintaan terbesar sehingga mencapai 5000 kemasan/hari, dan permintaan terkecil

sampai 1000 kemasan/hari. Persediaan barang di gudang terbanyak sampai 600 kemasan/hari, dan

terkecil pernah sampai 100 kemasan/hari. Dengan segala keterbatasannya, sampai saat ini,perusahaan baru mampu memproduksi barang maksimum 7000 kemasan/hari, serta demi efisiensi

mesin dan SDM tiap hari diharapkan perusahaan memproduksi paling tidak 2000 kemasan. Apabila

proses perusahaan tersebut menggunakan 4 aturan fuzzy.

[R1] IF Permintaan TURUN and Persediaan BANYAK THEN Produksi BERKURANG.

[R2] IF Permintaan TURUN and Persediaan SEDIKIT THEN Produksi BERKURANG.

[R3] IF Permintaan NAIK and Persediaan BANYAK THEN Produksi BERTAMBAH.

[R4] IF Permintaan NAIK and Persediaan SEDIKIT THEN Produksi BERTAMBAH.

Berapa kemasan makanan jenis ABC yang harus diproduksi, jika jumlah permintaan sebanyak 4000

kemasan dan persediaan di gudang masih 300 kemasan?

Jawab:Ada 3 variabel fuzzy yang akan dimodelkan: permintaan, persediaan dan produksi.

1000 50004000

0,25

0,75

1TURUN   NAIK

100 600300

0,4

0,6

1SEDIKIT   BANYAK

2000 7000

1BERKURANG   BERTAMBAH

 Permintaan Persediaan Produksi Barang

(kemasan/hari) (kemasan/hari) (kemasan/hari)

Input ( x1*, x2

*) = (permintaan, persediaan) = (4000, 300)

[R1] IF Permintaan TURUN and Persediaan BANYAK THEN Produksi BERKURANG.

1000 50004000

0,25

1TURUN

100 600300

0,4

1BANYAK

2000 7000

1BERKURANG

m(x)

2000 7000

1BERKURANG

0,25

m(y)   m(z)

 

Page 60: Catatan Kuliah Fuzzy.pdf

7/21/2019 Catatan Kuliah Fuzzy.pdf

http://slidepdf.com/reader/full/catatan-kuliah-fuzzypdf 60/60

59

[R2] IF Permintaan TURUN and Persediaan SEDIKIT THEN Produksi BERKURANG.

1000 50004000

0,25

1TURUN

100 600300

0,6

1SEDIKIT

2000 7000

1BERKURANG

m(x)

2000 7000

1BERKURANG

0,25

m(y)   m(z)

 [R3] IF Permintaan NAIK and Persediaan BANYAK THEN Produksi BERTAMBAH.

1000 50004000

0,75

1NAIK

100 600300

0,4

1BANYAK

2000 7000

1

BERTAMBAH

m(x)

2000 7000

1

BERTAMBAH0,4

m(y)   m(z)

 [R4] IF Permintaan NAIK and Persediaan SEDIKIT THEN Produksi BERTAMBAH.

1000 50004000

0,75

1NAIK

100 600300

0,6

1SEDIKIT

2000 7000

1

BERTAMBAH

m(x)

2000 7000

1

BERTAMBAH0,6

m(y)   m(z)

 Komposisi antar aturan

m(z)

1

0,25

0,6

A1   A2   A3

0 a1   a2

 (a1  – 2000)/5000 = 0,25  a1 = 3.250

(a2  – 2000)/5000 = 0,60  a2 = 5.000

Dengan demikian, fungsi keanggotaan untuk hasil komposisi ini adalah:

0,25 ; z   3250

=  ( z   – 2000) / 5000 ; 3250   z   5000

0,6 ; z   5000

M1 = 0,25z dz3250

0=  0,125z203250 = 1320312,5 

M2 = z−2000

5000z dz

5000

3250= 0,0002z2 − 0,4z dz

5000

3250=  0,000067z3 − 0,2z23250

5000 = 3187515,625 

M3 = 0,6z dz

7000

5000 =  0,3z2

5000

7000

= 7200000 

Luas setiap daerah:

A1 = 3250 * 0,25 = 812,5

A2  = (5000 – 3250) * (0,25 + 0,6) / 2 = 743,75

A3 = (7000 – 5000) * 0,6 = 1.200

Titik pusat dapat diperoleh