23
10/03/03 copyright Brian Williams, 2003 1 3/6/00 Model-based Diagnosis and Conflict-directed Search Brian C. Williams 16.410-13 Session 18 courtesy of JPL Brian C. Williams, copyright 2000 10/03/03 2 Assignment copyright Brian Williams, 2003 Reading Model-based Diagnosis – Lecture notes Propositional Logic AIMA Chapter 6 10/03/03 3 sense P(s) observations actions AGENT Plant act copyright Brian Williams, 2003 WORLD Diagnostic Agent: • Monitors & Diagnoses • Repairs & Avoids • Probes and Tests Symptom-directed 1

L18 model-based diagnosis reviseddspace.mit.edu/bitstream/handle/1721.1/71858/16-410-fall... · 2019. 9. 12. · Input Model: Abductive, Model-based Diagnosis Or(i): (i) (i): copyright

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: L18 model-based diagnosis reviseddspace.mit.edu/bitstream/handle/1721.1/71858/16-410-fall... · 2019. 9. 12. · Input Model: Abductive, Model-based Diagnosis Or(i): (i) (i): copyright

10/03/03 copyright Brian Williams, 2003 1

3/6/00

Model-based Diagnosisand Conflict-directed Search

Brian C. Williams16.410-13Session 18

courtesy of JPL Brian C. Williams, copyright 2000

10/03/03 2

Assignment

� �

copyright Brian Williams, 2003

Reading Model-based Diagnosis – Lecture notes Propositional Logic AIMA Chapter 6

10/03/03 3

sense P(s)

observations actions

AGENT

Plant

act

copyright Brian Williams, 2003

WORLD

Diagnostic Agent:

• Monitors & Diagnoses

• Repairs & Avoids

• Probes and Tests Symptom-directed

1

Page 2: L18 model-based diagnosis reviseddspace.mit.edu/bitstream/handle/1721.1/71858/16-410-fall... · 2019. 9. 12. · Input Model: Abductive, Model-based Diagnosis Or(i): (i) (i): copyright

Or1

10/03/03 4

Outline

� Defini�

copyright Brian Williams, 2003

Model-based diagnosis ng diagnoses

Searching for diagnoses Appendix

10/03/03 5

• • • •

:

• • •

copyright Brian Williams, 2003

Hidden Failures Require Reasoning from a Model: STS-93

Symptoms: Engine temp sensor high LOX level low GN&C detects low thrust H2 level possibly low

Problem Liquid hydrogen leak

Effect: LH2 used to cool engine Engine runs hot Consumes more LOX

10/03/03 6

Model-based Diagnosis Input: of a

model

Output: that .

11

1 Or2

Or3

A

B C D

E

F

G

X

Y

Z

1

1 1 1

0

0

1

Or1

1

1

copyright Brian Williams, 2003

Observations system with symptomatic behavior, and a of the system,

Diagnoses account for the symptoms

Symptom

And1

And2

3/6/00

2

Page 3: L18 model-based diagnosis reviseddspace.mit.edu/bitstream/handle/1721.1/71858/16-410-fall... · 2019. 9. 12. · Input Model: Abductive, Model-based Diagnosis Or(i): (i) (i): copyright

3/6/00

10/03/03 7

Model-based Diagnosis

11

1

Or1

Or2

Or3

A

B C D

E

F

G

X

Y

Z

1

1 1 1

0

0

1 0

1

Input: of a model

Output: that .

copyright Brian Williams, 2003

Symptom

And1

And2

Observations system with symptomatic behavior, and a of the system,

Diagnoses account for the symptoms

10/03/03 8

Solution: Diagnosis as Hypothesis Testing

1. Generate 2. Test

• . •

copyright Brian Williams, 2003

candidates, given symptoms. if candidates account for all symptoms.

Set of diagnoses should be completeSet of diagnoses should exploit all available information.

10/03/03 9

Outline

� Defini�

copyright Brian Williams, 2003

Model-based diagnosis ng diagnoses

Explaining failures (appendix) Handling unknown failures

Searching for diagnoses Appendix

3

Page 4: L18 model-based diagnosis reviseddspace.mit.edu/bitstream/handle/1721.1/71858/16-410-fall... · 2019. 9. 12. · Input Model: Abductive, Model-based Diagnosis Or(i): (i) (i): copyright

1 1 Symptom

10/03/03 10

How Should Diagnoses Account for Symptoms?

predict 1

1

0O1

O2

O3

A1

A2

A

B C D

E

1

1 1 1

0

F

G

X

Y

Z

