Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Consistent-based Diagnosis Yuhong YAN NRC-IIT. 2 Main concepts in this paper  (Minimal) Diagnosis  Conflict Set  Proposition 3.3  Corollary 4.5.

Similar presentations


Presentation on theme: "1 Consistent-based Diagnosis Yuhong YAN NRC-IIT. 2 Main concepts in this paper  (Minimal) Diagnosis  Conflict Set  Proposition 3.3  Corollary 4.5."— Presentation transcript:

1 1 Consistent-based Diagnosis Yuhong YAN NRC-IIT

2 2 Main concepts in this paper  (Minimal) Diagnosis  Conflict Set  Proposition 3.3  Corollary 4.5  How to calculate minimal hitting set (algorithm revised!)  Not required: default logic (section 6) and section 7

3 3 Scope of this paper  Only uses nominal/right/OK model OK/right modes / right behaviour Faulty modes / faulty behaviour  Only consider minimal diagnosis (the minimal set of abnormal components)  Is logic foundation for using first order logic for diagnosis  Its revise  Its extension

4 4 Model Behavioral model of each type of component: Adder(X)  not AB(X)  out(X) = inp1(X) + inp2(X) Multiplier(X)  not AB(X)  out(X) = inp1(X) * inp2(X)... Structural model: Multiplier(Mult1), Multiplier(Mult2), Multiplier(Mult3), Adder(Add1), Adder(Add2) out(Mult1) = inp1(Add1) out(Mult2) = inp2(Add1) = inp1(Add2) out(Mult3) = inp2(Add2) Mult1 Mult2 Mult3 Add2 2 3 2 3 2 3 Add1 A B

5 5 Diagnosis on models of structure and function actual device observed behaviour model of the device predicted behaviour diagnosis designtextbookfirst principles.... model of the structure of the device and of the (nominal) behaviour of each type of component diagnosis = removing discrepancies between the nominal predicted behaviour and the observed one From Luca Console

6 6 Symbols used for system  SD: System description, a set of first- order sentences  COMPONENTS: a finite set of constants  System: a pair (SD, COMPONENTS)  AB(.): unary predicate, “abnormal”  : “imply”, other forms:  or , other direction: , :-

7 7 Symbol used for observation  OBS: observations, a finite set of first- order sentence, value assignments to some variables.  Observables: the variables can be observed/measured

8 8 Consistent  There is an interpretation that makes a set of formulas true.  Example: Consistent: {AB, AB} Inconsistent: {AB,AB, AB, AB}  Connect formula sets with union operator Example: {AB, AB}  {AB}

9 9 Some explanations  Consistency means “AND” of the formulas in the sets  Consistency of SDOBSAB(.)¬AB(.)

10 10 Definition: diagnosis A diagnosis for (SD, COMPONENTS, OBS) is a minimal set   COMPONENTS such that SDOBS{AB(c)|c}{¬AB(c)|cCOMPONENTS- } is consistent  is the smallest set of components SD is the right modes

11 11 Diagnosis  {} is a diagnosis if all components are in right modes, i.e. SDOBS{¬AB(c)|cCOMPONENTS} is consistent  Before computing diagnosis Should have enough observables Is a NP-hard problem

12 12 Proposition 3.3 If  is a diagnosis for (SD, COMPONENTS, OBS), then for each c i . SDOBS{¬AB(c)|cCOMPONENTS- }|=AB(c i )  faulty components are logically determined by the normal components

13 13 Compute diagnoses  Direct compute  Compute conflict set (by using ATMS) then compute diagnoses from conflict set

14 14 Definition: Conflict set A conflict set for (SD, COMPONENTS, OBS) is a set { c 1, …, c k }COMPONENTS such that SDOBS{¬AB(c 1 ), …, ¬AB(c k )} is inconsistent A conflict set for (SD, COMPONENTS, OBS) is minimal iff no proper subset of it a conflict set for (SD, COMPONENTS, OBS)

15 15 How to compute diagnosis  Theorem4.4: COMPONENTS is a diagnosis for (SD, COMPONENTS, OBS) iff  is a minimal hitting set for the collection of conflict sets for (SD, COMPONENTS, OBS) (A diagnosis is the minimal hitting set of conflict sets)  Corollary4.5: COMPONENTS is a diagnosis for (SD, COMPONENTS, OBS) iff  is a minimal hitting set for the collection of minimal conflict sets for (SD, COMPONENTS, OBS)

