» Fuzzy conclusions. Fuzzy sets. linguistic variable. Fuzzy logic. Compositional inference rule - Lecture Informative example for fuzzy inference

Fuzzy conclusions. Fuzzy sets. linguistic variable. Fuzzy logic. Compositional inference rule - Lecture Informative example for fuzzy inference

The typical structure of the fuzzy inference process is shown in fig. 17.

Rice, 17

First of all, a rule base should be formed, which is a finite set of rules for fuzzy productions. The formation of the rule base includes the definition of input and output linguistic variables, as well as the rules themselves. The input linguistic variables are the linguistic variables used in the subconditions of the rules. Output variables are variables used in rule subconclusions. The definition of linguistic variables means the definition of basic term-sets of variables and membership functions of term-sets. The rules are formed as discussed in Section 2.4. Each rule can be assigned a weight that takes a value from the interval . If there is no weight, we can assume that the weight is zero.

The input of the fuzzy inference system is a vector x* =[*,*,*2, »?**, ] of crisp values ​​of linguistic variables e. The fuzzification block (am. fuzzification - reduction to fuzziness) calculates the degree of belonging of these values ​​to fuzzy sets of linguistic values. variables. To do this, the functions of each term of the linguistic variable must be known.

Fuzzification is done in the following way. Let for each input linguistic variable q its numerical value be known X*. Each statement of subconditions is considered, in which the variable g appears, for example, "p. there is from "where os (-term with known membership function [lah). Meaning X* is used as an argument //(l), resulting in = q(x*). In this case, modifiers can be used. Thus, the truth values ​​of all subconditions of the fuzzy inference system are calculated. Statements in subconditions are replaced by numbers. At the output of the fuzzification block, a vector m = is formed, which is the input of the output block.

The fuzzy inference block receives at the input the vector of the degree of truth of all subconditions t and calculates the resulting membership function of the output value (an inference system can have multiple outputs, in which case we are talking about an output vector). The calculation of the resulting membership function includes the following procedures (in parentheses are the names of the procedures in accordance with the international standard for programming languages ​​for controllers IEC 1131 - Programmable Controllers. Part 7 - Fuzzy Control Programming):

  • - calculation of the degree of truth of conditions (Aggregation - aggregation);
  • - determination of the activated membership functions of conclusions (Activftion - activation);
  • - determination of the resulting membership functions of the output linguistic variables (Accumulation - accumulation).

In the procedure for calculating the degree of truth of conditions for each of the rules of the fuzzy inference system (aggregation), each condition of the rules of the fuzzy inference system is considered and the degree of truth of the conditions is calculated. The initial data are the degree of truth of subconditions (vector t) computed in the fuzzification block. If the condition contains one fuzzy statement of the form, then the degree of truth of the condition is equal to the degree of truth of the statement of the condition. If a condition consists of two subconditions connected by conjunction or disjunction, the degree of fulfillment of the condition is calculated using triangular norms (Section 1.5). For example, for the condition of the IF rule "(3, there is a, "and" R 2 have a 2" we obtain

X and x 2 - values ​​of input variables n;, and x 2,

T is one of the t-norm operators, /and a(x) and M a,(*) - membership functions of the terms ", and a 2 .

Similarly for the condition of the rule:

where S- one of the s-norm operators. If a condition contains a set of subconditions connected by disjunctions and conjunctions, then first the degrees of truth of the subconditions connected by conjunctions are calculated, then by disjunctions. As usual, parentheses break the order. It is recommended to use consistent rules for calculating truth. For example, if the min-intersection operation is used to calculate the fuzzy conjunction, then the max-union operation should be used to calculate the fuzzy disjunction.

The procedure for determining activated membership functions of conclusions (activation) is based on the operation of fuzzy implication (Section 2.1). The input data for the procedure are the degrees of truth of the conditions of the rules and the membership functions of the output values, the output data are the membership functions of all subconclusions. Let's consider an example. Let the rule be of the form IF (x = A) THEN (y = AT), membership functions c A(x) and MV(y) - triangular (Fig. 18), input value X*\u003d 6.5, the degree of truth of the condition /i, f (x *) \u003d 0.5 (see Fig. 18).


Rice. 18 -

We use the Mamdaiya implication:

The practically activated membership function of the conclusion when using the Mamdani implication is found by simply truncating the membership function of the conclusion Мv(y) D° level degree of truth of the condition [l A(x*) (Fig. 18). Other fuzzy implication operators can be used.

For example, the result of activating the conclusion using the “product” rule is shown in Fig. 19.


Rice. 19

In practice, especially when there are several conclusions in the rules, it is convenient to use the activation procedure based on the Mamdani inference algorithm (the algorithm will be discussed in Section 2.6). In this algorithm, for each rule, a weighting factor /^e will be given. May be F/= 1, such a value is taken if the weighting factor is not explicitly specified. For individual subconclusions of the same rule, different weighting coefficients can be specified. The degree of truth of all subconclusions of the /th rule is calculated by the formula

Activated membership function j- th subconclusion of the /th rule is calculated by one of the formulas based on the fuzzy composition method:

min activation /J*(d>) = min ( with p(j"));

prod-activation //* (y) = c t// (y).

The considered algorithm is especially convenient when the rules contain several subconclusions of the form.

Since the subconclusions related to the same output linguistic variable generally belong to different rules, then it is necessary to construct a single resulting membership function for each output variable. This procedure is called accumulation. The accumulation is performed by combining, using one of the s-norms, the activated membership functions of each output linguistic variable. As a result, for each output variable, one membership function is obtained, possibly of a very complex form.

Defuzzification (reduction to parity) - finding for each output linguistic variable a clear value in a certain sense in the best way, representing a fuzzy variable. The need for defuzzification is explained by the fact that, as a rule, clear values ​​are needed at the output of the fuzzy inference system, which are fed, for example, to the actuator. Since there are different criteria for representing a tapped variable as a single number, there are various methods of defuzzification. As a result of determining the resulting membership functions of the output linguistic variables, the resulting membership functions are obtained №res(y)- For a unimodal membership function, the simplest defuzzification method is to choose a clear number corresponding to the maximum degree of membership. A generalization of this method to multimodal functions are the left and right modal value methods.

In the method of the left modal value (LM - Lost Most Maximum), also called the method of the first maximum (FM - FirstofMaxima), or the smallest of the maximums (SOM - Smallest Of Maximums), a clear value is taken at= min (X t ), where x t - the modal value of the resulting membership function. In other words, the smallest (leftmost) mode is taken as the crisp output variable.

In the right modal value method (RM - RightMostMaximum), also called the last maximum method (LM - LastofMaxima), or the largest maximum method (LOM - Largest Of Maximums), a clear value is taken at\u003d max (x / u |, that is, the largest (rightmost) of the modes. Examples of defuzzification using the left and right modal values ​​are shown in Fig. 20a and 206.

In the method of the average maximum (MM - MidleofMaxima), or the method of the center of maxima (MOM - MeanOfMaximums), the arithmetic mean of the elements of the universal set with the maximum degree of membership is found

where G- the set of all elements from the interval that have the maximum degree of belonging to the fuzzy set. An example of defuzzification using the mean maximum method is shown in fig. 20th century

Defuzzification by the center of gravity method (CG - Center of Gravity, Centroid) is performed according to the formula for determining the center of gravity flat figure, bounded by the coordinate axes and the graph of the membership function of the fuzzy set

where Min and max are the left and right points of the interval of the carrier of the output variable.

An example of defuzzification using the center of gravity method is shown in fig. 20th century


Rice. twenty - Examples of defuzzification a) the result of defuzzification by the left modal value of y =y 1 ;

  • b) the result of defuzzification by the right modal value method at = at 2 ;
  • c) the result of defuzzification by the mean maximum method;
  • d) the result of defuzzification by the center of gravity method. Defuzzification by the method of the center of the area (CA - Center of

Area, Bisector of Area, Bisector) is to find such a number

>’ max

la y, what J//(x)dx= J//(x)dx. geometric sense method

consists in finding such a point on the x-axis that the perpendicular restored at this point divides the area under the membership function curve into two equal parts.

Design and Simulate Fuzzy Logic Systems

Fuzzy Logic Toolbox™ provides MATLAB ® functions, applications, and a Simulink ® block for analyzing, designing, and simulating fuzzy logic systems. The product guides you through the steps of developing fuzzy inference systems. Functions are provided for many common techniques, including fuzzy clustering and adaptive neuro-fuzzy learning.

The toolbox allows you to behave complex system models using simple logical rules and then implement these rules in a fuzzy inference system. You can use it as a standalone fuzzy inference engine. You can also use fuzzy inference blocks in Simulink and model fuzzy systems in a comprehensive model of the entire dynamic system.

Beginning of work

Learn the basics of Fuzzy Logic Toolbox

Fuzzy system inference modeling

Create Fuzzy Inference Systems and Fuzzy Trees

Fuzzy System Output Tuning

Customize Membership Functions and Rules of Fuzzy Systems

Data clustering

Find clusters in input/output data using fuzzy c-means or subtractive clustering

Fuzzy logic (FL) implies the operation of fuzzy inference, the basis of which is the rule base, as well as the membership function of linguistic terms. The result is a clear value for the variable.

Fuzzy logical inference is the approximation of dependence using a fuzzy knowledge base and operations on fuzzy sets.

In order to perform fuzzy logical inference, the following conditions are necessary:

There must be at least one rule for each linguistic term of the output variable;

For any term in an input variable, there must be at least one rule that uses that term as a precondition;

There should be no contradictions and correlations between the rules.

Figure 1.7. shows the sequence of actions when using the fuzzy inference process.

Figure 1.7 - The sequence of actions when using

fuzzy inference process

Fuzzy inference is central to fuzzy logic and fuzzy control systems. This process is a procedure or algorithm for obtaining fuzzy conclusions based on fuzzy conditions or assumptions.

Fuzzy inference systems are a special case of production fuzzy systems in which the conditions and conclusions of individual rules are formulated in the form of fuzzy statements regarding the values ​​of certain linguistic variables.

The development and application of fuzzy inference systems include several stages, the implementation of which is carried out using the previously considered basic provisions of fuzzy sets.

The input variables coming to the input of the fuzzy inference system are information that is measured in some way. These variables are the real variables of the control process. The control variables of the control system are formed at the output of the fuzzy inference system.

Thus, fuzzy inference systems are designed to convert the values ​​of input variables of the control process into output variables based on the use of fuzzy production rules. The simplest version of the fuzzy production rule, which is most often used in fuzzy inference systems, is written in the form:

RULE<#>: IF “β 1 is α 1”, THEN “β 2 is α 2 ”

Here, the fuzzy proposition “β 1 is α 1 ” is the condition of this fuzzy production rule, and the fuzzy proposition “β 2 is α 2 ” is the fuzzy conclusion of this rule, which are formulated in terms of fuzzy linguistic statements. It is assumed that β 1 ≠ β 2 .

The main stages of fuzzy inference and the features of each of them are discussed in more detail below:

1) Formation of the rule base. The rule base of fuzzy inference systems is designed to formally represent empirical knowledge or expert knowledge in a particular problem area and is a set of rules for fuzzy productions of the form: RULE_1: IF “Condition_1”, THEN “Conclusion_1”(F 1)