0

1

copyright Brian Williams, 2003

Abductive Diagnosis: Given symptoms, find diagnoses that observations.

Symptom

Requires exhaustive fault models.

10/03/03 11

How Should Diagnoses Account for Symptoms?

predict

1

O1

O2

O3

A1

A2

A

B C D

E

1

1 1 1

0

F

G

X

Y

Z

0

1

• Fault Model to 0 •

0 0

0

1

copyright Brian Williams, 2003

Abductive Diagnosis: Given symptoms, find diagnoses that observations.

: O1’s output is stuck Output shorted to ground

10/03/03 12

� �

� Model of �

� ions �

1

1 1 1

0

O1

O2

O3

A1

A2

A

B C D

E

F

G

X

Y

Z

Or(i): �

(i) � (i):

0

1

Input: Abductive, Model-based Diagnosis

copyright Brian Williams, 2003

Model Structure

normal behavior for each component Model for every component failure mode

ObservatInputs and Response

G(i): Out(i) = In1(i) or In2

Stuck_0Out(i) = 0

3/6/00

4

Page 5: L18 model-based diagnosis reviseddspace.mit.edu/bitstream/handle/1721.1/71858/16-410-fall... · 2019. 9. 12. · Input Model: Abductive, Model-based Diagnosis Or(i): (i) (i): copyright

3/6/00

10/03/03 13

� X � Dc c ∈ X � Y � M( ) � O ⊆ Y

1

1 1 1

0

O1

O2

O3

A1

A2

A

B C D

E

F

G

X

Y

Z

0

1

Input Model: Abductive, Model-based Diagnosis Or(i): �

(i) � (i):

copyright Brian Williams, 2003

mode variables, one for each component c modes of component c = domain of xmodel variables and their domains

X, Y model constraints observable variables O

Partitioned into Inputs I and Responses R

G(i): Out(i) = In1(i) or In2

Stuck_0Out(i) = 0

10/03/03 14

Model-based Diagnosis

11

1

Or1

Or2

Or3

A

B C D

E

F

G

X

Y

Z

1

1 1 1

0

0

1 0

1

Input: of a model

Output: that .

copyright Brian Williams, 2003

Symptom

And1

And2

Observations system with symptomatic behavior, and a of the system,

Diagnoses account for the symptoms

10/03/03 15

� i ly � i i: � i:

Di ∧ In ∧ )

O1

O2

O3

A1

A2

A

B C D

E

F

G

X

Y

Z

Input Ö Output: Abductive, Model-based Diagnosis

1

1 1 1

0

0

1

Or(i): �

(i) � (i):

copyright Brian Williams, 2003

Obs <In, Resp>: Ass gnment to I and R, respectiveCand date C Assignment of modes to X Diagnosis D A candidate such that

M(X,Y predicts (entails) Resp

Diagnosis = {A1=G, A2=S0, O1=G, M2=G, M3=G} Candidate = {A1=G, A2=G, O1=G, M2=G, M3=G}

G(i): Out(i) = In1(i) or In2

Stuck_0Out(i) = 0

5

Page 6: L18 model-based diagnosis reviseddspace.mit.edu/bitstream/handle/1721.1/71858/16-410-fall... · 2019. 9. 12. · Input Model: Abductive, Model-based Diagnosis Or(i): (i) (i): copyright

3/6/00

10/03/03 16

by Generate and Test i

i

i

• • •

3. i i

copyright Brian Williams, 2003

Abductive Diagnosis

Given: Exhaust ve fault models, structure and observations.

Generate: Cons der each mode assignment as a candidate. Test: 1. Simulate candidate, given nputs. 2. Compare to responses

Disagree: Discard Agree: Keep No prediction: Discard

Exonerate component f none of ts fault models agree

Problem: • Fault models are often incomplete • May incorrectly exonerate faulty components

10/03/03 17

Outline

� Defini�

copyright Brian Williams, 2003

Model-based diagnosis ng diagnosis

Explaining failures (appendix) Handling unknown failures

Searching for diagnoses Appendix

10/03/03 18

• • • • Deep Space 2

copyright Brian Williams, 2003

Mars Observer Mars Climate Orbiter Mars Polar Lander

courtesy of JPL

Issue: Failures are Often Novel

6

Page 7: L18 model-based diagnosis reviseddspace.mit.edu/bitstream/handle/1721.1/71858/16-410-fall... · 2019. 9. 12. · Input Model: Abductive, Model-based Diagnosis Or(i): (i) (i): copyright

10/03/03 copyright Brian Williams, 2003 19

3/6/00

10/03/03 20

How Should Diagnoses Account for Novel Symptoms?

no

1

1

1Or1

Or2

Or3

A

B C D

E

1

1 1 1

0

F

G

X

Y

Z

0

1

copyright Brian Williams, 2003

Consistency-based Diagnosis: Given symptoms, find diagnoses that are consistent with symptoms.

Suspending Constraints: For novel faults make presumption about faulty component behavior.

Symptom

And1

And2

10/03/03 21

no

1

1

1Or1

Or2

Or3

A

B C D

E

1

1 1 1

0

F

G

X

Y

Z

0

1

How Should Diagnoses Account for Novel Symptoms?

copyright Brian Williams, 2003

Consistency-based Diagnosis: Given symptoms, find diagnoses that are consistent with symptoms.

Suspending Constraints: For novel faults make presumption about faulty component behavior.

Symptom

And1

And2

7

Page 8: L18 model-based diagnosis reviseddspace.mit.edu/bitstream/handle/1721.1/71858/16-410-fall... · 2019. 9. 12. · Input Model: Abductive, Model-based Diagnosis Or(i): (i) (i): copyright

3/6/00

10/03/03 22

no

1

1

Or1

Or2

Or3

A

B C D

E

1

1 1 1

0

F

G

X

Y

Z

0

1

How Should Diagnoses Account for Novel Symptoms?

copyright Brian Williams, 2003

Consistency-based Diagnosis: Given symptoms, find diagnoses that are consistent with symptoms.

Suspending Constraints: For novel faults make presumption about faulty component behavior.

And1

And2

10/03/03 23

Consistency-based Diagnosis

): � G(i):

