Вы находитесь на странице: 1из 27

# Lecture 5: Fuzzy Systems

## Alan Holland aholland@4c.ucc.ie

University College Cork

Fuzzy Rules

Fuzzy inference

## Sugeno fuzzy inference

Mamdami or Sugeno?

Summary

Overview
1

Fuzzy Rules Introduction Reasoning with fuzzy rules Fuzzy inference Mamdami method Inference Steps Sugeno fuzzy inference Sugeno Mamdami or Sugeno? How to decide

Fuzzy inference

## Sugeno fuzzy inference

Mamdami or Sugeno?

Summary

## What is a Fuzzy Rule?

Zadeh (1973) suggested capturing human knowledge using Fuzzy Rules. A Fuzzy Rule can be dened as a conditional statement of the form: IF x is A THEN y is B , where x and y are linguistic variables; and A and B are linguistic values, determined by fuzzy sets on the universe of discourses X and Y , respectively. For example: IF objectWeight is heavy THEN effortToLift is high, uses a linguistic variable, objectWeight , can include the fuzzy sets light , medium and heavy to describe weight. Separate rules are not necessary for cut-off points. In practice, Fuzzy expert systems merge the rules and reduce the number of rules by at least 90%!

Fuzzy Rules

Fuzzy inference

## Sugeno fuzzy inference

Mamdami or Sugeno?

Summary

## Fuzzy sets of tall and heavy men

The above fuzzy sets provide the basis for a weight estimation model. The model is based on a relationship between a mans height and his weight: IF height is tall THEN weight is heavy .

Fuzzy Rules

Fuzzy inference

## Sugeno fuzzy inference

Mamdami or Sugeno?

Summary

## Reasoning with fuzzy rules

Reasoning
Recall that a linguistic variable carries with it the concept of fuzzy set qualiers, called hedges, that modify the shape of fuzzy sets. They include adverbs such as very, somewhat, quite, more or less and slightly. Fuzzy rules relate fuzzy sets: Example IF height is very tall THEN weight is very heavy . In a fuzzy system, all rules re to some degree, or in other words they re partially. If the antecedent is true to some degree of membership, then the consequent is also true to that same degree.

Fuzzy Rules

Fuzzy inference

## Sugeno fuzzy inference

Mamdami or Sugeno?

Summary

## Reasoning with fuzzy rules

Montonic Selection
The value of the output or a truth membership grade of the rule consequent can be estimated directly from a corresponding truth membership grade in the antecedent. This form of fuzzy inference uses a method called monotonic selection.

Fuzzy Rules

Fuzzy inference

## Sugeno fuzzy inference

Mamdami or Sugeno?

Summary

## Reasoning with fuzzy rules

Multiple Parts
A fuzzy rule can have multiple antecedents, for example: IF trafc is light AND weather is good THEN travelTime is short The consequent of a fuzzy rule can also include multiple parts: IF trafc is light THEN travelTime is short ; numberOfAccidents is low Fuzzy rule in JESS: If you are tall then you are heavy
FuzzyValue condition = new FuzzyValue(height,tall); FuzzyValue conclusion = new FuzzyValue(weight, heavy); FuzzyRule rule1 = new FuzzyRule(); rule1.addAntecedent(condition); rule1.addConclusion(conclusion);

Fuzzy Rules

Fuzzy inference

## Sugeno fuzzy inference

Mamdami or Sugeno?

Summary

Overview
1

Fuzzy Rules Introduction Reasoning with fuzzy rules Fuzzy inference Mamdami method Inference Steps Sugeno fuzzy inference Sugeno Mamdami or Sugeno? How to decide

Fuzzy inference

## Sugeno fuzzy inference

Mamdami or Sugeno?

Summary

Mamdami
The most commonly used fuzzy inference technique is the so-called Mamdani method. Professor Ebrahim Mamdani of London University built one of the rst fuzzy systems to control a steam engine and boiler combination. He applied a set of fuzzy rules supplied by experienced human operators in 1975. Mamdami 4-step method
1 2 3 4

fuzzication of the input variables, rule evaluation, aggregation of the rule outputs, defuzzication.

Fuzzy inference

## Sugeno fuzzy inference

Mamdami or Sugeno?

Summary

## Two-input, one-output example

Rule: 1 IF funding is adequate OR stafng is small THEN risk is low Rule: 2 IF funding is marginal AND stafng is large THEN risk is normal Rule: 3 IF funding is inadequate THEN risk is high (Note that funding , stafng and risk are linguistic variables, inadequate, marginal and adequate are linguistic values determined by fuzzy sets on the funding universe of discourse. Also, small and large are linguistic values determined by fuzzy sets on the stafng UoD etc.)

Fuzzy inference

## Sugeno fuzzy inference

Mamdami or Sugeno?

Summary

Step 1: Fuzzication
The rst step is to take the crisp inputs, (let funding and stafng be x1 and y1 ), and determine the degree to which these inputs belong to each of the appropriate fuzzy sets. The crisp input is a numerical input. For instance, let the expert determine a gure between 0-100 to represent funding and stafng, say 35% and 60%.

Fuzzy inference

## Sugeno fuzzy inference

Mamdami or Sugeno?

Summary

## Step 2: Rule Evaluation

The second step is to take the fuzzied inputs, (x =A1) = 0.5, (x =A2) = 0.2, (y =B 1) = 0.1 and (y =B 2) = 0.7, and apply them to the antecedents of the fuzzy rules. If a given fuzzy rule has multiple antecedents, the fuzzy operator (AND or OR) is used to obtain a single number that represents the result of the antecedent evaluation. This number (the truth value) is then applied to the consequent membership function. To evaluate the disjunction of the rule antecedents, we use the OR fuzzy operation. Typically, using the fuzzy operation union: AB (x ) = max [A (x ), B (x )] Similarly, in order to evaluate the conjunction of the rule antecedents, we apply the AND fuzzy operation intersection: AB (x ) = min[A (x ), B (x )]