RULE_2: IF “Condition_2”, THEN “Conclusion_2” (F 2)

RULE_n: IF “Condition_n”, THEN “Conclusion_n”(F n)

Here F i (i belongs (1, 2, …, n)) are the certainty coefficients or weight coefficients of the corresponding rules, which can take values ​​from the interval . Unless otherwise stated, then F i =1.

Thus, the rule base is considered given if a set of fuzzy production rules, a set of input linguistic variables, and a set of output linguistic variables are defined for it.

2) Fuzzification (introduction of fuzziness) is a process and procedure for finding the values ​​of the membership functions of fuzzy sets (terms) based on ordinary (clear) input data. After the completion of this stage, for all input variables, the specific values ​​of the membership functions for each of the linguistic terms, which are used in the subconditions of the rule base of the fuzzy inference system, must be determined.

3) Aggregation is a procedure for determining the degree of truth of conditions for each of the rules of the fuzzy inference system. If the rule condition has simple form, then the degree of its truth is equal to the corresponding value of the input variable belonging to the term used in this condition. In the case when the condition consists of several subconditions of the form:

RULE<#>: IF “β 1 is α 1 ” AND “β 2 is α 2 ”, THEN “β 3 is ν”, or

RULE<#>: IF “β 1 is α 1” OR “β 2 is α 2 ”, THEN “β 3 is ν”,

