Reliability Engineering 16 (1986) 237-251
Failure Diagnosis of Complex Systems by a Network of Expert Bases P. Vaija, M. Jfirvel~iinen Helsinki University of Technology, Laboratory of Chemical Engineering, Kemistintie 1 M, SF-02150 Espoo, Finland
and M. D o h n a l Technical University of Brno, Department of Chemical Engineering, Kravi Hora 2, CS-60200 Brno, Czechoslovakia (Received: 9 April 1986)
ABSTRACT This paper discusses failure diagnosis by fuzzy expert systems. A network of expert bases is constructed. The first expert base is used for the evaluation of ill-measured or unmeasurable variables. These values are used as input information into the second expert base which identifies the type of failure. To increase the probability of eliminating errors in the failure analysis, a dialogue between a human specialist and an expert system is partially guided by the intelligence interface of the expert system.
NOTATION
Ca, Cb Cc F
FA, FB FC
concentration of reagents A and B, mol/1 concentration of product C, mol/1 failure failure in feeding of reagents A and B failure in measuring or control devices
237 Reliability Engineering 0143-8174/86/$03.50 © Elsevier Applied Science Publishers Ltd, England, 1986. Printed in Great Britain
238
P. Vaija, M. Jiirveliiinen, M. Dohnal
FP HS
failure in compressor failure in heating system during the starting of the reaction linguistic values: low, moderate, medium, high, very high grade of membership of x in S no failure pressure, at reaction out of order fuzzy set specifying the failure symptom temperature, °C weight factor fuzzy set
LO, MO, ME, HG, VH
ms(X) NF P
RS S T w
~Kw
relative measurement error
Subscripts q
question to the expert base answer of the expert base
r
1
INTRODUCTION
In modern engineering systems the information rate between the process and the operator, through control systems, is usually very high. Under normal conditions the process should be run under optimal conditions by a control computer. Provided that a significant failure occurs, the control system activates special safety routines or transfers the control to the human operator. 1 In both cases a method is needed which is capable of reasoning on the basis of not totally reliable, incomplete and partially inconsistent data. In the field of artificial intelligence, expert systems have been applied to fault diagnosis (e.g. Ref. 3). The expert system consists of two main subsystems: the intelligence interface and the expert base. 2 The expert base is oriented towards specific features of the problem under study. Therefore a suitable network of expert bases is usually required for practical problems. Dialogue with an expert system can be used for 'debugging' an expert base. It is very efficient when the intelligence interface of the expert
Failure diagnosis of systems by a network of expert bases
239
system itself takes the initiative and generates, if required, questions to the user. The main goal is to decrease the danger of a significant error in the design stage of a safety system, in cases where the problem is so complex that an exhaustive search is impossible.
2
A P P L I C A T I O N S OF F U Z Z Y E X P E R T SYSTEMS
Traditional expert systems find it difficult to deal with uncertain and imprecise knowledge. On the contrary, fuzzy expert systems provide a natural framework for the management of such knowledge, because the main purpose of fuzzy logic is to deal with imprecise rather than precise knowledge. 6 Fuzzy expert systems have been applied to modelling and decision making. The application of fuzzy expert systems to failure diagnosis is analysed in Refs 7, 8 and 9. Measurements are the primary source of information for diagnosis. Often some measurement data are too inaccurate or delayed to be used, e.g. for failure diagnosis. In this case a mathematical model, fuzzy or conventional, must be used to evaluate the essential variable. Let X be a multidimensional set of variables that can be easily, accurately and reliably measured. The ill-measured variable is Y. The mathematical model which can be used, e.g. for the checking of measurement data, is represented by the following function:
r=f(X)
(1)
To determine the relationship (1) by a fuzzy expert system, a fuzzy expert base is needed. In this expert base the relationship (1) is transformed into a set of conditional statements (2): if X i then Yi
i= 1,2,...,M
(2)
where Xi is an N-dimensional fuzzy set of independent variables and Y~ is an R-dimensional set of dependent variables (see the Apendix for definitions). The membership function of the one-dimensional fuzzy set Xi,j or Y~ has the general form given in Fig. 1. The set of conditional statements (2) can include expertise and literature knowledge as well as measurement results from the process, pilot plant and laboratory experiments. The difference in the reliability of the knowledge can be stressed by different weight factors (0 < w ~< 1): the choice of the weight factors is subjective. 8
240
P. Vaija, M. JiirveNiinen, M. Dohnal
grade of membership 1
a
Fig. 1.
b
c
d
variabte ~
The membership function specified by four points.
The intelligence interface of the expert system evaluates the dependent variable I1, corresponding to the N-dimensional set of process variables given as a question Xq to the system. Evaluation is made using knowledge in the expert base. Because of the fuzziness of the set of statements (2) and the possible fuzziness of the question Xq, the answer Y~ is fuzzy also. The fuzzy answers can be transformed to deterministic ones by taking averages or weighted averages.
3
QUESTIONS TO IMPROVE THE D I A G N O S T I C EXPERT BASE
In reality, the number of different failures L is nearly always considerably lower than the number of diagnostic heuristics T. Hence, the failure F r is specified by the following set: ifS ithenFr
i=l,2,...,T
r~{1,2 ..... L}
(3)
where S~ is the N-dimensional symptoms specification in the ith heuristics and F~ is one of the failures {F~,F 2. . . . . FL} (see the Appendix for definitions). Provided that any two failure symptoms subspaces S~ and S, are disjunctive,
s,~G=O
r~t
i4)
the diagnostic result is always unique, i.e. to any deterministic Sq c Sr w S, there is only one failure assigned. Because of measurement inaccuracy and ill-known nature of failures the fuzzy intersection (4) is
Failure diagnosis of systerns by a network of expert bases
241
not necessarily an empty set. Therefore it is useful to evaluate the fuzzy set IV,.t, the intersection of the symptom subspaces:
wr,, - sr
s,
(5)
The grade of membership of the fuzzy set IV,., can be easily evaluated:
mw,.,(aj) = min (ms,(aj) , ms,(aj) )
(6)
where
aj - {x 1,j~, x2,j2 .... , XN,jN }
(7)
If a diagnostic question Sq is submitted to the diagnostic expert base then the corresponding failure F, is evaluated. If any Sq belongs to the fuzzy set
w,,,
sq
(8)
with the non-zero grade of membership, both failures F, and F, are possible. In this case it is useful to study the answers of the diagnostic expert base to the questions Sq. The difference between the grades of membership of the rth and tth failures to the fuzzy answer is important. Let us suppose that the answers to the question Sq are as shown in Table 1. For the first answer, it is clear that the rth failure is much more truthful than the tth failure. Not only is the absolute value of the grade of membership of the rth failure high, but the difference between the failures is high as well. The second answer is not reliable on the whole because of low absolute values. For the third answer, it is not possible to discriminate the failure symptoms; the expert base is too fuzzy. The source of this fuzziness can be human error during the development stage (debugging), the low level of human knowledge, or both failures occurring simultaneously. The second and third answers in Table 1 indicate that there is probably something wrong with the expert base. Under such conditions the intelligence interface TABLE 1 Grades of Membership of Different Failures Answer
Grade of membership of the failure
no.
1 2 3
F,
F,
0'80 0.12 1.00
0"10 0"03 0"95
242
P. Vaija, M. Jgirvelgiinen, M. Dohnal
of the expert system can be ordered to generate questions to the user. The user's attention will be focused on unclear subspaces in the expert base. The simplest algorithm to generate questions by the intelligence interface is to evaluate the maximum of the grade of membership mw,.t by the following formula: max (m w,.,(a)) aj
(9)
The most primitive algorithm is to generate random values of a~:
aj <<,a~ <~?tj where aj is the set of lowest and the •j the set of highest symptom values (eqn (7)). The aj that gives the maximum value of mwr., is an approximate solution to the optimization problem. The solution of the problem (9), i.e. x maxl,jt, x max2,j2,..., x maxu,~u (10) is then submitted as a question to the user who tries to make the subspace (5) clearer. In reality, the situation is more complicated because interactions of more than two failures must be analysed. Moreover, it is highly desirable to offer a human expert wider possibilities of interference with the computer system. Therefore a more dialogue-oriented approach was developed as a test example. This test example demonstrates how easily the results of fuzzy diagnosis can be used to improve the expert base. General aspects of a dialogue-like approach to the generation of questions are given in Ref. 5. A simple sequence of questions and answers is presented here: this sequence was chosen to demonstrate some important features. 4
TEST E X A M P L E
A hypothetical polymerization reactor is studied. The polymerization reaction is highly exothermic and there is a danger of a runaway reaction. The reaction mechanism is ill-known and therefore a conventional mathematical model cannot be constructed. Because of control hardware problems it is impossible to measure the polymer concentration. Variables on the basis of which the failure diagnosis is made are the
Failure diagnosis of systems by a network of expert bases
243
TABLE 2 Linguistic Values of Variables and Their Membership Functions
Variable
Linguistic value
Membership function* a
b
c
d
Ca
LO ME HG
2.0 4-0 10.0
2.0 6"0 12-0
4.0 10"0 16.0
6'0 12'0 16.0
Cb
LO ME HG
10.0 15.0 40"0
I 0-0 24.0 48.0
15-0 40.0 64.0
24.0 48-0 72"0
T
LO ME HG
150 185 235
150 195 245
185 235 280
195 245 280
p
LO ME HG
1 000 1 100 2000
! 000 1 200 2 100
1 100 2000 2700
1 200 2 100 2700
Cc
LO ME HG
0.0 15-0 40.0
9.0 24.0 48.0
15"0 40.0 64.0
24.0 48.0 70.0
* For the meaning of a, b, c and d, see Fig. 1.
concentrations of the reagents A and B (C a and Cb), the concentration o f the polymer product (Cc), temperature (T) and pressure (p). Because of the lack of a conventional mathematical model, a fuzzy expert base is constructed to determine the unknown relation:
C c = f ( C a, C b, T,p)
(11)
In the expert base the relation (11) is given as a set of conditional statements: if Ca~ and Cb, and T i and p / t h e n Cc,
i = 1, 2,..., M
(12)
The variables in eqn (12) are determined by linguistic values which are transformed to the fuzzy sets shown in Fig. 1 (see Table 2). The level o f fuzziness is regarded as the inaccuracy in the measuring results. One possible way to interpret the uncertainty is (see Fig. 1) a = (1 -- e)b
d = (1 + e)c
where e is the relative measurement error.
(13)
244
P. Vaija, M. Jiirveliiinen, M. Dohnal TABLE 3 Some Examples of Conditional Statements of the Fuzzy Expert Base Evaluating C¢
Statement no.
1 2 3 4 5 6 7 8 9 10 I1
Independent variables Ca
Ch
T
p
Dependent variable C¢
LO ME HG HG LO ME ME LO ME ME ME
ME HG ME HG ME HG LO ME ME ME ME
LO LO ME ME LO ME LO ME ME ME HG
LO ME HG ME HG ME ME ME ME HG ME
LO LO ME LO LO ME LO LO ME ME ME
60
Some examples of the conditional statements (12) are given in Table 3. The meaning of the first statement is if C a is low and C b is medium and T is low and p is low then C c is low (14) The set of conditional statements (12), together with definitions of the variables in Table 2, form the expert base for evaluating the unknown C c. To this expert base, a fuzzy or deterministic question of the following form can be posed: if Ca, and
Cbo and
Tq and
[q
(15)
On the basis of the expert base (Tables 2 and 3) the intelligence interface gives the corresponding Co. In practice, the realistic diagnostic expert base is constructed by two sets of conditional statements. The first set consists of conditional statements based on expert knowledge. The second set is a set of records of former failures. The first set of statements can be regarded as the diagnostic heuristics: therefore the validity of the conditional statements in the first set is more general compared to the statements in the second
245
Failure diagnosis o f systems by a network o f expert bases
TABLE 4 Some Examples of Conditional Statements of the Diagnostic Expert Base Statement no.
1 2 3 4 5 6 7 8 9 10 11
12 13 14
15 16 17
Independent variables Ca
Cb
T
p
Cc
LO ME ME LO ME ME LO ME ME ME LO ME ME ME ME ME HG
ME LO HG ME ME HG HG ME HG LO ME ME ME ME LO LO LO
ME LO LO HG LO HG ME HG ME LO ME ME ME HG LO LO LO
LO ME ME ME ME ME LO ME ME ME ME ME HG ME ME ME
LO LO LO LO LO ME LO ME ME LO LO ME ME ME ME HG LO
ME
Dependent variable F
FA and FP FB HS and FB RS HS FB FA, FB and FP RS FB FB FA NF FP RS FC FC FA
157
set. A s a c o n s e q u e n c e the f u z z y sets Sid are usually m u c h fuzzier t h a n t h o s e in the r e c o r d set. Because o f e x a c t k n o w l e d g e in the r e c o r d set the weight f a c t o r o f these c o n d i t i o n a l s t a t e m e n t s h a s the highest possible v a l u e (1.0). T h e g e n e r a l s t a t e m e n t s h a v e l o w e r f a c t o r s - - t h e y e q u a l 0.80. In the test e x a m p l e , the v a r i a b l e s C a, C b, T, p a n d C c d e t e r m i n e the s y m p t o m s p a c e S i in e q n (3), w h i c h c o r r e s p o n d s to six different failures (FA, FB, F C , FP, H S , RS) a n d to the n o r m a l o p e r a t i n g c o n d i t i o n s (NF). T h e fuzzy sets Si,j in the d i a g n o s t i c heuristics are the s a m e as t h o s e in the e x p e r t b a s e e v a l u a t i n g C c. E x a m p l e s o f d i a g n o s t i c heuristics are given in T a b l e 4. T h e f u z z y sets S~,j in the r e c o r d set are fairly deterministic. T h e i r m e m b e r s h i p f u n c t i o n is given b y the f o l l o w i n g e q u a t i o n s : b = c
a = (1 - e)b
d = (1 + ~)b
(16)
w h e r e b = c = m e a s u r e m e n t results a n d e is the relative m e a s u r e m e n t
246
P. Vaija, M. JiirveEiinen, M.
Dohnal
TABLE 5 Some Examples of Failure Records
Record no.
Membership function
Independent variables
Dependent variable
Ca
Co
T
p
Cc
F
a b c d
12.8 13"0 13'0 13.2
29"8 30'0 30'0 30"2
193 195 195 198
1 230 l 270 1 270 1 310
22.0 24.0 24.0 25.0
FA
a b c d
13.0 13.5 13-5 14"0
64.8 65"0 65"0 65"2
269 270 270 272
1 130 1 180 1 180 1 220
47.0 52.0 52.0 55.0
FA a n d FB
a b c d
6-8 7"0 7"0 7.1
36-7 37-0 37.0 37'3
271 275 275 277
1 150 1 200 1 200 1 250
27.0 29-0 29.0 31 "0
RS
2O
error. Examples of records are given in Table 5. Tables 2, 4 and 5 together form the diagnostic expert base. To pose questions to the diagnostic expert base, measurement data are transformed into fuzzy sets according to eqn (16) (see Table 6). To show that information of the polymer concentration is necessary for the failure diagnosis, example 1 (see Table 6) with unknown polymer concentration is studied. The diagnostic expert base, however, requires the specification of C c. The fuzzy interpretation of the unknown is a=b=
-~
c=d=
+re
(17)
The results of diagnosis are shown in Table 7. The first column specifies the discrete universe of alternatives, i.e. failures. The grades of membership of all failures are given. The grades of membership of the failures are considered as the quantitative measure of the truthfulness of the result. The first question activates three heuristics, namely 10, 15 and 16 from Table 4. It results in a rather inaccurate diagnosis where failures FB and FC have relatively high grades of membership. The grade of membership of the failure FA is very low and could therefore be
Failure diagnosis of systems by a network of expert bases
247
TABLE 6 Questions to the Diagnostic Expert Base
Variable
Membership function
Example 1
2
3
4
5
6
7
ca
a b c d
9.8 10.0 10.0 10-2
9.8 10.0 10.0 10.2
9.8 10.0 10.0 10.2
9.8 10-0 10.0 10.2
7.1 7.2 7.2 7.3
2.7 2.8 2.8 2.9
6-6 6.8 6.8 7.0
Cb
a b c d
12.8 13.0 13.0 13.2
12.8 13.0 13.0 13.2
12.8 13.0 13.0 13.2
12.8 13.0 13.0 13.2
51.2 51.4 51.4 51-6
37.0 39.0 39-0 40-0
36.9 37.1 37.1 37.3
T
a b c d
185 187 187 189
p
a b c d
1 870 I 920 1 920 1 960
Cc
a b c d
- oo - ~ +oo +~
186.5 187.0 187.0 187.5
187 187 187 189
185 187 187 189
207 210 210 212
233 235 235 237
275 276 276 278
1 870 1 920 1 920 1 960
1 870 1 920 1 920 1 960
1 870 1 920 1 920 ! 960
i 500 1 550 1 550 1 590
1 370 1 410 1 410 1 450
1 150 1 200 1 200 1 250
- so -~ +oc + oc
- ~ -~ +so +~
0-0 3"3 16.5 24.0
15"0 24'0 40.0 48.0
0"0 4.0 15.0 24.0
15"0 24.0 40.0 48-0
c o n s i d e r e d a s z e r o . T h e a c t i v e v a r i a b l e 5 in t h e a n s w e r is t h e t e m p e r a t u r e T. T h e l o w e s t v a l u e o f T is 1 8 6 ° C . T h e i n f l u e n c e o f t h e a c c u r a c y o f temperature measurement o n t h e r e s u l t s o f d i a g n o s i s is a n a l y s e d . Example 2 shows that a more accurate temperature measurement cannot solve the diagnostic problem. Even deterministic values of the t e m p e r a t u r e in e x a m p l e 3 h a v e n o i n f l u e n c e o n t h e r e s u l t s o f t h e diagnosis. O b v i o u s l y , t h e n e x t s t e p in t h e d i a g n o s i s is t o e v a l u a t e t h e v a l u e s o f C c b y t h e e x p e r t b a s e ( T a b l e s 2 a n d 3) i n s t e a d o f r e g a r d i n g t h e m a s u n k n o w n ( e q n (17)). T h e v a l u e s o f C a, C b, T a n d p f r o m T a b l e 6 a r e u s e d in q u e s t i o n (15) t o t h e e x p e r t b a s e , e v a l u a t i n g Co. T h e s t a r t i n g p o i n t is t h e s a m e s i t u a t i o n a s in q u e s t i o n (1), n o w r e f e r r e d t o a s q u e s t i o n (4) t o a v o i d c o n f u s i o n . T h e r e s u l t s o f t h e f u z z y e v a l u a t i o n a r e
P. Vaija, M. J?irveliiinen, M. Dohnal
248
TABLE 7 Results o f the Failure D i a g n o s i s
Failure
FA FB FC FP HS RS NF
Example 1
2
3
4
4*
5*
6*
7*
0.07 0.67 0.67 0.00 0.00 0.00 0.00
0.07 0.65 0.65 0.00 0-00 0.00 0.00
0.07 0.64 0.64 0.00 0.00 0-00 0.00
0.48 0.67 0.00 0.00 0.00 0.00 0.00
0.07 0.80 0.00 0-00 0.00 0.00 0-00
0.00 0.80 0.00 0.00 0.00 0-00 0-00
0.80 0.00 0.00 0.00 0.00 0-13 0.00
0.00 0.00 0-00 0.00 0.00 0.80 0-00
9
11
Ca 7.2
C, 2.8
14 3 C, 6.8
Number of active statements with highest grade of membership FromTable4 10,15,16 10,15,16 10,15,16 10 -From Table 5 . . . . . . . Active variable T T T T C~ Lowest value of 187 187 187 187 10.0 active variable * Modified expert base; see Table 9.
summarized in Table 8. These values of C c are used to complete the questions in Table 6 submitted to the diagnostic expert base. By studying the answer to question (4) it can be noticed that two diagnostic heuristics are still activated with almost equal grades of membership. This can indicate that either there are two simultaneous failures in the process or the expert base is too inaccurate. However, the numerical value 186°C of the active variable T could be utilized TABLE 8 Results o f the Fuzzy E v a l u a t i o n o f the P o l y m e r C o n c e n t r a t i o n C c
Examples
M e m b e r s h i p function o f C C a b c d N u m b e r o f active s t a t e m e n t s with the highest grade of m e m b e r s h i p (from Table 2) Active variable Lowest value o f active variable
4
5
6
7
0.0 3-3 16.5 24.0
15.0 24.0 40.0 48.0
0.0 4.0 15-0 24.0
15,0 24,0 40,0 48,0
6 C. 7.2
8 (7 2.8
11 Ca 6'8
7 T 187
Failure diagnosis of systems by a network of expert bases
249
TABLE 9 Modified Linguistic Values of the Temperature
Membership function*
Linguistic value
oft LO MO ME HG
a
b
c
d
150 180 187 235
150 183 195 245
180 187 235 280
183 195 245 280
* For the meaning of a, b, c and d, see Fig. 1.
and the fuzzy sets specifying the temperature in Table 2 modified. Instead of determining the temperature by three linguistic values, four linguistic values are introduced in Table 9. After this modification the diagnosis is unambiguous, as shown in Table 8. Auxiliary examples 5-7 are submitted to the modified expert base. 5
CONCLUSION
The fuzzy approach to failure diagnosis is convenient because knowledge of failures and their symptoms is usually inexact and includes a lot of experience-based data as well as expert insight into the diagnosis, which is usually unsuitable for mathematical formulation. On the contrary, fuzzy mathematics can deal with such data and put them into a form acceptable for the computer. The expert system demonstrated here with a simple network of expert bases represents a modern methodology for utilizing the increasing computer power available. This approach is more flexible and userfriendly than conventional diagnosis methods, e.g. fault trees or hazard analysis, and can be included in the computer control software. The expert system can include an expert base which recommends safety actions according to the results of failure diagnosis. The safety action expert base works as a supervisor of the normal control system. ACKNOWLEDGEMENT The authors would like to thank K. Keshinen for the fuzzy simulation program I F T H E N which was used in this study. The program is
250
P. Vaija, M. Jgirveliiinen, M. Dohnal
based on the program package C O N F U C I U S and is under further development.
REFERENCES I. Androw, P. K. Real-time analysis of process plant alarms using a minicomputer, Comput. Chem. Engng, 4 (1980), pp. 143-55. 2. Hayes-Roth, F., Waterman, D. A. and Lenat, D. B. Building Expert Systems, Addison-Wesley, Reading, Mass., 1983. 3. Androw, P. K. Fault diagnosis using intelligent knowledge based systems, Inst. Chem. Engrs Symposium Series, no. 92, Cambridge (1985), pp. 14556. 4. Dubois, D. and Prade, H. Fuzzy Sets and Systems, Theory and Applications, Academic Press, New York, 1980. 5. Dohnal, M. et al. Research Report 1985, VUT, Brno, 1985. 6. Zadeh, L. A. The role of fuzzy logic in the management of uncertainty in expert systems, Fuzzy Sets and Systems, 11 (1983), pp. 199-227. 7. Bonissone, P. P. Failure diagnosis and decision making in industrial processes: a fuzzy set application, Proceedings of the 1980 Winter Simulation Conference, paper FA5-10, p. 15. 8. Vaija, P., Turunen, I., J/irvel/iinen, M. and Dohnal, M. Fuzzy strategy for failure detection and safety control of complex processes, Microelectron. Reliab., 25 (1985), pp. 369-81. 9. Bonissone, P. P. QUAISY/DAISY: an on-line quality assurance information system/diagnosis aid system, IEEE Int. Conf. Cybernetics and Society, ICCS (1981), pp. 324-30. 10. Dohnal, M. Linguistics and fuzzy models, Comput. Ind., 4 (1983), pp. 341-5. 11. Dohnal, M. Fuzzy simulation of industrial problems, Comput. Ind., 4 (1983), pp. 347-52.
APPENDIX
Universe U is a conventional set: U = {x}
(a.1)
Fuzzy set A is a set of ordered pairs: A = {(x, m a ( X ) ) ,
X
~ U}
0 < mA(X) ~< 1
(A.2)
where mA(X ) is the grade of membership of the element x in the set A.
Failure diagnosis of systems by a network o f expert bases
251
The N-dimensional fuzzy set is N
X i = jN=lX,.j
tA.3)
R
Y, - jn=1 Y,.j
(A.4)
The rth failure symptom space is s~f~, \ j = 1
where f~, = {it if S i then Fr}
(A.6)
The grade of membership of the failure F, is
mr,(X 1,j~,
XN,jN) = max(min(ms.,,~(xlJl)'ms~.
X2,j2,
" " " ,
.., ms~N(nNj,N)).
(A.7)
where t) is the fuzzy union (max.) and 53 is the fuzzy intersection (min.). 4