Fuzzy logic and system Notes

superorange 2022/05/28 496Views

Fuzzy logic and system Notes

Lecture2

1.1 character function(p27)

characteristic function: for a given set A, this function assigns a value μA(x) to every x ∈ X, such that

μA(x) = 1 iff x ∈ A μA(x) = 0 iff x ∈/ A

1.2 Membership function(隶属度函数)(P29)

分段函数:完全符合则为1, 完全不符合为0,中间的部分使用程度表示,

1.3 Notation(P30)

1.3.1 Discrete sets(离散集)

A=μ1/x1 +μ2/x2 +μ3/x3 +…+μn/xn

1.3.2 Continuous sets

A=xXμA(x)/xA = \int_{x∈X}μ_A(x)/x

1.4 α-cuts(p37-p43)

An α-cut of a fuzzy set A is a crisp set:

AaA_a

α-cuts:

A**α = {x X|µA(x) α*}*

strong α-cuts:

A**α+ = {x X|µA(x) > α*}*

image-20220518150554378

1.5 Support

defination: the crisp set of elements where the membership is greater than 0

1.6 Normality

A fuzzy set is normalised if at least one of its elements attains the maximum possible grade if membership grades are in [0*,* 1],

it is normalised when at least one element has height 1.

归一化:至少有一个元素达到了1,且其他元素都处于[0,1]之间

1.7 Convexity(凸性):(平滑曲线,先升后降)

μA(λr +(1−λ)s)≥min[μA®,μA(s)]

∀r , s ∈ X and ∀λ ∈ [0, 1]

image-20220318153955542

1.8 Complement:相反的(P44)

µ_ \overline{A} = 1 -µ_A(x)

image-20220318153920231

1.9 Intersection: A And B: 取A和B中逐个对应,数值小的那个组成新的集合

The fuzzy intersection (AND), A ∩ B of two fuzzy sets A and B, is usually given by μA∩B = min(μA(x), μB(x)).

image-20220318154710537

1.10 UNION A OR B: 取A和B中逐个对应,数值大的那个组成新的集合

The fuzzy union (OR), A ∪ B of two fuzzy sets A and B, is usually given by μA∪B = max(μA(x),μB(x)).

image-20220318154726541 image-20220318154916238

1.11 complement c

A complement c is a function which converts a fuzzy set, A, to another set, A

满足一下四个条件

1.11.1 Boundary condition(有边界,c(0) = 1 and c(1) = 0)

1.11.2 Monotonic non-increasing (单调不递增)

1.11.3 Continuity(连续的)

1.11.4 Involution(对合的, c(c(a)) = a, ∀a ∈ [0, 1], 即转两次后依旧是原来的值,对称的)

image-20220518201600898

image-20220518201630935

1.12 triangular norms or t-norms

1.12.1 Intersection norms(t-norm)(p53-55)

A t-norm is a function which takes two arguments in [0, 1] and returns a value in [0*,* 1].**

image-20220318162119216 $$ \mu_{A}(x) \cap \mu_{B}(x)=i\left(\mu_{A}(x), \mu_{B}(x)\right) $$ **必须** **满足以下公理 **: **(1)有边界 (2)可交换 (3)单调性 (4)联想性(可以交叉运算)**

公理 i1: i(1, 1) = 1*,* i(0*,* 1) = i(1*,* 0) = i(0*,* 0) = 0** must behave like crisp sets (boundary conditions)

公理 i2: i(a, b) = i(b,a) (commutative)

公理i3:if a a’ and b b, then i(a, b) i(a’,b’)** (单调性)

公理i4: i(i(a, b), c) = i(a, i(b, c))** (associative)

**可能需要满足以下公理:(1)连续 (2)幂等: i(a,a) = a **

1.12.1.1 Common t-norms(Intersection)(p55)
image-20220318165858125

1.12.2 Union axioms(p56-p59)

image-20220318170159053 $$ \mu_{A}(x) \cup \mu_{B}(x)=u\left(\mu_{A}(x), \mu_{B}(x)\right) $$ **必须** **满足以下公理 **: **(1)有边界 (2)可交换 (3)单调性 (4)联想性(可以交叉运算)**

公理 u1: u(0,0)=0, u(0,1)=u(1,0)=u(1,1)=1 must behave like crisp sets (boundary conditions)

公理 u2: u(a, b) = u(b,a) (commutative)