then the degree of truth of a complex statement is determined based on known values the truth of the subconditions. In this case, the corresponding formulas are used to perform fuzzy conjunction and fuzzy disjunction:

§ Fuzzy logical conjunction (AND)

§ Fuzzy logical disjunction (OR)

4) Activation is the process of finding the degree of truth of each of the subconclusions of the fuzzy production rules. Prior to this stage, the degree of truth and the weight coefficient are assumed to be known ( F i) for each rule. Next, each of the conclusions of the rules of the fuzzy inference system is considered. If the conclusion of the rule is one fuzzy statement, then the degree of its truth is equal to the algebraic product of the corresponding degree of truth of the condition and the weight coefficient.

When the conclusion consists of several sub-conclusions of the form:

RULE<#>: IF “β 1 is α 1 ” THEN “β 2 is α 2 ” AND “β 3 is ν”, or

RULE<#>: IF “β 1 is α 1 ” THEN “β 2 is α 2 ” OR “β 3 is ν”,

then the degree of truth of each of the subconclusions is equal to the algebraic product of the corresponding value of the degree of truth of the condition by the weight coefficient.

After finding the set С i =(c 1 , c 2 , … , c n ) the degrees of truth of each of the subconclusions are determined by the membership functions of each of them for the considered output linguistic variables. To do this, use one of the following methods:

