Mathematical basics for general fuzzy systems Nikos Aspragathos Mechanical Engineering & Aeronautics Department, University of Patras
The scope of this lecture A 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
Outline Fuzzy sets and membership functions Fuzzy 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
Fuzzy sets and membership functions High 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”.
Definition of a Fuzzy Set A 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
The difference between Fuzzy and Probability Theory The 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
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
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.
Usual shapes of Membership Functions Trapezoidal MF Bell shape or Gaussian MF
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
Three different meanings of Fuzzy Logic In 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.
Logical connectives The most important logical connectives are the logical AND ∧ (conjunction, min), the logical OR ∨ (disjunction, max), the negation NOT ¬ (1-a) and the IMPLICATION →.
Implications Lukasiewicz implication G¨odel implication
The need for Fuzzy Logic Humans 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.
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) = α.
t-Norms Minimum t(α, β) = min{α, β} Lukasiewicz t-norm: t(α, β) = max{α + β − 1, 0} Algebraic product: t(α, β) = α · β 0 if 1 {α, β} Drastic product: t(α, β) = min{α, β} otherwise
“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.9+0.6-1,0)=0.5 Max(φ3+φ4-1,0)=Max (0.6+0.6-1,0)=0.2
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) = α
Fuzzy set relations Fuzzy subset Fuzzy Complement A fuzzy set A is a fuzzy subset of the fuzzy set B if Fuzzy Complement
Fuzzy set operations Intersection minimum (continuous line) and Union minimum (continuous line) and Lukasiewicz t-norm (dashed line)
Fuzzy set operations Union
Linguistic Variables, Values and Modifiers Linguistic Variables represent quantities and take linguistic values The linguistic values are represented by fuzzy sets Modifiers (“linguistic hedges”) like “very” or “more or less”.
Fuzzy Numbers and the Extension Principle A fuzzy set with finite support that is both normal and convex is often called a fuzzy number. “about −0.5”
The Extension Principle Definition 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
Mappings for Fuzzy Sets The mapping f[M] of the usual subset M The mapping f[μ] of the fuzzy subset μ
Example Determine the absolute of the fuzzy number “about -0.5”
Extension principle for multivariable mappings
Example Sum of two fuzzy numbers Add the two fuzzy numbers “about 1” and “about 2”. μ1+2(z)=Sup {min (μ1(x), μ2(y)), x+y=z}
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.
Crisp relations Example Keys si fit to doors ti
Example (cont.) Determine the doors that can be opened with the given subset of keys
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].
Simple Fuzzy Relations A 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 .
Example Instead of the crisp relation R from the measuring example, we can use a fuzzy relation
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 [0.0 0.5 1 0.5 0.0] = = = =
A Fuzzy System
Linguistic Rules Two standard forms of linguistic rules Multi-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
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
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
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.
Inference mechanism Matching Inference Step alternatives Step 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
Matching Fuzzification of the inputs to determine the corresponding fuzzy sets Determine the membership functions The * represents a t-norm Determine the activated rules
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
Defuzzification: Implied Fuzzy Sets Center 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.
Defuzzification: The Overall Implied Fuzzy Set Max 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
Defuzzification: The Overall Implied Fuzzy Set Center 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
The mathematical representation of a fuzzy system With 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.
Functional Fuzzy Systems A “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.
Takagi-Sugeno Fuzzy Systems The 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.
An Interpolator Between Linear Mappings As an example, suppose that n = 1, R = 2, and that we have rules y=(1/2) u12+u1+1
The effects of input membership overlapping In 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,
Fuzzy Systems Are Universal Approximators For 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