Behavior Modes
Meir Kalech
Partially Based on slides of Brian Williams, Luca Console and Peter
struss
Outline
Last lecture:
1.
Generation of tests/probes
2.
Measurement Selection
3.
Probabilities of Diagnoses
Today’s lecture:
1.
Models of correct + faulty behavior
2.
Sherlock engine
3.
Abductive diagnosis
4.
Qualitative models
Exploiting models of correct/faulty
behavior
Initial proposal: using only models of correct behavior
They are those that are in strict accordance with
the goals (easy to acquire, e.g., from design)
But unfortunately they are not always sufficient
Need of exploiting also fault models of some form
predictive models
[Struss, Dressler, 89] – GDE+
[de Kleer, Williams 89] - SHERLOCK
“weak” models of physical impossibility
[Friedrich et al. 90]
behavioral models
[Console, Torasso, 91]
Diagnosis With Only the Unknown
0
A
X
Inverter(i):
G(i):
U(i):
B
Y
C
0
Out(i) = not(In(i))
• Isolates surprises
• Doesn’t explain
Nominal and Unknown Modes
Diagnosis With Only the Known
0
A
X
Inverter(i):
G(i):
S1(i):
S0(i):
B
Y
C
Out(i) = not(In(i))
Out(i) = 1
Out(i) = 0
Exhaustive Fault Modes
0
• No surprises
• Explains
Solution: Diagnosis as
Estimating Behavior Modes
0
A
X
Inverter(i):
G(i):
S1(i):
S0(i):
U(i):
B
Y
C
Out(i) = not(In(i))
Out(i) = 1
Out(i) = 0
0
• Isolates surprises
• Explains
Nominal, Fault and Unknown Modes
Measurement motivation to use
Behavior modes
Knowledge of failure modes is important to
decide what measurement to make next.
If all faults were equally likely, measuring X or
Y provides equal information.
Suppose:
Inverters A and B almost always fail by stuck-at-1.
Inverter C almost always fails by stuck at-0.
It is unlikely that inverter A is failing.
The likely failures of inverters B and C are
consistent with the symptom
Behavior Modes
• System comprises a (finite) set of components
COMPS = { Ci }
• Each Ci has a (finite) set of behavior modes
modes(Ci) = { mij(Ci)}
• E.g.
- (unique) correct behavior: ok(Ci)
- (any) faulty behavior: ok(Ci)
Definition
- a specific fault: stuck-closed(valve
)i (Mode Assignment)
• COMPS’
COMPS
• Behavior mode operating mode
(of correct
behavior)
• E.g. blocking mode of a diode• MA = {mij(Ci) Ci COMPS’ }
• or MA = Ci COMPS’ mij(Ci)
• MA complete: COMPS’=COMPS
Diagnoses as Assignments of Fault
Modes
Definition (Diagnosis):
• A complete mode assignment MA that is consistent with
the observations:
SD MA OBS
^
Definition (Mode Assignment)
• COMPS’ COMPS
• MA = {mij(Ci) Ci COMPS’ }
• or MA = Ci COMPS’ mij(Ci)
• MA complete: COMPS’=COMPS
Yet Another Simple Example
Head lights work
Starter and rear light don’t
Obvious diagnosis:
Starter and rear light are
broken
Battery
Starter
RLight
HLight
Fault Localization for the Simple
Example - Conflicts 1 and 2
• ok(Battery) ok(Wire1)
ok(Wire2) ok(Starter)
active(Starter)
• OBS active(Starter)
• Conflict
ok(Battery) ok(Wire1)
ok(Wire2) ok(Starter)
Battery
Wire1
Wire2
Starter
Wire3
Wire4
RLight
Analogously:
• ok(Battery) ok(Wire1)
ok(Wire2) ok(Wire3)
ok(Wire4) ok(RLight)
Wire5
Wire6
HLight
Fault Localization for the Simple
Example - Conflicts 3 and 4
• lit(HLight) ok(HLight)
ok(Wire5)
ok(Wire6) ok(RLight)
lit(RLight)
• OBS lit(RLight)
• Conflict
ok(HLight) ok(Wire5)
ok(Wire6) ok(RLight)
Battery
Wire1
Wire2
Starter
Wire3
Wire4
RLight
Analogously:
• ok(HLight) ok(Wire5)
ok(Wire6) ok(Wire3)
ok(Wire4) ok(Starter)
Wire5
Wire6
HLight
Fault Localization for the Simple
Example - Hitting Sets
• {Battery, Wire1, Wire2, Starter}
• {Battery, Wire1, Wire2, Wire3,
Wire4, Rlight}
• {HLight, Wire5, Wire6, Rlight}
• {Hlight, Wire5, Wire6, Wire3,
Wire4, Starter}
• {Starter, Rlight}
• {Battery, HLight}
• {Wire1, Wire5}
Battery
Wire1
Wire2
Starter
Wire3
?!
• + 19 NONSENSES more!
Wire4
RLight
Wire5
Wire6
HLight
What Makes Most of the Fault
Localizations Implausible?
• If the battery were broken, the
headlights would not be lit
• Broken headlights cannot be lit
• Knowledge about faults can
reduce the set of fault
localizations
• {Starter, Rlight}
• {Battery, HLight}
• {Wire1, Wire5}
• + 19 more!
Battery
Wire1
Wire2
Starter
Wire3
?!
Wire4
RLight
Wire5
Wire6
HLight
Fault Models - “Physical Negation”
Fault models are needed
predictive: bulb(B) AB(B)
light(B,off)
voltageIn(B,X)
Outline
Last lecture:
1.
Generation of tests/probes
2.
Measurement Selection
3.
Probabilities of Diagnoses
Today’s lecture:
1.
Models of correct + faulty behavior
2.
Sherlock engine
3.
Abductive diagnosis
4.
Qualitative models
Search Guided by Probabilities:
SHERLOCK ([de Kleer- Williams 89])
• Basic Idea: Search for the most probable explanations of the
observations
• Fault models for each component (type)
• Possible: unknown fault mode
•
•
•
•
Modes have prior probability
Mode assignments have a probability
SHERLOCK: best first search for consistent mode assignments
termination criteria
Leading Diagnoses
Complexity of diagnoses space:
n-#components, m-#modes
GDE 2n SHERLOCK: mn
To reduce the high complexity, generate only
leading diagnoses:
1.
2.
3.
4.
Diagnoses are those with the highest probabilities.
No more than k1 (=5) leading diagnoses.
Candidates with probability less than 1/k2(=100)
of the best diagnosis are not considered
The diagnoses need not include more than k3
(=0.75) of the total probability mass of the
candidates.
SHERLOCK - Example: Two
Inverters
0
A
1
B
Model of Inverter X
Mode
Behavior
Prior
XN: Normal
X1: Stuck at 1
Out =In
Out = 1
.99
.006
X0: Stuck at 0
XU: Unknown
Out = 0
.003
.001
SHERLOCK - Example: Two
Inverters
0
A
1
B
In slide 25 see how to
generate conflicts and
diagnoses
• Conflicts: {AN, BN}, {B0}, {A1, BN}
Model of Inverter X
Mode
Behavior
Prior
XN: Normal
X1: Stuck at 1
Out =In
Out = 1
.99
.006
X0: Stuck at 0
XU: Unknown
Out = 0
.003
.001
SHERLOCK - Example: Two
Inverters
0
A
B
1
• Conflicts: {AN, BN}, {B0}, {A1, BN}
• Inspired by GDE + modes
• Diagnosis is an explanation: SDMAOBS ┴ , where
MA=CiCOMPSmij(Ci), (rather than a set of faulty
components)
• I.E., the diagnosis set contains all the combinations
of the components’ modes except of conflicts.
SHERLOCK - Example: Two
Inverters
0
A
B
1
Generated by ATMS
Conflicts: {AN, BN}, {B0}, {A1, BN}
Full diagnostic explanations with probabilities:
[[AN , B1]]
.00594
[[AN , BU]]
.00099
[[A1 , B1]]
.00004
[[A1 , BU]]
.00001
[[A0 , BN]]
.00297
[[A0 , B1]]
.00002
[[A0 , BU]]
.000003
[[AU , BN]]
.00099
[[AU , B1]]
.00001
[[AU , BU]]
.000001
Diagnoses set does not contain:
{AN, BN}, {A1, BN}, and supersets of {B0}
SHERLOCK - Example: Two
Inverters
0
A
B
1
Generated by ATMS
Conflicts: {AN, BN}, {B0}, {A1, BN}
Full diagnostic explanations with probabilities:
[[AN , B1]]
.00594
[[AN , BU]]
.00099
[[A1 , B1]]
.00004
[[A1 , BU]]
.00001
[[A0 , BN]]
.00297
[[A0 , B1]]
.00002
[[A0 , BU]]
.000003
[[AU , BN]]
.00099
[[AU , B1]]
.00001
[[AU , BU]]
.000001
• Exhaustive search impossible
• Perform best first search
SHERLOCK - Example: Search
Strategy
{An,Bn} .98010 3 x
0
A
1
B
{An}
.99
2
{An,B1} .00594 5
{An,B0} .00297 8 x
{An,Bu} .00099
{}
1.0
1
{A1,Bn} .00594 6 x
{A1}
.006 4
{A1,B1} .00004
{A1,B0} .00002
x
{A1,Bu} .00001
{A0,Bn} .00297 9
{A0}
Legend:
MA Probability Step #
x
Consistent ?
.003 7
{A0,B1} .00002
{A0,B0} .000009
{A0,Bu} .000003
inconsistent
{Au} the
.001
Generate
next explanation with the
highest probability
x
SHERLOCK, Process in details:
1. Find Symptoms & Conflicts
0
A
X
B
0
G
1
G
Y
0
1
C
0
G
0
Conflict:
not (G(A) and G(B) and G(C))
Finding conflict through ATMS, but generate
focus environments
More Symptoms & Conflicts
0
A
X
B
0
S1
1
G
Y
0
C
0
G
0
1
not (S1(A) and G(B) and G(C)
More Symptoms & Conflicts
0
0
A
X
B
S0
Y
0
1
not (S0(B) and G(C))
C
0
G
0
More Symptoms & Conflicts
0
A
X
B
0
not S1(C)
Y
C
0
S1
1
0
All Minimal Conflicts
< S1(C) >
< S0(B), G(C) >
< S1(A), G(B), G(C) >
< G(A), G(B), G(C) >
2. Constituent Diagnoses from
Conflicts
Diagnosis is an explanation, so it must contains no
conflict:
< S1(C) >: not S1(C):
=> G(C) or S0(C) or U(C)
<S0(B) and G(C)>:not (S0(B) and G(C)) => not S0(B) or not G(C)
=> G(B) or S1(B) or U(B) or S1(C) or S0(C) or U(C)
< S1(A), G(B), G(C) >
=> G(A),S0(A),U(A),S1(B),S0(B),U(B),S1(C),S0(C) or U(C)
< G(A), G(B), G(C) >
=> S1(A),S0(A),U(A),S1(B),S0(B),U(B),S1(C),S0(C) or U(C)
3. Generating Kernel Diagnoses
[G(C),S0(C),U(C)]
[G(B),S1(B),U(B),S1(C),S0(C),U(C)]
[G(A),S0(A),U(A),S1(B),S0(B),U(B),S1(C),S0(C),U(C)]
[S1(A),S0(A),U(A),S1(B),S0(B),U(B),S1(C),S0(C),U(C)]
[U(C)]
3. Generating Kernel Diagnoses
[G(C),S0(C),U(C)]
[G(B),S1(B),U(B),S1(C),S0(C),U(C)]
[G(A),S0(A),U(A),S1(B),S0(B),U(B),S1(C),S0(C),U(C)]
[S1(A),S0(A),U(A),S1(B),S0(B),U(B),S1(C),S0(C),U(C)]
[U(C)]
[S0(C)]
3. Generating Kernel Diagnoses
[G(C),S0(C),U(C)]
[G(B),S1(B),U(B),S1(C),S0(C),U(C)]
[G(A),S0(A),U(A),S1(B),S0(B),U(B),S1(C),S0(C),U(C)]
[S1(A),S0(A),U(A),S1(B),S0(B),U(B),S1(C),S0(C),U(C)]
[U(C)]
[S0(C)]
[U(B),G(C)]
3. Generating Kernel Diagnoses
[G(C),S0(C),U(C)]
[G(B),S1(B),U(B),S1(C),S0(C),U(C)]
[G(A),S0(A),U(A),S1(B),S0(B),U(B),S1(C),S0(C),U(C)]
[S1(A),S0(A),U(A),S1(B),S0(B),U(B),S1(C),S0(C),U(C)]
[U(C)]
[S0(C)]
[U(B),G(C)]
[S1(B),G(C)]
3. Generating Kernel Diagnoses
[G(C),S0(C),U(C)]
[G(B),S1(B),U(B),S1(C),S0(C),U(C)]
[G(A),S0(A),U(A),S1(B),S0(B),U(B),S1(C),S0(C),U(C)]
[S1(A),S0(A),U(A),S1(B),S0(B),U(B),S1(C),S0(C),U(C)]
[U(C)]
[S0(C)]
[U(B),G(C]
[S1(B),G(C)]
[U(A),G(B),G(C)]
3. Generate Kernel Diagnoses
[G(C),S0(C),U(C)]
[G(B),S1(B),U(B),S1(C),S0(C),U(C)]
[G(A),S0(A),U(A),S1(B),S0(B),U(B),S1(C),S0(C),U(C)]
[S1(A),S0(A),U(A),S1(B),S0(B),U(B),S1(C),S0(C),U(C)]
[S1(B),G(C)]
[U(C)]
[S0(C)]
[U(A),G(B),G(C)]
[U(B),G(C]
[S0(A),G(B),G(C)]
These are the kernel diagnoses
But for [U(C)] (for instance), what are the modes of A and B?
The best first search finds the most likely modes of A and B.
Candidate Initial (prior)
Probabilities
p(c) p(m)
m c
A
B
C
p(G)
.99
.99
.99
p(S1)
.008
.008
.001
p(S0)
.001
.001
.008
p(U)
.001
.001
.001
No observations
With no observations Sherlock finds the single
leading diagnosis
The unfocused Sherlock finds 43 diagnoses
Input I=0
Sherlock computes the following environments:
The focused Sherlock finds no label for X=0 as it
does not hold in the single leading diagnosis.
S
0(
C
)
(C
S
1(
)
A
),
S
0(
C
)
)
Y
U
(B
B
U
)
S
1(
B
)
(A
X
U
A
S
0(
A
)
O
K
1.2
1
0.8
0.6
0.4
0.2
0
0
C
0
1.
2.
3.
4.
A
X
B
Y
C
0
Suppose O=0 Minimal conflicts are:
< S1(C) >
< S0(B), G(C) >
Next highest probability:
< S1(A), G(B), G(C) >
< G(A), G(B), G(C) >
Leading candidates:
For instance:
These are the most likely
modes of A and B, beyond
the kernel diagnosis U(C)
0
A
X
B
Y
C
0
Now, the posterior behavior modes probabilities are:
ATMS labels are:
0
A
B
X
C
Y
0
0.5
0.4
0.3
0.2
0.1
)
A
)S
0(
C
)
)
)
U
(B
U
(C
S
1(
Top 6 of 64 = 98.6% of P
U
(A
C
)
S
0(
B
)
S
1(
A
)
S
0(
O
K
0
Outline
Last lecture:
1.
Generation of tests/probes
2.
Measurement Selection
3.
Probabilities of Diagnoses
Today’s lecture:
1.
Models of correct + faulty behavior
2.
Sherlock engine
3.
Abductive diagnosis
4.
Qualitative models
Abductive diagnosis
The definition above is based on consistency:
explanation consistent with the observations
Weak notion of explanation
A diagnosis D explains an observation m if it does
not contradict m (D does not support not m).
Abductive diagnosis:
A stronger notion of explanation
Explanation implies the observations
A diagnosis D explains an observation m if it
supports m (D m).
Abductive diagnosis [Poole 87][Console, Torasso, 89]
Abductive diagnosis – Poole et al. 87
A different concept:
A diagnosis is not a logical consequence of our
observations.
Exactly the opposite:
The observation should be shown to be logical
consequences of our knowledge and diagnosis.
Abductive diagnosis - definition
Given
Cxt: inputs.
The data that let the diagnoser to
make prediction about the behavior
of the system
SD
Modes
Observations, with the distinction between
contextual data (Cxt) and observations (Obs)
Determine
An assignment of behavior modes to components
D = {mi(ci) | mi Modes(ci) }
such that:
1.
SD Cxt D |= Obs
(SD Cxt D consistent)
2.
A continuum of definitions
Console and Torasso 91
Given OBS, partition it into Obs1 Obs2
SD Cxt D Obs2 |= Obs1
SD Cxt D Obs1 Obs2 consistent
Since Abduction diagnosis is more restrict than
consistency:
Abduction provides a subset of the solutions
provided by consistency-based diagnosis
Varying Obs1 we have a continuum of definitions:
Obs1=OBS,Obs2= Ø abduction diagnosis of Poole86
Obs1=Ø, Obs2=OBS consistency based diagnosis
Abductive or Consistency?
Criteria to select the most appropriate definition
abduction and consistency are the two extremes of
a spectrum of alternatives
abduction is the most restrictive definition
it requires “complete” models
it provides a strong (physical) notion of
explanation
consistency-based is less restrictive
less constraints on the models
weaker notion of explanation
Computing abductive diagnoses: an example
oil_cup
normal holed
oil_loss
radiator
normal holed
oil_level
water_level
oil_below_car
normal low
normal low
oil_gauge
normal red
water_temp
normal high
Model:
oil_cup(normal) oil_level(normal)
oil_cup(holed) oil_loss(present)
oil_loss(present) oil_below_car(present)
oil_loss(present) oil_level(low)
oil_level(normal) oil_gauge(normal)
oil_level(low) oil_gauge(red)
oil_level(normal) water_level(normal)
engine(on)
engine_temp(normal)
...
engine_on
normal high
engine_temp
Obs1 = {engine_temp(high)}
Two minimal candidate
explanations
E1 = { oil_cup(holed) }
E2 = {radiator(holed)}
Outline
Last lecture:
1.
Generation of tests/probes
2.
Measurement Selection
3.
Probabilities of Diagnoses
Today’s lecture:
1.
Models of correct + faulty behavior
2.
Sherlock engine
3.
Abductive diagnosis
4.
Qualitative models
Qualitative models in MBD
Instead of educate quantity model give qualitative values
In many cases qualitative models are sufficient for
diagnostic purposes.
They are close to the way expert diagnosticians
operate.
In many cases imprecise knowledge makes numerical
models useless.
Usually imprecision in the observations.
Easier to use (in some cases).
Qualitative models in MBD (2)
New problems:
choosing the “right” qualitative models
choosing
the right form of qualitative reasoning
choosing the “right” qualitative abstractions
mapping quantities into qualitative values
(e.g., for observations)
dealing with the ambiguities that arise as a
result of the abstraction
A simple example
pump
1 pipe 2
tank
Pipe (flow direction from 1 to 2):
interface variables:
P1, P2, F1, F2 (0, +)
constraints
Structure:
Fout= F1, Pout= P1 , P2= Ptank ,
F2= Fin
Pump:
Pipe Ok F2= F1 P1=P2
Pipe occluded F2=0, P1=+
Pipe leaking F2=0, P1=0
interface variables:
Tank:
Pout, Fout (0, +)
interface variables: Fin, Ltank, Ptank
(0, +)
constraints (pump ON)
Pump OK
internal variable dLtank (0, +, -)
Pout= + Fout=0,
constraints
Pout=0 Fout=+
Tank Ok Ptank=Ltank, dLtank= Fin
Pump blocked Fout=0
Pipe leaking Ptank=0, dLtank= -
A simple example (2)
Diagnosis (using pump and pipe only, we will return
later to considering the tank)
Obs {F2=0, P2=0 }
the set of assumptions {ok(pump), ok(pipe)} is a conflict
from P2=0 and ok(pipe) we predict P1=0 and from the
structure Pout=0 (for the pump)
then from ok(pump) we predict Fout=+ i.e., F1=0 (for the pipe)
and finally using again ok(pipe) we predict F2=+
(CONFLICT!!!!)
Three set of assumptions explain the observations (are
candidate diagnoses)
D1 { blocked(pump) }
D2 { occluded(pipe)}
D3 { leaking(pipe)}
A second example
pump1
pipe1
join
Diagnosis
pump2
pipe2
if: Obs = {Fout=0, Pout=0 }
Then several minimal
explanations
Join
interface variables:
Pout, Fout, Pin1, Fin1
Pin2, Fin2 (0, +)
constraints
Pump OK
D1 { blocked(pump1) }
D2 { occluded(pipe1)}
D3
D1
D2
D3
Pin1= Pin2= Pout
Fout= Fin1 Fin2
( qualitative add)
0
+
??
0
0
+
+
??
+
+
{
{
{
{
leaking(pipe1)}
blocked(pump2) }
occluded(pipe2)}
leaking(pipe2)}
© Copyright 2026 Paperzz