Geri Dön

Bir bulanık uzman sistem kabuk prototipi

A Fuzzy expert system shell prototype

  1. Tez No: 46436
  2. Yazar: HAKAN SARIBIK
  3. Danışmanlar: DOÇ.DR. GAZANFER ÜNAL
  4. Tez Türü: Yüksek Lisans
  5. Konular: Mühendislik Bilimleri, Engineering Sciences
  6. Anahtar Kelimeler: Sistem analizi, Uzman sistemler, System analysis, Expert systems
  7. Yıl: 1995
  8. Dil: Türkçe
  9. Üniversite: İstanbul Teknik Üniversitesi
  10. Enstitü: Fen Bilimleri Enstitüsü
  11. Ana Bilim Dalı: Belirtilmemiş.
  12. Bilim Dalı: Belirtilmemiş.
  13. Sayfa Sayısı: Belirtilmemiş.

Özet

ÖZET Bu tezin ana amacı, bulanık üretim kuralları kullanarak çıkarım yapabilen bulanık bir uzman sistem kabuğu yapmaktır. Bu yüzden, tez iki ayrı kısım olarak düşünülebilir. Bunlardan birincisi bulanık kümeler ve bulanık mantık, ikincisi ise bulanık kümelerin bilgisayarda temsili ve kullanımı¬ dır. Birinci kısım sadece, bu konuda yeterli Türkçe doküman olmamasından dolayı verilmiştir. Birinci bölümde, bilgi ve taşıdığı belirsizlik üzerinde durulmuş ve bilhassa belirsizliğin tiplerinin ayırdedilmesinin önemi vurgulanmıştır, ikinci ve üçüncü bölümlerde, bulanık küme kavramı üzerinde durulmuş ve bu konu üzerinde tez çalışmasının gerektirdiği bilgiler verilmiştir. Dördüncü bölümde, bulanık kümelerden farklı bir belirsizlik kavramı, bulanık ölçü hakkında kısa bir bilgilendirme yapılmıştır. Beşinci bölümde, bulanık çıkarım üzerinde durularak bu konuda en popüler yöntemlerden biri olan Zadeh' in kompozisyon kuralı ayrıntılı olarak ve ilerisi için ümit vadeden bulanık Petri ağlarından bilgilendirme amacıyla bahsedilmiştir. Altıncı bölümde, bulanık kümelerin bilgisayarda temsili ve işlenmesi problemi üzerinde durulmuştur. Bu probleme bir çözüm olarak, yapay zeka dillerinden LISP' deki liste yapısı kullanılarak, C Programlama dili vasıtasıyla bulanık kümelerin bilgisayarda iyi bir şekilde temsil edilebileceği gösterilmiştir. Yedinci bölümde, kısaca uzman sistemlerden bahsedilmiş ve kural tabanlı uzman sistemlerde enbüyük problemlerden biri olan, kuralın öncülünün elde mevcut bulunan gerçeklerle tam olarak uyuşamaması durumu incelenmiştir. Bulanık kümelerle bu problemin nasıl çözülebileceği üzerinde durulmuştur. Bundan sonra örnek bir bulanık uzman sistem oluşturulması için altıncı bölümde bahsedilen listelerin nasıl kullanılacağı ayrıntılı olarak anlatılmış ve uygulama olarak Ek A' da verilen programın nasıl yazıldığı ve işlemesi hakkında bilgi verilmiştir. Son bölümde, SÜRÜCÜ ve YATIRIM adlı iki küçük bulanık kural tabanı vasıtasıyla, yazılan programın çalışması anlatılmıştır. vii

Özet (Çeviri)