( (i) � U(i):

� Obs: � i: � Diagnosis Di:

Di ∧ Obs ∧ .

1

1 1 1

0

O1

O3

A1

A

B C D

E

F

G

X

Y

Z

0

1

A2=U

copyright Brian Williams, 2003

And(i

Out(i) = In1 i) AND In2

Assignment to O Candidate C Assignment of modes to X

A candidate such that M(X,Y) is satisfiable

Diagnosis = {A1=G, O1=G, O2=U, O3=G}

ALL components have “unknown Mode” U, Whose assignment is never mentioned in M

10/03/03 24

Testing Consistency →

• DPLL (Titan) )

• •

(s) copyright Brian Williams, 2003

Propositional Logic

• Just unit propagation (incomplete) (Livingstone/DS1

•Finite Domain Constraints • Backtrack w forward checking • Waltz constraint propagation (incomplete)

Algebraic Constraints (GDE/Sherlock/GDE+/XDE) • Gaussian Elimination

Sussman/Steele Constraint Propagation (incomplete) Propagate newly assigned values through equations mentioning

variables. • To propagate, use assigned values of constraint to

deduce unknown value of constraint.

8

Page 9: L18 model-based diagnosis reviseddspace.mit.edu/bitstream/handle/1721.1/71858/16-410-fall... · 2019. 9. 12. · Input Model: Abductive, Model-based Diagnosis Or(i): (i) (i): copyright

3/6/00

10/03/03 copyright Brian Williams, 2003 25

X ∈{1,0} X=1 ∨ X=0 ¬X=1∨ ¬X=0

Encoding Models In Propositional Logic

¬(i=G) ∨ ¬(In1(i)=1) ∨ Out(i)=1 ¬(i=G) ∨ ¬(In2(i)=1) ∨ Out(i)=1 ¬(i=G) ∨ ¬(In1(i)=0) ∨ ¬(In2(i)=0) ∨ Out(i)=0

And(i): � G(i):

Out(i) = In1(i) AND In2(i) � U(i):

Or(i): � G(i):

Out(i) = In1(i) OR In2(i) � U(i):

¬(i=G) ∨ ¬(In1(i)=0) ∨ Out(i)=0 ¬(i=G) ∨ ¬(In2(i)=0) ∨ Out(i)=0 ¬(i=G) ∨ ¬(In1(i)=1) ∨ ¬(In2(i)=1) ∨ Out(i)=1

10/03/03 copyright Brian Williams, 2003 26

Outline

� Model-based diagnosis � Defining diagnosis � Explaining failures (appendix) � Handling unknown failures

� Searching for diagnoses � Conflict learning � Single-fault diagnosis

� Appendix � Multiple-fault diagnosis

10/03/03 copyright Brian Williams, 2003 27

O1

O2 A1

A

B C D

E

1

1 1 1

F

G

X

Y

Z

Symptom: F is observed 0, but should be 1 if O1, O2 and A1 are okay.

Conflict: {A1=G, O1=G, O2=G} is inconsistent

F 0 1

1

1

→ At least A1=U or O1=U or O2=U

Learning Conflicts From Symptoms

0 O3 A3

9

Page 10: L18 model-based diagnosis reviseddspace.mit.edu/bitstream/handle/1721.1/71858/16-410-fall... · 2019. 9. 12. · Input Model: Abductive, Model-based Diagnosis Or(i): (i) (i): copyright

3/6/00

10/03/03 28

r q

p

C2: ¬ p ∨ ¬ t

true false

true

t false

(C) // C lif in C l l ithen i l

C l and C’ “ l”,

(C’) end

C1 : ¬r ∨ q ∨ p

copyright Brian Williams, 2003

procedure propagate is a c ause all literals are false except , and s unassigned

ass gn true to and record as a support for for each clause mentioning not

propagatepropagate

Find Symptom Using Unit Propagation

10/03/03 29

¬ ∨ ¬(A=1) ∨ X=1

¬ ∨ ¬(X=1) ∨ ¬(Y=1) ∨

¬ ∨ ¬ ) ∨

