FUZZY
_
sets and systems
II Fuzzy Sets and Systems 78 (1996) 51 72
ELSEVIER
A new approach of multi-stage fuzzy logic inference Hung-Pin Chen*, Tai-Ming Parng Department of Electrical Engineering, National Taiwan University, Taipei 10764. Taiwan, ROC
Received July 1994; revised January 1995
Abstract
In general multi-stage fuzzy logic inference, there are three kinds of linguistic variables: input, output, and intermediate variables. When intermediate variables are present in a set of fuzzy rules to form multi-stage fuzzy rules, the inferring time involved is understandably lengthened. To achieve fast reasoning of multi-stage fuzzy logic, the number of fuzzy set operations of input, output, and intermediate variables must be decreased as much as possible without information loss. For the intermediate variables, the fuzzy logic operations of overlapped fuzzy value pairs on several multi-stage fuzzy rules may be pre-computed at compiling time. Furthermore, if the pre-computations have been done, the numbers of intersection and union scalar operations must also decrease in order to speed up reasoning at execution time. Moreover, whether fuzzy logic operations of multi-stage fuzzy rules are pre-computed or not, the types of fuzzy logic operators must be considered. Failing to do so may lead to information error. By using the Truck-Trailer Backer-Parking System, improvements over related methods are attained. Keywords." Approximate reasoning; Fuzzy control; Multi-stage fuzzy logic inference; Truck-and-trailer system
1. Introduction
The multi-stage fuzzy logic inference plays an important rote in human intelligent activities. When humans engage in complex activities and make decisions, the approximate, qualitative aspects of human knowledge are hierarchically organized to provide concept association and reasoning. On the other hand, if the approximate aspects are flattened in making single-stage fuzzy logic inference, the computational complexity will increase. As the number of variables grows, the number of rules in a conventional complete rule set goes up exponentially 1-11, 12]. Under such circumstances, the single-stage approach calls for time-consuming calculation. By using hierarchical structure, the number of rules will increase linearly (not exponentially) with the number of variables [-11, 12]. Therefore, human intelligent activities are efficiently performed by using multi-stage fuzzy logic inference I-1-4, 10-15]. In general multi-stage fuzzy logic inference, there are three kinds of linguistic variables: input, output, and intermediate variables. Input variables appear only in antecendent parts (i.e., if-parts) of fuzzy rules, while
* Corresponding author. 0165-0114/96/$15.00 (c 1996 ElsevierScienceB.V. All rights reserved SSDI 0165-01 14(95)001 10-7
52
H.-P. (?'hen, T.-M. Parng / Fuzzy Sets and Svstems 78 (1996) 51 ~72
output variables are found only in consequent parts (i.e., then-parts). The other variables are called intermediate variables. If a set of fuzzy rules contain intermediate variables, the rules are called multi-stage fuzzy rules. From a systematic point of view, intermediate variables refer to approximate outputs in the current stage when humans are engaged in a complex activity such as decision-making. This is because as they are so engaged, they usually chose the most influential parameters as input variables in the first stage, the next most important parameters in the second stage, and so on [11, 12]. In rule representation, intermediate variables are included in then-parts in the current stage and in if-parts in the next stage. The if-part variables in the current stage include the intermediate variable(s) of the previous stage and input variables. Thus, in mimicking human knowledge by using intermediate variables, approximate (or qualitative) concepts, which in some way are related to the system goals, are created in hierarchical structure. These approximate, qualitative concepts are hierarchically organized to provided concept association and reasoning. An example by using the intermediate variable is depicted in Section 5 (the qSi intermediate variable). The time involved in multi-stage fuzzy logic inference is usually longer. Fuzzy rules of multi-stage fuzzy logic are usually inferred in the following way. When facts are given, those fuzzy rules which contain input variables are inferred. The consequences of intermediate variables in the current stage are passed on to the next stage as facts. Thus, the multi-stage fuzzy rules are inferred stage by stage. Finally, when all fuzzy rules have been inferred, the conclusions of output variables are computed. In a conventional reasoning method, there are a large number of fuzzy set operations including (1) the match-degree calculations for input variables, (2) the conclusion formulations and defuzzification operations for output variables, and (3) for intermediate variables, the conclusion formulations in the current stage and the match-degree calculations in the next stage. Since those operations in a conventional reasoning method make the calculations more complex as well as time consuming, how to shorten inferring time is an important issue in multi-stage fuzzy logic research. To achieve fast reasoning of multi-stage fuzzy logic, the number of fuzzy set operations of input, output, and intermediate variables must be reduced as much as possible. The number of the match-degree calculations for input variables and the conclusion formulations and defuzzification operations for output variables may decrease. For the intermediate variables, the fuzzy logic operations on several multi-stage fuzzy rules may be pre-computed at compiling time. Furthermore, if the pre-computations have been done, the numbers of intersection and union scalar operations must also decrease in order to speed up reasoning at execution time. Thus, the time involved in multi-stage fuzzy logic inference can be effectively reduced. There are two studies related to pre-computing the fuzzy logic operations: (1) the compacting rules by Bugarin et al. [1, 2] and (2) the propagation of linguistic truth values by Uehara and Fujise [14, 15]. In the approach presented in [1], the consequence of a single fuzzy rule in the current stage is passed on to the next stage as a fact, but this approach does not address the problem in solving multiple fuzzy rules with the same intermediate variable. Although the problem is solved by Bugarin and Barro [2], the complexity of those algorithms is too high, which is O((C/2 + M + N)R 2) for the "complete information" case, where R is the number of fuzzy rules, M and N the maximum numbers of antecedents and consequents in the rules and C the number of chaining operations. Uehara and Fujise [14, 15] deal with the above problem by moving the fuzzy values of if-parts of fuzzy rules in the current stage to the then-parts in the previous stage to pre-compute the match degrees of the same intermediate variable. But the computational complexity is too high. In the approach [14, 15] the numbers of pre-computations and run-time scalar operations for the same intermediate variable are equal to the product of the numbers of fuzzy rules in the current and previous stages. Since the number of fuzzy rules is proportional to the numbers of linguistic variables [11,123 and/or fuzzy values, the numbers of pre-computations and run-time scalar operations may greatly increase when application systems have either many intermediate variables or numerous fuzzy values of the intermediate variable(s). Moreover, whether fuzzy logic operations of multi-stage fuzzy rules are pre-computed or not, the types of fuzzy logic operators must be considered because the pre-computations are based on the associative and
H.-P. Chert, T.-M. Parng / Fuzzy Sets and 51vsterns 7~ (1996) 51 72
53
distributive operations of fuzzy logic operators. If different types of intersection operators are used in then-parts and if-parts of multi-stage fuzzy rules, the pre-computations cannot be performed for the intermediate variables because the associative and distributive operations do not work. Thus, the multi-stage fuzzy rules are inferred only stage by stage. Otherwise, information errors (loss) will result in precomputations. (For detailed discussion, see Section 2.) However, the related research does not take these cases into account. In this paper, we present a new approach to reducing the number of computations without any loss of information for both fuzzy rules and fuzzy values. In this approach, the reduced computations are performed for input, output, and intermediate variables. For input variables, the fuzzy set operations are reduced by applying the following rules: (1) the input fact is not broadcast to if-parts of fuzzy rules to evaluate match degrees. Match-degree computations are evaluated only on the common ranges of the fact and fuzzy values for the same input variable; (2) the computed match degrees are broadcast to if-parts to evaluate firing strengths of fuzzy rules. The redundant match-degree calculations are removed in common if-clauses. For output variables, the calculations of the same fuzzy value in the 'then-part' of different rules can be omitted to reduce fuzzy set operations. If some fuzzy rules have the same then-clause, only the result derived with the maximum firing strength among them is effective. These techniques save many fuzzy set operations for input and output variables. For intermediate variables, the computations are reduced by pre-processing the fuzzy logic operations of overlapped fuzzy values contained in both then-parts in the current stage and if-parts in the next stage. The resulting number of pre-computations is equal to the number of overlapped fuzzy value pairs. (How to calculate the value of [3 in precomputations is shown in Formula (12) of Section 4.31. In the meanwhile, at executation time the number of the intersection ( A ) scalar operations is only twice that of overlapped fuzzy value pairs, whereas the number of the union (Max) scalar operations just equals that of fuzzy values of the intermediate variable. On the other hand, when different types of intersection operators are used in then-parts and if-parts of multi-stage fuzzy rule, pre-computations for intermediate variables do not work. In that case our methods for processing input and output variables are also applicable to the processing of intermediate variables. Specifically, the method for processing input variables is applied to the if-parts of intermediate variables(s) at any stage, whereas the method for processing output variables is applied to the then-parts. Although in the latter case the pre-computations are not performed for intermediate variables, fuzzy set operations are reduced as much as possible. By using the Truck-and-Trailer Backer-Parking Control System, the simulation results show that the number of computations in our method is much smaller relative to previous studies [2, 14, 15]. In other words, the numbers of either fuzzy values or overlapped fuzzy value pairs for an intermediate variable is actually smaller than the product of the numbers of two adjacent stage fuzzy rules which contain the intermediate variable. As a result, not only the number of pre-computations at compiling time but also A and Max scalar operations at execution time are quite small. For the rest of this paper, Section 2 describes the basis of fuzzy logic inference, Section 3 proposes the multi-stage fuzzy logic inference network, Section 4 presents mathematical formulation for fast reasoning of multi-stage fuzzy logic, Section 5 applies the Truck-and-Trailer Backer-Parking System, and Section 6 makes concluding remarks.
2. Basics of multi-stage fuzzy logic inference In multi-stage fuzzy logic inference, various fuzzy logic operators may be used in fuzzy rules. Relationship between fuzzy logic operators will influence the reasoning process of multi-stage fuzzy rules. In this section, the distribution and association laws of fuzzy logic operators are described. Next, the multi-stage fuzzy logic inference is made.
H.-P. Chen, T.-M. Parng / Fuzzy Sets and Systems 78 (1996) 51-72
54
2.1. F u z z y logic operators in multi-stage f u z z y rules
For fuzzy logic operations, there are alternative operators that are proposed as intersection and union operators. The various types of fuzzy logic operators have been defined and used in [5, 6] when inferring fuzzy rules. The T - n o r m and S - n o r m fuzzy logic operators (Ti and Si, i e {0, ..., 3}) [16] are commonly chosen for the operators of intersection and corresponding union operations. They are summarized in Table 1. In some applications, fuzzy logic operators may be different types of T-norm operators in both if-parts and then-parts of fuzzy rules. For example, logic product operators are used in if-parts of fuzzy rules [8, 9, 18], but in then-parts, algebraic product operators are used [8, 18] and bounded product operators are also used [9]. In the meanwhile, different types of fuzzy logic operators may also be used in multi-stage fuzzy rules. The composition of two fuzzy logic operators in multi-stage fuzzy rules may or may not be performed by using distributive and associative operations. Whether the distributive and associative operations of two fuzzy logic operators work or not must be carefully deliberated. They are described in the following. First, the existence of the distribution law for fuzzy logic operators, #a A (pn V Pc) = (lAA A lAB) V (lAA A lAc), is shown in Table 2. There exist only T~ operators, i e {0,..., 3} distributed to So operator. Next, the existence of the association law for fuzzy logic operators, Pa A (P8 A Pc) = (lAA A PB) A lAc, is shown in Table 3. There exist only Ti operators, i c {0..... 3} themselves. For proofs and more details of some examples, see lemmas described in Appendices. 2.2. M u l t i - s t a g e f u z z y logic inference
A simple architecture for fuzzy logic inference is shown in Fig. 1. The dynamic behaviors of an external system are measured by a set of sensors. The system actions are controlled by control signals through a set of adjusters. This architecture consists of five elements: (1) fuzzifier, (2) data base of membership function definition, (3) rule base of fuzzy rule description, (4) inference engine, and (5) de-fuzzifier. These functions are
Table 1 The most widely used fuzzy logic operators T-norm: product (intersection)
S-norm:sum (union)
Logical Algebraic Bounded
To: a A b = minla,b)
So: a V b = max(a,b)
Drastic
T3:aA b=
TI: a'b = ab Te:aQ) b = O V ( a + b -
Table 2 Distribution law of T-norm to S-norm operators
$1: aq-b = a + b - ab
1)
S2:aOb= 1 A(a+b)
a ifb=l b if a = 1 0 otherwise
S3:a Vb=
{ a ifb=O b if a=O 1 otherwise
Table 3 Association law of T-norm operators
So 0 0 0
$1 × x x
$2 x × x
$3 × × x
To TI T2
To 0 x x
TI × 0 x
Tz × x 0
7"3
To T1 T2 Ts
0
x
x
x
Ts
x
x
x
0
x x x
H . - P . Chen, T - M . P a r n g / F u z z v
Function
S e t s a n d S y s t e m s 78 (1996) 51
|
72
55
""
Definition J
! $
i --@
...... I
.
.
.
.
.
.
................................. t.....
(sensors)
System
(adjusters)
Fig. 1. A simple architecture of fuzzy logic inference. described as follows. (1) In multi-stage fuzzy logic inference, fuzzifiers are needed for input variables. In coding the value from the sensor, the fuzzifier transforms the value of the sensor measurement into a corresponding universe of discourse for each input variable. This process is commonly called fuzzification. Usually, the fuzzifier may transform the measured value into either a singleton or a fuzzy value (i.e., a fuzzy number) as an input fact. For an input fact, a measured value (i.e., a crisp value) from a real world device can usually be fuzzified into a fuzzy value by taking into account the typical error information specified by the manufacturer of the device. Therefore, a singleton is simplified by the fuzzifier and is a special case of the fuzzy value. By way of illustration, the input facts, such as fuzzy value A and singleton/~, are shown in Fig. 2(a). (2) Proposition variables take fuzzy subsets as fuzzy values or linguistic values. Each fuzzy value corresponding to a fuzzy subset, which is represented to domain elements and degrees associated with its domain elements, must be defined. As an example, the fuzzy values like Ai, Bi, C s, 1 <~ i <~ 3, j = 1, 2 are shown in Fig. 2(a). (3) Fuzzy rules are used to express knowledge. In general multi-stage fuzzy logic inference, three kinds of linguistic variables are used in fuzzy rules. They are input, output, and intermediate variables. Input variables appear only in the if-parts of fuzzy rules, while output variables are found only in the then-parts. Any other variables are called intermediate variables. If some fuzzy rules contain intermediate variables, the fuzzy rules are called multi-staoefuzzy rules. In the following description, a multi-stage fuzzy logic inference system with d stages has m number of fuzzy rules. In the set of fuzzy rules the rth stage has n, if-parts (x,, ~ ..-x .... ) and p, then-parts (x(r+ 1). 1"" x(r+ l},p,) variables. The ith fuzzy rule of multi-stage fuzzy logic has the following general form derived from [1, 2, 4, 11, 12, 14, 15] R;: i f x x , l i S A i,1 1 ..- and
Xl,nl
i s A i,,~ ~ "" and
x,.1 is A l l "" and x .... is A'i.,... and Xd, 1
is
AqI. 1 " -. and
then x2,1 is B i,1 1
""•
Xd, na
and
is Aql, na
X2.pl
is B.~,Pl ~ " .. and
x~,+1).1 is B[I ... and x(,+l).p, is
B~,p . . .
x{~+11,1 is B~, a -.. and x(s+a),v~ is BSp~
and (1)
56
H.-P. Chert, T-M. Parng / Fuzzy Sets and Systems 78 (1996) 51-72
l'01 P
..........
Aa
.
[
B2
P A1
CI ~'v1
, B1
''',
.
~
A--
[
.
C2
0
.
= 01U
O~
/
P
A2
B3
J
02
~
.4.
(a)
Layer 1
Layer 2
Stage 1 Layer 3
Layer 4
U
~'6{L--.,q[}
A
a,.*-v,-
I~FV,(®(.+,).,)("+' k )), ifa[,T, ~ > 0
(b) Fig. 2. (a) The original fuzzy inference method. (b) The proposed equivalent inference method.
where x14 (j = 1, ... ,nl) and xr4 (r = 2 . . . . . d;j = 1. . . . . nr) in if-parts are input and intermediate linguistic variables defined on the universe of discourse Ux, j and Ux,.j, respectively; X~,+~.k (r = 1 . . . . , d - 1; k = 1,...,p,) and x~+ ~).k (r < s ~< d; k = 1. . . . . p~) in then-parts are intermediate and o u t p u t linguistic variables defined on the universe of discourse U ........ and U ..... ,k, respectively; A[.j and B[,k, (r = 1, 2 . . . . , d; i = 1. . . . . m; j = 1,..., n,; k = 1,... ,pr) are fuzzy values defined on the universe of discourse Ux,.~ and Ux,,+,.~, respectively, which are used in fuzzy rules to describe linguistic concepts; Pab and pn~., are the membership functions of A [ j and B[ k, respectively; 'x,, j is A74' and 'x~, + ~).k is B[ k' are called if-clause and then-clause, respectively. F o r fuzzy rules, the linguistic variables involved in if-parts have input and intermediate variables, whereas the ones in then-parts have intermediate and o u t p u t variables. F o r fuzzy rule description given in F o r m u l a (1) each fuzzy rule has at least one if-clause in if-part and one then-clause in then-part. (4) As for facts, they can be stated as follows: Facts:
x1, 1 is A~, x l , z is A~
. . . . . Xl,.~ is A~,.
(2)
H.-P. Chen. T.-M. Parng / Fuzzy Sets and Systems 78 (1996) 51-72
57
When facts are given, the fuzzy rules in the first stage are inferred. Then the consequences of intermediate variables in an inference stage are formulated before they are passed on to the next stage as facts, where ,4),s ( j ' = 1,2 ..... nl), fuzzy values defined on the universe of discourse Ux,,j, are input facts; A~s (2 ~< r ~< d; j = 1, 2. . . . . n,), fuzzy values defined on the universe of discourse Uxr,, are facts; ~jLand/~i: are the membership functions of,4~ and A~~i, respectively; finally, the conclusions B] ~ of X~s+ 11.1, BS2 of x~ + 1~2 Bp., ~2 of x~,~+~.p~ are obtained, where/3], (1 ~< s 4 d; k = 1,2 .... ,p~) are fuzzy subsets. The diagrammatic explanation of the inference process is shown in Fig. 2. (5) The de-fuzzification process decides for each output variable a single value. The de-fuzzification process for an output variable xls+l~.p ~ is generally performed using the center ~[" ,qravity (COG) method. . . . . .
3. The proposed multi-stage fuzzy logic inference network In the original method, some computations are redundant in inferring fuzzy rules such as match-degree evaluations and then-clause derivations. Furthermore, some pre-computations and scalar operations at execution time in multi-stage fuzzy rules are redundant, too. In this section, we first propose the fuzzy logic inference network (FLIN). Then the reasoning algorithms based on the F L I N are presented. Finally, a simple example of the proposed method is presented.
3.1. Proposed fuzzy logic inference network For simplicity, we assume that the fuzzy logic inference system under consideration has two input xl and x2 and one output y variables at inference stage 1 and three fuzzy rules. The original reasoning method is shown in Fig. 2(a). The equivalent architecture proposed is shown in Fig. 2(b), where node functions in the same layer are of the same type, to be described in the following. Layer 1: The node function in this layer is the match-degree evaluation for every fuzzy value with the fuzzy fact of the same linguistic variable. The match-degree evaluations are fuzzy set operations. The A operators of the match-degree evaluations are the T-norm operators, Ti, i ~ {0.... ,3}. Layer 2: The node function in this layer is the firing strength evaluation of each rule. The firing strength evaluations are scalar operations to take match-degrees as inputs. The type of every A operator of the firing strength evaluation is the same as the one in layer 1. Layer 3: The node function in this layer is the maximum firing strength for some rules corresponding to the same then-clause. The maximum firing strength evaluation is a scalar operation to take firing strengths of fuzzy rules as inputs, where these fuzzy rules have the same then-clause. In this layer the max operator is only the So operator. Layer 4: The node function in this layer is the fuzzy value derivation and conclusion formulation in every then-part of the linguistic variable. The fuzzy value derivation is only for the fuzzy value associated with a non-zero firing strength. The operators used in fuzzy value derivations are 7",. operators, i ~ [0 . . . . . 31. Finally, the derived fuzzy values are united with union operations to arrive at the conclusion. Thus, we have constructed a fuzzy logic inference network which is equivalent to the original reasoning method. In inferring multi-stage fuzzy rules, different types of fuzzy logic operators can be used in if-parts and then parts at any inference stage. In order to induce an equally efficient reasoning method, the distribution and association laws of fuzzy logic operators are commonly used to reduce computations. In other words, the reduce computation method is dependent on whether the distribution and association laws are satisfied with the fuzzy logic operators or not.
58
H.-P. Chen, T.-M. Parng / Fuzzy Sets and Systems 78 (1996) 51-72
3.2. Fast reasoning algorithms of multi-stage fuzzy rules If t-norm operators which are of the same type are used in then-parts and if-parts, the fuzzy logic operations of overlapped fuzzy value pairs may pre-compute for all intermediate variables. The reasoning algorithm is as follows.
Algorithm Pre-computation () {/* for all intermediate variables */ for (stage i) {/* 2 ~< i */ FV-pre-computations();/* The way to calculate the pre-computations of overlapped fuzzy value pairs is presented in Theorem 2 of subsection 4.3 */ } / * end for */ }/* end Pre-computation() */ When facts are given, those fuzzy rules which contain the input variables are inferred. For an intermediate variable, if t-norm operators which are of the same type are used in if-parts and then-parts of multi-stage fuzzy rules, the fuzzy logic operations may pre-compute. Otherwise, the consequence in the current stage is passed on to the next stage as a fact. Thus, the multi-stage fuzzy rules are inferred stage by stage. Finally, when all fuzzy rules have been inferred, the conclusions of output variables are obtained. A new approach to fast reasoning of multi-stage fuzzy rules can be described as follows:
Algorithm Multistage-Fuzzy-Logic-Inference() { while (not halt) { Input-fuzzy();/* Fuzzification process for input data to get input fact */ FV-evaluate();/* Layer 1 to get match-degrees for all input variables */ If-part-evaluate();/* Layers 2 and 3 at stage 1 to get Maximum firing strengths */ /* For intermediate variables as follows: */ If t-norm operators which are of the same type are used in if-parts and then-parts, then call Pre-computed-Multistage( ); else call Stage-by-stage-computation( ); Then-part-evaluate();/* Layer 4 at any stage for all output variables */ Defuzzify-output();/* to obtain the defuzzification results for all output variables */ }/* end while */ }/* end Multistage-Fuzzy-Logic-Inference() */
Algorithm Stage-by-stage-computation() {/* for all intermediate variables */ for (stage i) {/* 2 ~< i */ Then-part-evaluate();/* Layer 4: Consequences at stage (i - 1). Some of them are input facts at stage i for intermediate variables. */ FV-evaluate();/* Consequences at stage (i - 1) and fuzzy values at stage i */ If-part-evaluate();/* Layers 2 and 3 at stage i */ }/* end for */ }/* end Stage-by-stage-computation0 */
Algorithm Pre-computed-Multistage() {/* for all intermediate variables */ for (stage i) {/* 2 ~< i */ A -operations();/* product pre-computed degrees with (i - 1)-th stage firing strengths */ max-operations();/* evaluate match-degrees C~h(Xl,;)iat stage i */
H.-P. Chen. 7~-M. Parng / Fuzzy Sets and Svstems 78 (1996) 51-72
59
If-part-evaluate();/* to get Maximum firing strengths at stage i */ } / * end for */ } / * end Pre-computed-Multistage() */
3.3. An example An example by means of graphic representation is presented to give an intuitive explanation that describes the inference process of our method. The fuzzy system has three input variables x l, x2, and xs; two output variables x3 and x6; one intermediate variable x4. The fuzzy values of the above variables are {A1, A2, A3}, { B 1, B 2, B 3 }, {El, E2, E3} , {C1, C2, C3} , {El, F2, F3} , and {D1, O2, 03 }, respectively. There are 11 fuzzy rules as follows: RI" if Xl is A1 and x2 is B1 then x3 is Ca and x4 is D1
R2" if Xl is A2 and x2 is B1 then Xa is C1 and x4 is D2 R3: if xl is A2 and x2 is B2 then x3 is C3 and x4 is D2 R4: if xl is A3 and x2 is B2 then x3 is C2 and x4 is D3 Rs" if Xl is A3 and x2 is Ba then x3 IS C3 and x4 is DI R6: if x4 is D1 and x5 is E2 then x6 is F1 RT" if x4 is D2 and x5 is E1 then x6 is F3 Rs: if x4 is D3 and xs is E1 then x6 is F 2 R~: if x,~ is O 2 and x5 is E3 then x6 is F1 R~o: if x4 is D3 and x5 is E2 then x6 is F2 R l l ' if x4 is D1 and x5 is Ea then x6 is F3. When facts ,4 of xl,/3 of x2, and/~ of x5 are given, the fuzzy rules are activated and conclusions C~of x3 and P of xo are obtained. The graphic representation of our method for illustrating multi-stage fuzzy logic inference is shown in Fig. 3. The graph points out how to infer multi-stage fuzzy rules from the view point of fuzzy values when different types of fuzzy logic operators are used in if-parts and then-parts. For input variables Xl, x2, and xs, when facts ,4,/3, and/~ occur, we first execute fuzzy set operations to evaluate match degrees 9~l(x1),:~1(x2), and ~](xs), 1 ~< h ~< 3. Then the match-degrees are broadcasted to the scalar min operations of the if-parts to evaluate firing strengths. Meanwhile, maximum firing strengths ~,r,k, 1 <<.9 ~ 3, k = 1, 2 are updated from those firing strengths which correspond to the same fuzzy values. For intermediate variable x4, the conclusion in the first stage is passed on to the second stage as a fact. Then match-degrees ~2(x4), 1 ~ h ~< 3 are evaluated. The conclusion of output variable x3 is deduced by uniting its derived fuzzy value results (c~,lr. ~ A /~vv,,l~.,I), 1 ~< 9 ~< 3, while the conclusion of x6 is also deduced by uniting its derived fuzzyvalue results (~,,,T, 2 ~ A I~vv,~), 1 ~ 9 ~< 3. If fuzzy logic operators which are of the same type are used in if-parts and then-parts for intermediate variable x4, the computations are enclosed by the dotted line in Fig. 3. Then their pre-computations are detailed in Fig. 4. Pre-computation values [3h.o, 1 ~ h ~< 3, 1 ~< 9 ~< 3 are easily obtained from the membership functions of variable x4. Therefore, in inferring fuzzy rules, the computation of match-degrees :~2(x4), 1 ~ h ~< 3 is a scalar operation. Since fuzzy values D1 and D3 do not overlap with each other,/~.3 and/~3,1 are zero in Fig. 5. Therefore, pre-computations of/31.2 and /~2,3 are necessary because fuzzy value D~ overlaps with D 2 and D 2 with D3. From this example, one can see that by using the method suggested the number of computations does not grow much with the numbers of fuzzy values and intermediate variables. The number of computations compared with the previous methods
60
H.-P. Chen, T.-M. Parng / Fuzzy Sets and Systems 78 (1996) 51-72
[
a~(z'd) = ~,erz®,,'m(P'ax"A'(u~) i,-t,..tAp,..(=,,,)(u~))
]
Layer 1
Layer2 >Stage Layer3
U
gE{1,.., q l}
~
.Fy.(=C.+I),~)(u~)), if c~,xT,~ > 0 lhen-p*zt
Layer4
I i
~)'~(~])
I Stage 2
U gEO,...,q:].
A
3 UFV.(=(.+~),bl(Uk)), if ~ 2~.T,k > 0
then-p~t
Fig. 3. The graphic representation of multi-stage fuzzy logic inference.
~ D1
Pre-computations
flh'g;hE{l'''"l;+l}'ge{l"'"q;) ]
Pre-computations 1
D~
D3
~
. z;
J ' , g ell,.-.,q D \~h,,;he{1,... , lj"+1"
Ma~ax |
Fig. 4. Pre-computing of intermediate variable x4.
Fig. 5. Considering overlapped fuzzy values pa]rs only.
H.-P. Chen, T.-M. Parng / Fuzzy Sets and Systems 78 (1996) 51 72
61
Table 4 Comparison of two methods
No. of pre-computations No. of A scalar operations No. of max scalar operations
Related methods [2. 14, 15]
Suggestedmethod
5 x 6 = 30 5 x 6 = 30 6
2 4 3
[2, 14, 15] are listed in Table 4, where the number of fuzzy rules which involve intermediate variable x4 in the first and second stages are 5 and 6, respectively.
4. Mathematical formulation for fast reasoning of multi-stage fuzzy logic If different types of fuzzy logic operators are used in if-parts and then-parts, the set of fuzzy rules fires stage by stage in which the consequences in the inference stage are passed on to the next stage as facts. Under such circumstances, the sequence of the inference process will result in a longer response time. Therefore, we propose a method to avoid the longer response time of firing multi-stage fuzzy rules. First, the method for evaluating if-parts of fuzzy rules at any stage is discussed. Second, the way to reduce computation of deriving then-parts is presented. On the other hand, if the same type of fuzzy logic operator is used in both if-parts and then-parts, pre-computations of overlapped fuzzy values for intermediate variables are described. Finally, deriving fuzzy values and formulating conclusions of output variables are also described.
4.1. Reducing if-part evaluations of fuzzy rules at any stage In the original method, when facts occur, they are broadcasted to if-parts to evaluate match-degrees of if-clauses. Since the number of fuzzy rules is proportional to the number of fuzzy values of variables and the same if-clauses usually appear in the if-parts of different rules, in our method the facts are not directly broadcasted to if-parts of variables. We first evaluate the match-degrees of fuzzy values of variables. Then the match-degrees are broadcasted to the if-parts in order to evaluate the firing strengths of fuzzy rules. To describe our method, the notation of fuzzy values of variables must be assumed. Assume that the fuzzy values ofjth if-part variable xr.~ are {Fuzzy-Valueh ofjth if-part variable xr.j in the rth stage~, which are denoted by {FVh(Xr, j)~, h ~ [1 .... ,1~}, 1 <~ r <~d, .j ~ [1 ..... nr}. Then,
Ai.j~FVh(Xr.~)~, l ~ i < < . m , l ~ r < ~ d , j ~ { 1
. . . . . nr], h ~
..... ii,
(3)
where m is the number of the rth stage fuzzy rules, and l~ is the number of fuzzy values of the jth if-part variable in the rth stage. When facts occur, they are not directly broadcasted to if-clauses that involve the if-part variables. We use two non-zero range indices, Bx,~ and E~,j, for facts to record the beginning and ending indices of the fact associated with the if-part variable x,.j. Then boundary checking operations of both the fact and all fuzzy values of the same variable are computed. Meanwhile, we also use the non-zero overlapping range indices, B'~r., and Ex,.',, to record the non-zero common ranges~ of the fact and all fuzzy values of x,.j. Under such a circumstance, the universe of discourse is U~,, instead of U~,,, with C:~,., = (B'., . . . . . E L ,). Accordingly, in the rth stage we calculate only the non-zero match-degrees of FVh(X,.j) and the fact, and both are found to have overlapped in the course of the boundary checking operation. We have
~;(x~.j) = max (pvv,~,j~(u~) A p~(u~)),
h e {1 .... ,1~}, .je {1 ..... n~}.
(4)
62
H.-P. Chert, T.-M. Parng / Fuzzy Sets and Systems 78 (1996) 5 1 - 7 2
When these non-zero match-degrees are evaluated, they are broadcasted to those if-clauses which involve the fuzzy value FVh(X,4). So the firing strength of rule R~ can also be derived:
O~iT= AO~(Xr.j), 1 <~ i <~m, r ~ {I .... ,d}, h 6 {1..... 1~}, j ~ {1..... n,}.
(5)
Using formulas (4) and (5), the number of fuzzy set operations can be greatly reduced.
4.2. Reducing then-part derivations of fuzzy rules at any stage In deriving the then-part consequences of variables, our method emphasizes the viewpoint of fuzzy values. It is simpler than the concept of active rules in the basic method, since the same fuzzy value may appear in the then-clauses of different rules. Assume that the rth stage the fuzzy values of the kth then-part variable x(r+ 1),k are a set of {Fuzzy-Values of the kth then-part variable X(r+l),k in the rth stage}, which is denoted by {FVo(x(r+l).k) }, g ~ {1.... ,q~,}, k ~ {1. . . . . Pr}. Then
B[.k~{FVg(x(,+l),k)},
1 <~i<~m, g ~ { 1 . . . . . q~}, k ~ { 1 ..... pr},
(6)
where q~, is the number of fuzzy values of the kth then-part variable in the rth stage. Since the processing of then-clauses is limited to non-zero elements of fuzzy values in the rth stage, we can get ]l~ri.k(U~) = O~iT A ].lB~.k(Urk), urk E Ux( . . . . . . .
1 ~< i ~< m, k 6 {1, ... ,p,}.
(7)
Note that /-~x,r+,,.k= ( B , E ) is a subset of Ux,,,,., and the fuzzy value FVo(x(,+l).k ) can appear in the then-clauses of different rules. By formula (6), we have
B[.kEFVo(x(r+I).k) ,
l <~i<~m, k 6 { 1 ..... p~}, g ~ { 1 ..... q~,}.
(8)
r is drawn in uniting the derived results ~,,,T,k r Then the conclusion /~'~(Uk) A / ~ ( ....... )(U r ), which can be obtained according to the following theorem.
Theorem 1. The conclusion of the then-part variable x(~+ 1).k, k ~ { 1,..., p,} in the rth stage is formulated by ' = ~/B.~(uk)
U
(O~[qT,klheApart
]2FV.(
........ ) ( uk )r) ,
Uk' e 0~, , +,,. ,, if~,,T.k > 0,
(9)
g e ' , l ..... q;l
at~T.k = max a/T, l<~i<~m, r e { 1 .... ,d}, 9 e { 1 . . . . . q~,}.
(10)
iET~,k
where the at~,,T.kis the maximum firing strength of those rules which involve the same fuzzy value in the then-parts in the rth stage; U~,,+,)~ = (B'k,E'k) is a subset of U~,,+,,. Proof. See Appendices. We note that there exist only the distribution of 7",.operators, i ~ {0.... ,3} to So operator in Table 2. For an intermediate variable in the then-parts of fuzzy rules, the conclusion/~hz(uT,) is passed on to the next stage as a fact which is denoted by #,i;÷,(u~+1), where j equals k and u~~+1 is equal to u~. In multi-stage fuzzy rules, the consequence at a certain stage is passed on to the next stage as a fact. When the same type of fuzzy logic operator is used in if-parts and then-parts, pre-computations of fuzzy values can be done.
4.3. Pre-computations of fuzzy values for intermediate variables In pre-computing the match-degrees of intermediate variables, our method is very simple for fuzzy value evaluations of intermediate variables since the non-zero pre-computed value exists only for the two adjacent
H.-P. Chen. T.-lVL Parng / Fuzz), Sets and ,~vstems 78 (1996) 51 72
63
fuzzy values which are defined as having over-lapped each other. As a result, the fuzzy set operations in both if-parts and then-parts of intermediate variables are pre-computed. At execution time, the effectiveness of pre-computations of intermediate variables is to evaluate match-degrees with both the firing strengths in the previous stage and the pre-computed values in the current stage. The consequence p~(u~,), 1 <~ r <~ (d - 1) of the kth then-part variable Xt,+ll.k in the rth stage is passed on to the ( r + 1)th stage as a fact. When the intermediate variable X(r+ILj in the (r + 1)th stage equals the Xl,+~l,k variable in the rth stage, the . . . . 1 ) , h s [ 1 .... ,lj + 1 } , j 6 { l ..... n~+~ } of the hth fuzzy value of the jth match-degreecthr + 1~x~+~.i~,l <~r<<.(dvariable xt~+~).i can be pre-computed to reduce many fuzzy set operations according to the following theorem. Theorem 2. The consequence I~g'~(U'k)of the kth then-part variable xl¢+ ~).k in the rth stage is passed on to the r (r + l)th stage as a fact, p~7,(u~ + 1). W h e n Xlr+ ll.j X~r+1).k, and ujr + l ~ Uk, the match-degree ~h~+ 1,IX(r+ 1),j~,, 1 ~ < r ~ < ( d - 1),he ~1 . . . . . l~ + 1~~, . 1• ~ { 1 . . . . . n , + l ~ ~ of the h t h f u z z y value o f t h e j t h variable in the (r + 1)th stage can be pre-computed as r+l '~h
(X(r+l).j) =
max
r
(O~t,,T,k A f l h , g ) ,
ke{1
. . . . .
pr},(f/]h.g>O,
fih.o = max (PFV,,I....... ,~(U~+1) A ~IFV,A. . . . . . . . )(U~)},
(11) (12)
where ~[,'r,~ = max (~r), 1 ~< i ~< m, g ~ {1..... q~,}. i~ T,~.~
Proof. See Appendices. We note that the existence of the distribution law for fuzzy logic operators is shown in Table 2, whereas the association law is given in Table 3. As a result, the Ti operators, i~ I0 ..... 3} in the both if-parts and then-parts must be of the same type as T-norm operators. Meanwhile, the S-norm operator is only the So operator. Otherwise, the reasoning method for pre-computations is not equivalent to the original method. If ~Fv,,~...... ~)(u~+ 1) and la~v~..... ~ (u~,)do not overlap, then fib. g is equal to zero. In fact, when the intermediate variable x~r+l)..i in the (r + 1)th stage is the same as the Xl,+~.k in the rth stage, the flh.oS, which are dependent on whether /~vv,,~..... ~j)(uj~+ ) and Pvv,,~....... )(u~,) overlap with each other or not, are easily obtained from the membership function definitions of variable xt~+ a~.~. Meanwhile, the match-degree 7~+ 1(x~,+ ~~..i) is broadcasted to the if-parts of multi-stage fuzzy rules. By Formula (1), the firing strength of rule R,- can also be derived: 3(iT= gI,(xI.j,) A ~rh+l(X(r+lLj), 1 <~ i <~ m, r e { 1 . . . . . ( d -
1)I. (13)
h ' @ {1 . . . . . 1)I , h e
{1 . . . . . I ~ + l } ,
j ' ~ {1 ..... n,}, j ~ [1 . . . . . n r + l l .
In multi-stage fuzzy rules, the number of pre-computations of fuzzy sets can be counted with the following corollaries. Corollary 1. For an intermediate variable xl, + 1),j in the (r + 1)th stage, which is the same as the x~+ l),k in the rth stage, the number P of f u z z y set pre-computations flh.oS, h ~ g is equal to the number h' of overlapped f u z z y value pairs P = h'. Proof. See Appendices.
(14)
H.-P. Chen, T.-M. Parng / Fuzzy Sets and Systems 78 (1996) 51-72
64
In firing fuzzy rules, the numbers of A and max scalar operations at execution time can be counted with the following corollary. C o r o l l a r y 2. In the (r + 1)th staqe for an intermediate variable x(,+ 1),j which is the same as the x(,+ 1),k in the rth staqe, the number A of the A operations at execution time is twice that of overlapped fuzzy value pairs, whereas the number M of the max operations equals the number 1"3~+1 of fuzzy values of the jth variable in the (r + l)th staye.
A = 2h',
(15)
m = l~+~
(16)
Proof. See Appendices.
4.4. Reducing fuzzy value derivations of output variables In the dth stage, the conclusion of the output variable X(d+1).k can be obtained by Theorem 1 as follows:
~(u~) = d ~t,T.k
U
]AFV..(........ ) ( U k" ) ) ' ud ~ ~x(,,,.,, if ~toT. (O~toT,kthen/~_part d k > O, "
(17)
g ~ ~1 , ' " , q k a} J
max ~ir, 1 ~< i ~< m, 9 6 {1..... q~},
(18)
where ~ ........ = (B~,, EL) is a subset of Ux,~+,,.r In practical application, the conclusion of each output variable of fuzzy rules must be defuzzified into a single value for the external system. For defuzzification, the center of the gravity (COG) method is commonly used. We calculate the local value of defuzzification Bt*k only on the subset (B~, E~,): Bl*k =
X
~ :
V u k e G .......
_
u~ x ~ ( u ~ ) d
,
(19)
where B~, and E;, are the beginning and ending indices of non-zero elements of fuzzy values produced when formulating the conclusion. This local value Bt*k is then added by an amount of B~, to obtain the defuzzification result:
B~ = B,*k + B'k.
5. S i m u l a t i o n
{20)
results
5.1. Truck-and-trailer backer-parking system In this section, we demonstrate the simulation results by using the truck-and-trailer backer-parkin9 control system. Fig. 6 shows the simulated truck-and-trailer system. The coordinate pair (x, y) specifies the position of the rear center of the trailer. We want the truck-and-trailer to arrive at a loading dock at a right angle (~bf = - 90 °) and to align the position (x, y) of the trailer with the desired loading dock (xf, yf). This control system contains three input variables and two output variables. The input variables are defined by using fuzzy variables x, qSt,and qSc,whereas the output variables are defined by using 0 and r. When the decisions of parking activities are made, the qualitative aspects of human knowledge are hierarchically organized to provide concept association and reasoning. Hence, the intermediate variable ~biis introduced. In this case two
65
H.-P. Chen, T.-M. Parng / Fuzzv Sets and Systems 78 (1996) 51 72
( x , y)
(x , y) : Cartesian coordinate of the rear
end,
[500,1000].
(u , v) : Cartesi~mcoordinate of the joint. t
(u, v)
¢~ : Angle of the
trailer
with horizontal, [-270,90].
¢c : Relativeangle of the cab with trailer, [-90,90]. 0 : Steering
¢c
,
angle, [-30,30].
0
I Loading dock (ml, Yl) Fig. 6. Diagram of the simulated truck-and-trailer system. FAM rules take the form IF 4), is R B AND ¢~ is N E T H E N ~b i is I R U ,
(21)
IF x is L E AND ~bi is I R V T H E N 0 is PS AND r is S M .
(22)
The two state variables ~bt and 4)c determine the intermediate status ¢i of the truck-and-trailer system in the plane. Then the state variable x and the intermediate variable qSi determine the steering angle 0 and the moving distance r, with the latter two deciding the position of the truck-and-trailer system. The fuzzy variable Ct specifies the angle of the trailer with the horizontal (q~t ranging from - 2 7 0 ° to 9if). The fuzzy variable 4)~ specifies the relative cab angle with respect to the centerline along the trailer (4)¢ ranging from - 9 0 ° to 90 °). The extreme cab angles 75 ° and - 7 5 '~correspond to two "jackknife" positions of the cab with respect to the trailer. A negative ¢¢ value indicates that the cab resides on the left-hand side of the trailer. A positive value indicates that it resides on the right-hand side. Fig. 6 shows a negative angle value of 4)c and a positive angle value of 0. The coordinate x ranges from 0 to 1000. Resolution of the fuzzy variable X is 1. The y-position coordinate y of the truck-and-trailer is ignored. For an input fact, a crisp value from a real world device which can be a low cost sensor can usually be fuzzified into a fuzzy value (i.e., a fuzzy number) by taking into account the typical error information that is specified by the device's manufacturer. In this application, the input facts of 4), ¢c, and X variables are crisp values fuzzified with base widths at 5, 3, and 11~ respectively. The two control variables are the steering-angle signal 0 and the moving-distance signal r. At every stage the fuzzy rules should produce the steering angle 0 and the moving distance r. These products determine the new relative cab angle with respect to the centerline along the trailer and the new positions (u', v') and (x', y'). The simple kinematic equations replace the truck-and-trailer simulator, a topic that has been discussed by S.-G. Kong [7]. The simulator method of [7] is to measure angle fl, which is defined as the output variable of fuzzy rules. The steering-angle output 0 is then computed. Our kinematic equations, which give an intuitive description of the moving behavior of the truck-and-trailer system, are refined from [7]. The steering-angle output 0 is directly inferred from the firing set of fuzzy rules. If the truck-and-trailer moved backward from (x,y) to (x',y') at an iteration, then 4);., = 4)~,h + 0. ,' = u + rcos(¢;.h).
v' = u + rsin(4);.h),
H.-P. Chen, T.-M. Parng / Fuz~ Sets and Systems 78 (1996) 51-72
66 y -- v"]
q~ = tan-1 \ x -
u'J'
x' = u' + Icos(q~',),
y' = v' + lsin(qS~), q~'o = q~'o., -
4;,
where 0 and r are produced through the reasoning of fuzzy rules; q~.h denotes the cab angle with the horizontal; I denotes the length of the trailer and is set at 100. The fuzzy set values of qS,, q5¢,qSi, x, 0, and r are shown in Fig. 7. Fig. 8 displays the two FAM-rule matrices in the FAM banks of the truck-and-trailer system for the intermediate and each output variables. The fuzzy variables ~bt,~bc, and qSi form the first stage FAM-rule matrices, whereas the fuzzy variables x, ~bi, 0, and r form the second stage FAM-rule matrices.
VE
m(~b~)
-270
- 180
-90
0
90
m(~) NE
NU
NV ZR PV PU
PO
i t
i i
-90
-60
-30 m(Oi)
-2"/0
0
30
60
90
IRW ILW
-180
-90
0
90
m(~)
0
100
200
300 400 500
600 700
800 900
1000
re(O) NB
NM
NS ZE ,
PS
PM
PB
i
i
~
D
-30
-20
-10
0
10
20
0
30
m(O
i
i
i
i
i
i
0
5
10
15
20
25
30
Fig. 7. Membership graphs of the fuzzy-set values of fuzzy variables ~b,, ~bc, ~b~, x, O, a n d r.
H,-P. Chen, T.-M. Parng / Fuzzy Sets and Systems 78 (1996) 51 72
RB
RU
RV
VE
LV
LU
LB
NE
IRB IRB [RB IRB IRU IRW ILV
NU
IRB IRB IRU IRV IRW ILW ILU
NV
IRU IRV IRW IRW IVE ILV ILU
ZR
IRU IRV IRW IVE ILW ILV ILU
PV
IRU IRV IVE ILW ILW ILV ILU
PU
IRU IRW ILW ILV ILU ILB ILB
PO
IRV !ILW ILU ILB ILB
ILB
67
ILB
(a) X LE LC
¢i
X
CE
RC RI
LE LC
CE
RC RI
IRB
PB PB
PB
PB
PB
IRB
SM SM 5M SM SM
IRU
PB PB
PB
PM PS
IRU
SM'SM
IRV
PB PB
SM SM SM SM SM
SM SM SM
PB
PS
PS
IRV
IRW PB PM PS
ZE
NM
IRW SM MI
MI
MI
SM
IVE
IVE
LM MI
MI
ILW SM MI
MI
SM
ILV
BM SM SM
PM PS
ZE
NS NM
ILW
PM ZE
NS
NM NB
ILV
NS NS
NB NB
¢i
NB
Nil MI
SM:SM
MI
ILU
NS NM NB [NB
ILU
SM SM SM SM SM
ILB
NB NB NB
ILB
SM SM SM SM SM
NB NB
r c o n t r o l variable.
0 c o n t r o l variable.
(b) Fig. 8. FAM-bank matrix for fuzzy truck-and-trailer backer-parking controller. (a) The first stage FAM rules for Ch~intermediate variable. (b) The second stage FAM rules.
(,
200
/ 200
I
i
i
40o
eO0
800
IOOC
1000
I
I
2¢0
400
I II
1
400
I 800
I
I
600
800
lO00
1000
I
200
L 400
i
L
600
SO0
___J to00
Fig. 9. Sample truck-and-trailer trajectories from the fuzzy controller for initial positions (x,y, qS,,qS,): (a) (600,300,45,30), (b) (600, 300, 0, 60), and (c) (300, 300, 90, 0).
68
H.-P. Chen, T.-M( Parng / Fuzzy Sets and Systems 78 (1996) 51-72
100 $00 300
I00 500 600 700
800 900
I loading d o c k
1000 100
200
300
400
500
600
700
800
900
1000
Fig. 10. Admissible region of the truck-and-trailer system.
Table 5 Comparison of two methods for intermediate variable ¢i
No. of pre-computations No. of A scalar operations No. of max scalar operations
Related methods [2, 14, 15]
Suggested method
49 x 45 = 2205 49 x 45 = 2205 45
8 16 9
With the first and second stage FAM rules, Fig. 9 shows typical backing-parking trajectories of the fuzzy truck-and-trailer control system from different initial positions. The initial positions (x, y, ¢ , ¢c) from cases 1-3 are (600, 300, 45, 30), (600, 300, 0, 60), and (300, 300, 90, 0), respectively. Fig. 10 shows the admissible region of the truck-and-trailer system with various initial conditions of Ct and ¢c variables. In this simulation, the y-position coordinate y of the truck-and-trailer is ignored. For the intermediate variable ¢i the results of fuzzy logic inference based on our method, compared with the related methods [2, 14, 15], are shown in Tables 4 and 5.
6. Conclusion
In this paper, we have presented a method of fast multi-stage fuzzy logic inference. Fuzzy set operations are performed only in fuzzy-value evaluation of if-part variables and then-clause derivation of then-part variables at any stage. Only one fuzzy set operation is necessary for the fuzzy value that overlaps with the fact and for the fuzzy value with a non-zero firing strength. The firing-strength evaluation of fuzzy rules at any stage is a scalar operation. When T-norm operators which are of the same type are used in both if-parts and then-parts for intermediate variables, a method for pre-computing the match-degrees of fuzzy values is proposed. The number of operations that must be carried out at execution time is significantly reduced. The complexity of the algorithms is much smaller than the related works [2, 14, 15]. Through the simulation of the truck-and-trailer application system, our method shows improvement over the previous approaches.
H.-P. Chen, T-M. Parng / Fuzzy Sets and Systems 78 (1996) 51-72
69
Appendix
L e m m a A.I. T 1 operator to So operator of two fuzzy sets A and B follows the distribution law, which is defined as
(23)
[IA'(]~ B V ]1C) = ([IA'12B) V (J,IA'[2C).
Proof. Let a e ]~A, 0 ~ a ~< 1; b e/~B, 0 ~< b ~< 1; c ~ Pc, 0 ~< c ~< 1. The left-hand side of F o r m u l a (23) is as follows: if b > C,
a ' (b V c) = a ' (max(b, c)) = {ab
ac
if b ~< c.
The right-hand side of F o r m u l a (23) is as follows: (a' b) V (a- c) = (max(ab, ac)) = ~ab
ac Thus, L e m m a A.1 is true.
if b > c, if b < c.
[]
T 1 operator to $2 operator of two fuzzy sets A and B is not satisfied with the distribution law, which is described as
L e m m a A.2.
(24)
]JA'(I'IB (~ ~[C) ~ (]AA" ~LB) (~ (~A" ['2C) "
Proof. Let a ~ pA, 0 ~< a ~< 1; b E #~, 0 ~< b ~< 1; c e ~c, 0 ~< c ~< 1. The left-hand side of F o r m u l a (24) is as follows: a
a.(bOc)=a.(1A(b+e))=
a(b+c)
if b + c >~ 1, ifb+c
The right-hand side of F o r m u l a (24) is as follows: 1
(ab) O)(ac)= 1 A ( a b + a c ) ) =
1 A(a(b+c)) = a(b+c)
if a(b + c) >~ 1, if a ( b + c ) < l ,
w h e r e 0 ~ < a b < ~ 1;0~
is described as (25)
~1A A ([[B " tac) ~ (/~A A [AB)" [AC .
Proof. Let a e # a , 0 ~ a ~ 1; b ~ PB, 0 ~< b ~< 1; c ~ #c, 0 ~< c ~< 1. The left-hand side of F o r m u l a (25) is as
follows: O A (b'c) = rain(a, bc)) = ~a
t bc
if a < bc, if a >~ bc.
70
H.-P. Chen, T.-M. Parng / Fuzzy Sets and Systems 78 (1996) 51-72
The right-hand side of Formula (25) is as follows:
ac be
(aAb).c=(min(a,b))'c=
if a < b, if a / > b .
The association law does not satisfy for To operator to T1 operator. For example, a = 0.6, b = 0.8, c = 0.9, Formula (25) is true. [] Lemma A.4.
Tz operator itself of two fuzzy sets A and B follows the association law, which is defined as
/'/A@ (~/B (~) #C) = (#A (L) ~B) (~ #C"
(26)
Proof. Let a e/~a, 0 ~< a ~< 1; b ~/~B, 0 ~< b ~< 1; c ~/~c, 0 ~< c ~< 1. The left-hand side of formula (26) is as follows:
a(~(bGc)
= 0 V (a + ( 0 V (b + c -
1))-
={:'V(a+b+c-2),
ifb+c~l
={O0'v(a+b+c_2),
otherwise if(b+c)>l,
1)
or ( a + b ) >
1, or ( a + c ) >
1
The right-hand side of Formula (26) is as follows: (a Q b) Q c = 0 V ( ( 0 V ( a + b -
1))+c-l)
={~'V(a+b+c-2),
ifa+b~l ifa+b>l
={~'V(a+b+c-2),
otherwise if(b+c)>l,
Thus, Lemma A.4 is true•
or ( a + b ) > l ,
or ( a + c ) > l .
[]
P r o o f of Theorem 1. For the then-part variable X(r+l). k of the rth stage, by Formulas (7) and (8), the conclusion is
i=1 =
i=1
V
i=1
(~r A ."F~,( ..... ,.,)(U[,)) V V
ie T~.k
( ~ A ~F~:(..... ,.,,(u~,))
i~ T'2.k
i~T~,, =
\i~r;.,(maxair ) A
l~rv,(
........
( m~T;,' a x ~iT) APFV2(........ )(U~)> )(U~) w \( V
H.-P. Chen, T.-M. Parng / Fuzz2; Sets and Systems 78 (1996) 51-72
= gU 1
m a x ~T
• = \\i~T',,.k
=
~)
A/~rv.( ........ )(~) ur
(~t~l",k then/~_part I"lFgtl(.......
~ : ~..... q~
A n d ~[,T,k = m a x ~ v , ~ , r ,
71
1 ~i~m,
)(k)), Lir
r~{1 .....
Ukr ~ U . . . . . .
d},a~{1 . . . . .
' if
:(~,,T.k > 0
q~}.
"
[]
of T h e o r e m 2. F o r the intermediate variable (X(r+ ll.j = X(r. ~),k a n d l~ ÷ 1 = p~), by F o r m u l a (9) a n d r+l~ x F o r m u l a (10), the m a t c h - d e g r e e ~h tXtr+~),~] of hth fuzzy value can be derived as follows:
Proof
r+l
Z~h (x(,+~),j) =
max
=
max
=
max
=
max w
," r + l x
]'IFv,,(....... i)(Uj
A ~ +1 r+ ]if.part ]JA~ (Uj 1))
~ r+l
Rr
]../FVh(. . . . . . j)(U; ÷ | ) A U ((~o T.k A F~FVq(........ ) ( k ) ) if-part O = 1 then-part z r+l
]"lFVh(x,..... i)[blJ
(#ev~, . . . . .
max
r ~r )if.p/\art ((Xt, T, k then-partA ]'IFvI( . . . . . . . . ) ( k ) ) )
,i)(b/;+l)if_pA a
then/~-part
x + t~.i (/~vv~ ....... Au~ +1) if-part /k (O~r~T,kthen/~.part~UFVq:( . . . . . . . )(U~))) u~ * m I ~ a~,~, =
"
O~ttT, k A
max
"
"u r+~"
(/~rv~ ....... i) ~ j
u" )
) A ].IFV,( . . . . . . . ) ( k ) )
u T ' ~O.,........
k-) O~t2T,k A
r w I ~,,:r.k A
"
max
(#vv,,( ..... ,,)(u; +1) A l~vw(~, ..... ) ( k ) )
max
(/~vv,~....... ,)(ujr +1) A larv<(~, ...... , (/,/r ,)) /
u~+ t e/~,+ t, i
= (:Z~,,T,k A [:lh,l)t.O(O~t~T,k A =
max
(~,,r. kAfih.o)
(by distribution law)
flh.2)"'" U(~¢,T,k
A
(by association law)
flh.q;)
ifX{r+l).t=Xtr+l,.k,U~+l=u~,andflh.,
Ur h ~ {1, . . I.tr+. 1 },g . . ~. {1, whereflh.,q = m a x . , + , ~ 0 ,, (#rv, a..... ,,)(u~ +1) A #ev~ ....... )(k)), j ~ { 1. . . . . nr+~}, k e { 1 . . . . . p~}. Also, ~,'.r,k = maxi~ r,;, (~,r), 1 ~< i ~< m, g ~ { 1. . . . . q~ }.
>0, qkj, ~ 1 <~ r <~ (d-- 1), []
o f C o r o l l a r y 1. F o r the s a m e intermediate variable x(r + ~,.j = xlr + l).k, the set of fuzzy values of Xlr + ~).j f r r is {FVh(X{r+l),t)(u~+l)} tFVa(xtr+I),k)(Uk)}, h e {1, . . . , , l, r + l ~,, y ~ I1 . . . . . qg}, ljr + l = qk,r utr + l =Uk.r F r o m the m e m b e r s h i p function definitions of linguistic variables, we can easily get the adjacent fuzzy values• If the FVn(xtr+ 1),t)(u~ ÷ 1) a n d FVg(xtr+ 1).k)(U~) overlap, by F o r m u l a (16), fib,,( = fig.n) is larger t h a n zero. Otherwise, flh,g equals zero a n d does n o t h a v e a n y evaluation. If the fuzzy value FV~ equals the fuzzy value F V o, then flh,~ = flh.h = flY,0 = 1 SO that the p r e - c o m p u t a t i o n s do n o t evaluate. As a result, the n u m b e r P of fuzzy set p r e - c o m p u t a t i o n s fl~,ns, h ¢: g is equal to the n u m b e r h' of o v e r l a p p e d fuzzy value pairs. Proof
72
H.-P. Chen. 72-M. Parng / Fuzzy Sets and Systems 78 (1996) 51 72
P r o o f o f C o r o l l a r y 2. F o r the s a m e i n t e r m e d i a t e v a r i a b l e xtr + ~, j = x~r + 1J,k, the set of fuzzy v a l u e s of v a r i a b l e x~,+t),j is {FVh(X{,+x),j)(uS+l)} {FVo(x,,+,).k)(U~,)}, h e {1 . . . . . /5+' }, g • {1 . . . . . q~,}, l}.+t -- q~,, u5 + ' ~ u k . By F o r m u l a (11), the o p e r a t i o n s (Cq~T,R A fib.o) are o n l y c o m p u t e d o n 0 < flh,o < 1. Since the flh.o e q u a l s the rio,h, the n u m b e r A of (e~,r,, A fib.o) o p e r a t i o n s is twice the n u m b e r P of fuzzy set p r e - c o m p u t a t i o n s flh,oS, h :/= 9- It m e a n s t h a t A = 2. P = 2. h'. I n the m e a n w h i l e , b y F o r m u l a (11) the m a x i m u m n u m b e r M of the m a x o p e r a t i o n s maxo~:~ ..... qgl (e,~T.~ A fib.0) at the e x e c u t i o n t i m e is e q u a l to the n u m b e r 15+1 of fuzzy v a l u e s of the j t h v a r i a b l e in the (r + 1)th stage since 9 • {1 . . . . . q~,} for m a x o p e r a t i o n s a n d 15+~ = q~,.
References [1] A. Bugarin, S. Barro and R. Ruiz, Compacting rules for fuzzy production system computation, IEEE Internat. Conj. on Fuzzy Systems (8 12 March 1992) 933-940. I-2] A. Bugarin and S. Barro, Fuzzy reasoning supported by Petri nets, IEEE Trans. Fuzzy Systems 2 (1994) 135-150. [3] H.-P. Chen and T.-M. Parng, Toward fast reasoning for multi-stage fuzzy logic inference, First Asian Fuzzy Systems Symp. (Singapore, 23-26 November 1993). [4] J.R. Clymer, P.D. Corey and J.A. Gardner, Discrete event fuzzy airport control, IEEE Trans. Systems Man Cybernet. 22 (1992) 343-351. I-5] M.M. Gupta and J. Qi, Theory of T-norms and fuzzy inference methods, Fuzzy Sets and Systems 40 (1991) 431 450. [6] M.M. Gupta and J. Qi, Design of fuzzy logic controllers based on generalized T-operators, Fuzzy Sets and Systems 40 (1991) 473-489. [7] S.-G. Kong and B. Kosko, Adaptive fuzzy systems for backing up a truck-and-trailer, IEEE Trans. Neural Networks 3 (1992) 211-223. [8] C.C. Lee, Fuzzy logic in control systems: fuzzy logic controller Parts I and II, IEEE Trans. Systems Man Cybernet. 20 (1990) 404-418, 419-435. 1-9] C.-T. Lin and C.S.G. Lee, Neural-network-based fuzzy logic control and decision system, IEEE Trans. Comput. 40 (1991) 1320-1336. [10] D.-q. Qian and Y.-Z. Lu, A strategy of problem solving in a fuzzy reasoning network, Fuzzy Sets and Systems 33 (1989) 137 154. [11] G.V.S. Raju, J. Zhou and R.A. Kisner, Hierarchical fuzzy control, lnternat. J. Control 54 (1991) 1201-1216. 1,12] G.V.S. Raju and J. Zhou, Adaptive hierarchical fuzzy controller, IEEE Trans. Systems Man Cybernet. 23 [1993) 973-980. [13] R.M. Tong, A retrospective view of fuzzy control systems, Fuzzy Sets and Systems 14 (1984) 199 210. [14] K. Uehara and M. Fujise, Learning algorithm for multi-stage fuzzy inference by back-propagating error information, Proc. lnternat. Fuzzy Engineering Symp. '91 (Yokohama, Japan, 13th 15th November 1991) 1035 1046. [15] K. Uehara and M. Fujise, Multistage fuzzy inference formulated as linguistic-truth-valuepropagation and its learning algorithm based on back-propagating error information, IEEE Trans. Fuzzy Systems 1 (1993) 205 221. [16] H. Watanabe, Some consideration on design of fuzzy information processors - from a computer architectural point of views, Proc. Internat. Fuzzy Enyineerin9 Syrup. 91 (Yokohama, Japan 13-15 November 1991) 387 398. [17] L.A. Zadeh, Fuzzy sets, Inform. and Control 8 (1965) 338-353, [18] H.J. Zimmermann, Fuzzy Set Theory and its Applications, 2nd ed (Kluwer, Boston, 1991).