SUMMARY A FUZZY EKPERT SYSTEM SHELL PROTOTYPE The main purpose of this thesis is to write a fuzzy expert system shell protptype whicn can uşe fuzzy production rtües for inference. Therefore, the thesis can be divided into two par t: the first part is' about fuzzy sets and fuzzy logic, and the second öne is representation and manipulation of fuzzy sets on computers. The first part is only given to form. a sel£-explained thesis in Turkish language. Because, there is not any enough documentation for this subject in Turkish. The first part consists of four chapters. Let us make a quick view to these chapters. in the first chapter, knowledge and uncertainty relation is explained After that, we want to find an answer to the question“why do we need fuzzy sets for the representation of sonıe kind of luıcertainty called vagueness ?”. in the second chapter, fuzzy set notion and its mathematical bases is mentioned. Ali ordinary operations on crisp sets is carried to fuzzy sets. For example; the cardinality of a fuzzy set, fuzzy subsethood, intersection and union operations of fuzzy sets ete. Also, the relation between two fuzzy sets is descnbed and explained with an example. Fuzzy relations is important to form a bases for fuzzy inference. The well-known fuzzy inference mechanism Zadeh's max-min composition [6] and its variety max-product composition is given. in the third chapter. öne another important notion, fuzzy logic is given and then its relation with fuzzy sets is explained. in the fourth chapter, a different uncertainty notion, namely the fuzzy measures is explained. in the subsequent chapters, we introduce fuzzy inference in Chapter 5. At first, we need to understand when fuzzy inference comes into play. For this reason, let us begin with classical implication operation denoted with Table l The truth table of implication operatör. A B l A -»B l -'AV B 1111 1.0OO 011l 001l viiiWe can use A -*. B for representation of rules which A denotes antecedent E art and B denotes conseguent part.. A and B are propositions in classical >gic. Because of our main purpose is to infer with fuzzy propositions, let us assume A and B be fuzzy propositions such as large and small. If large then small If slippery tlıen dangerous in essence, these rules are an abbreviation form from the daily language to special purpose language. For exanaple, If x large then y is small If road is slippery then driving is dangerous These kind of rules can be defined as a fuzzy relatipn between two fuzzy sets [6]. This idea forms the core of Zadeh's compositional rule of inference. Let us look at Zadeh's compositional rule of inference now. We have mentioned that a fuzzy productıon rule can be described as a relatipn be- tween the antecedent part and the consequent part. We can show this rela- tion as follows, RA-^ s(«,u) = [J.A^B(U,V')/(U,V') /J.A^B(U,V) = I (IJLA(U},IJ,B(V}} I represents generalized implication operatör [25]. For example, b(u, u) = min(l, a + &) k(u, v} = maks(0, u + v - 1) t(u) = l - u I(u, ü) = ınin(l, l - u + u) How can we perform inference if a fact such as very large will be given? it can be easily seen that classical modus ponens rule of inference can not be used. Let H be a fuzzy relation represents 'if large then small', then we can infer from given fact x=very large' as follows, y = x o R Hy(v~) = supTOzO),/^(w,u)) u£U The result is y. We have used this form of inference concept in our fuzzy expert system shell prototype. However, there are another inference mech- anısms at the literatüre. Öne of them is Chen's Matching Functions via using Fuzzy Petri Nets [22]. Let R be a set of fuzzy production rules R = {J2ı,R<2<..., Rn }. The general formulation of the zth fuzzy production rule is as follows: Rİ: If d j then dk ( CF = /^)(1) where><ij and dk fuzzy propositions, and certainty factor (CF) is the strength of belief in the rule. This rule can be represented as a fuzzy petri net as shown in Fiğ. 1. ixd, V-idk U/?)5J/yT)yfc = y j * & PjtiPk Figüre l A Fuzzy Petri Net representation of the (1) Chen describes a matching function for similarity between dj and an observation g j and uses this similarity value for fuzzy inference. gj ' d j 3 max(gj-gj-,dj-dj) Now it is time to show really what we did in this thesis. Chapter 6 is about representation and manipulation of fuzzy sets on computer. This is already an active research area at the literatüre of fuzzy sets. As it is known, this subject is closely related with Artificial Intelli- gence (Al). Therefore, it is reasonable to choose a method already exists in AL There are a number of ways to represent knowledge. The most com- mon way used in Al community is lists in LISP. Because of this, there is an attempt to use list representation [29] for fuzzy sets on computer. For this purpose a LISP dialect named FLISP is developed by Sosnowski and Pedrycz. We will follow this approach and first constmct a list representa¬ tion method in C programming language, and then represent fuzzy sets with lists in C. Added to this, we have an extra problem for which ali necessary list manipulation functions must be written in C. Let us firstly look at how ordinary sets such as { a\, 02,..., an } at- (E X can be represented by lists; (X APVAL (aı a2... a»)) Of course, this is held as a data structure in the memory of computer. We especially interested in the form of this data structure. This data structure can be represent as shown in Fiğ. 2 ; AXAPVALnil aıa2«n nil Figüre 2 List representation of a set in LISP xAlso, we can represent a list which is much more complex than in Fiğ. 2 such as shown in Fiğ. 3. rrı M ı ı I-H ı ı f-*mi l l l l l l t-rjl f-nil l ı l h-TTTTI l x l l, J^ l 2 l l 3 l rp M,1 I-H ı l l-^nii ı A ı ı B i ı c ı a ) Explicit celi representation. rn M ıı hH ı ı mi ı ı ı ı H-nrr^n 121 M 3 l nil i FT1 M B | M c l nal b ) Shorthancl representation. Figüre 3 Pointer structure of ((A B C) l ((2 3) X~)} As it can be seen, lists give us a rich representation method enough to handle fuzzy sets. This can be done as follows; (FSET NAME (X ((at ^) (a2 /x2)... (o» /*“)))) Tbis can be represented grapbically as shown in Fiğ. 4; xiAPSET.NAMEnil X| |1 |nil | l-l) |1 |nü| ÇŞl_ ^1_02_ /X2an JÜT[ Figüre 4 The graphical representation of a fuzzy set Let us see how this works. Example: : Let X = (0,1,2,3,4,5,6,7). Then a fuzzy set few in X may be defined as follows: (FSET FEW (01234567) ((O 0.0)(1 0.2)(2 0.5)(3 0.8)(4 1.0) (5 0.7)(6 0.4)(7 0.2)))) Example: : Let X = {USA, HOLLAND, TURKEY}. If we want to describe these countries' surface area with linguistic terms such as; large, small and medium respectively, we can represeııt these vague knowledge as a fuzzy set; (FSET CountrySurfaceArea (X ((USA LARGE) (HOLLAND SMALL) (TURKEY MEDIUM)) )) Chapter 7 is about fuzzy expert systenıs. in the beginning, expert sys- tems (ESs) are described and it has been tried to explain why we need them. When we are interested in rule-based expert systems, we notice that these systems have a lot of problems about processing knowledge. When the rules in ES knowledge base have vague ör uncertain knowledge, it is not easy to process this kind of infonnation for ES unlike to human experts. Two problems espacially arise for ESs. Öne of them is partial matching, and the other is representation of uncertain knowledge and its processing with logical inference technique such as forward chaining. Fuzzy sets give an opportunity to make partial matching. in other words, when the observation and the antecedent of the rule do not com- pletely the same, then we need to ıneasure their similarity degree. We can do this via fuzzy matching. Because, there is no best rneasure function avail- able, a lot of alternatives exist at the literattıre [19,31]. in addition this, xiithere are mainly three types of measure function. We chose to compute the matching value as given below; E(A, B) = sup [min( A(z), B(x) )] xex E(A,B) = |A0B xnax(|A|,|S|) \AHB\ E(A,B)=IA ”. v ; \ADB\ As you see, this functions are based on fuzzy set operations. FESSP Now it is time to construct a Fuzzy Expert System Shell Prototype (FESSP) which must contain the following three modules; 1) A fuzzy rule base is needed to contain fuzzy production rules. 2) An inference engine to perform fuzzy inference. 3) A dialog module to provide an interaction between FESS and the user. As can be seen in Ap£>endix A, a comptiter program is written with C Programming language for representation and manipulation of lists. The refore, it is easy to express a fuzzy rule as follows; (rule Rl (IF (ROAD VERY SLIPPERY)) (THEN (DRIVING SLOW) )) (2) It is necessary to form the manipulation function of lists to use this rule as easy as in LISP. For this purpose, the main functions of LISP have been written in C. Before an example of these functions are given, let us understand the basic data structure of list called cell. typedef struct cons{ union { struct cons *p; char *s; int *i; float *f; } car; struct cons *cdr; unsigned char type; } cons; In this data structure, cdr variable generally points a sublist, and type is used to know what the data type in this cell. Now, we can give an example xiiifor converting LISP function to C function. For this purpose, let us take Ireverse function which reverses the ör der of top-level children of list. (defun Ireverse (ist) (cond f (null ist) nil) (t (append (Ireverse (cdr ist)) (list (car ist))) ) cons *lreverse(cons *lst) cons *temp,*a; if(lst!=NULL) temp=lreverse( CDR(lst) ); else return NULL; a=mkcons( CAR_LIST, CAR(lst), NULL); return append(temp,a); We can reach every element of a fuzzy rule (2) with this function and similar functions written in C. For example, we can get antecedent of the rule with function given below. ( defun get_antecedents (rule) (cdr (nth 2 rule)) cons *get_antecedents(cons *rule) return CDR( nthJist(2,rule) ); Ali the necessary functions for doing fuzzy inference are written as seen Appendix A. Furthermore, fuzzy sets can be represented as follows. (FSET (ROAD SLIPPERY)(((0 l 2 3 4 5 6)) ( (O 0.0)(1 0.25) (2 0.45)(3 0.65)(4 0.85)(5 0.95)(6 0.99)(7 0.99) )) (VERY MOREORLESS () SLIGHTLY NOT)) in the last section of the thesis, it has been shown two simple examples for FESs, named SÜRÜCÜ and YATIRIM. The results of fuzzy inferences are shown in Appendix B and C, respectively. xiv

Benzer Tezler

  1. Direct decomposed rule base fuzzy logic systems

    Doğrudan ayrıştırılmış kural tabanlı bulanık mantık sistemleri

    GHALEP MAABREH

    Doktora

    İngilizce

    İngilizce

    1998

    Bilgisayar Mühendisliği Bilimleri-Bilgisayar ve Kontrolİstanbul Teknik Üniversitesi

    Bilgisayar Mühendisliği Ana Bilim Dalı

    PROF. DR. EŞREF ADALI

  2. A Programmable fuzzy controller emulator chip

    Programlanabilir bir puslu denetleyici emülatörü tümdevresi

    FİKRET DÜLGER

    Yüksek Lisans

    İngilizce

    İngilizce

    1996

    Elektrik ve Elektronik Mühendisliğiİstanbul Teknik Üniversitesi

    PROF.DR. UĞUR ÇİLİNGİROĞLU

  3. SHEF: A tool for fuzzy control system development

    SHEF: Bulanık kontrol algoritması geliştirme ortamı

    ŞİMA ETANER

  4. Ulaştırma yatırımlarının değerlendirilmesinde bulanık mantık yaklaşımıyla katılımcı bir karar destek sistemi

    A Decision support system for the evaluation of transportation investments: A participatory approach using fuzzy logic

    MURAT MUSTAFA SATI

    Doktora

    Türkçe

    Türkçe

    2000

    İnşaat Mühendisliğiİstanbul Teknik Üniversitesi

    PROF.DR. HALUK GERÇEK

  5. Elektrik makinaları kontrolünde bulanık mantığın uygulanması

    Fuzzy logic applications in control of electrical machines

    NESLİHAN KEPEZ

    Yüksek Lisans

    Türkçe

    Türkçe

    1995

    Elektrik ve Elektronik Mühendisliğiİstanbul Teknik Üniversitesi

    PROF.DR. M. EMİN TACER