Min activation: μ'(y)=min(C i , μ(y));

Prod-Activation: μ'(y)=C i *μ(y);

Average- activation: μ'(y)=0.5*(C i +μ(y)),

where μ'(y) is the membership function of a term that is the value of some output variable y j, given on the universe Y.

5) Accumulation is the process of finding the membership function for each of the output linguistic variables. The purpose of accumulation is to combine all degrees of truth of conclusions (sub-conclusions) to obtain a membership function for each of the output variables. The reason for the need for this stage is that subconclusions related to the same output linguistic variable belong to different rules of the fuzzy inference system. Union of fuzzy sets C i produced using the formula:

,

where is the modal value (mode) of the fuzzy set corresponding to the output variable after accumulation, calculated by the formula:

6) Defuzzification (reducing to clarity) is a procedure for finding the usual (clear) value for each of the output linguistic variables. The goal is to use the results of the accumulation of all output linguistic variables to obtain the usual quantitative value of each of the output variables, which can be used by special devices external to the fuzzy inference system. To perform numerical calculations at the final stage, the following defuzzification methods can be used (Figure 1.8):

Centroid - center of gravity; Bisector - median; SOM (Smallest Of Maximums) - the smallest of the maximums;

LOM (Largest Of Maximums) - the largest of the maximums; MOM (Mean Of Maximums) - center of maximums.

Figure 1.8 - Main methods of defuzzification

1. The Center of Gravity method is considered one of the simplest in terms of computational complexity, but quite accurate method. The calculation is made according to the formula:

where is the result of defuzzification (the exact value of the output variable); – boundaries of the interval of the carrier of the fuzzy set of the output variable; - membership function of the fuzzy set corresponding to the output variable after the accumulation stage.

For the discrete option:

where the number of elements in the area to calculate the "center of gravity".

2. Center of Area method:

where is the result of defuzzification (the exact value of the output variable); Min and Max- left and right point of the carrier of the fuzzy set of the output variable; - membership function of the fuzzy set corresponding to the output variable after the accumulation stage.

concept fuzzy inference occupies an important place in fuzzy logic Mamdani algorithm, Tsukamoto algorithm, Sugeno algorithm, Larsen algorithm, Simplified fuzzy inference algorithm, Refinement methods.

The fuzzy inference mechanism used in various kinds of expert and control systems basically has a knowledge base formed by experts in the subject area in the form of a set of fuzzy predicate rules of the form:

P1: if X is A 1 , then at is B 1 ,

P2: if X is A 2 , then at have B 2 ,

·················································

P n: if X there is BUTn, then at have B n, where X- input variable (name for known data values), at- output variable (name for the data value to be calculated); A and B are membership functions defined, respectively, on x and at.

An example of such a rule

If a X- low then at- high.

Let's give a more detailed explanation. Expert knowledge A → B reflects a fuzzy causal relationship between the premise and the conclusion, so it can be called a fuzzy relationship and denoted by R:

R= A → B,

where "→" is called a fuzzy implication.

