Soft Computing

Soft computing is a set of algorithms, including neural networks, fuzzy logic, and evolutionary algorithms. These algorithms are tolerant of imprecision, uncertainty, partial truth and approximation. It is contrasted with hard computing: algorithms which find provably correct and optimal solutions to problems.

Soft Computing includes:

  • Fuzzy Logic
    • use fuzzy rules and approximate reasoning
    • a popular analogy: human knowledge
  • Neural Networks
    • network of massively connected nodes
    • a popular analogy: neuron structure in brain
  • Genetic Algorithms
    • Derivative-free optimization
    • a popular analogy: biological evolution
  • Probabilistic Reasoning
    • Incorporates uncertainty in predicting future events
    • a popular analogy: random action of a human

Fuzzy Logic Systems

Fuzzy logic was first developed by L.A. Zadeh in 1960’s to extend conventional (binary) crisp logic to make it suitable to incorporate knowledge and mimic human-like approximate reasoning.

Two-state (bivalent) crisp logic uses two quantities: true (T) and false (F) as truth values.

However:

  • Real-life situations are usually characterized by ambiguity and partial truth.
    • cannot always assume two crisp states T and F with a crisp line dividing them.

Terminology:

  • Crisp: only T or F
  • Fuzzy: Partial membership is possible (very true? not very true?)

Membership Function

A fuzzy set may be represented by a membership function, which gives the grade (or degree) of membership within the set, of every element of the universe of discourse.

Think of universe as a as set that contains every set in the context.

img

  • A fuzzy set A may be represented as a set of ordered pairs:
    • A={(x,μA(x));xX,μA(x)[0,1]}A = \{(x, \mu_A(x)); x \in X, \mu_A(x) \in [0,1]\}
    • The membership function μA(x)\mu_A(x) maps the elements of the universe of discourse onto numerical values in the interval [0, 1].
  • The membership function μA(x)\mu_A(x) represents the grade of possibility (not probability) that an element xx belongs to the fuzzy set AA.
    • μA(x)=1\mu_A(x) = 1 => x is definitely an element of A.
    • μA(x)=0\mu_A(x) = 0 => x is definitely not an element of A.
    • μA(x)=0.2\mu_A(x) = 0.2 => the possibility that x is an element of A is 0.2.

Symbolic Representation

If the universe of discourse is discrete with elements xix_i, then a fuzzy set AA may be symbolically represented with a “formal series”

A=μA(x1)/x1+μA(x2)/x2++μA(xn)/xn=xiXμA(xi)/xiA=\mu_A\left(x_1\right) / x_1+\mu_A\left(x_2\right) / x_2+\cdots+\mu_A\left(x_n\right) / x_n=\sum_{x_i \in X} \mu_A\left(x_i\right) / x_i

If the universe of discourse is continuous, an equivalent form notation is given in terms of a “symbolic” integration

A=xiXμA(xi)/xiA=\int_{x_i \in X} \mu_A\left(x_i\right) / x_i

Note that \sum and \int do not represent summation or integration.

but rather the collection of members in discrete or continuous domain.

Discrete Universe

  • E.g. a fuzzy representation of the integer 5:
    • Given by the Zadeh notation: A=0.2/3+0.3/4+1.0/5+0.2/6+0.1/7A = 0.2/3 + 0.3/4 + 1.0/5 + 0.2/6 + 0.1/7

Triangular Membership Function

  • +ve: Linear ⇒ Computationally inexpensive.

  • -ve: Non-differentiable ⇒ May not be suitable to be used with gradient-descent optimization algorithms.

  • A triangular membership function is characterized by 3 parameters {a, b, c}

    • a < b < c
img

Trapezoidal Membership Function

  • +ve: Linear ⇒ Computationally inexpensive.

  • -ve: Non-differentiable ⇒ May not be suitable to be used with gradient-descent optimization algorithms.

  • A trapezoidal membership function is characterized by 4 parameters {a, b, c, d},

    • a < b < c < d
img

Gaussian Membership Function

  • +ve: Differentiable ⇒ Suitable to be used with gradient-descent optimization algorithms.
  • -ve: Nonlinear ⇒ Computationally expensive.
  • A Gaussian membership function is characterized by 2 parameters {σ,c},
    • σ indicating the width
    • c being the center of the membership function.
img

Generalized Bell Membership Function

  • +ve: Differentiable ⇒ Suitable to be used with gradient-descent optimization algorithms.
  • -ve: Nonlinear ⇒ Computationally expensive.
  • A Generalized Bell (or simply Bell) membership function is characterized by 3 parameters {a, b, c},
    • a and b defining the width and the slope,
    • and c being the center of the membership function,
img

Fuzzy Logic Operations