¬(F=1) ∨ ¬ )

B=1

A=1

X=1

A1=G

F=1 F=1

copyright Brian Williams, 2003

Find Symptom Using Unit Propagation

(O1=G)

(A1=G) F=1

(O2=G) (B=1 Y=1

(F=0O1=G

O2=G

Y=1

10/03/03 30

¬ ∨ ¬(A=1) ∨ X=1

¬ ∨ ¬(X=1) ∨ ¬(Y=1) ∨

¬ ∨ ¬ ) ∨

¬(F=1) ∨ ¬ )

B=1

B=1 true

A=1

A=1 true

X=1

A1=G

F=1

F=1

F=1 true

copyright Brian Williams, 2003

Find Symptom Using Unit Propagation

(O1=G)

(A1=G) F=1

(O2=G) (B=1 Y=1

(F=0O1=G

O2=G

Y=1

10

Page 11: L18 model-based diagnosis reviseddspace.mit.edu/bitstream/handle/1721.1/71858/16-410-fall... · 2019. 9. 12. · Input Model: Abductive, Model-based Diagnosis Or(i): (i) (i): copyright

3/6/00

10/03/03 31

¬ ∨ ¬(A=1) ∨ X=1

¬ ∨ ¬(X=1) ∨ ¬(Y=1) ∨

¬ ∨ ¬ ) ∨

¬(F=1) ∨ ¬ )

B=1

true

B=1 truetrue

A=1

A=1 true

X=1

A1=G true

F=1

F=1

F=1 true

copyright Brian Williams, 2003

Find Symptom Using Unit Propagation

(O1=G)

(A1=G) F=1

(O2=G) (B=1 Y=1

(F=0

O1=G

O1=G

O2=G

O2=G

Y=1

A1=G

10/03/03 32

¬ ∨ ¬(A=1) ∨ X=1

¬ ∨ ¬(X=1) ∨ ¬(Y=1) ∨

¬ ∨ ¬ ) ∨

¬(F=1) ∨ ¬ )

B=1

true

B=1 truetrue

A=1

A=1 true

X=1 true

true

A1=G true

F=1

F=1

F=1 true

copyright Brian Williams, 2003

Find Symptom Using Unit Propagation

(O1=G)

(A1=G) F=1

(O2=G) (B=1 Y=1

(F=0

O1=G

O1=G

O2=G

O2=G

Y=1

A1=G

10/03/03 33

¬ ∨ ¬(A=1) ∨ X=1

¬ ∨ ¬(X=1) ∨ ¬(Y=1) ∨

¬ ∨ ¬ ) ∨

¬(F=1) ∨ ¬ )

B=1

true

B=1 truetrue

A=1

A=1 true

X=1 true

true

A1=G true

F=1 true

F=1

F=1 true

copyright Brian Williams, 2003

Find Symptom Using Unit Propagation

(O1=G)

(A1=G) F=1

(O2=G) (B=1 Y=1

(F=0

O1=G

O1=G

O2=G

O2=G

Y=1

A1=G

11

Page 12: L18 model-based diagnosis reviseddspace.mit.edu/bitstream/handle/1721.1/71858/16-410-fall... · 2019. 9. 12. · Input Model: Abductive, Model-based Diagnosis Or(i): (i) (i): copyright

3/6/00

10/03/03 34

¬ ∨ ¬(A=1) ∨ X=1

¬ ∨ ¬(X=1) ∨ ¬(Y=1) ∨

¬ ∨ ¬ ) ∨

¬(F=1) ∨ ¬ )

