Fuzzy Systems Prof. Dr. Widodo Budiharto 2018 Course : Artificial Intelligence Fuzzy Systems Prof. Dr. Widodo Budiharto 2018
Outline Introduction Fuzzy Sets Membership Function Fuzzy Logic Linguistic Variable Fuzzy Rules Fuzzification Inferencing Defuzzification
Fuzzy Logic representation Slowest For every problem must represent in terms of fuzzy sets. What are fuzzy sets? [ 0.0 – 0.25 ] Slow [ 0.25 – 0.50 ] Fast [ 0.50 – 0.75 ] Fastest [ 0.75 – 1.00 ] Bina Nusantara University
Classical Sets Classical sets contain objects that satisfy precise properties of membership; fuzzy sets contain objects that satisfy imprecise properties of membership, i.e., membership of an object in a fuzzy set can be approximate. For example, the set of heights from 5 to 7 feet is precise (crisp); the set of heights in the region around 6 feet is imprecise, or fuzzy. Bina Nusantara University
Fuzzy Sets and Membership For crisp sets (Himpunan klasik), an element x in the universe X is either a member of some crisp set A or not. This binary issue of membership can be represented mathematically with the indicator function Fungsi keanggotaan Nilai keanggotaan Bina Nusantara University
Classical Sets (1) The universe of discourse (Semesta Pembicaraan) is the universe of all available information on a given problem. Figure below shows an abstraction of a universe of discourse, say X, and a crisp (classical) set A somewhere in this universe. A classical set is defined by crisp boundaries, that is, there is no uncertainty in the prescription or location of the boundaries of the set, where the boundary of crisp set A is an unambiguous line. Bina Nusantara University
Classical Sets (2) Bina Nusantara University
Fuzzy components Bina Nusantara University 8 Bina Nusantara University
example Bina Nusantara University
Fuzzification Fuzzyfikasi: proses memetakan nilai crisp (numerik) ke dalam himpunan fuzzy dan menentukan derajat keanggotaannya di dalam himpunan fuzzy. Bina Nusantara University
example Bina Nusantara University
Defuzification Defuzzyfikasi: proses memetakan besaran dari himpunan fuzzy ke dalam bentuk nilai crisp. reason: sistem diatur dengan besaran riil, bukan besaran fuzzy. Bina Nusantara University
Membership functions Bina Nusantara University
Bina Nusantara University
Bina Nusantara University
Mapping of Classical Sets to Functions Mapping is an important concept in relating set-theoretic forms to function-theoretic representations of information. If an element x is contained in X and corresponds to an element y contained in Y, it is generally termed a mapping from X to Y, or f: X → Y. Bina Nusantara University
Membership functions The membership function embodies the mathematical representation of membership in a set, and the notation used throughout this text for a fuzzy set is a set symbol with a tilde underscore, say Bina Nusantara University
Fuzzy Sets A notation convention for fuzzy sets when the universe of discourse, X, is discrete and finite, is as follows for a fuzzy set Bina Nusantara University
Fuzzy Sets Operations (1) Define three fuzzy sets , , and on the universe X. For a given element x of the universe, the following function-theoretic operations for the set-theoretic operations of union, intersection, and complement Bina Nusantara University
Fuzzy Sets Theory Classical Set vs Fuzzy set Membership value 1 1 175 Height(cm) 175 Height(cm) Universe of discourse
example Bina Nusantara University
answer Bina Nusantara University
Bina Nusantara University
Review Kurva Penyusutan Bina Nusantara University
example Fungsi keanggotan untuk himpunan TUA pada variabel umur uTUA[50]=1-2((60-50)/(60-35))2 Bina Nusantara University
example Fungsi keanggotaan untuk himpunan MUDA pada variabel umur: uMUDA[37]=2((50-37)/(50-20))2 =0.376 Bina Nusantara University
Operator Dasar Zadeh Nilai keanggotaan sebagai hasil dari operasi 2 himpunan dikenal dengan fire strength atau α-predikat. Operator AND, dengan mengambil nilai keanggotaan terkecil Contoh : nilai keanggotaan 27 th pada himpunan MUDA 0.6 (uMUDA[27]=0.6); nilai keanggotan Rp 5.000.000 pada himpunan penghasilan TINGGI 0.8 (uGAJITINGGI[5x106]=0.8; Maka α predikat untuk usia MUDA dan penghasilan TINGGI Bina Nusantara University
Operator Dasar Zadeh Operator OR berhubungan dengan operasi union dengan mengambil nilai keanggotaan terbesar Operator NOT berhubungan dengan operasi komplemen Bina Nusantara University
Fuzzy Inference Systems Metode Tsukamoto Bina Nusantara University
Example Suatu perusahaan minuman akan memproduksi minuman jenis ABC. Dari data 1 bulan terakhir, permintaan terbesar hingga mencapai 6000 botol/hari, dan permintaan terkecil sampai 500 botol/hari. Persediaan barang digudang terbanyak sampai 800 botol/hari, dan terkecil pernah sampai 200 botol/hari. Sampai saat ini, perusahaan baru mampu memproduksi barang maksimum 9000 botol/hari, demi efisiensi mesin dan SDM tiap hari diharapkan perusahaan memproduksi paling tidak 3000 botol. Bina Nusantara University
[R1] IF Permintaan TURUN And Persediaan BANYAK Apabila proses produksi perusahaan tersebut menggunakan 4 aturan fuzzy sbb: [R1] IF Permintaan TURUN And Persediaan BANYAK THEN Produksi Barang BERKURANG; {R2] IF Permintaan TURUN And Persediaan SEDIKIT [R3] IF Permintaan NAIK And Persediaan BANYAK THEN Produksi Barang BERTAMBAH; [R4] IF Permintaan NAIK And Persediaan SEDIKIT Berapa botol minuman jenis XYZ yang harus diproduksi, jika jumlah permintaan sebanyak 4500 botol, dan persediaan di gudang masih 400 botol? Bina Nusantara University
Ada 3 variabel fuzzy yang akan dimodelkan, yaitu: Permintaan; terdiri-atas 2 himpunan fuzzy, yaitu: NAIK dan TURUN Cari nilai keanggotaan: PmtTURUN[4500] = (6000-4500)/5500 = 0,27 PmtNAIK[4500] = (4500-500)/5500 = 0,72 Fungsi keanggotaan variabel Permintaan Bina Nusantara University
Persediaan; terdiri-atas 2 himpunan fuzzy, yaitu: SEDIKIT dan BANYAK PsdSEDIKIT[400] = (600-400)/600 = 0,667 PsdBANYAK[400] = (400-200)/600 = 0,33 Fungsi keanggotaan variabel Persediaan Bina Nusantara University
Produksi barang; terdiri-atas 2 himpunan fuzzy, yaitu: BERKURANG dan BERTAMBAH Fungsi keanggotaan variabel Produksi Barang Bina Nusantara University
Sekarang kita cari nilai z untuk setiap aturan dengan menggunakan fungsi MIN pada aplikasi fungsi implikasinya: [R1] IF Permintaan TURUN And Persediaan BANYAK THEN Produksi Barang BERKURANG; -predikat1 = PmtTURUN PsdBANYAK = min(PmtTURUN [4500],PsdBANYAK[700]) = min(0,27; 0,83) = 0,27 Lihat himpunan Produksi Barang BERKURANG, (9000-z)/6000 = 0,27 ---> z1 = 7380
{R2] IF Permintaan TURUN And Persediaan SEDIKIT THEN Produksi Barang BERKURANG; -predikat2 = PmtTURUN PsdSEDIKIT = min(PmtTURUN [4500],PsdSEDIKIT[700]) = min(0,667; 0,337) = 0,333 Lihat himpunan Produksi Barang BERKURANG, (9000-z)/6000 = 0,333 ---> z2 = 7002 Bina Nusantara University
[R3] IF Permintaan NAIK And Persediaan BANYAK THEN Produksi Barang BERTAMBAH; -predikat3 = PmtNAIK PsdBANYAK = min(PmtNAIK [4500],PsdBANYAK[400]) = min(0,72; 0,33) = 0,4 Lihat himpunan Produksi Barang BERTAMBAH, (z-3000)/6000 = 0,333 ---> z3 = 4996 Bina Nusantara University
[R4] IF Permintaan NAIK And Persediaan SEDIKIT THEN Produksi Barang BERTAMBAH; -predikat4 = PmtNAIK PsdBANYAK = min(PmtNAIK [4500],PsdSEDIKIT[400]) = min(0,72; 0,667) = 0,667 Lihat himpunan Produksi Barang BERTAMBAH, (z-3000)/6000 = 0,667 ---> z4 = 7002 Bina Nusantara University
Dari sini kita dapat mencari berapakah nilai z, yaitu: Jadi jumlah minuman jenis XYZ yang harus diproduksi sebanyak 6652 botol. Bina Nusantara University
Example http://petro.tanrei.ca/fuzzylogic/fuzzy_negnevistky.html The problem is to estimate the level of risk involved in a software engineering project. For the sake of simplicity we will arrive at our conclusion based on two inputs: project funding and project staffing. Bina Nusantara University
Project Funding Suppose our our inputs are project_funding = 35% and project_staffing = 60%. Bina Nusantara University
Project Staffing Bina Nusantara University
The rules If project_funding is adequate or project_staffing is small then risk is low. If project_funding is marginal and project_staffing is large then risk is normal. If project_funding is inadequate then risk is high. Bina Nusantara University
Bina Nusantara University
Bina Nusantara University
Rule Evaluation results Bina Nusantara University
Rule Evaluation results Bina Nusantara University
Rule Evaluation results Bina Nusantara University
Calculation We perform a union on all of the scaled functions to obtain the final result Bina Nusantara University
Result The defuzzification can be performed in several different ways. The most popular method is the centroid method. Bina Nusantara University
Result We chose the centroid method to find the final non-fuzzy risk value associated with our project. This is shown below. The result is that this project has 67.4% risk associated with it given the definitions above. Bina Nusantara University
Homework Bina Nusantara University
References Widodo Budiharto et al (2015). Artificial Intelligence, Andi Offset Publisher. Widodo Budiharto. (2016). Machine Learning and Computational Intelligence, Andi Offset Publisher. Andries P. Engelbrecht. 2007. Computational Intelligence: An Introduction. Wiley. ISBN: 978-0-470-03561-0