Attitude R can be considered as a fuzzy subset of the direct product X×Y full set of prerequisites X and conclusions Y. Thus, the process of obtaining the (fuzzy) result of the conclusion B" using this observation BUT" and knowledge A → B can be represented as a formula

B" \u003d A "ᵒ R\u003d A "ᵒ (A → B),

where "o" is the convolution operation introduced above.

Both the operation of composition and the operation of implication in the algebra of fuzzy sets can be implemented in different ways (in this case, of course, the final result obtained will also differ), but in any case, the general logical conclusion is carried out in the following four stages.

1. Fuzziness(introduction of fuzziness, fuzzification, fuzzifica-tion). The membership functions defined on the input variables are applied to their actual values ​​to determine the degree of truth of each premise of each rule.

2. logical conclusion. The computed truth value for the premises of each rule is applied to the conclusions of each rule. This results in one fuzzy subset to be assigned to each output variable for each rule. As inference rules, only min (MINIMUM) or prod (MULTIPLICATION) operations are usually used. In the MINIMUM logical inference, the membership function of the inference is "cut off" in height, corresponding to the calculated degree of truth of the premise of the rule (fuzzy logic "AND"). In the MULTIPLICATION inference, the membership function of the inference is scaled by the computed degree of truth of the premise of the rule.

3. Composition. All fuzzy subsets assigned to each output variable (in all rules) are combined together to form one fuzzy subset for each output variable. With such a union, the operations max (MAXIMUM) or sum (SUM) are usually used. With MAXIMUM composition, the combined derivation of a fuzzy subset is constructed as a pointwise maximum over all fuzzy subsets (fuzzy logic "OR"). When SUMMARY is composed, the combined inference of a fuzzy subset is constructed as a pointwise sum over all fuzzy subsets assigned to the inference variable by the inference rules.

4. In conclusion (optional) - clearing(defuzzification), which is used when it is useful to convert a fuzzy set of outputs into a crisp number. There are a large number of sharpening methods, some of which are discussed below.

Example.Let some system be described by the following fuzzy rules:

P1: if X is A, then ω have D,

P2: if at is B, then ω there is E

P3: if z is C, then ω is F, where x, y and z— names of input variables, ω is the name of the output variable, and A, B, C, D, E, F are the given membership functions (triangular shape).

The procedure for obtaining a logical conclusion is illustrated in Fig. 1.9.

It is assumed that the input variables have taken some specific (clear) values ​​− x o,yabout and z about.

In accordance with the above steps, at step 1 for these values ​​and based on the membership functions A, B, C, the degrees of truth are found α (x o), α (at o)and α (z o) for the premises of each of the three given rules (see Fig. 1.9).

At stage 2, the membership functions of the conclusions of the rules (i.e. D, E, F) are “cut off” at the levels α (x o), α (at o) and α (z o).

At stage 3, the membership functions truncated at the second stage are considered and they are combined using the operation max, resulting in a combined fuzzy subset described by the membership function μ ∑ (ω) and corresponding to the logical conclusion for the output variable ω .

Finally, at the 4th stage - if necessary - a clear value of the output variable is found, for example, using the centroid method: the clear value of the output variable is determined as the center of gravity for the curve μ ∑ (ω), i.e.

Consider the following most commonly used modifications of the fuzzy inference algorithm, assuming, for simplicity, that the knowledge base is organized by two fuzzy rules of the form:

P1: if X is A 1 and at is B 1 , then z is C 1 ,

P2: if X is A 2 and at is B 2 , then z is C 2 , where x and at— names of input variables, z- output variable name, A 1, A 2, B 1, B 2, C 1, C 2 - some given membership functions, with a clear value z 0 to be determined based on the information provided and clear values x 0 and at 0 .

Rice. 1.9. Illustration for the inference procedure

Mamdani algorithm

This algorithm corresponds to the considered example and Fig. 1.9. In the situation under consideration, it can be mathematically described as follows.

1. Fuzziness: there are degrees of truth for the premises of each rule: A 1 ( x 0), A 2 ( x 0), B 1 ( y 0), B 2 ( y 0).

2. Fuzzy inference: "cutoff" levels are found for the preconditions of each of the rules (using the MINIMUM operation)

α 1 = A 1 ( x 0) ˄ B 1 ( y 0)

α 2 = A 2 ( x 0) ˄ B 2 ( y 0)

where “˄” denotes the operation of the logical minimum (min), then the “truncated” membership functions are found