Fuzzy inference

## Sugeno fuzzy inference

Mamdami or Sugeno?

Summary

Fuzzy inference

## Sugeno fuzzy inference

Mamdami or Sugeno?

Summary

## Step 2: Mamdami Rule Evaluation contd.

The result of the antecedent evaluation can be now be applied to the membership function of the consequent. Clipping is a common method of correlating the rule consequent with the truth value of the rule antecedent is to cut the consequent membership function at the level of the antecedent truth. Since the top of the membership function is sliced, the clipped fuzzy set loses some information. However, clipping is still often preferred because it involves less complex and faster mathematics, and generates an aggregated output surface that is easier to defuzzify (in Step 4).

Fuzzy inference

## Sugeno fuzzy inference

Mamdami or Sugeno?

Summary

## Step 2: Mamdami Rule Evaluation contd.

Scaling is a better approach for preserving the shape of the fuzzy set. The original membership function of the rule consequent is adjusted by multiplying its membership degrees by the truth value of the rule antecedent.

Fuzzy inference

## Sugeno fuzzy inference

Mamdami or Sugeno?

Summary

## Step 3: Aggregation of Rule Outputs

Aggregation is the process of unication of the outputs of all rules. We take the membership functions of all rule consequents previously clipped or scaled and combine them into a single fuzzy set. The input of the aggregation process is the list of clipped or scaled consequent membership functions, and the output is one fuzzy set for each output variable.

Fuzzy inference

## Sugeno fuzzy inference

Mamdami or Sugeno?

Summary

Defuzzication
The last step in the fuzzy inference process is defuzzication. Fuzziness helps us to evaluate the rules, but the nal output of a fuzzy system has to be a crisp number. The input for the defuzzication process is the aggregate output fuzzy set and the output is a single number. There are several defuzzication methods, but probably the most popular one is the centroid technique. It nds the point where a vertical line would slice the aggregate set into two equal masses. Mathematically this centre of gravity (COG) can be expressed as: COG =
b a A (x )xdx b a A (x )dx

(1)

Fuzzy inference

## Sugeno fuzzy inference

Mamdami or Sugeno?

Summary

Defuzzication contd.
Centroid defuzzication method nds a point representing the centre of gravity of the fuzzy set, A, on the interval, ab. A reasonable estimate can be obtained by calculating it over a sample of points.

Fuzzy Rules

Fuzzy inference

## Sugeno fuzzy inference

Mamdami or Sugeno?

Summary

Overview
1

Fuzzy Rules Introduction Reasoning with fuzzy rules Fuzzy inference Mamdami method Inference Steps Sugeno fuzzy inference Sugeno Mamdami or Sugeno? How to decide

Fuzzy inference

## Sugeno fuzzy inference

Mamdami or Sugeno?

Summary

## Reducing inference time

Mamdani-style inference, as we have just seen, requires us to nd the centroid of a two-dimensional shape by integrating across a continuously varying function. In general, this process is not computationally efcient. Michio Sugeno suggested to use a single spike, a fuzzy singleton, as the membership function of the rule consequent. This is a fuzzy set with a membership function that is unity at a single particular point on the universe of discourse and zero everywhere else. Sugeno-style fuzzy inference is very similar to the Mamdani method. Sugeno changed only a rule consequent. He used a mathematical function of the input variable (instead of a fuzzy set).

Fuzzy inference

## Sugeno fuzzy inference

Mamdami or Sugeno?

Summary

## Format of Sugeno-style fuzzy rule

IF x is A AND y is B THEN z is f (x , y ) ,where x , y and z are linguistic variables; A and B are fuzzy sets on universe of discourses X and Y , respectively; and f (x , y ) is a mathematical function. The most commonly used zero-order Sugeno fuzzy model applies fuzzy rules whose THEN part takes the following form: THEN z is k , where k is a constant. In this case, the output of each fuzzy rule is constant. All consequent membership functions are represented by singleton spikes.

Fuzzy inference

## Sugeno fuzzy inference

Mamdami or Sugeno?

Summary

Fuzzy inference

## Sugeno fuzzy inference

Mamdami or Sugeno?

Summary

Sugeno-style aggregation

We can nd a weighted average (WA): WA = (0.1 20) + (0.2 50) + (0.5 80) = 65 0.1 + 0.2 + 0.5

Fuzzy inference

## Sugeno fuzzy inference

Mamdami or Sugeno?

Summary

Sugeno-style defuzzication

Fuzzy Rules

Fuzzy inference

## Sugeno fuzzy inference

Mamdami or Sugeno?

Summary

Overview
1

Fuzzy Rules Introduction Reasoning with fuzzy rules Fuzzy inference Mamdami method Inference Steps Sugeno fuzzy inference Sugeno Mamdami or Sugeno? How to decide

Fuzzy inference

## Sugeno fuzzy inference

Mamdami or Sugeno?

Summary

## Strengths and Weaknesses: Mamdami & Sugeno

Mamdani method is widely accepted for capturing expert knowledge. It allows us to describe the expertise in more intuitive, more human-like manner. However, Mamdani-type fuzzy inference entails a substantial computational burden. Sugeno method is computationally efcient and works well with optimisation and adaptive techniques, which makes it very attractive in control problems, particularly for dynamic nonlinear systems.

Fuzzy Rules

Fuzzy inference

## Sugeno fuzzy inference

Mamdami or Sugeno?

Summary

Summary

Summary We saw how fuzzy rules relate fuzzy sets, possibly using monotonic selection. JESS example. Fuzzy inference: Mamdami or Sugeno? How to decide between them.