What is Fuzzy Logic? Fuzzy Logic Andrew Kusiak Fuzzy logic is a tool for embedding Intelligent Systems Laboratory 2139 Seamans Center human knowledge The University of Iowa Iowa City, IA 52242 – 1527 (experience, expertise , heuristics) andrew-kusiak@uiowa.edu @ http://www.icaen.uiowa.edu/~ankusiak ( Based on the material provided by Professor V. Kecman) The University of Iowa Intelligent Systems Laboratory The University of Iowa Intelligent Systems Laboratory Why Fuzzy Logic ? Fuzzy Logic Human knowledge is fuzzy: expressed “Fuzzy logic may be viewed as a bridge Fuzzy logic may be viewed as a bridge in ‘fuzzy’ linguistic terms e g young in fuzzy linguistic terms, e.g., young, between the excessively wide gap between old, large, cheap. the precision of classical crisp logic and the imprecision of both the real world and its human interpretation” Temperature is expressed as cold, warm or hot. No quantitative meaning. Paraphrasing L. Zadeh The University of Iowa Intelligent Systems Laboratory The University of Iowa Intelligent Systems Laboratory
The World is Not Binary! Fuzzy Logic Gradual transitions and ambiguities at the boundaries • Fuzzy logic attempts to model the way of Bad, Night, Old, Ill reasoning of the human brain. i f th h b i NO NO False, Sad, Short , , 1 • Almost all human experience can be expressed in the form of the IF - THEN rules. • Human reasoning is pervasively approximate, H i i i l i t non-quantitative, linguistic, and dispositional (meaning, usually qualified). Good, Day, Young, Healthy, YES, True, Happy, Tall , , 0 The University of Iowa Intelligent Systems Laboratory The University of Iowa Intelligent Systems Laboratory When and Why to Apply FL? When and Why to Apply FL? • Human knowledge is available • Mathematical model is unknown or impossible to obtain • At higher levels of hierarchical control systems • Process substantially nonlinear • Process substantially nonlinear • In decision making processes • Lack of precise sensor information The University of Iowa Intelligent Systems Laboratory The University of Iowa Intelligent Systems Laboratory
How to Transfer Human Knowledge Fuzzy Sets vs Crisp Sets Into the Model ? • Knowledge should be structured Knowledge should be structured. Crisp Sets Crisp Sets Fuzzy Sets Fuzzy Sets • Possible shortcomings: – Knowledge is subjective – ‘Experts’ may bounce between extreme points of view: • Have problems with structuring the knowledge, or • Have problems with structuring the knowledge or • Too aware in his/her expertise, or • Tend to hide ‘knowledge’, or ... Venn Diagrams • Solution: Find a ‘good’ expert. The University of Iowa Intelligent Systems Laboratory The University of Iowa Intelligent Systems Laboratory Modeling or Approximating a Function: Fuzzy Sets vs Crisp Sets Curve or Surface Fitting Crisp Sets Fuzzy Sets μ μ 1 1 0 0 μ - membership degree, possibility distribution, Terms used in other disciplines: regression (L or NL), estimation, identification, filtering grade of belonging The University of Iowa Intelligent Systems Laboratory The University of Iowa Intelligent Systems Laboratory
Modeling a Function Modeling a Function Curve fitting by using fuzzy rules (patches) Standard mathematical approach of curve fitting Surface approximation for 2 inputs or ( (more or less satisfactory fit) y ) a hyper surface (3 or more inputs) a hyper-surface (3 or more inputs) Small number of rules - Large patches or rough approximation The University of Iowa Intelligent Systems Laboratory The University of Iowa Intelligent Systems Laboratory Modeling a Function Example 1 Consider modeling two different functions by fuzzy rules y y x x More rules - more smaller patches and better approximation What is the origin of the patches and how do they work? The University of Iowa Intelligent Systems Laboratory The University of Iowa Intelligent Systems Laboratory
Example 1 Example 1 • Lesser number of rules decreases the y y approximation accuracy. An increase in a number of rules, increases the precision at the cost of a computation time needed to process these rules. x x • This is the most classical soft computing dilemma - A trade-off between the imprecision and IF x is low THEN y is high. IF x is low THEN y is high. uncertainty on one hand and low solution cost, tractability and robustness on the other tractability and robustness on the other. IF x is medium THEN y is low. IF x is medium THEN y is • The appropriate rules for the two functions are: medium. IF x is large THEN y is high. IF x is large THEN y is low. The University of Iowa Intelligent Systems Laboratory The University of Iowa Intelligent Systems Laboratory Example 2 Example 1 Modeling two different functions by fuzzy rules y y These rules define three large rectangular patches These rules define three large rectangular patches that cover the functions. They are shown in the next slide together with two possible approximators for each function. x x The two original functions (solid lines in both graphs) covered by three patches produced by IF-THEN rules and modeled by two possible approximators ( dashed and dotted curves ). The University of Iowa Intelligent Systems Laboratory The University of Iowa Intelligent Systems Laboratory
Example 2 Example 2 • Humans do not (or only rarely) think in terms of nonlinear functions. • Even more, our expertise or understanding of • Even more our expertise or understanding of • Humans do not ‘draw these functions in their some functional dependencies is often not a mind’. structured piece of knowledge at all. • We neither try ‘to see’ them as geometrical • We typically perform complex tasks without being artifacts. able to express how they are executed able to express how they are executed. • In general, we do not process geometrical figures, curves, surfaces or hypersurfaces while performing tasks or expressing our knowledge. The University of Iowa Intelligent Systems Laboratory The University of Iowa Intelligent Systems Laboratory Car Example Example 2 The steps in fuzzy modeling are always the same. Th t i f d li l th i ) Define the variables of relevance, interest or importance: Explain to your colleague in the form of IF- • In engineering we call them input and output variables THEN rules how to ride a bike. ii ) Define the subsets’ intervals: • Small - medium, or negative - positive, or • Left - right (labels of dependent variables) The University of Iowa Intelligent Systems Laboratory The University of Iowa Intelligent Systems Laboratory
Car Example Car Example iii ) Choose the shapes and the positions of fuzzy INPUTS D INPUTS: D = DISTANCE, v = SPEED DISTANCE SPEED subsets, i.e., OUTPUT: B = BRAKING FORCE • Membership functions, i.e., attributes B D iv ) Set the rule form, i.e., IF - THEN Rules v ) Perform computation and (if needed) tune (learn, v adjust, adapt) the positions and the shapes of both the input and the output attributes of the model The University of Iowa Intelligent Systems Laboratory The University of Iowa Intelligent Systems Laboratory Car Example Car Example Velocity Braking Force Low Medium High Small Medium High B D 1 1 1 1 v 120 (km/h) 100 (%) 10 0 I F the Velocity is Low, THEN the Braking Force is Small Analyze the rules for a given distance D and for IF the Velocity is Medium, THEN the Braking Force is Medium different velocity v , i.e., B = f ( v ) IF the Velocity is High, THEN the Braking Force is High , The University of Iowa Intelligent Systems Laboratory The University of Iowa Intelligent Systems Laboratory
Car Example Car Example Braking Force Braking Force 1 100 1 100 High High Th f The fuzzy Medium Medium The fuzzy patch Low Low patches 0 (%) 0 (%) 1 1 1 Velocity Velocity 10 120 10 120 Small Medium High Small Medium High The University of Iowa Intelligent Systems Laboratory The University of Iowa Intelligent Systems Laboratory Car Example The Fuzzy Patches Define the Function The Fuzzy Patches Define the Function Braking Force The fuzzy patches 1 100 Braking Force Three possible High 1 100 dependencies p e ar Example High between the Velocity Medium and Breaking force. Medium Low Each of us drives Low differently 0 0 (%) (%) 1 Ca 1 1 Note the overlapping Velocity fuzzy subsets smooth Velocity approximation 10 120 of the function between the Small Medium High Velocity and Braking Force 10 120 Small Medium High The University of Iowa Intelligent Systems Laboratory The University of Iowa Intelligent Systems Laboratory
Recommend
More recommend