公理 u3:if a a’ and b b, then u(a, b) u(a’,b’)* (单调性)

公理 u4: u(u(a, b), c) = u(a, u(b, c))* (associative)

**可能需要满足以下公理:(1)连续 (2)幂等: u(a,a) = a **

1.12.2.1 Common t-conorms(Union)
image-20220318170451254

Lecture3

1. 语言变量(linguistic variable)

Informally:(p63)

fuzzy sets representing linguistic terms

模糊集的语言变量值只有terms,而没有正式中的那么多

Formal defination:(p64)

x:语言变量的名称(如高度)

T (X):一组术语(例如,矮、中、高),即 X 的语言值 X 的集合

u:给出基本变量 X 的取值范围的论域(域)

g:用于生成术语(例如,非常高,非常高,…),X,in T (X )

M:与 T (X)中的每个语言术语 X 相关联的语义规则 ,M(X),它表示一个模糊集

2. hedge**(限制语:类似形容词)**(p68)

比如:非常,稍微

3. concentrate**(集中)**(p69)

对隶属度函数求平方,使其函数曲线更集中于

Dilation:(p70)

Square-rooting a membership function makes it less concentrated (more dilated) - ‘slightly’

对成员函数进行平方根化,使其不那么集中(更加扩张)–"略微

image-20220518205831605

4.Terms

术语的数量和形状可能取决于应用

Alternative Term

image-20220318180650854

Memebership(p74-77)

5.Triangular membership functions(三角隶属度函数)

Three parameters (left, centre, right)

6.Trapezoidal membership functions(梯形隶属度函数)

Three parameters (left, centre, right) for ‘shoulder’(梯形的肩膀有三个参数)

Four parameters for trapezoid (lb, lt, rt, rb)(梯形有四个参数)

7.Gaussian membership functions(高斯隶属度函数)

Two parameters (standard deviation, centre)(标准偏差,中心))

8.Sigmoid membership functions(S型函数)

Two parameters (slope, half–point)(斜率、半点))

Deriving terms(p78)

Question arise when designing an application

how many terms should there be?

what shape should they be?

how much overlap should there be?

在设计一个应用程序时出现的问题

应该有多少个术语? 不超过7个

它们应该是什么形状?

应该有多少重叠? 最好在0.5左右

Methods for deriving terms

conduct a survey

ask domain experts

machine learning from data

trial and error

得出术语的方法

进行调查

询问领域专家

从数据中进行机器学习

试验和错误

9. Guildline of Lingustic variable(p79)

(1)the terms should span the universe of discourse

(2)the terms should not overlap too much

(3)terms should normally overlap at around 0.5 membership

(4)the number of terms should be small ( 7)

(5)all terms are normal

(6)all terms are convex

(7)usually odd number of terms

(1)术语应跨越话语的范围。

(2)术语不应重合太多

(3)术语一般应在0.5个成员左右重叠。

(4)术语的数量要少(≤7)。

(5)所有项都是正常的

(6)所有项都是凸的

(7)术语数量通常为奇数

10. Linguistic Truth(P80-84):True, False, Undefined, Unknown

X = Truth

U = [0, 1]

T = true + not true + very true + somewhat true + defifinitely true+ . . . + false + not false + very false + somewhat false +defifinitely false + . . .

So, we can now represent and systematise statements such as

“that’s not very true!”

image-20220518212141222

11. Level Sets

The term undefifined can be defifined as

θ=010/Vθ=\int_{0}^{1}{0/V}

The term unknown can be defifined as

θ=011/Vθ=\int_{0}^{1}{1/V}

image-20220518212225525

12. Extension Principle(p84)

Zadeh asserted a basic identity which allows a relationship from one domain to another to be extended into fuzzy domains

Zadeh断言了一个基本的身份,它允许从一个领域到另一个领域的关系被扩展到模糊领域

f is a mapping (function) from U to V

A = µ1/u1 + . . . + µn/un**

Then

f(A) = f(µ1/u1 + . . . + µn/un) µ1*/f(u1) + . . . + µn*/f*(un)**

image-20220518213323707

Lecture4

Inferencing Principles

1. If-Then Rules (Fuzzy Logic)(p92)

Inference is performed by utilising a set of rules connecting

premises to conclusions.

premise (if part) is called the antecedent(s)

conclusion (then part) is called the consequent(s)

