1 Mathematical basics for general fuzzy systemsNikos Aspragathos Mechanical Engineering & Aeronautics Department, University of Patras
2 The scope of this lectureA more mathematical and complete exposition on the details of fuzzy systems. A precise mathematical characterization and generalization of fuzzy entities and operations “Functional fuzzy systems” and Fuzzy theorems useful for the identification and control of systems
3 Outline Fuzzy sets and membership functionsFuzzy Logic and Operations on Fuzzy Sets Linguistic Variables, Values and Modifiers Fuzzy Numbers and the Extension Principle Fuzzy Relations Fuzzification, Defuzzification and the Inference mechanism. Takagi-Sugeno Fuzzy Systems Fuzzy Systems Are Universal Approximators
4 Fuzzy sets and membership functionsHigh speed of a car Conventional set Fuzzy Set Fuzzy sets and fuzzy logic are used to heuristically quantify the meaning of linguistic variables, linguistic values, and linguistic rules that are specified by the expert. The membership function describes the “certainty” that an element of universe of discourse a “speed value”, may be classified linguistically as “High speed”.
5 Definition of a Fuzzy SetA fuzzy subset or simply a fuzzy set µ of a set X (the universe of discourse) is a mapping µ : X → [0, 1], which assigns to each element x X a degree of membership µ(x) to the fuzzy set µ. The set of all fuzzy sets of X is denoted by F(X). Alternative Fuzzy set definitions and representations Some authors use the term fuzzy set only for a vague concept A like high velocity and call the membership function µA, that models the vague concept, a characterizing or membership function of the fuzzy set or the vague concept A . Others use the set of the pair of elements A={(3,0.0),(4,0.5),(5,1.0),(6,0.5),(7,0.0)} Representation as a sum or as an integral A=3/0.0+4/0.5+5/1.0+6/0.5+7/0.0
6 The difference between Fuzzy and Probability TheoryThe gradual membership or the “certainty” is a completely different concept than the probability. a fuzzy set µ can not be regarded as a probability distribution or density, because, in general, µ does not satisfy the condition Example of the set U of non-toxic bottles bottle A belongs to U with a probability of 0.9 Bottle B has a degree of membership of 0.9 to U
7 Representation of Fuzzy Sets (Real number universe of discourse)Linguistic expressions– like ’approximately 3’, ’of medium height’ or ’very tall’ which describe a vague value or a vague interval. Non-convex fuzzy set Convex fuzzy sets Triangular MF
8 Fuzzy set parameters “Support of a fuzzy set”: The set of points on the universe of discourse where the membership function value is greater than zero. “Height” of a fuzzy set or membership function: The peak value reached by the membership function. “Normal” fuzzy sets: membership functions that reach 1.00 for at least one point on the universe of discourse.
9 Usual shapes of Membership FunctionsTrapezoidal MF Bell shape or Gaussian MF
10 Level Sets Let µ ∈ F(X) be a fuzzy set over the universe of discourse X and let 0 ≤ α ≤ 1. The (usual) set is called α-level set or α-cut of the fuzzy set µ. Approximation of a fuzzy set with it’s a-cuts
11 Three different meanings of Fuzzy LogicIn the broader sense, Fuzzy logic includes all applications and theories where fuzzy sets or concepts are involved. In a narrower meaning, the term fuzzy logic focuses on the field of approximative reasoning, where fuzzy sets are used and propagated within an inference mechanism as it is for instance common in expert systems. In the narrow sense, Fuzzy logic considers multi-valued logics and is devoted to issues connected to logical calculi and the associated deduction mechanisms.
12 Logical connectives The most important logical connectives arethe logical AND ∧ (conjunction, min), the logical OR ∨ (disjunction, max), the negation NOT ¬ (1-a) and the IMPLICATION →.
13 Implications Lukasiewicz implication G¨odel implication
14 The need for Fuzzy LogicHumans formulate “fuzzy” statements, understand them, draw conclusions from them and work with them. An appointment at 5 o’clock The distance for stopping a car “the wetter the road, the longer the distance needed for breaking” Gradual truth values for statements L. A. Zadeh. Fuzzy sets. Information and Control, 8:338–353, 1965.
15 t-Norms A function t : [0, 1]2 → [0, 1] is called a t-norm (triangular norm) , if the axioms (T1) – (T4) are satisfied. (T1) t(α, β) = t(β,α) (commutative) (T2) t(t(α, β), γ) = t(α, t(β, γ)). (associative) (T3) β ≤ γ implies t(α, β) ≤ t(α, γ). (monotonicity) (T4) t(α, 1) = α.
16 t-Norms Minimum t(α, β) = min{α, β}Lukasiewicz t-norm: t(α, β) = max{α + β − 1, 0} Algebraic product: t(α, β) = α · β 0 if 1 {α, β} Drastic product: t(α, β) = min{α, β} otherwise
17 “The price of house x is good AND The location of house x is good”Min (0.9, 0.6)=min(0.6, 0.6)=0.6 Lukasiewicz t-norm Max(φ1+φ2-1,0)=Max ( ,0)=0.5 Max(φ3+φ4-1,0)=Max ( ,0)=0.2
18 t-conorms A function s : [0, 1]2 → [0, 1] is called t-conorm (triangular conorm), if the axioms (T1) – (T3) and (T4’) are satisfied. (T4’) t(α, 0) = α
19 Fuzzy set relations Fuzzy subset Fuzzy ComplementA fuzzy set A is a fuzzy subset of the fuzzy set B if Fuzzy Complement
20 Fuzzy set operations Intersection minimum (continuous line) andUnion minimum (continuous line) and Lukasiewicz t-norm (dashed line)
21 Fuzzy set operations Union
22 Linguistic Variables, Values and ModifiersLinguistic Variables represent quantities and take linguistic values The linguistic values are represented by fuzzy sets Modifiers (“linguistic hedges”) like “very” or “more or less”.
23 Fuzzy Numbers and the Extension PrincipleA fuzzy set with finite support that is both normal and convex is often called a fuzzy number. “about −0.5”
24 The Extension PrincipleDefinition of fuzzy number operations like addition subtraction, multiplication, division or taking squares as well as the composition of relations for fuzzy sets. Mappings for Fuzzy Sets is the basis for the fuzzy operations and fuzzy relations The extension principle is based on the mappings for fuzzy sets
25 Mappings for Fuzzy SetsThe mapping f[M] of the usual subset M The mapping f[μ] of the fuzzy subset μ
26 Example Determine the absolute of the fuzzy number “about -0.5”
27 Extension principle for multivariable mappings
28 Example Sum of two fuzzy numbersAdd the two fuzzy numbers “about 1” and “about 2”. μ1+2(z)=Sup {min (μ1(x), μ2(y)), x+y=z}
29 Fuzzy Relations Relations can be used to model dependencies, correlations or connections between variables, quantities or attributes The pairs (x, y) ∈ X × Y belonging to the relation R are linked by a connection described by the relation R. A common notation for (x, y) ∈ R is xRy. Fuzzy relations are useful for representing and understanding fuzzy controllers that describe a vague connection between input and output values.
30 Crisp relations ExampleKeys si fit to doors ti
31 Example (cont.) Determine the doors that can be opened with the given subset of keys
32 Example An instrument measures a quantity y IR with a precision of ±0.1. If x is the measured value, the true value y lies within the interval [x − 0.1, x + 0.1].
33 Simple Fuzzy RelationsA fuzzy set ρ F(X × Y ) is called (binary) fuzzy relation between the universes of discourse X and Y . The greater the membership degree (x, y) the stronger is the relation between x and y. For a fuzzy relation ρ F(X×Y ) and a fuzzy set μ F(X) the image of μ under ρ is the fuzzy set ρ[μ](y) = sup{min{ρ(x, y), μ(x)} | x X} over the universe of discourse Y .
34 Example Instead of the crisp relation R from the measuring example, we can use a fuzzy relation
35 Example Given two fuzzy sets and their relation″IF A is Slow THEN B is High″ or For a new input fuzzy set Determine the output fuzzy set [ ] = = = =
36 A Fuzzy System
37 Linguistic Rules Two standard forms of linguistic rulesMulti-Input Multi-Output (MIMO) and Multi-Input Single-Output (MISO), MISO MIMO with n inputs and 2 outputs The MIMO can be divided into MISO
38 Properties of Rules “Completeness” “Consistency” “Continuity”A rule base is complete if for every possible combination of inputs to the fuzzy system, the fuzzy system can infer a response and generate an output This does not mean that for every combination of fuzzy sets of input values we have to formulate a rule with these fuzzy sets in the premise part. “Consistency” A rule base is consistent if there are no rules that have the same premise and different consequents “Continuity” The output universe of discourse is covered completely by the membership functions a sufficient overlapping of the fuzzy sets guarantees that there will still be rules firing, even if we have not specified a rule for all possible combinations of input fuzzy sets
39 Rule base granularity Enlarging the rule-base has many disadvantages, even though we were able to significantly improve performance : the number of rules increases exponentially for an increase in membership functions and inputs to the fuzzy controller, the computational efficiency decreases as the number of rules increases, a rule base with a large number of rules will require a long time period for the learning mechanism to fill in the correct control laws Good practice minimize the number of membership functions and therefore the used rules, and at the same time, maximize the granularity of the rule-base near the point where the system is operating
40 Fuzzification Fuzzification transforms a crisp value to a fuzzy set by a fuzzification operator “singleton fuzzification” The other fuzzification methods these methods add computational complexity to the inference process and their need has not been that well justified.
41 Inference mechanism Matching Inference Step alternativesStep 1: Combine Inputs with Rule Premise Step 2: Determine Which Rules Are On Inference Step alternatives Determine Implied Fuzzy Sets Determine the Overall Implied Fuzzy Set
42 Matching Fuzzification of the inputsto determine the corresponding fuzzy sets Determine the membership functions The * represents a t-norm Determine the activated rules
43 Inference Step Alternative 1: Determine Implied Fuzzy Sets for the ith rule ,compute the “implied fuzzy set” with membership function Alternative 2: Determine the Overall Implied Fuzzy Set is a t-conorm
44 Defuzzification: Implied Fuzzy SetsCenter of gravity (COG): Center-average is the average of the center values of the output membership function centers weighted with the maximum certainty of each of the conclusions represented with the implied fuzzy sets.
45 Defuzzification: The Overall Implied Fuzzy SetMax criterion chooses as the output crisp value, the value of the output variable with the higher certainty to the output fuzzy set Mean of maximum chooses as output value, the mean values of the values with maximum certainty to the output fuzzy set where
46 Defuzzification: The Overall Implied Fuzzy SetCenter of area (COA): Similar to the mean of the maximum method, this defuzzification approach can be computationally expensive. Computation of the area of the overall implied fuzzy set does not count the area that the implied fuzzy sets overlap twice
47 The mathematical representation of a fuzzy systemWith center-average defuzzification The mathematical representation of a fuzzy system with Gaussian membership functions and product as a t-norm There are nR input membership function centers, nR input membership function spreads, and R output membership function centers. Hence, we need a total of R(2n + 1) parameters to describe this fuzzy system.
48 Functional Fuzzy SystemsA “functional fuzzy system” has the form The consequents of the rules are different from the usual fuzzy sets. In the consequent, instead of a linguistic term with an associated membership function, a function of the inputs is used (hence the name “functional fuzzy system”) that does not have an associated membership function The consequent function depends on the crisp inputs, but other variables may also be used. The choice of the function depends on the application being considered.
49 Takagi-Sugeno Fuzzy SystemsThe Takagi-Sugeno fuzzy system is a special case of the functional fuzzy Systems, where the consequent function is affine (linear) The consequent function is a good local control function for the fuzzy region that is described by the premise part of the rule. For the linear functions, the desired input/output behavior of the controller is described locally (in fuzzy regions) by linear models. At the boundaries between single fuzzy regions, we interpolate in a suitable way between the corresponding local models.
50 An Interpolator Between Linear MappingsAs an example, suppose that n = 1, R = 2, and that we have rules y=(1/2) u12+u1+1
51 The effects of input membership overlappingIn order to maintain the interpretability of a TSK controller in terms of local models for fuzzy regions, a strong overlap of these regions should be avoided,
52 Fuzzy Systems Are Universal ApproximatorsFor example, suppose that we use center-average defuzzification, product for the premise and implication, and Gaussian membership functions to the fuzzy system f(u). Then, for any real continuous function ψ(u) defined on a closed and bounded set and an arbitrary ε > 0, there exists a fuzzy system f(u) such that