3. Composition: using the MAXIMUM operation (max, hereinafter referred to as "˅"), the found truncated functions are combined, which leads to obtaining final fuzzy subset for an output variable with a membership function

4. Finally, reduction to clarity (to find z 0 ) is carried out, for example, by the centroid method.

Tsukamoto algorithm

The initial premises are the same as in the previous algorithm, but in this case it is assumed that the functions C 1 ( z), С 2 ( z) are monotonic.

1. The first stage is the same as in the Mamdani algorithm.

2. At the second stage, first (as in the Mam-dani algorithm) the “cut-off” levels α 1 and α 2 are found, and then by solving the equations

α 1 = C 1 ( z 1), α 2 = C 2 ( z 2)

- clear values ​​( z 1 and z 2 ) for each of the original rules.

3. A clear value of the output variable is determined (as a weighted average z 1 and z 2 ):

in the general case (discrete version of the centroid method)

Example. Let we have A 1 ( x 0) = 0.7, A 2 ( x 0) = 0.6, B 1 ( y 0) = 0.3, V 2 ( y 0) = 0.8, corresponding cutoff levels

a 1 = min (A 1 ( x 0), B 1 ( y 0)) = min(0.7; 0.3) = 0.3,

a 2 = min (A 2 ( x 0), B 2 ( y 0)) = min(0.6; 0.8) = 0.6

and values z 1 = 8 and z 2 = 4 found as a result of solving equations

C 1 ( z 1) \u003d 0.3, C 2 ( z 2) = 0,6.


Rice. 1.10. Illustrations for the Tsukamoto algorithm

At the same time, the clear value of the output variable (see Fig. 1.10)

z 0 \u003d (8 0.3 + 4 0.6) / (0.3 + 0.6) \u003d 6.

Sugeno algorithm

Sugeno and Takagi used a set of rules in the following form (as before, here is an example of two rules):

R 1: if X is A 1 and at is B 1 , then z 1 = a 1 X + b 1 y,

R 2: if X is A 2 and at is B 2 , then z 2 = a 2 x+ b 2 y.

Algorithm representation

2. At the second stage are α 1 = A 1 ( x 0) ˄ B 1 ( y 0), α 2 \u003d A 2 ( x 0) ˄ В 2 ( at 0) and individual rule outputs:

3. In the third stage, a clear value of the output variable is determined:

Illustrates the algorithm in Fig. 1.11.

Rice. 1.11. Illustration for the Sugeno algorithm

Larsen algorithm

In the Larsen algorithm, fuzzy implication is modeled using the multiplication operator.

Description of the algorithm

1. The first stage is like in the Mamdani algorithm.

2. At the second stage, as in the Mamdani algorithm, the values ​​are first found

α 1 = A 1 ( x 0) ˄ B 1 ( y 0),

α 2 \u003d A 2 ( x 0) ˄ В 2 ( y 0),

and then private fuzzy subsets

α 1 C 1 ( z), a 2 C 2 (z).

3. The final fuzzy subset with the membership function is found

µs(z)= FROM(z)= (a 1 C 1 ( z)) ˅ ( a 2 C 2(z))

(in general n rules).

4. If necessary, reduction to clarity is performed (as in the previously considered algorithms).

The Larsen algorithm is illustrated in Fig. 1.12.


Rice. 1.12. An illustration of the Larsen algorithm

Simplified Fuzzy Inference Algorithm

The initial rules in this case are given in the form:

R 1: if X is A 1 and at is B 1 , then z 1 = c 1 ,

R 2: if X is A 2 and at is B 2 , then z 2 = With 2 , where c 1 and since 2 are some ordinary (clear) numbers.

Description of the algorithm

1. The first stage is like in the Mamdani algorithm.

2. At the second stage, the numbers α 1 = A 1 ( x 0) ˄ B 1 ( y 0), α 2 = A 2 ( x 0) ˄ B 2 ( y 0).

3. At the third stage, a clear value of the output variable is found according to the formula

or - in the general case of the presence n rules - according to the formula

An illustration of the algorithm is shown in fig. 1.13.


Rice. 1.13. Illustration of a simplified fuzzy inference algorithm

Refinement methods

1. One of these methods has already been considered above - troid. We present the corresponding formulas again.

For continuous option:

for the discrete option:

2. The first maximum (First-of-Maxima). The clear value of the output variable is found as the smallest value at which the maximum of the final fuzzy set is reached, i.e. (see fig. 1.14a)


Rice. 1.14. Illustration for methods of reduction to definition: α - the first maximum; b - average maximum

3. Average maximum (Middle-of-Maxima). A clear value is found by the formula

where G is the subset of elements that maximize C (see Figure 1.14 b).

Discrete option (if C is discrete):

4. The maximum criterion (Max-Criterion). A clear value is chosen arbitrarily among the set of elements that deliver the maximum C, i.e.

5. Heightdefuzzification. Elements of the domain of definition Ω for which the values ​​of the membership function are less than a certain level α are not taken into account, and a clear value is calculated using the formula

where Сα is a fuzzy set α -level (see above).

Top-Down Fuzzy Inference

The fuzzy inferences considered so far are bottom-up inferences from the premises to the conclusion. AT last years top-down inferences are beginning to be used in diagnostic fuzzy systems. Let's consider the mechanism of such a conclusion using an example.

Let's take a simplified model for diagnosing a car malfunction with variable names:

X 1 - battery failure;

x 2 - working off engine oil;

y 1 - difficulty starting;

y 2 - deterioration in the color of exhaust gases;

y 3 - lack of power.

Between x i and y j there are unclear causal relationships rij= x iy j, which can be represented as some matrix R with elements rijϵ . Specific inputs (premises) and outputs (conclusions) can be considered as fuzzy sets A and B on the spaces X and Y. The relations of these sets can be denoted as

AT= BUTR,

where, as before, the sign "o" denotes the composition rule for fuzzy inferences.

In this case, the inference direction is the reverse of the inference direction for the rules, i.e. in the case of diagnostics, there is (given) a matrix R(expert knowledge), exits observed AT(or symptoms) and inputs are defined BUT(or factors).

Let the knowledge of an expert auto mechanic have the form

and as a result of the inspection of the car, its condition can be assessed as

AT= 0,9/y 1 + 0,1/at 2 + 0,2/at 3 .

It is required to determine the cause of this condition:

A =a 1 /x 1 + a 2 /x 2 .

The ratio of the introduced fuzzy sets can be represented as

or, transposing, in the form of fuzzy column vectors:

When using (max-mix)-composition, the last ratio is converted to the form

0.9 = (0.9 ˄ α 1) ˅ (0.6 ˄ α 2),

0.1 = (0.1 ˄ α 1) ˅ (0.5 ˄ α 2),

0.2 = (0.2 ˄ α 1) ˅ (0.5 ˄ α 2).

When solving this system, we note first of all that in the first equation the second term on the right side does not affect the right side, therefore

0.9 \u003d 0.9 ˄ α 1, α 1 ≥ 0.9.

From the second equation we get:

0.1 ≥ 0.5 ˄ α 2 , α 2 ≤ 0.1.

The resulting solution satisfies the third equation, so we have:

0.9 ≤ α 1 ≤ 1.0, 0 ≤ α 2 ≤ 0.1,

those. it is better to replace the battery (α 1 is the battery failure parameter, α 2 is the engine oil waste parameter).

In practice, in tasks similar to the one considered, the number of variables can be significant, different compositions of fuzzy inferences can be used simultaneously, the inference scheme itself can be multi-stage. General Methods Solutions to such problems do not seem to exist at the present time.

Fuzzy sets. linguistic variable. Fuzzy logic. Fuzzy conclusion. composition rule of inference.

(Abstract)

The concept of a fuzzy set (NS) is based on the notion that elements of a certain set that have a common property can have different degrees of degeneracy of this property and, consequently, different degrees of belonging to this property.

Let U be some set. A fuzzy set à in U is a collection of pairs of the form ((µ à (u), u)), where u U, µ à .

The value µ Г is called the degree of membership of the object in the fuzzy set U.

µ Ã : U 

µ Ã is called the membership function.

An example of fuzzy sets is the age of people (Fig. 19.1).

By analogy with traditional set theory, the NM Theory defines the following operations:

An association:

, where

Enumeration:

,

Addition:

Algebraic product:

, where

An n-ary fuzzy relation defined on sets is a fuzzy subset of Cartesian products