B=1

true

B=1 truetrue

A=1

A=1 true

X=1 true

true

A1=G true

F=1 true

F=1

F=1 true

copyright Brian Williams, 2003

Extract Conflict by Tracing Support

(O1=G)

(A1=G) F=1

(O2=G) (B=1 Y=1

(F=0

O1=G

O1=G

O2=G

O2=G

Y=1

A1=G

10/03/03 35

(C) // C l i

union end

lict )

i i l (C)) i ) }

Else { } El li l

i lend l

copyright Brian Williams, 2003

procedure Conflict is an inconsistent c ause for each literal I n C

Support-Conflict(l, support(l) ) Conflict

procedure Support-Conf (l,SIf unit-clause?(C)

If mode-ass gnment?(l teraThen { l teral(C

se for each teral I1 in C, other thanUnion Support-Confl ct(l1, support( 1)) Support-Conf ict

Extract Conflict by Tracing Support

10/03/03 36

procedure

2. Propagate obs . 3. If 4. using DPLL

• If c . “consistent”

copyright Brian Williams, 2003

Candidate Test with Conflict Extraction

Test_Candidate(c,M,obs) 1. Assert candidate assignment c

through model M using unit propagationinconsistent clause return Conflict(c)

Else search for satisfying solution inconsistent return as a conflict

• Else return

12

Page 13: L18 model-based diagnosis reviseddspace.mit.edu/bitstream/handle/1721.1/71858/16-410-fall... · 2019. 9. 12. · Input Model: Abductive, Model-based Diagnosis Or(i): (i) (i): copyright

3/6/00

10/03/03 37

Outline

� Defini� �

copyright Brian Williams, 2003

Model-based diagnosis ng diagnosis

Searching for diagnoses Conflict learning Single-fault diagnosis

Appendix

10/03/03 38

l 1. ,

∈ X} 2. Conflict ← 3. If return All_Good 4.

Cands ← {{x=U}∪Z=G | x=G ∈ 5.

copyright Brian Williams, 2003

Single Fault Diagnosis w Conflicts: Generate Candidates From Symptom

Single_Fault_w_Conflicts(M, X, Obs) \\ Mode M, Mode variables X, Observation Obs Assume all components okayAll_Good = { x=G | x

Test_Candidate(All_Good, M, Obs) Conflict = “consistent”

Generate single fault candidates Conflict, Z=X-{x}}

Test_Candidates(Cands, M, Obs)

10/03/03 39

0 1

1

0

O1

O2

O3

A1

A2

A

B C D

E

F

G

X

Y

Z

1

1 1 1

0

0

1 1

0

copyright Brian Williams, 2003

Symptom: F is observed , but should be

Conflict: {O1=G, O3=G, A1=G, A2=G} is inconsistent

Candidates: {{O1=U…}, {O3=U…}, {A1=U...}, {A2=U…}}

Generate Candidates From Symptom

Symptom

13

Page 14: L18 model-based diagnosis reviseddspace.mit.edu/bitstream/handle/1721.1/71858/16-410-fall... · 2019. 9. 12. · Input Model: Abductive, Model-based Diagnosis Or(i): (i) (i): copyright

3/6/00

10/03/03 40

0 1

1

0

O1

O2

O3

A1

A2

A

B C D

E

F

G

X

Y

Z

1

1 1 1

0

0

1 1

0

copyright Brian Williams, 2003

Symptom: F is observed , but should be

Conflict: {O1=G, O3=G, A1=G, A2=G} is inconsistent

Candidates: {{O1=U…}, {O3=U…}, {A1=U...}, {A2=U…}}

Generate Candidates From Symptom

Symptom

10/03/03 41

l l i )

← ← {}

If l li .

If li ”

i li

copyright Brian Williams, 2003

Single Fault Diagnosis w Conflicts: Test Candidates, Collecting Conflicts

Sing e_Fau t_Test_Cand dates(C,M, Obs\\ Candidates C, Model M, Observation Obs

Diagnoses {}, Conflicts For each c in C

c is a superset of some conf ict in Conf icts Then inconsistent cand date, ignoreElse Conflict = Test_Candidate(c, M, Obs)

Conf ct = “consistentThen add c to Diagnoses Else add Confl ct to Conf cts

return Diagnoses

10/03/03 42

O11

1 1 1

0

O2

O3

A1

A2

A

B C D

E

F

G

X

Y

Z

0

1

1

1

{

Candidates: {{O1=U…}, {O3=U…}, ,

copyright Brian Williams, 2003

Test Candidates, Collecting Conflicts

• First candidate O1=U, …}

{A1=U…} {A2=U…}}

Diagnoses: {}

14

Page 15: L18 model-based diagnosis reviseddspace.mit.edu/bitstream/handle/1721.1/71858/16-410-fall... · 2019. 9. 12. · Input Model: Abductive, Model-based Diagnosis Or(i): (i) (i): copyright

3/6/00

10/03/03 43

1

1 1 1

0

O2

O3

A1

A2

A

B C D

E

F

G

X

Y

Z

0

1

…}

Candidates: {{O1=U…}, {O3=U…}, ,

copyright Brian Williams, 2003

• First candidate {O1=U, • Suspend O1’s constraints

Test Candidates, Collecting Conflicts {A1=U…} {A2=U…}}

Diagnoses: {}

10/03/03 44

1

1 1 1

0

O2

O3

A1

A2

A

B C D

E

F

G

X

Y

Z

0

1 11

1

Candidates: {{O1=U…}, {O3=U…}, ,

copyright Brian Williams, 2003

• First candidate {O1=U, …} • Suspend O1’s constraints • Test consistency

Test Candidates, Collecting Conflicts {A1=U…} {A2=U…}}

Diagnoses: {}

10/03/03 45

1

1 1 1

0

O2

O3

A1

A2

A

B C D

E

F

G

X

Y

Z

0

1 11

1

Candidates:

{{O1=U…}}

copyright Brian Williams, 2003

• First candidate {O1=U, …} • Suspend O1’s constraints • Test consistency Consistent: Add to solutions

Test Candidates, Collecting Conflicts {{O3=U…}, {A1=U…}, {A2=U…}}

Diagnoses:

15

Page 16: L18 model-based diagnosis reviseddspace.mit.edu/bitstream/handle/1721.1/71858/16-410-fall... · 2019. 9. 12. · Input Model: Abductive, Model-based Diagnosis Or(i): (i) (i): copyright

3/6/00

10/03/03 46

1

1 1 1

0

O1

O2

O3 A2

A

B C D

E

F

G

X

Y

Z

0

1

A1

{{ ,

copyright Brian Williams, 2003

Test Candidates, Collecting Conflicts

• Second candidate {O3=U, …} • Suspend O3’s constraints • Test consistency

Candidates: O3=U…} {A1=U…}, {A2=U…}}

Diagnoses: {{O1=U…}}

10/03/03 47

1

1 1 1

0

O1 A1

A2

A

B C D

E

F

G

X

Y

Z

0

1 1

1

11

≠ Forward Prediction

{{

O2

copyright Brian Williams, 2003

Test Candidates, Collecting Conflicts

• Second candidate {O3=U, …} • Suspend O3’s constraints • Test consistency Inconsistent

Testing Consistency

Candidates: O3=U…}, {A1=U…}, {A2=U…}}

Diagnoses: {{O1=U…}}

10/03/03 48

1

1 1 1

0

O1 A1

A2

A

B C D

E

F

G

X

Y

Z

0

1 1

1

11

{

{{ ,

{ }

O2

copyright Brian Williams, 2003

Test Candidates, Collecting Conflicts

• Second candidate {O3=U, …} • Suspend O3’s constraints • Test Inconsistent

• Extract Conflict: O1=G, O2=G, A1=G}

• Use to prune candidates

Candidates: O3=U…} {A1=U…}, {A2=U…}}

Diagnoses: {{O1=U…}}

Conflicts: {O1=G, O2=G, A1=G}

16

Page 17: L18 model-based diagnosis reviseddspace.mit.edu/bitstream/handle/1721.1/71858/16-410-fall... · 2019. 9. 12. · Input Model: Abductive, Model-based Diagnosis Or(i): (i) (i): copyright

3/6/00

10/03/03 49

1

1 1 1

0

O1

O3

A1

A2

A

B C D

E

F

G

X

Y

Z

0

1 1

1

1

1O2

Candidates:

{ }

copyright Brian Williams, 2003

Test Candidates, Collecting Conflicts

• Third candidate {A1=U, …} • Subsumed by conflict? • Suspend A1’s constraints • Test Consistent

{{A1=U…}, {A2=U…}}

Diagnoses: {{O1=U…}}

Conflicts: {O1=G, O2=G, A1=G}

No, since A1 = U, not A1=G

10/03/03 50

1

1 1 1

0

O1

O3

A1

A2

A

B C D

E

F

G

X

Y

Z

0

1

O2

Candidates: {{A2=U…}}

{ }

copyright Brian Williams, 2003

Test Candidates, Collecting Conflicts

• Fourth candidate {A2=U, …} • Subsumed by conflict? • Eliminate candidate

Consistent

Diagnoses: {{O1=U…}, {A1=U…}}

Conflicts: {O1=G, O2=G, A1=G}

Yes, since O1=G,O2=G and A1=G

10/03/03 51

1

1 1 1

0

O1

O3

A1

A2

A

B C D

E

F

G

X

Y

Z

0

1

O2

Candidates: {}

{ }

copyright Brian Williams, 2003

Test Candidates, Collecting Conflicts

• Return Solutions O1 or A1 broken

Diagnoses: {{O1=U…}, {A1=U…}

Conflicts: {O1=G, O2=G, A1=G}

17

Page 18: L18 model-based diagnosis reviseddspace.mit.edu/bitstream/handle/1721.1/71858/16-410-fall... · 2019. 9. 12. · Input Model: Abductive, Model-based Diagnosis Or(i): (i) (i): copyright

3/6/00

10/03/03 52

{A1=G, O1=U, O2=U}

{A1=U, A2=U, O1=U, O3=U}

copyright Brian Williams, 2003

Single Fault Diagnoses = {{A1=U..}, {O1=U..}}

Single Fault Diagnoses are the Intersection of All Conflicts

A1=U or O1=U or O2=U removes conflict 1

A1=U or A2=U or O1=U or O3=U removes conflict 2

conflict 1

conflict 2

10/03/03 53

Outline

� � � i�

� � i� l

� Appendix � Mul l is

copyright Brian Williams, 2003

Model-based diagnosis Defining diagnosis

Explain ng failures Handling unknown failures

Searching for diagnoses Confl ct learning Sing e-fault diagnosis

tiple-fau t diagnos

10/03/03 54

Summary:

• A failure is a l

• Diagnosis is . • as

initial i . • Test by i

and . •

copyright Brian Williams, 2003

Model-based Diagnosis

discrepancy between the modeand observations of an artifact.

symptom directedSymptoms identify conflicting components

cand datesnovel failures suspend ng constraints testing consistency

Newly discovered conflicts further prune candidates.

18

Page 19: L18 model-based diagnosis reviseddspace.mit.edu/bitstream/handle/1721.1/71858/16-410-fall... · 2019. 9. 12. · Input Model: Abductive, Model-based Diagnosis Or(i): (i) (i): copyright

3/6/00

10/03/03 55

Apendix

� l

copyright Brian Williams, 2003

Multiple Fau t Diagnosis

10/03/03 56

Multiple Faults Occur

l

• i

• i

i•

licopyright Brian Williams, 2003

courtesy of NASA

Quintuple fault occurs (three shorts, tank-line and pressure jacket burst, paneflies off). Power lim tations too severe to perform new mission.. Novel reconfiguration dentified, exploiting LEM batter es for power. Swaggert & Lovell work on Apollo 13 emergency rig thium hydroxide unit.

APOLLO 13

Courtesy of Kanna Rajan, NASA Ames. Used with permission.

10/03/03 57

� i i

3

2 2 3

3

M1

M2

M3

A1

A2

A

B C D

E

F

G

X

Y

Z

10 Adder(i): �

) � U(i): 12

Diagnosis identifies consistent modes

copyright Brian Williams, 2003

Cand date: Ass gnment to all component modes.

G(i): Out(i) = In1(i)+In2(i

Candidate = {A1=G, A2=G, M1=G, M2=G, M3=G}

19

Page 20: L18 model-based diagnosis reviseddspace.mit.edu/bitstream/handle/1721.1/71858/16-410-fall... · 2019. 9. 12. · Input Model: Abductive, Model-based Diagnosis Or(i): (i) (i): copyright

3/6/00

10/03/03 58

Diagnosis identifies All sets of consistent modes Adder(i): �

) � U(i):

� i

� l ii

Î i l

3

2 2 3

3

M1

M3

A1

A

B C D

E

F

G

X

Y

Z

10

12

A2=U, M3=G}

copyright Brian Williams, 2003

G(i): Out(i) = In1(i)+In2(i

Diagnosis D: Cand date consistent with model Phi and observables OBS. As more constraints are re axed, cand dates are more easily satisf ed. Typ cally an exponentia number of candidates.

Diagnosis = {A1=G, M1=G, M2=U,

10/03/03 59

? ?3

2 2 3

3

M1

M3

A1

A

B C D

E

F

G

X

Y

Z

10

12?

A2=U, }

Representing Diagnoses Compactly: Kernel Diagnoses

copyright Brian Williams, 2003

“Smallest” sets of modes that remove all symptoms

Kernel Diagnosis = { M2=U

Every candidate that is a subset of a kernel diagnosis is a diagnosis.

10/03/03 60copyright Brian Williams, 2003

Kernel Diagnoses =

Generate Kernels From Conflicts

A1=U or M1=U or M2=U removes conflict 1.

A1=U or A2=U or M1=U or M3=U removes conflict 2

“Smallest” sets of modes that remove all conflicts

{A1=G, M1=U, M2=U} conflict 1.

{A1=U, A2=U, M1=U, M3=U} conflict 2

20

Page 21: L18 model-based diagnosis reviseddspace.mit.edu/bitstream/handle/1721.1/71858/16-410-fall... · 2019. 9. 12. · Input Model: Abductive, Model-based Diagnosis Or(i): (i) (i): copyright

3/6/00

10/03/03 61

{A1=U}

copyright Brian Williams, 2003

Kernel Diagnoses =

“Smallest” sets of modes that remove all conflicts

A1=U or M1=U or M2=U removes conflict 1.

A1=U or A2=U or M1=U or M3=U removes conflict 2

Generate Kernels From Conflicts

10/03/03 62

{M1=U} {A1=U}

copyright Brian Williams, 2003

Kernel Diagnoses =

“Smallest” sets of modes that remove all conflicts

A1=U or M1=U or M2=U removes conflict 1.

A1=U or A2=U or M1=U or M3=U removes conflict 2

Generate Kernels From Conflicts

10/03/03 63

{M1=U} {A1=U}

copyright Brian Williams, 2003

Kernel Diagnoses = {A2=U, M2=U}

“Smallest” sets of modes that remove all conflicts

A1=U or M1=U or M2=U removes conflict 1.

A1=U or A2=U or M1=U or M3=U removes conflict 2

Generate Kernels From Conflicts

21

Page 22: L18 model-based diagnosis reviseddspace.mit.edu/bitstream/handle/1721.1/71858/16-410-fall... · 2019. 9. 12. · Input Model: Abductive, Model-based Diagnosis Or(i): (i) (i): copyright

3/6/00

10/03/03 64

{M1=U} {A1=U}

copyright Brian Williams, 2003

Kernel Diagnoses = {M2=U, M3=U} {A2=U, M2=U}

“Smallest” sets of modes that remove all conflicts

A1=U or M1=U or M2=U removes conflict 1.

A1=U or A2=U or M1=U or M3=U removes conflict 2

Generate Kernels From Conflicts

10/03/03 65

Diagnosis by Divide and Conquer

� �

( → candidates) �

i

copyright Brian Williams, 2003

Given model Phi and observations OBS 1. Find all symptoms 2. Diagnose each symptom separately

each generates a conflict 3. Merge diagnoses

(set covering kernel diagnoses)

General Diagnost c Engine [de Kleer & Williams, 87]

10/03/03 66

be the truth. - l

Exploring the Improbable

copyright Brian Williams, 2003

When you have eliminated the impossible, whatever remains, however improbable, must

Sherlock Ho mes. The Sign of the Four.

22

Page 23: L18 model-based diagnosis reviseddspace.mit.edu/bitstream/handle/1721.1/71858/16-410-fall... · 2019. 9. 12. · Input Model: Abductive, Model-based Diagnosis Or(i): (i) (i): copyright

3/6/00

10/03/03 67

M3=U

M1=U M2=U

∧ ∧

copyright Brian Williams, 2003

A2=U M1=U

A1=U A1=U, A2=U, M1=U, M3=U

A1=U

A1=U M1=U M1=U A2=U M2=U M3=U

Conflict-Directed A*: Generating The Best Kernel

A1=U, M1=U , M2=U

Conflicts

• Minimal set covering is an instance of breadth first search.

Insight: • Kernels found by minimal set covering

10/03/03 68

M2=U

copyright Brian Williams, 2003

A1=U, A2=U, M1=U, M3=U

A1=U M1=U

M1=U

Conflict-Directed A*: Generating The Best Kernel

A1=U, M1=U , M2=U

Conflicts

• Minimal set covering is an instance of breadth first search. • To find the best kernel, expand tree in best first order.

Insight: • Kernels found by minimal set covering

23