300 likes | 1.84k Views
Fuzzy Inference System (FIS) and Matlab Fuzzy Logic Toolbox. Fuzzy inference is the process of formulating the mapping from a given input to an output using fuzzy logic. The mapping provides a basis from which decisions can be made , or patterns discerned.
E N D
Fuzzy Inference System (FIS)and Matlab Fuzzy Logic Toolbox • Fuzzy inference is the process of formulating the mapping from a given input to an output using fuzzy logic. The mapping provides a basis from which decisions can be made, or patterns discerned. • The process of fuzzy inference involves three pieces: • membership functions, • fuzzy logic operators, • and if-then rules. • Two types of fuzzy inference systems in Matlab: that can be implemented in the Fuzzy Logic Toolbox: • Mamdani • Sugeno
Building a FIS from scratch • The Basic Tipping Problem. Given a number between 0 and 10 that represents the quality of service at a restaurant (where 10 is excellent), and another number between 0 and 10 that represents the quality of the food at that restaurant (again, 10 is excellent), what should the tip be?
Building a FIS from scratch (cont.) • 1. If the service is poor or the food is rancid, then tip is cheap. • 2. If the service is good, then tip is average. • 3. If the service is excellent or the food is delicious, then tip is generous. • We'll assume that an average tip is 15%, a generous tip is 25%, and a cheap tip is 5%. It's also useful to have a vague idea of what the tipping function should look like.
Fuzzy Logic Toolbox (GUI) • Start the toolbox:
Command Line functions • plotfis • plotmf • gensurf
Evaluate “tipper” >> a = readfis('tipper'); >> evalfis([1 2], a) ans = 5.5586 >> evalfis([3 5; 2 7], a) ans = 12.2184 7.7885
Detailed info on “tipper” >> showfis(a)