推理是通过利用一套连接前提和结论的规则来进行的。
前提与结论之间的关系。
前提(如果部分)被称为前因(s)。
结论(则部分)被称为结果。

1.1 Essential operation(p93-94)

(1) each of the antecedent(s) is evaluated to a number in [0, 1] and combined into a single number - the truth of the rule premise

(2)each of the consequent(s) is considered to be true to the same degree as the premise)(每个结果都被认为在与前提相同的程度上是正确的))

Example

IF p THEN q

p is true, hence q is true

p is half true, hence q is half true

p is not true, hence q is not true!

p is FALSE, hence q is FALSE

Inference process: fuzzify inputs, combine inputs,implication, aggregate outputs, defuzzifification

image-20220518214931799

2.Method

2.1 Comprises a set of rules of the form:

IF x1 is A1 [AND/OR x2 is B1 . . . ] THEN y is C1

2.2 Rule的要求

(1)for each antecedent, evaluate the membership degree of the crisp input value in the fuzzy term(对于每个前件,评估模糊项中清晰输入值的隶属度)

(2)combine all membership degrees using appropriate fuzzy operator (e.g. min, prod, max)(使用适当的模糊算子(例如 min、prod、max)组合所有隶属度;);

(3)fifire the rule at the strength (combined degree) to obtain the rule output based on the consequent(在强度(组合度)处触发规则以根据结果获得规则输出。).

Aggregate outputs

2.3 Aggregate the output of each rule and interpret in some way (e.g. defuzzify the fuzzy output to a crisp value)(汇总每个规则的输出并以某种方式进行解释(例如,将模糊输出去模糊化为清晰的值)。).

image-20220318232337755

(1)将输入条件按每个rule(规则)进行输出,并考虑两个条件的用And

(2)将所有条件的输出都得到后,合并每个条件的输出, 使用OR。

(3)合并后得到最后的结果。

image-20220318233135978 image-20220318233156577 image-20220318233218284 image-20220318233242278 image-20220318233313140

3. Operator(p105)

Mamdani inference features union and intersection operators:

Intersection:(当rule的条件需要一起考虑时;对单个rule的结果进行推导时)

(1)intersection combining antecedents joined by AND;
(2)implication operator to derive each consequent

UOION:(当合并所有rule 的结果时;rule的条件中是OR的情况)

(1)union combining antecedants joined by OR;

(2)also used to combine all consequents overall

Mamdani

2.1Mamdani Defuzzifification(去模糊化)

去模糊化原因: Mamdani 推理的结果通常为模糊集

输出要求:将模糊输出集转换为数字,这个过程称为去模糊化Defuzzication

方法:Centroid(Centre-Of-Gravity),mean-of-maxima, centre-of-area

2.1.1 Type of Defuzzification(p108-118)

2.1.1.1 Numeric Defuzzification(数字化去模糊化)

often, a single (crisp) number is required as output e.g. fuzzy controller; there are many different options (COG (centroid), mean-of-maxima, centre-of-area)

(通常,需要一个(清晰的)数字作为输出,例如模糊控制器;有许多不同的选项(COG(质心)、最大值均值、区域中心))

2.1.1.2Linguistic defuzzifification(语言去模糊化)

a linguistic term representing the output set is found; some form of similarity or distance metric used

(找到表示输出集的语言术语;使用某种形式的相似性或距离度量)