Assume two fuzzy sets AA and BB are given in universe XX.

  • the fuzzy complement AA'
    • μA(x)=1μA(x),xX\mu_{A'}(x) = 1 - \mu_A(x), x \in X
  • the fuzzy union ABA\cup B
    • μAB(x)=max(μA(x),μB(x)),xX\mu_{A\cup B}(x) = \max(\mu_A(x), \mu_B(x)), \forall x \in X
    • OR => max
  • the fuzzy intersection ABA\cap B
    • μAB(x)=min(μA(x),μB(x)),xX\mu_{A\cap B}(x) = \min(\mu_A(x), \mu_B(x)), \forall x \in X
    • AND => min
  • Generalized Fuzzy Complement

Fuzzy Complement

μA(x)=1μA(x),xX\mu_{A'}(x) = 1 - \mu_A(x), x \in X

Example: Discrete Universe: Suppose that the universe of discourse X is defined as X = {0, 7}.

Consider the fuzzy set A in this discrete universe given by:

A=0.2/3+0.3/4+1.0/5+0.2/6+0.1/7A = 0.2/3 + 0.3/4 + 1.0/5 + 0.2/6 + 0.1/7

Then the complement of fuzzy set A is as follows:

A=1.0/0+1.0/1+1.0/2+0.8/3+0.7/4+0.0/5+0.8/6+0.9/7A' = 1.0/0 + 1.0/1 + 1.0/2 + 0.8/3+0.7/4 + 0.0/5 + 0.8/6 + 0.9/7

Fuzzy Union

μAB(x)=max(μA(x),μB(x)),xX\mu_{A\cup B}(x) = \max(\mu_A(x), \mu_B(x)), \forall x \in X

Example: Discrete Universe: Suppose that the universe of discourse X denotes the driving speeds in a highway. Consider the fuzzy sets A and B are given by:

Fuzzy state Slow (A): A=1.0/40+1.0/50+0.8/60+0.4/80+0.1/100A = 1.0/40 + 1.0/50 + 0.8/60 + 0.4/80 + 0.1/100

Fuzzy state Moderate (B): B=0.6/50+0.8/60+1.0/70+1.0/80+1.0/90+1.0/100B = 0.6/50 + 0.8/60 + 1.0/70 + 1.0/80 + 1.0/90 + 1.0/100

The fuzzy union of A and B are as follows:

AB=1.0/40+1.0/50+0.8/60+1.0/70+1.0/80+1.0/90+1.0/100A \cup B = 1.0/40 + 1.0/50 + 0.8/60 + 1.0/70 + 1.0/80 + 1.0/90 + 1.0/100

Fuzzy Intersection

μAB(x)=min(μA(x),μB(x)),xX\mu_{A\cap B}(x) = \min(\mu_A(x), \mu_B(x)), \forall x \in X

Example: Discrete Universe: Suppose that the universe of discourse X denotes the driving speeds in a highway. Consider the fuzzy sets A and B are given by:

Fuzzy state Slow (A): A=1.0/40+1.0/50+0.8/60+0.4/80+0.1/100A = 1.0/40 + 1.0/50 + 0.8/60 + 0.4/80 + 0.1/100

Fuzzy state Moderate (B): B=0.6/50+0.8/60+1.0/70+1.0/80+1.0/90+1.0/100B = 0.6/50 + 0.8/60 + 1.0/70 + 1.0/80 + 1.0/90 + 1.0/100

##The fuzzy intersection of A and B are as follows:

AB=0.6/50+0.8/60+0.4/80+0.1/100A \cap B = 0.6/50 + 0.8/60 + 0.4/80 + 0.1/100

Generalized Fuzzy Complement

A generalized complement operation, denoted by C : [0, 1] → [0, 1], should satisfy the following axioms:

  • Boundary conditions
    • C()=XC(\emptyset) = X and C(X)=C(X) = \emptyset, where XX is the universe of discourse
  • Non-increasing:
    • If μA(x)<μB(X)\mu_A(x) < \mu_B(X) then C(μA(x))C(μB(x))C(\mu_A (x)) \geq C(\mu_B (x)) , and vice versa
  • Involutive
    • C(C(A))=AC(C(A)) = A

T-norm (Generalized Intersection)

The intersection of two fuzzy sets A and B is given by an operation T which maps two membership functions to:

μAB(x)=T(μA(x),μB(x))\mu_{A\cap B} (x) = T(\mu_A(x), \mu_B(x))

Let a=μA(x)a = \mu_A(x), b=μB(x)b = \mu_B(x).

The t-norm operation or generalized intersection may be represented by T(a,b)T(a,b) or more commonly aTbaTb.

T-norm Properties:

  • non-decreasing
    • if aba \leq b and cdc \leq d then aTcbTdaTc \leq bTd
  • commutativity
    • aTb=bTaaTb = bTa
  • associativity
    • (aTb)Tc=aT(bTc)(aTb)Tc = aT(bTc)
  • Boundary conditions
    • aT1=aaT1 = a
    • aT0=0aT0 = 0

Two general forms of T-norms are:

1min[1,((1a)p+(1b)p)1/p],p1max[0,(λ+1)(a+b1)λab],λ1\begin{aligned} & 1-\min \left[1,\left((1-a)^p+(1-b)^p\right)^{1 / p}\right], p \geq 1 \\ & \max [0,(\lambda+1)(a+b-1)-\lambda a b], \lambda \geq-1 \end{aligned}

Four of the well known T-norm operators are:

 Min: T(a,b)=min(a,b)=ab Algebraic product: T(a,b)=a×b Bounded product: T(a,b)=0(a+b1) Basic product: T(a,b)={a if b=1b if a=10 if a,b<1\begin{array}{ll} \text { Min: } & T(a, b)=\min (a, b)=a \wedge b \\ \text { Algebraic product: } & T(a, b)=a \times b \\ \text { Bounded product: } & T(a, b)=0 \vee(a+b-1) \\ \text { Basic product: } & T(a, b)= \begin{cases}a & \text { if } b=1 \\ b & \text { if } a=1 \\ 0 & \text { if } a, b<1\end{cases} \end{array}

S-norm (Generalized Union)

S()S(\cdot) is known as S-norm operator, or T-conorm operator

The union of two fuzzy sets A and B is given by an operation S which maps two membership functions to:

μAB(x)=S(μA(x),μB(x))\mu_{A\cup B} (x) = S(\mu_A(x), \mu_B(x))

Let a=μA(x)a = \mu_A(x), b=μB(x)b = \mu_B(x).

According to DeMorgan’s Law, there exists a complementary S-norm associated to every T-norm, and vice versa.

aSb=1(1a)T(1b)aSb = 1 − (1 − a)T (1 − b)

  • aSb=1min[(1a),(1b)]=1(1a)=a if abaSb = 1 − \min[(1 − a), (1 − b)] = 1 − (1 − a) = a \quad \text{ if } a \geq b
  • aSb=1min[(1a),(1b)]=1(1b)=b if a<baSb = 1 − \min[(1 − a), (1 − b)] = 1 − (1 − b) = b \quad \text{ if } a < b

aTb=1(1a)S(1b)aTb = 1 − (1 − a)S(1 − b)

S-norm Properties:

  • non-decreasing
  • commutativity
  • associativity
  • Boundary conditions

Two general forms of S-norms are:

min[1,(ap+bp)1/p],p1min[1,a+b+λab],λ1\begin{aligned} & \min \left[1,\left(a^p+b^p\right)^{1 / p}\right], \quad p \geq 1 \\ & \min [1, a+b+\lambda a b], \quad \lambda \geq-1 \end{aligned}

Four of the well known S-norm operators are:

 Max: S(a,b)=max(a,b)=ab Algebraic sum: T(a,b)=a+bab Bounded sum: T(a,b)=1(a+b) Basic sum: S(a,b)={a if b=0b if a=01 if a,b<1\begin{array}{ll} \text { Max: } & S(a, b)=\max (a, b)=a \vee b \\ \text { Algebraic sum: } & T(a, b)=a+b-a b \\ \text { Bounded sum: } & T(a, b)=1 \wedge(a+b) \\ \text { Basic sum: } & S(a, b)= \begin{cases}a & \text { if } b=0 \\ b & \text { if } a=0 \\ 1 & \text { if } a, b<1\end{cases} \end{array}

T-norm and S-norm Convertion

Example:

If the S-norm of two fuzzy variables aa and bb is given by

aSb=min(1,a+b+λab)for λ1aSb = \min(1, a+b+\lambda ab) \quad \text{for } \lambda \geq -1

Then, using de Morgan law, determine its dual T-norm (aTb)(aTb).

Recall deMorgan’s law:

aSb=1(1a)T(1b)aTb=1(1a)S(1b)aSb = 1 − (1 − a)T(1 − b)\\ aTb = 1 − (1 − a)S(1 − b)

and note that

max(a,b)=+min(a,b)min(a,b)=+max(a,b)-max(a,b) = +min(-a,-b)\\ -min(a,b) = +max(-a,-b)

Therefore:

(1a)S(1b)=min[1,(1a)+(1b)+λ(1a)(1b)]=min[1,2ab+λ(1ab+ab)]=min[1,2ab+λλaλb+λab)]=min[1,(2+λ)(λ+1)a(λ+1)b+λab]\begin{align} (1 − a)S(1 − b) & = \min[1, (1-a)+(1-b) + \lambda(1-a)(1-b)]\\ & = \min[1, 2-a-b + \lambda(1-a-b+ab)]\\ & = \min[1, 2-a-b + \lambda-\lambda a- \lambda b+ \lambda ab)]\\ & = \min[1, (2+\lambda) - (\lambda+1)a - (\lambda+1) b + \lambda ab] \end{align}

aTb=1(1a)S(1b)=1min[1,(2+λ)(λ+1)a(λ+1)b+λab]=1+max[1,(2+λ)+(λ+1)a+(λ+1)bλab]=max[0,1(2+λ)+(λ+1)a+(λ+1)bλab]=max[0,(λ+1)+(λ+1)a+(λ+1)bλab]=max[0,(λ+1)(a+b1)λab]\begin{align} aTb & = 1 - (1 − a)S(1 − b)\\ & = 1 - \min[1, (2+\lambda) - (\lambda+1)a - (\lambda+1) b + \lambda ab]\\ & = 1 + \max[-1, -(2+\lambda) + (\lambda+1)a + (\lambda+1) b - \lambda ab]\\ & = \max[0, 1-(2+\lambda) + (\lambda+1)a + (\lambda+1) b - \lambda ab]\\ & = \max[0, -(\lambda+1) + (\lambda+1)a + (\lambda+1) b - \lambda ab]\\ & = \max[0, (\lambda+1)(a+b-1) - \lambda ab] \end{align}

Grade of Inclusion

In the context of fuzzy logic, a set may be partially included in another set.

μAB(x)={1, if μA(x)<μB(x)μA(x)TμB(x), otherwise μAB(x)={1, if μA(x)μB(x)μA(x)TμB(x), otherwise \begin{equation} \begin{aligned} & \mu_{A \subset B}(x)=\left\{\begin{array}{cl} 1 & , \text { if } \mu_A(x)<\mu_B(x) \\ \mu_A(x) T \mu_B(x) & , \text { otherwise } \end{array}\right. \\ & \mu_{A \subseteq B}(x)=\left\{\begin{array}{cl} 1 & , \text { if } \mu_A(x) \leq \mu_B(x) \\ \mu_A(x) T \mu_B(x) & , \text { otherwise } \end{array}\right. \end{aligned} \end{equation}

Grade of Equality

fuzzy relation A=BA=B

μA=B(x)={1, if μA(x)=μB(x)μA(x)TμB(x), otherwise \begin{equation} \begin{aligned} & \mu_{A = B}(x)=\left\{\begin{array}{cl} 1 & , \text { if } \mu_A(x)=\mu_B(x) \\ \mu_A(x) T \mu_B(x) & , \text { otherwise } \end{array}\right. \\ \end{aligned} \end{equation}

Dilation and Contraction

Let A be a fuzzy set in the universe X with membership function μA\mu_A.

Dilation

  • K-th dilation = μA1/K(x)\mu_A^{1/K}(x)

Example : Consider the following fuzzy set:

A=0.0/1+0.5/2+1.0/3+0.5/4+0.0/5A = 0.0/1 + 0.5/2 + 1.0/3 + 0.5/4 + 0.0/5

The second dilation of fuzzy set A is given as follows:

A1/2=0.01/2/1+0.51/2/2+1.01/2/3+0.51/2/4+0.01/2/5A^{1/2} = 0.0^{1/2}/1 + 0.5^{1/2}/2 + 1.0^{1/2}/3 + 0.5^{1/2}/4 + 0.0^{1/2}/5

=0.0/1+0.7071/2+1.0/3+0.7071/4+0.0/5= 0.0/1 + 0.7071/2 + 1.0/3 + 0.7071/4 + 0.0/5

Contraction:

  • K-th contraction = μAK(x)\mu_A^{K}(x)

Example : Consider the following fuzzy set:

A=0.0/1+0.5/2+1.0/3+0.5/4+0.0/5A = 0.0/1 + 0.5/2 + 1.0/3 + 0.5/4 + 0.0/5

Contraction of fuzzy set A is given as follows:

A2=0.02/1+0.52/2+1.02/3+0.52/4+0.02/5A^2 = 0.0^2/1 + 0.5^2/2 + 1.0^2/3 + 0.5^2/4 + 0.0^2/5

=0.0/1+0.25/2+1.0/3+0.25/4+0.0/5= 0.0/1 + 0.25/2 + 1.0/3 + 0.25/4 + 0.0/5

Implication (if-then)

Consider two fuzzy sets: A in X and B in Y .

The fuzzy implication A → B is a fuzzy relation in the Cartesian product X × Y defined by:

Larsen implication:

μAB(x,y)(x,y)(X×Y)=μA(x)μB(y)\underset{\forall(x, y) \in(X \times Y)}{\mu_{A \rightarrow B}(x, y)}=\mu_A(x) \mu_B(y)

Mamdai implication:

μAB(x,y)(x,y)(X×Y)=min[μA(x),μB(y)]\underset{\forall(x, y) \in(X \times Y)}{\mu_{A \rightarrow B}(x, y)}=\min \left[\mu_A(x), \mu_B(y)\right]

Zadeh implication:

μAB(x,y)(x,y)(X×Y)=max[min{μA(x),μB(y)},1μA(x)]\underset{\forall(x, y) \in(X \times Y)}{\mu_{A \rightarrow B}(x, y)}=\max \left[\min \left\{\mu_A(x), \mu_B(y)\right\}, 1-\mu_A(x)\right]

Dienes-Rascher implication:

μAB(x,y)(x,y)(X×Y)=max[1μA(x),μB(y)]\underset{\forall(x, y) \in(X \times Y)}{\mu_{A \rightarrow B}(x, y)}=\max \left[1-\mu_A(x), \mu_B(y)\right]

Lukasiewicz implication:

μAB(x,y)(x,y)(X×Y)=min[1,1μA(x)+μB(y)]\underset{\forall(x, y) \in(X \times Y)}{\mu_{A \rightarrow B}(x, y)}=\min \left[1,1-\mu_A(x)+\mu_B(y)\right]

Height of a Fuzzy Set

The height (also called modal grade) of a fuzzy set is the maximum value of its membership function.

hgt(A)=supxXμA((x))hgt(A) = \underset{x\in X}{\sup}\mu_A((x))

also called the modal element value, or simply modal point.

Support Set of a Fuzzy Set

A crisp set containing all the elements (in the universe) whose membership grades are greater than zero.

S={xXμA(x)>0}S = \{x \in X | \mu_A(x) > 0\}

Alpha-cut of a Fuzzy Set

The α-cut of a fuzzy set A is the crisp set denoted by AαA_α formed by the elements of A whose membership function grades are greater than or equal to a specified threshold value α ∈ [0, 1].

Aa={xXμA(x)α},α[0,1]A_a = \{x \in X | \mu_A(x) \geq \alpha\}, \alpha \in [0,1]

Three Measures of Fuzziness

A measure of fuzziness of a fuzzy set A in the universe X defines the closeness of its membership function μAμ_A to the most fuzzy grade (0.5).

  • Closeness to grade 0.5 (A1A_1),
    • A1=xSf(x)dxA_1 = \int_{x\in S} f(x)dx
      • where
        • SS denotes the support set
        • f(x)=μA(x)f(x) = \mu_A(x) for μA(x)0.5\mu_A(x) \leq 0.5
        • f(x)=1μA(x)f(x) = 1 - \mu_A(x) otherwise
  • Distance from 1/2−cut (A2A_2),
    • A2=xXμA(x)μA1/2(x)dxA_2 = \int_{x \in X} |\mu_A(x) - \mu_{A_{1/2}}(x)|dx
  • Inverse of distance from the complement (A3A_3).
    • A3=2xXμA(x)0.5dxA_3 = 2 \int_{x\in X} |\mu_A(x) - 0.5|dx
      • can be derived to xXμA(x)μAˉ(x)dx\int_{x\in X} | \mu_A(x) - \mu_{\bar{A}}(x)|dx

Relationship Between Different Measures of Fuzziness

A1=A2=12(S1A3)A_1 = A_2 = \frac{1}{2}(S *1 - A_3)

Relations

For boolean relation in crisp sets and binary logic:

  • the relation is equivalent to the logical expression (proposition)
  • Can be proved using truth table

E.g. Consider a fuzzy logic proposition AA with membership function μAμ_A.

  • μA\mu_A may be taken to represent the degree of validity of the relation AA is True.
  • 1μA1 - \mu_A represents the degree of validity of the fuzzy relation AA is NOT True.

Cartesian Product of Fuzzy Sets

Consider a fuzzy set A1A_1 defined on the universe X1X_1 and a second fuzzy set A2A_2 defined on a different (independent, orthogonal) universe X2X_2.

  • The Cartesian product A1×A2A_1 × A_2 is the fuzzy subset of the Cartesian space X1×X2X_1 × X_2. Its membership function is given by:
    • μ(A1×A2)(x1,x2)=min[μA1(x1),μA2(x2)],(x1,x2)(X1×X2)\mu_{(A_1 \times A_2)}(x_1, x_2) = \min[\mu_{A_1}(x_1), \mu_{A_2}(x_2)], \forall(x_1, x_2) \in (X_1 \times X_2)
    • note that it is a “AND” operation

Extension Principle

Consider a mapping function f:XYf: X \rightarrow Y
Let AA be a fuzzy set on XX

A=μA(x1)x1+μA(x2)x2++μA(xn)xnA=\frac{\mu_A\left(x_1\right)}{x_1}+\frac{\mu_A\left(x_2\right)}{x_2}+\cdots+\frac{\mu_A\left(x_n\right)}{x_n}

The Extension Principle states that the image of AA under mapping f()f(\cdot) is expressed on YY

B=f(A)=μA(x1)y1+μA(x2)y2++μA(xn)yn, where y1=f(x1),y2=f(x2),,yn=f(xn)\begin{aligned} B=f(A) & =\frac{\mu_A\left(x_1\right)}{y_1}+\frac{\mu_A\left(x_2\right)}{y_2}+\cdots+\frac{\mu_A\left(x_n\right)}{y_n}, \text { where } \\ y_1 & =f\left(x_1\right), y_2=f\left(x_2\right), \ldots, y_n=f\left(x_n\right) \end{aligned}

presuming that the function ff is a one-to-one mapping.
If ff is a many-to-one mapping, i.e., x1x2\exists x_1 \neq x_2 such that y1=f(x1)=f(x2)=y2y_1=f\left(x_1\right)=f\left(x_2\right)=y_2, Then μB(y)=max[μA(x1),μA(x2)]\mu_B(y)=\max \left[\mu_A\left(x_1\right), \mu_A\left(x_2\right)\right].

Example:

A=0.12+0.41+0.80+0.91+0.32f:xx23B=0.11+0.42+0.83+0.92+0.31=(0.10.3)1+(0.40.9)2+(0.8)3=0.31+0.92+0.83\begin{equation} \begin{aligned} A & =\frac{0.1}{-2}+\frac{0.4}{-1}+\frac{0.8}{0}+\frac{0.9}{1}+\frac{0.3}{2} \\ f & : x \mapsto x^2-3 \\ B & =\frac{0.1}{1}+\frac{0.4}{-2}+\frac{0.8}{-3}+\frac{0.9}{-2}+\frac{0.3}{1} \\ & =\frac{(0.1 \vee 0.3)}{1}+\frac{(0.4 \vee 0.9)}{-2}+\frac{(0.8)}{-3} \\ & =\frac{0.3}{1}+\frac{0.9}{-2}+\frac{0.8}{-3} \end{aligned} \end{equation}

Projection

Given the relation RR defined by R=X×YμR(x,y)(x,y)R=\int_{X \times Y} \frac{\mu_R(x, y)}{(x, y)}
The first projection is a fuzzy set that results by eliminating the second set YY of X×YX \times Y by projecting the relation on XX.

Projection 1:

R1=XμR1(x)x,μR1(x)=ymax[μR(x,y)]R_1=\int_X \frac{\mu_{R_{\mathbf{1}}}(x)}{x}, \quad \quad \mu_{R_{\mathbf{1}}}(x)=\bigvee_y \max \left[\mu_R(x, y)\right]

The second projection is a fuzzy set that results by eliminating the first set XX of X×YX \times Y by projecting the relation on YY.

Projection 2:

R2=YμR2(y)y,μR2(y)=xmax[μR(x,y)]R_2=\int_Y \frac{\mu_{R_2}(y)}{y}, \quad \quad \mu_{R_2}(y)=\bigvee_x \max \left[\mu_R(x, y)\right]

The total projection is a combined projection over the spaces XX and YY and is defined by

μRT(x,y)=xymax[μR(x,y)]=yxmax[μR(x,y)]\mu_{R_T}(x, y)=\bigvee_x \bigvee_y \max \left[\mu_R(x, y)\right]=\bigvee_y \bigvee_x \max \left[\mu_R(x, y)\right]

Cylindrical Extension

  • Basically extend 1D projection into 2D projection by repeating the axis along another axis

Projection Example

Example for Projection in discrete cases:

Given:

R=[0.10.20.40.81.00.60.20.40.80.90.80.60.50.91.00.80.40.2]xy\underset{y}{R=\left[\begin{array}{cccccc} 0.1 & 0.2 & 0.4 & 0.8 & 1.0 & 0.6 \\ 0.2 & 0.4 & 0.8 & 0.9 & 0.8 & 0.6 \\ 0.5 & 0.9 & 1.0 & 0.8 & 0.4 & 0.2 \end{array}\right]x}\\

Then the first projection R1R_1, second projection R2R_2 and total projection RTR_T

R=0.1(x1,y1)++0.6(x1,y6)+0.2(x2,y1)++0.6(x2,y6)+0.5(x3,y1)++0.2(x3,y6)R1=iμR1(xi)xi=1.0x1+0.9x2+1.0x3=[1.00.91.0]R2=jμR2(yj)yj=0.5y1+0.9y2+1.0y3+0.9y4+1.0y5+0.6y6=[0.50.91.00.91.00.6]TRT=1\begin{equation} \begin{aligned} & R = \frac{0.1}{(x_1, y_1)} + \cdots + \frac{0.6}{(x_1, y_6)} + \frac{0.2}{(x_2, y_1)}+ \cdots + \frac{0.6}{(x_2, y_6)}+ \frac{0.5}{(x_3, y_1)}+ \cdots + \frac{0.2}{(x_3, y_6)} \\ & R^1=\sum_i \frac{\mu_{R^1}\left(x_i\right)}{x_i}=\frac{1.0}{x_1}+\frac{0.9}{x_2}+\frac{1.0}{x_3}=\left[\begin{array}{l} 1.0 \\ 0.9 \\ 1.0 \end{array}\right] \\ & R^2=\sum_j \frac{\mu_{R^2}\left(y_j\right)}{y_j}=\frac{0.5}{y_1}+\frac{0.9}{y_2}+\frac{1.0}{y_3}+\frac{0.9}{y_4}+\frac{1.0}{y_5}+\frac{0.6}{y_6} =\left[\begin{array}{llllll} 0.5 & 0.9 & 1.0 & 0.9 & 1.0 & 0.6 \end{array}\right]^T \\ & R^T=1 \end{aligned} \end{equation}

Then Cylindrical Extension:

C(R1)=[1.01.01.01.01.01.00.90.90.90.90.90.91.01.01.01.01.01.0]C(R2)=[0.50.91.00.91.00.60.50.91.00.91.00.60.50.91.00.91.00.6]\begin{equation} \begin{aligned} & C\left(R^1\right)=\left[\begin{array}{llllll} 1.0 & 1.0 & 1.0 & 1.0 & 1.0 & 1.0 \\ 0.9 & 0.9 & 0.9 & 0.9 & 0.9 & 0.9 \\ 1.0 & 1.0 & 1.0 & 1.0 & 1.0 & 1.0 \end{array}\right] \\ & C\left(R^2\right)=\left[\begin{array}{llllll} 0.5 & 0.9 & 1.0 & 0.9 & 1.0 & 0.6 \\ 0.5 & 0.9 & 1.0 & 0.9 & 1.0 & 0.6 \\ 0.5 & 0.9 & 1.0 & 0.9 & 1.0 & 0.6 \end{array}\right] \end{aligned} \end{equation}

Compositional Rule of Inference

A typical fuzzy logic system’s knowledge base is composed of a series of if-then rules.

  • Each rule is a fuzzy relation employing the (if-then) fuzzy implication.
  • When all individual rules (relations) are aggregated (executed), they result in one fuzzy relation represented by a fuzzy set, say K, and a multi-variable membership function.
  • In a fuzzy decision making process, the rule base K is first collectively matched with the available data.

Suppose that the available data (context) is denoted by the fuzzy set (or relation) DD and the inference (action) is denoted by a fuzzy set (or relation) II.

  • Then, the compositional rule of inference states that

I=DK,: “composed with" I=D \circ K, \quad \quad \circ: \text { ``composed with" }

  • The membership function of the inference I (also called decision, or action) is determined as

μI=supy{min[μD,μK]}\mu_I=\sup _y\left\{\min \left[\mu_D, \mu_K\right]\right\}

where the inference II is the output of the knowledge base decision making system.

  • This is known as the sup-min (or max-min) composition.
  • Another method to compute the inference II is through the sup-product composition.

μI=supy{μDμK}\mu_I=\sup _y\left\{\mu_D \cdot \mu_K\right\}

Fuzzy Reasoning

Fuzzy reasoning, also known as approximate reasoning (AR), is an inference procedure that derives conclusions from a set of if-then rules.

  • Fuzzy reasoning is basically the extension of the well known composition of elements and functions.
  • Let us assume that F is a fuzzy relation on X×YX \times Y.
  • Let AA be a fuzzy set in XX.
  • To obtain the resulting fuzzy set B, we first construct a cylindrical extension of A, C(A).
  • The inference of C(A) and F leads to the antecedent of the projection of C(A)∩F.
  • This leads to the fuzzy set B.
  • C(A)∩F(x,y) is known as the composition operator R1R2R_1 \circ R_2
    • Where C(A)=R1C(A) = R_1, \circ is the generalized operator (\cap In this case), R2=F(x,y)R_2 = F(x,y)

Modus Ponens (MP)

  • The rule of inference in conventional logic is modus ponens.
  • Modus Ponens leads to inference of truth of a proposition B from the truth of A and the implementation AB.

Case 1: Single Rule with Single Antecedent

Rule: if xx is AA then yy is BB

Fact: x is AA′

Conclusion: yy is BB'

Relation:

R:ABR: A \rightarrow B

Basically:

B=AR=A(AB)B' = A' \circ R = A' \circ (A \rightarrow B)

In detail (in this case):

B=AABB' = A' \wedge A \wedge B

μB(y)=x[μA(x)μA(x)]μB(y)\mu_{B'}(y) = \bigvee_x [\mu_{A'}(x) \wedge \mu_A (x)] \wedge \mu_B(y)

where

  • x[μA(x)μA(x)]\bigvee_x [\mu_{A'}(x) \wedge \mu_A (x)] is the degree of validity ww

Case 2: Single Rule with Multiple Antecedents

Rule: If xx is AA and yy is BB, then zz is CC

Fact: xx is AA' and yy is BB',

Conclusion: zz is CC'

Relation:

R:A×BC=R:A×B×CR: A \times B \rightarrow C \\ = R: A \times B \times C

R=X×Y×ZμA(x)μB(y)μC(z)(x,y,z)R = \int_{X\times Y \times Z} \frac{\mu_A(x) \wedge \mu_B(y) \wedge \mu_C(z)}{(x,y,z)}

Basically:

C=(A×B)(A×BC)C' = (A' \times B') \circ (A \times B \rightarrow C)

In detail (in this case):

C=[AABB]CC' = [A' \wedge A \wedge B' \wedge B] \wedge C

μC(z)=x,y[μA(x)μB(y)][μA(x)μB(y)μC(z)]=x,y[μA(x)μB(y)μA(x)μB(y)]μC(z)=x,y[μA(x)μA(x)]x,y[μB(y)μB(y)]μC(z)\begin{align} \mu_{C'}(z) &= \bigvee_{x,y} [\mu_{A'}(x) \wedge \mu_{B'}(y)] \wedge [\mu_{A}(x) \wedge \mu_{B}(y) \wedge \mu_C(z)]\\ &= \bigvee_{x,y} [\mu_{A'}(x) \wedge \mu_{B'}(y) \wedge \mu_{A}(x) \wedge \mu_{B}(y)] \wedge \mu_C(z)\\ &= \bigvee_{x,y} [\mu_{A'}(x) \wedge \mu_{A}(x)] \wedge \bigvee_{x,y}[\mu_{B'}(y) \wedge \mu_{B}(y)] \wedge \mu_C(z) \end{align}

where

  • x,y[μA(x)μA(x)]\bigvee_{x,y} [\mu_{A'}(x) \wedge \mu_{A}(x)] is the degree of validity of x:w1x : w_1
  • x,y[μB(y)μB(y)]\bigvee_{x,y}[\mu_{B'}(y) \wedge \mu_{B}(y)] is the degree of validity of y:w2y : w_2
  • x,y[μA(x)μA(x)]x,y[μB(y)μB(y)]\bigvee_{x,y} [\mu_{A'}(x) \wedge \mu_{A}(x)] \wedge \bigvee_{x,y}[\mu_{B'}(y) \wedge \mu_{B}(y)] is the firing strength

Case 3: Multiple Rules with Multiple Antecedents

Rules:

  • If xx is A1A_1 and yy is B1B_1, then zz is C1C_1
  • Else if xx is A2A_2 and yy is B2B_2, then zz is C2C_2

Fact: xx is AA' and yy is BB',

Conclusion: zz is CC'

Relation:

R1:A1×B1C1R2:A2×B2C2R_1 : A_1 \times B_1 \rightarrow C_1 \\ R_2 : A_2 \times B_2 \rightarrow C_2

Basically:

C=(A×B)(R1R2)=[(A×B)R1][(A×B)R2]=C1C2where Ci is the inferred consequent of rule iC' = (A' \times B') \circ (R_1 \cup R_2) = [(A' \times B') \circ R_1] \cup [(A' \times B') \circ R_2] \\ = C'_1 \cup C'_2 \quad \text{where } C'_i \text{ is the inferred consequent of rule i}

In detail (in this case):

as shown previously for Ci=(A×B)RiC'_i = (A' \times B') \circ R_i

μCi(z)=x[μA(x)μAi(x)]y[μB(y)μBi(y)]μCi(z)\mu_{C_i'}(z) = \bigvee_x [\mu_{A'}(x) \wedge \mu_{A_i}(x)] \wedge \bigvee_{y}[\mu_{B'}(y) \wedge \mu_{B_i}(y)] \wedge \mu_{C_i}(z)

Fuzzy Inference System (FIS)

Fuzzy input => [Rules] => Fuzzy output

Fuzzification

  • Fuzzification refers to the representation of a crisp value by a membership function.
  • It is needed prior to applying the composition (CRI), when the data (measurements) are crisp values, as common in control applications.
  • It may be argued that the process of fuzzification amounts to giving up the accuracy of crisp data.

Discrete case of fuzzification

Continuous case of fuzzification

  • Singleton method
  • Triangular function method
  • Gaussian function method

Defuzzification

  • Usually, the decision (control action) of a fuzzy logic controller is a fuzzy value and is represented by a membership function.
  • Because low-level control actions are typically crisp, the control inference must be defuzzified for physical purposes such as actuation.

Methods of defuzzification

  • Centroid method
  • Mean of maxima method
  • Threshold methods

Fuzzy Models (Different Inferencing Systems)

Different inferencing procedures have been used in the literature.

The main difference among them is the aggregation and the defuzzification.

Mamdani fuzzy model

  • Output is the maximum

Sugeno fuzzy model

  • Output is the average or weighted average