16 16 Minimal hitting set A hitting set for a collection of sets C is a set H   SC S such that HS{ } for each SC. A hitting set is minimal iff no proper subset of it is a hitting set for C.

17 17 Compute Minimal Hitting Set  Hitting set tree (HS-tree): a smallest edge- labeled and node-labeled tree for C a collection of sets The root is labeled by  if C is empty, otherwise the root is labeled by an arbitrary set of C For each node n of T, let H(n) be the set of edge labels on the path in T from the root node to n. The label for n is any set  C such that  H(n) = {}, if such a set  exists. Otherwise, the label for n is , If n is labeled by the set , then for each  , n has a successor, n , joined to n by an edge labeled by 

18 18 Mult1 Mult2 Mult3 Add2 2 3 2 3 2 3 Add1 A B Prediction: A=12, B=12 12 Observation A=10, B=12 10 12 A=10 generates two conflicts: {A1, M1, M2} {A1, M1, M3, A2} Example

19 19 HS Tree {M1,M2,A1} {M3,A2,M1,A1}   M1 M2 A1  M3 A2M1 A1

20 20 Constructing HS-Tree  Keep the HS-tree as small as possible  Calculate only minimal hitting set  Minimize the number of calls to the underlying theorem prover

21 21 Algorithm: outline  Generate a HS-tree  Return {H(n)|n is a node labeled }

22 22 Algorithm: more detail  Select a set from C as root node, label the root node with this set  For each , generate an arc labeled by   For a new node n Select the first member xC, such that H(n)x={}, label n by x. If such x doesn’t exist, label n by “ “. If n is labeled by x, x , for each  x, generate an arc labeled by . If m, H(m)=H(n){}, the arc points to m (a graph)

23 23 Optimization Strategies  Reusing Nodes: If m, H(m)=H(n){}, the arc points to m (a graph)  Closing If n’, n’ labeled by “ “ and H(n’)H(n), then close n.  Pruning (Subset problem) A old node n’, labeled S’; A new node n, labeled  If S’, relabel n’ with . Remove arcs S’-  Interchange S’ and  in collection

24 24 New Measurements  A diagnosis can predict some behavior  Example SD OBS {¬AB(c)|cCOMPONENTS-}|=   Confirming measurements preserve diagnoses (which predict )  Disconfirming measurements reject diagnoses (which predict ¬)

25 25 Observation vs. Prediction Mult1 Mult2 Mult3 Add2 2 3 2 3 2 3 Add1 A B (12) 10 12 SD OBS {M1}|={out(Mult1)=4, out(Mult2)=6}

26 26 Summary of Reiter’s Paper  The diagnosis is the minimal hitting set of conflict sets  An algorithm for computing minimal hitting set

27 27 Assignment 1 Use the revised algorithm to compute minimal hitting set Language: Java Inputs: F is conflict sets (vector of vectors) in a file Outputs: minimal hitting sets (vector of vectors) Option functions:  Display the tree on the screen (good for debug)  The number of times visiting conflict sets (efficiency)  Single fault diagnoses (only first level)  Write result to a file NO more than required

28 28 Please notice  The input vectors in different sequences  Reduce the access times to conflict sets F  Option functions can add points  Functions beyond basic functions and option functions can NOT add points

29 29 My test cases  3-multi-2-adder {{Add1, Mult1, Mult2},{Add1, Mult1, Mult3, Add2}}  Full adder {{X1,X2},{X1,A2,O1}}  Case A {{a,b},{b,c},{a,c},{b,d},{b}}  Case B {{2,4,5},{1,2,3},{1,3,5},{2,4,6},{2,4},{1,6} }

30 30 Oral Test  Read paper Randall Davis, “Diagnostic Reasoning Based on Structure and Behavior”, Artificial Intelligence 24 (1984), 347-410  Half hour presentation, half hour q&a  Audit students are invited to present


Download ppt "1 Consistent-based Diagnosis Yuhong YAN NRC-IIT. 2 Main concepts in this paper  (Minimal) Diagnosis  Conflict Set  Proposition 3.3  Corollary 4.5."

Similar presentations


Ads by Google