2.1.2Centre of Gravity(Centroid:

计算方法:(不为0的数乘以✖️后面的数并且整个集合结果相加,(出现重复的只计算一次))/(前面的数相加)

image-20220320103510625 image-20220517162048384

2.1.3 Mean of Maxima (MOM)

The mean of the x which attain the maximal membership grade(隶属度函数中达到最高值得那一段的平均值)

image-20220320104101784 image-20220320104145149

找到最大值,找到属于最大值的几个量,将这几个量求平均值

image-20220320105605626

2.1.4 Smallest/Largest of Maxima

属于最大值的部分中,最小的量以及最大的量

image-20220320105723903 image-20220320110025035

2.1.5Bisector(最好画个图)

The value of x which splits the total area into two equal subareas usually very similar result to the centroid.(x 的值将总面积分成两个相等的子面积,通常与质心非常相似。)(即分割后的两边的平均值都相似或相等)

image-20220320111511855 image-20220320111529315

2.1.6 去模糊化的问题

信息丢失 - 当减少到单个时这是不可避免的数字

2.1.7 Other Metrics(p119)

µg:Membership grade at defuzzifification point, it provides an indication of confifidence in the result.

µh:Maximum membership grade(Height), it provides a direct measure of the maximum strength of rules fifired.

Normalised Area:

A=i=1NμiNA = \frac { \sum _ { i = 1 } ^ { N } \mu _ { i } } { N }

Fuzzy Entropy(模糊熵):The fuzzy entropy can be used to measure the subjective value of information under the condition of uncertainty.

S=i=1N(μiln(μi)(1μi)ln(1μi))NS = \frac { \sum _ { i = 1 } ^ { N } ( - \mu _ { i } \operatorname { ln } ( \mu _ { i } ) - ( 1 - \mu _ { i } ) \operatorname { ln } ( 1 - \mu _ { i } ) ) } { N }

2.1.8 Linguistic Approximation

2.1.8.1 compute the distance:

(1)the actual output set

(2)the set of all terms of the linguistic variable

Search to fifind the best term while limiting the complexity to produce comprehensible output (e.g. medium or high may be prefered to not extremely low or fairly medium or fairly high)(搜索以找到最佳术语,同时限制产生可理解输出的复杂性(例如,可能更喜欢中或高而不是极低或相当中等或相当高))

2.1.8.2 Euclidean distance:
image-20220320120816331

ηi:语言术语的隶属等级

Minimum distance = best match(最小距离即最佳匹配)

2.1.8.3 Degree of overlap:
image-20220320132337449

Maximum overlap = best match(最大重叠 = 最佳匹配)

Lecture5

1. Zeroth order inference models(p133-142)

1.1 Rule Type

image-20220320153853389

A, B, . . . are fuzzy sets in the antecedent(A,B为前缀中的模糊集合),ki表示结果的每一个常量

Example:

IF x is A1 AND/OR y is B1 . . . THEN z is k1

*wi:*The antecedents are evaluated as per Mamdani to find the fifiring strength (truth) of each rule

**权重wi:**与每条规则相关的 ki 的加权平均值给出的总输出

wi: 每个输入规则的组成后的Rule strength

ki :The ki associated with each rule can be obtained from the results of each rule

规则里,每个输出变量term中为1的后面的值,将其对应term组成新的输出变量

ki 的值可以通过每个规则后面then后的输出变量是什么选择对应的值

The Combination f of rules:

f=i=1nwikii=1nwif = \frac { \sum _ { i = 1 } ^ { n } w _ { i } k _ { i } } { \sum _ { i = 1 } ^ { n } w _ { i } }

1.3 TSK处理rule得到结果的过程:

image-20220320164413814 image-20220320164443691 image-20220320164834163 image-20220320164849973 image-20220320164917903 image-20220320164936203

2 Comparisons between Mamdani and TSK(p147)

Mamdani vs Sugeno

image-20220320170448911

3 First order(p148)

3.1 the rule format

image-20220320170849005

pi, qi and ri are constants(变量)

3.2 TSK VS Mamdani(Advantages)

TSK Sugeno advantages:

computationally effificient

works well with linear techniques (e.g. PID control)

works with optimisation & adaptive techniques

has guaranteed continuity of the output surface

well-suited to mathematical analysis

does not require defuzzifification

计算效率高

适用于线性技术(例如 PID 控制)

使用优化和自适应技术

保证了输出表面的连续性

非常适合数学分析

不需要去模糊化

Mamdani advantages

简单直观
已被广泛接受
非常适合人工输入

Higher order(p153)

Higher orders are possible, featuring x2, y2 and xy, etc., in the outputs.

Lecture6

Model identification and Tuning( Optimization )(p158-159)

1.Fuzzy Model

1.1 Fuzzy model identifification: Two process

structure identifification(寻找合适的言语变量的数量以及隶属度函数,规则形式等)

Example:finding the number of linguistic variables, fuzzy terms (membership functions), form of rules, etc

Parameter Tuning(寻找合适的参数以及规则权重、去模糊化的参数)

finding the exact values of the m.f. parameters, rule weights, defuzzifification parameters, etc.

1.2 考察模型以及性能的方法(p160)

1.2.1 模型的好坏

(1)objective function(目标函数)

(2)cost function(消耗函数)

(3)error measure(错误测量)

1.2.2 性能测试

(1)maximise objective functions/performance(最大化目标函数/性能)

(2)minimise cost functions/error(最小化消耗函数/错误)

Objective Function

direct objectivce function(p161)

direct objective functions: Problems where there is a predetermined objective or where there is an obvious optimisation, where the optimal solution to the problem is found directly by constructing a certain search pattern in the feasible domain.

indirect objective functions(p167)

indirect objective functions: For problems with no pre-specified target output or obvious target, the suitable indirect objective function can convert the original problem into the problem with specified targets, and indirectly obtain an optimal solution to the problem by solving the indirect problem, so that the goodness of the solution to the problem can be objectively measured

Example:

考虑餐厅消费

输入:餐厅服务与食物质量

输出:小费

目标函数:

最大化小费(for waiter)

最小化小费(for customer)

1.4 Cost Function

Direct cost function

It is more usual to have a fixed or pre-specifified idea of the outputs desired

calculate the cost (e.g. root-mean-squared error) based on model outputs

更常见的是对所需的输出有一个固定的或预先指定的想法

根据模型输出计算成本(如均方根误差)

1.5 FIS Structure(股票投资建议)

Inputs:

(1)FTSE index – three terms (m.f.s): falling, stable, rising

(2)Exchange-rate – three terms (m.f.s): down, unchanged, up

Outputs:

advice – three terms: sell, hold, buy

Rules:

Three rules

  1. If exchange is falling and ftse is up then advice is buy

  2. If exchange is rising and ftse is down then advice is sell

  3. If exchange is stable or ftse is unchanged then advice is hold

Indirect Objective function:

A suitable indirect objective function can be created by using the advice to buy/sell shares

Methods:

Exhaustive Search(穷举)(p169)

Each possible solution to the problem is evaluated in turn using a systematic method to finally find the appropriate solution. there are too many solutions or combinations for one problem in the real world, so this method is not useful for most problems in the real world.

2. The Monte Carlo algorithm(p171)

Process:(创建随机位置,不断寻找最优位置,如果找到的位置比目前最优位置好则替换它。直到完成迭代(设定迭代次数)。可能找不到全局最优)

(A random starting point is chosen, evaluated and stored as the best point, followed by the creation of a new random point, and if the new point is better than the original best point, this new point is used as the best point, and the above comparison and optimisation process is repeated until a set number of iterations is reached.Global optimum may not be found)

(1)generate a random starting position

(2)evaluate the starting position and store it as best

(3)repeat

​ generate a new random position

​ evaluate the new position

​ if the new position is better than the best found so far store the new position as the best

(4)until we decide to stop (e.g. not improved for 20 goes)

This may or may not fifind the global maximum

3. The hill climbing algorithm(p173)

Process:(Choose a random or fixed point as the starting point and evaluate that point, evaluate the points around that point and choose the most optimised of the four points as the new point, and repeat the process until there are no better points around)(选择一个随机的或固定的点作为起点,评估该点,评估该点周围的点,选择四个点中最优化的一个作为新的点,重复这个过程,直到周围没有更好的点为止)。

(1)从一个固定或者随机点开始迭代

(2)每一次迭代:

a.评估每一个方向

b.向有最好提升的方向去

(3)当下一步的所有方向都比当前的点低时,则终止(即无法产生下一个更优解时)

Output:

保证找到一个最优解,但如果存在多个最优解则不保证其为全局最优解

4. Stochastic Local Search(随机局部搜索)(结合蒙特卡洛和爬山)(p174-175)

创建一个随机起始点,使用爬山算法找到并存储局部最大值,不停重复上述过程直到达到设定的停止条件。

Create a random start point, find and store the local maximum using the hill-climbing algorithm, and repeat the process until a set stopping condition is reached.

Stochastic: ‘random’

Local search: moves in the local neighbourhood

局部爬山的性能非常依赖于景观的形状——如果景观有很多局部最大值,找到全局最大值的机会很小

过程:
  1. 重复:

    a.创建新的初始起点

    b.爬山搜寻局部最大值

    c.存储局部最大值

  2. 直到达到停止条件

  3. 随机搜索

  4. 在附近移动

5. simulated Annealing(退火算法)(p176-182)

适应爬坡 - 允许一些下坡步骤。接受所有上坡路段。开始时允许所有的下坡步骤,然后逐渐减少可能性

在模拟退火算法中,一个温度参数控制着该算法。最初,在高温下–所有下坡步骤都是允许的。温度逐渐降低–(步骤大小/温度)控制着接受的机会。

Adapts to climbing - allows some downhill steps. Accept all uphill sections. All downhill steps are allowed at the beginning and then the possibilities are gradually reduced

In the simulated annealing algorithm, a temperature parameter controls the algorithm. Initially, at high temperatures,all downhill steps are allowed. The temperature is gradually reduced (step size/temperature) controls the chances of acceptance.

Process:(SA 算法通常被实现为基本爬山算法)

1.初始化温度:T

1.1 所有的操作(爬山或者退火)都能接受
1.2 搜索是随机的

2.生成随机解: i

3.重复:
3.1 生成一个新的(附近的)解决方案,j
3.2 如果适应度(j)高于适应度(i)然后接受移动
3.3如果适应度(j)低于适应度(i)然后接受移动

3.4:for 3.2,3.3:根据随着适应度差异的大小而减小并随着温度T而增加的概率

3.5: 降低温度,T

3.5.1只接受上坡动作
3.5.2 搜索是逐渐爬坡接近(局部最优解)

Notice:

可以让算法在每个 T 重复多次,而不是而不是在每一步之后减少 T

长度参数 L 指定在每个温度T要重复执行的步骤数

4.直到停止标准

SA Parameters tuning (退火算法的优化)

参数设定

需要选择一个初始温度T,以便几乎所有的移动都被接受(上坡和可能下坡)。当前的搜索是一种 “随机行走”。

然后逐渐降低温度T,直到只有上坡动作被接受。现在的搜索是向(局部)最佳状态的爬坡。

可以让算法在每个温度下重复若干次,而不是每一步都降低温度。长度参数L指定了在每个温度T下要重复的步骤数T。

Need to choose an initial temperature T such that

almost all moves are accepted (uphill & probably downhill)

the search is a ‘random walk’

Then decrease the temperature T gradually, until

only uphill moves are accepted

the search is now a hill climb to the (local) optimum

Can let the algorithm repeat a number of times at each T, rather

than decreasing T after every step

the length parameter, L, specififies the number of steps to

be repeated at each temperature, T

参数的优化Nelder-Mead simplex

动态步长取决于地形
最好是利用地形的形状
但梯度(通常)是不可用的
需要一种无梯度的动态算法
解决方案。Nelder-Mead单线法

Dynamic step length dependent on terrain

Ideally using the shape of the terrain

But gradients are not (usually) available

Need a gradient-free dynamic algorithm

Solution: Nelder-Mead simplex

Lecture7(ANFIS

ANFIS:Adaptive Neuro-Fuzzy Inference System

1. First-order Sugeno fuzzy model

Structure: 2 inputs (2 mfs), 4 rules

image-20220321205606939

description of layers (calculations)(p189-193)

2. Layer

2.1 Layer1 : Inputs

前提参数:例子中输入为两个参数,且每个参数有两种可能

O1,i=μAi(x1) for i=1,2O _ { 1 , i } = \mu _ { A _ { i } } ( x _ { 1 } ) \quad \text { for } i = 1,2

O1,i=μBi2(x2) for i=3,4O _ { 1 , i } = \mu _ { B _ { i-2 } } ( x _ { 2 } ) \quad \text { for } i =3,4

m.f.s are Gaussians(隶属度函数通常为高斯函数)

μAi(x)=e(xci)2ai2\mu _ { A _ { i } } ( x ) = e ^ { - \frac { ( x - c _ { i } ) ^ { 2 } } { a _ { i } ^ { 2 } } }

2.2 Layer2: rule Firing 规则触发

T-norm operator combining the separate antecedents into single rule firing strength

(T-范数算子将单独的前件组合成单个规则触发强度):即 将条件规则的前置条件互相组合从而达到各个规则的触发条件

image-20220323131850134

对于n个输入,有R=Mn的规则

O2,i=j=1nμ(xj)=μ(x1)μ(x2)μ(xn) for i=1RO _ { 2 , i } = \prod _ { j = 1 } ^ { n } \mu ( x _ { j } ) = \mu ( x _ { 1 } ) \cdot \mu ( x _ { 2 } ) \cdots \mu ( x _ { n } ) \text { for } i = 1 \ldots R

image-20220323131915080
2.3 Layer3: Normalised Firing(中心化触发)

layer3的输出是对条件触发强度的中心化

O3,i=wij=1rwj for i=1RO _ { 3 , i } = \frac { w _ { i } } { \sum _ { j = 1 } ^ { r } w _ { j } } \quad \text { for } i = 1 \ldots R

2.4 Layer 4 – Rule Consequents

Consequent parameters (towards defuzzification)(后置参数:去模糊化)

O4,i=wiyi=wi(pix1+qix2+ri)O _ { 4 , i } = \overline { w _ { i } } y _ { i } = \overline { w _ { i } } ( p _ { i } x _ { 1 } + q _ { i } x _ { 2 } + r _ { i } )

2.5 Layer5-Defuzzification(去模糊化)

最终清晰的输出:对每个归一化的求和规则输出

y=O5,i=iwiyi=iwiyiiwiy = O _ { 5 , i } = \sum _ { i } \overline { w _ { i } } y _ { i } = \frac { \sum _ { i } w _ { i } y _ { i } } { \sum _ { i } w _ { i } }

3.ANFIS – Zeroth Order

3.1 Zeroth-order Sugeno fuzzy model

Structure: 2 inputs (2 mfs), 4 rules

image-20220323134810858 image-20220323134827720

parameters: antecedents, consequents(p195)

Parameters

Two sets:S1,S2

S1:

1.定义输入的隶属度函数

2.非线性

3.在反向传播中(错误的反向传播)通过使用梯度下降调整算法进行修改

• the parameters that define the input m.f.s

• non-linear

• modified by using a gradient descent tuning algorithm

in a backward pass (back-propagation of errors)

S2

1.定义结果函数的参数

  1. 线性
  2. 在前向传播算法通过使用迭代最小二乘估计进行修改

the parameters that define the consequent functions

• linear

• modified by using an iterative least squares estimation

algorithm in a forward pass

the hybrid learning procedure(p196-198)

3.3 ANFIS Learning
3.3.1 Two passes(混合学习步骤的两种方法)
image-20220412193427063

1.Forward Pass

1.1 LSE

a. goal:minimise the squared error(最小化方差)

AXB2\| A X - B \| ^ { 2 }

1.A 是第 3 层产生的输出矩阵

2.B 是目标输出的矩阵

3.X 是结果参数的矩阵

b.顺序(迭代)估计算法来估计 X,基本上按照卡尔曼滤波器

2.Backward Pass

2.1 Back Propagation

a.overall error measure

E=p=1P(TpYp)2PE = \sqrt { \frac { \sum _ { p = 1 } ^ { P } ( T _ { p } - Y _ { p } ) ^ { 2 } } { P } }

Yp are actual outputs and Tp are targets

b.

Δαi=ηEαi\Delta \alpha _ { i } = - \eta \frac { \partial E } { \partial \alpha _ { i } }

h为学习速率,它的表达式为:

η=ki(Eαi)2\eta = \frac { k } { \sqrt { \sum _ { i } ( \frac { \partial E } { \partial \alpha _ { i } } ) ^ { 2 } } }

example models(p201-220)

Iris Data

Type-2 Fuzzy Logic

Type-2 Fuzzy Sets(p274-276)

A type-2 fuzzy set, A˜, is characterised by a type-2 membership function µA˜(x*,u), where x X and u Jx [0,*1]

A˜ = {((x*,u),µA˜(x,u))|∀x X,∀u Jx [0,1]}*

A type-2 fuzzy set, A, over X is a defifined by the following function:

A~:XF([0,1]):xA~(x)Ax\begin{aligned} \widetilde{A}: X & \rightarrow F([0,1]): \\ x & \mapsto \widetilde{A}(x) \equiv A_{x} \end{aligned}

where

Ax:[0,1][0,1]:uxAx(ux)\begin{gathered} A_{x}:[0,1] \rightarrow[0,1]: \\ u_{x} \mapsto A_{x}\left(u_{x}\right) \end{gathered}

Let, F**(X), be the set of all T2FSs on X.

image-20220519000426362 image-20220519000357790

The FootPrint of Uncertainty(p278)

The footprint of uncertainty (FOU) is the union of all primary memberships:

FOU(A~)=xXJxF O U(\tilde{A})=\bigcup_{x \in X} J_{x}

Interval Valued Fuzzy Sets(p281)

An interval valued type-2 fuzzy set (IVFS), A˜*iv* , is characterised by a

type-2 membership function µA˜iv (x*,u), where x X and u Jx [0,*1]

A~iv={((x,u),1)xX,uJx[0,1]}\tilde{A}^{i v}=\left\{((x, u), 1) \mid \forall x \in X, \forall u \in J_{x} \subseteq[0,1]\right\}

Intersection(p283)

The union () of two type-2 fuzzy sets (A˜, B˜) corresponding to A˜ OR B˜ is given by

xA~B~μA~B~(x)=μA~(x)μB~(x)=i,j(f(ui)g(wj))/(uiwj)x\begin{aligned}\tilde{A} \cap \tilde{B} \Leftrightarrow \mu_{\tilde{A} \cap \tilde{B}}(x) &=\mu_{\tilde{A}}(x) \sqcap \mu_{\tilde{B}}(x) \\&=\sum_{i, j}\left(f\left(u_{i}\right) \wedge g\left(w_{j}\right)\right) /\left(u_{i} \wedge w_{j}\right)\end{aligned}

Union(p282)

The intersection () of two type-2 fuzzy sets (A˜, B˜) corresponding to A˜ AND B˜ is given by:

ABμA~B~(x)=μA~(x)μB~(x)=i,j(f(ui)g(wj))/(uiwj)\begin{aligned} A \cup B \Leftrightarrow \mu_{\tilde{A} \cup \tilde{B}}(x) &=\mu_{\tilde{A}}(x) \sqcup \mu_{\tilde{B}}(x) \\ &=\sum_{i, j}\left(f\left(u_{i}\right) \wedge g\left(w_{j}\right)\right) /\left(u_{i} \vee w_{j}\right) \end{aligned}

Type-Reduction(2 stages)

Conventionally, defuzzifification of a type-2 fuzzy sets is a two stage process:

(1)类型还原,创建一个第一类型的模糊集,(Type-reduction, creating a type-1 fuzzy set)
(2)对产生的1型模糊集进行去模糊化。(defuzzifification of the resultant type-1 fuzzy set.)

第二个阶段比第一个阶段简单很多

The second stage is easily implemented; the first stage is more problematic.

类型还原依赖于嵌入式集合的概念

Type-reduction is reliant on the concept of an embedded set.

Defuzzifification: algorithms, embedded sets

embedded sets:

(1)Defifinition

一个内嵌集包含在一个第二类模糊集中,其方式是 对于每一个x的值,只有一个y的值,(二级成员等级由x和y决定)。成员等级由x和y决定)。
孟德尔和约翰的表示定理指出,一个2型模糊集可以表示为一个2型模糊集的联盟。可以表示为其嵌入集的联合。

An embedded set is contained in a type-2 fuzzy set in such a way that for every value of x, there is only one value of y, (the secondary membership grade being determined by x and y.)

Mendel and John’s representation theorem states that a type-2 fuzzy set can be represented as the union of its embedded sets.

Algorithm for Type-Reduction

所有可能的第二类嵌入集都被列举出来。
对于每个嵌入集来说,最小的二级成员等级是 找到。
对于每个嵌入集,计算出第二类嵌入集的第一类中心点的域值。 2型嵌入集的域值被计算出来。
对于每个嵌入集,二级会员等级与域值配对,以产生一组有序的配对。 来产生一组有序的对(x,z)。很可能有些 的值将对应于一个以上的z值。
对于每一个域值,都会选择最大的二级等级。这就产生了一个较小的有序对集合(x,zMax),使得x与z之间存在着 x和zMax之间有一个一对一的对应关系。这就 "类型还原 "了 这就把2型模糊集 "类型还原 "为1型模糊集,称为类型还原的 集(TRS)。

All possible type-2 embedded sets are enumerated.

For each embedded set the minimum secondary membership grade is found.

For each embedded set the domain value of the type-1 centroid of the type-2 embedded set is calculated.

For each embedded set the secondary grade is paired with the domain value to produce a set of ordered pairs (x*,*z). It is likely that some values of x will corresponding to more than one value of z.

For each domain value, the maximum secondary grade is selected. This creates a smaller set of ordered pairs (x*,*zMax) such that there is a one-to-one correspondence between x and zMax. This ‘type-reduces’ the type-2 fuzzy set to a type-1 fuzzy set, known as the type-reduced set (TRS).

applications:

supply chain modelling, decision making