Since a fuzzy relation is a set, all operations defined for fuzzy sets are valid for it. In practical applications of the theory of fuzzy sets, the composition of fuzzy relations plays an important role.

Composition of fuzzy relations

Let 2 two-place fuzzy relations be given:

The composition of fuzzy relations is determined by the following expression:

Membership Degrees of Specific Expressions

Linguistic variable - is a five X - variable name (age), U - basic set (0 ... 150), T (x) - term of the set. Sets of linguistic meanings (young, middle-aged, elderly, old). Each linguistic value is a label of a fuzzy set defined on U. G is a syntactic rule that generates the linguistic value of the variable X (very young, very old). M is a semantic rule that assigns to each linguistic value a fuzzy subset of the base set, that is, a membership function.

A fuzzy statement is a statement about which this moment time, one can judge the degree of its truth or falsity. Truth takes a value in the interval . A fuzzy statement that does not allow division into simpler ones is called elementary.

A fuzzy statement built on elementary ones using logical connectives is called a compound fuzzy statement. Logical connectives correspond to operations on the truth of fuzzy statements. - the degree of truth of specific statements.

2)

Thus, the algebra of fuzzy sets is isomorphic to the algebra of fuzzy propositions.

4) implication operation

Several definitions have been proposed for the implication operation in fuzzy logic. Main:

1)

2)

3)

5) Equivalence

An n-place fuzzy predicate defined on the sets U 1 , U 2 ,…,U n is an expression containing the subject variables of these sets and turning into fuzzy statements when the subject variables are replaced by elements of the sets U 1 , U 2 ,…,U n .

Let U 1 , U 2 ,…,U n be basic sets of linguistic variables, and let the yen of linguistic variables act as symbols of subject variables. Then examples of fuzzy predicates are:

    "pressure in the cylinder is low" - one-place predicate

    “the temperature in the boiler is much higher than the temperature in the heat exchanger” - a two-place predicate.

If U k \u003d 1.5, therefore "pressure in the boiler is low" \u003d 0.7

In the construction and implementation of fuzzy algorithms, the compositional inference rule plays an important role.

Let be a fuzzy mapping

A fuzzy subset of the universe U then generates in V a fuzzy subset

the compositional inference rule is the basis for constructing a logical inference in fuzzy logic.

Let a fuzzy statement  be given, where and are fuzzy sets. Let also some statement (close to A, but not identical to it) be given.

In classical logic, the Modus Ponens inference rule is widely used

This rule is generalized to the case of fuzzy logic as follows:

Let the set and be defined on the base set X, and on the base set Y. It is natural to assume that the statement if defines some fuzzy mapping from the set X to Y

Then, in accordance with the compositional inference rule, we have:

The relation is built on the basis of the definition of the implication operation in fuzzy logic.

1)

If the temperature in the boiler is low (), then the heating is increased ()

Real fuzzy logic algorithms contain not one, but many production rules

If S 1 , then R 1 , otherwise

If S n , then R n , otherwise

Therefore, fuzzy relationships must be built for each individual rule and then aggregated by superimposing each other

Either min or max is chosen as an aggregating operation, depending on the type of implication. compositional output (rule convolutions). In the considered logical system, the prerequisites are determined linguistic variables A1, A2, A3, and the conclusion - linguistic variable ...

  • Methodology fuzzy control of an autonomous photowind energy system

    Abstract >> Informatics

    one fuzzy or linguistic variable, fuzzy function or fuzzy relation. Then fuzzy ... fuzzy implication. Actually fuzzy conclusion in fig. 2 is the use of maxmin composition as compositional regulations fuzzy output ...

  • ...based on an agent-based approach and conversational logician

    Dissertation >> Informatics, programming

    ... output on the dialogue work of polysemantic and fuzzy logician ... linguistic ... logic small dimension, however, with increasing power sets truth values ​​construction and use rules output... values variables educated...

  • "Alor-Trade" system

    Thesis >> Financial sciences

    The icon is rule compositional output (rule convolutions) /3/. In the considered logical system, the prerequisites are determined linguistic variables, and the conclusion is linguistic variable B. In each ...

  • Management Decision Cheat Sheets

    Cheat sheet >> Management

    From sets subjective factors - logics... are values linguistic variable X. Suppose that lots of solutions are characterized ... determined on the basis of compositional regulations output: G \u003d Aº D, where G - fuzzy subset of interval I. ...

  •