knowledge-based systems for industrial...
TRANSCRIPT
Model-Based Systems & Qualitative Reasoning
Group of the Technical University of Munich SS 15 KBSIA 4 - 17
Knowledge-based Systems for Industrial Applications
1 The Topic
2 Tasks
3 Modeling
4 Diagnosis
4.2 Component-oriented
Diagnosis
Goal:
Restriction to special classes of
systems, fault types, problem
classes
Algorithms for different diagnosis
tasks
Script: Chap. 10.4.1, 10.4.2, 10.4.3
Model-Based Systems & Qualitative Reasoning
Group of the Technical University of Munich SS 15 KBSIA 4 - 18
Component-oriented Diagnosis
Components:
• (Usually) physical objects
• interacting in a fixed structure
• of an artifact
• i.e. a (well-)designed system
Assumptions:
• System:
components + structure
• System behavior:
component behavior + structure
(reductionism)
• Correct system behavior achieves
goals
(well-designed system)
• Correct component behavior
achieves correct system behavior
• Diagnostic assumption:
no undesigned components or
interactions
Model-Based Systems & Qualitative Reasoning
Group of the Technical University of Munich - 19 SS 15 KBSIA 4
Component-oriented Diagnosis - Examples
• Electrical Circuits
• Hydraulic Circuits
• Pneumatic Systems
• Mechatronic Systems
• ...
30
V1
Ignition 15
(22)K
15-E
(39)E
KP
-0
(1)B
AT
+
(19)B
AT
+
(33)H
RL-0
(4)B
AP
+
Control Unit
BA
T-(
16)
BA
T-(
52)
V2
31
MEKP
2
31
5
45
EKP
Relay
System Relay
Main relay
hydraulic unit
front left wheel
rear right wheel
brake pedal
Model-Based Systems & Qualitative Reasoning
Group of the Technical University of Munich SS 15 KBSIA 4 - 20
Different Diagnosis Tasks
• Is the system working correctly?
Has a fault occurred?
• In which component has a fault
occurred?
• Which fault has occurred?
• Monitoring Fault detection
• Fault localization
• Fault identification
Model-Based Systems & Qualitative Reasoning
Group of the Technical University of Munich SS 15 KBSIA 4 - 21
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)
- a specific fault: stuck-closed(valvei)
• Behavior mode operating mode
(of correct behavior)
• E.g. blocking mode of a diode
Definition (Mode Assignment)
• COMPS’ COMPS
• MA = {mij(Ci) Ci COMPS’ }
• or MA = Ci COMPS’ mij(Ci)
• MA complete: COMPS’=COMPS
Model-Based Systems & Qualitative Reasoning
Group of the Technical University of Munich SS 15 KBSIA 4
Behavior Models
• System behavior:
component behavior
+ structure
• System model:
component models
+ structure description
• Library associates a (relational)
behavior model with each
behavior mode
• System model:
library + mode assignment
+ structure description
• mij(Ci) modelij
(Ci)
• MODEL =
LIB {mij(Ci) Ci COMPS }
STRUCTURE
• In [Reiter 87]:
SD = LIB STRUCTURE
• MODEL = SD MA
- 22
Model-Based Systems & Qualitative Reasoning
Group of the Technical University of Munich SS 15 KBSIA 4 - 23
Detection of Component Faults
• Has a fault occurred?
Is the system working correctly?
• Do observations provide evidence
that the system working according
to its goal specification?
• Assumption: Correct system
behavior achieves goals
• Are observations consistent
with system model of correct
behavior?
MODELOK ⊨ GOALS
Fault Detection:
SD MAok OBS ⊨ ? ^
• MAok = {mok (Ci) Ci COMPS }
• MODELOK = SD MAok
MODELok OBS ⊨? ^
Model-Based Systems & Qualitative Reasoning
Group of the Technical University of Munich
The Stupid System – Detecting Inconsistencies
• Inconsistent partial models:
„conflict“
- 24 SS 15 KBSIA 4
Model-Based Systems & Qualitative Reasoning
Group of the Technical University of Munich SS 15 KBSIA 4 - 25
Knowledge-based Systems for Industrial Applications
1 The Topic
2 Tasks
3 Modeling
4 Diagnosis
4.2 Component-oriented
Diagnosis
4.2.1 Fault localization
Goal:
Definition
Characterization
Computation
Script: Chap. 10.4.1, 10.4.2
Model-Based Systems & Qualitative Reasoning
Group of the Technical University of Munich SS 15 KBSIA 4 - 26
Diagnosis - Definition
• Diagnosis (hypotheses):
Models that are consistent with observations
Definition (Diagnosis):
• A complete mode assignment MA that is consistent with the
observations:
SD MA OBS ⊭ ^
Definition (Abductive diagnosis):
• A complete mode assignment MA that entails the observations:
SD MA ⊨ OBS
Model-Based Systems & Qualitative Reasoning
Group of the Technical University of Munich SS 15 KBSIA 4 - 27
Fault Localization - Definition
• For each component:
• Ok or not ok?
• modes(Ci) = { oki(Ci), oki(Ci) }
• All modes different from ok imply ok:
• mode(C) modes(C) \ {ok(C)}
mode(C) ok(C)
Definition (Fault Localization)
• OK COMPS
• FAULTY = COMPS \ OK is a fault localization iff
• MA(FAULTY) := Ci FAULTY oki(Ci) Ci OK oki(Ci)
is a diagnosis of SD and OBS
SD MA(FAULTY) OBS ⊭ ^
Model-Based Systems & Qualitative Reasoning
Group of the Technical University of Munich SS 15 KBSIA 4 - 28
Fault Localization - Example
M1
M2
M3
A1
A2
F = 10
G = 12
2
3
2 3
3
3 Multipliers
and 2 Adder
List all fault
localizations!
• {A1}
• { M1}
• {A2, M2},
• {M2, M3}
• {A1, M1}, ...
• {A1, M2, M3}, ...
• {A1, M2, M3 , A2}, ...
• {A1, A2, M1, M2, M3} !!
Model-Based Systems & Qualitative Reasoning
Group of the Technical University of Munich SS 15 KBSIA 4 - 29
Minimal Fault Localization
• Why assume more components to be broken than necessary?
• “Occam’s razor”
Definition (Minimal Fault Localization)
• FAULTY is a minimal fault localization iff
• no proper subset FAULTY’ FAULTY is a fault localization
Model-Based Systems & Qualitative Reasoning
Group of the Technical University of Munich SS 15 KBSIA 4 - 30
Fault Localization - Example
• {A1, M1}, ...
• {A1, M2, M3}, ...
• {A1, M2, M3 , A2}, ...
• {A1, A2, M1, M2, M3} !!
List all fault
localizations!
• {A1}
• { M1}
• {A2, M2},
• {M2, M3}
M1
M2
M3
A1
A2
F = 10
G = 12
2
3
2 3
3
3 Multipliers
and 2 Adder
List all minimal fault
localizations!
Model-Based Systems & Qualitative Reasoning
Group of the Technical University of Munich SS 15 KBSIA 4 - 31
If all components in {A1, M2, M1} were ok, F=12 would hold
Contradiction!
One of them must be broken
Partial inconsistent mode assignments: important diagnosis
information
How to Find Fault Localizations? - Example
M1
M2
M3
A1
A2
F = 10
G = 12
2
3
2 3
3
3 Multipliers
and 2 Adder
Model-Based Systems & Qualitative Reasoning
Group of the Technical University of Munich SS 15 KBSIA 4 - 32
How to Find Fault Localizations? - Conflicts
Definition (Conflict)
• If the mode assignment MA = Ci COMPS’ mij(Ci)
is inconsistent with the observations:
SD MA OBS ⊨ ^
• then its negation Ci COMPS’ mij(Ci) is called a conflict
M1
M2
M3
A1
A2
F = 10
G = 12
2
3
2 3
3
3 Multipliers
and 2 Adder
Model-Based Systems & Qualitative Reasoning
Group of the Technical University of Munich
The Stupid System – Conflicts
• Inconsistent partial models:
„conflict“
- 33 SS 15 KBSIA 4
Model-Based Systems & Qualitative Reasoning
Group of the Technical University of Munich - 34
hydraulic unit
front left wheel
rear right wheel
brake pedal
under-
braked
over-
braked
harder
Conflicts - Example ABS Hydraulics
• Conflict:
ok(left inlet valve)
ok(left outlet valve)
• Provided the pedal, wheel, pipes etc. are OK
hydraulic unit
front left wheel
rear right wheel
brake pedal
under-
braked
over-
braked
harder
Discrepancy!
{LOV}: [QLOV] = 0
[pWBC] = [–]
[pWBC] = [–]
[pMC] = [+]
[QLIV] [QLOV] = [–]
{LIV}: [QLIV] = [+]
{LOV}: [QLIV] = [–]
Under-braked
harder
SS 15 KBSIA 4
Model-Based Systems & Qualitative Reasoning
Group of the Technical University of Munich SS 15 KBSIA 4 - 35 - 35
ABS Hydraulics: Second Conflict
{LIV, ROV, RIV, THR}: [QPMP] = [+]{PMP}: [QPMP] = [0]
[QPED] [QLIV] [QTHR] [QRIV] = [0]
discrepancy!
[QPED] = [–]
{LIV, ROV, RIV, THR}: [pDC] = [+]
{LIV, ROV, RIV}: [QTHR] = [–]
{LIV}: [QLIV] = [+] {RIV, ROV}: [QRIV] = [+]
{LOV}: [QLIV] = [–]
under-braked over-braked
harder
• Conflict:
ok(left inlet valve)
ok(left outlet valve)
• Conflict #2:
ok(left inlet valve)
ok(right inlet valve)
ok(right outlet valve)
ok(throttle)
ok( pump)
Model-Based Systems & Qualitative Reasoning
Group of the Technical University of Munich SS 15 KBSIA 4 - 36
Minimal Conflicts - All You Need for Diagnosis
• Each restriction to less modes corresponds to a consistent
mode assignment
• “sharpest” characterization of possible diagnoses
• Even more: they capture the entire diagnosis information
Theorem
• A mode assignment MA is a diagnosis of SD OBS
• iff it is consistent with the minimal conflicts of SD OBS
-
Model-Based Systems & Qualitative Reasoning
Group of the Technical University of Munich SS 15 KBSIA 4 - 37
Minimal Conflicts Replace SD OBS
Theorem
• A mode assignment MA is a diagnosis of SD OBS
• iff it is consistent with the minimal conflicts of SD OBS
SD OBS MA ⊭ ^
MIN-CONFL MA ⊭ ^
Not needed any more:
• Model
• Observations
• Predictions
• Discrepancies and
• their magnitude ...
Model-Based Systems & Qualitative Reasoning
Group of the Technical University of Munich SS 15 KBSIA 4 - 38
Positive Conflicts - All You Need for Fault Localization
• Positive conflicts:
Ci COMPS’ ok(Ci)
• at least one of the components mentioned is broken
• minimal positive conflicts:
“sharpest” characterization of fault locations
• If there are no fault models, fault modes make no predictions
• all conflicts are positive
Theorem
• FAULTY COMPS is a minimal fault localization
• iff Ci FAULTY ok(Ci)
is a prime implicant of the positive minimal conflicts
Model-Based Systems & Qualitative Reasoning
Group of the Technical University of Munich SS 15 KBSIA 4 - 39
Prime Implicants
Definition (Implicant)
• Th: a set of propositional formulas
• CC: conjunction clause (of literals)
• CC is an implicant of Th
• iff it entails all formulas in Th
Theorem
• FAULTY COMPS is a minimal fault localization
• iff Ci FAULTY ok(Ci)
is a prime implicant of the positive minimal conflicts
CC ⊨ Th
• CC is a prime implicant of Th
• iff no proper sub clause CC’
is also an implicant of Th
CC’ ⊭ Th
Model-Based Systems & Qualitative Reasoning
Group of the Technical University of Munich SS 15 KBSIA 4 - 40
Prime Implicants - Example
Definition (Implicant)
• Th: a set of propositional formulas
• CC: conjunction clause (of literals)
• CC is an implicant of Th
• iff it entails all formulas in Th
CC ⊨ Th
• CC is a prime implicant of Th
• iff no proper sub clause CC’
is also an implicant of Th
CC’ ⊭ Th
• Th:
{ A B ,
A C D}
• Some implicants:
A
B C
A C
A B C D
B D
• Prime implicants:
A
B C
B D
Model-Based Systems & Qualitative Reasoning
Group of the Technical University of Munich
The Stupid System – Fault Localizations
Conflicts:
ok(flow-sensor)
ok(pump) ok(container) ok(pressure-sensor)
• ok(mech-drive)
ok(pump) ok(container) ok(pressure-sensor)
Minimal fault localizations:
ok(pump)
ok(container)
ok(pressure-sensor)
• ok(mech-drive) ok(flow-sensor)
SS 15 KBSIA 4 - 41
Model-Based Systems & Qualitative Reasoning
Group of the Technical University of Munich SS 15 KBSIA 4 - 42
ABS Hydraulics: Fault Localizations
• Conflict:
ok(left inlet valve)
ok(left outlet valve)
• {left inlet valve}
• {left outlet valve,
right inlet valve}
• {left outlet valve,
right outlet valve}
• {left outlet valve,
throttle}
• {left outlet valve,
pump}
• Conflict #2:
ok(left inlet valve)
ok(right inlet valve)
ok(right outlet valve)
ok(throttle)
ok( pump)
Model-Based Systems & Qualitative Reasoning
Group of the Technical University of Munich SS 15 KBSIA 4 - 43
• {left inlet valve}
• {left outlet valve,
right inlet valve}
• {left outlet valve,
right outlet valve}
• {left outlet valve,
throttle}
• {left outlet valve,
pump}
Computing Fault Localizations - Idea
• Conflict:
ok(left inlet valve)
ok(left outlet valve)
• Each fault localization has to contain at least one component out of each positive conflict
• Conflict #2:
ok(left inlet valve)
ok(right inlet valve)
ok(right outlet valve)
ok(throttle)
ok( pump)
Model-Based Systems & Qualitative Reasoning
Group of the Technical University of Munich SS 15 KBSIA 4 - 44
Computing Fault Localizations as Hitting Sets
Definition (Hitting Set)
• M = { Mi } a set of sets
• HS is called a hitting set of M
• iff HS contains at least one element
out of each Mi :
• Mi M HS Mi
• HS is a minimal hitting set of M, if
no proper subset of HS is one
Theorem
• FAULTY COMPS is a minimal fault localization
• iff it is a minimal hitting set of the set of the sets of
components that occur in the positive minimal conflicts
Model-Based Systems & Qualitative Reasoning
Group of the Technical University of Munich SS 15 KBSIA 4 - 45
Min. hitting sets of {{A1, M2, M1}}:
{A1}, { M2}, {M1}
ok(A1) ok(M2) ok(M1) F=12
ok(A1) ok(M2) ok(M1) F=10 inconsistent
minimal conflict: ok(A1) ok(M2) ok(M1)
Computing Fault Localizations - Adder-Multiplier Example
BUT:
Minimal fault
localizations:
• {A1}
• { M1}
• {A2, M2},
• {M2, M3} ?
M1
M2
M3
A1
A2
F = 10
G = 12
2
3
2 3
3
3 Multipliers
and 2 Adder
Model-Based Systems & Qualitative Reasoning
Group of the Technical University of Munich SS 15 KBSIA 4 - 46
Min. hitting sets of {{A1, M2, M1}}:
{A1}, { M2}, {M1}
Min. hitting sets of {{A1, M2, M1}, {M1, M3, A1, A2}}:
{A1}, {M1}, {A2, M2}, {M2, M3}
ok(M1) ok(A1) ok(M3) ok(A2) G=10
ok(M1) ok(A1) ok(M3) ok(A2) G=12 incons.
conflict: ok(M1) ok(A1) ok(M3) ok(A2)
Adder-Multiplier Example - The Second Conflict
BUT:
Minimal fault
localizations:
• {A1}
• { M1}
• {A2, M2},
• {M2, M3} !
M1
M2
M3
A1
A2
F = 10
G = 12
2
3
2 3
3 6
6 3 Multipliers
and 2 Adder
4
10
Model-Based Systems & Qualitative Reasoning
Group of the Technical University of Munich SS 15 KBSIA 4 - 47
Fault Localization - The Overall Picture
Model Revision
Conflict
Fault Localization
No fault models
no consistency check
Discrepancy
Diagnosis
Predictor
Observations/Goals
Behavior Model
Library
ok Modes
Model Composer
E.g. Hitting Sets
Model-Based Systems & Qualitative Reasoning
Group of the Technical University of Munich SS 15 KBSIA 4 - 48
But: How to Obtain Conflicts?
Model Revision
Conflict
Fault Localization
Discrepancy
Diagnosis
Predictor
Observations/Goals
Behavior Model
Library
ok Modes
Model Composer ?
Model-Based Systems & Qualitative Reasoning
Group of the Technical University of Munich SS 15 KBSIA 4 - 49
Dependency-based diagnosis - The Idea
ok(M1) ok(A1) ok(M3) ok(A2) G=10
ok(M1) ok(A1) ok(M3) ok(A2) G=12 incons.
conflict: ok(M1) ok(A1) ok(M3) ok(A2)
M1
M2
M3
A1
A2
F = 10
G = 12
2
3
2 3
3 6
6 3 Multipliers
and 2 Adder
4
10
Record dependencies:
• of constraints on modes
• of values on applied constraints
• of discrepancies on values
Model-Based Systems & Qualitative Reasoning
Group of the Technical University of Munich SS 15 KBSIA 4 - 50
Dependencies
Model
composition { Behavior
Modes M1 M4 M3 M2
C4 C1 C2 C3 Constraints
P3 P1 P2 Predictions
Discrepancies
{ Behavior Prediction
{ Discrepancy
Detection
Model-Based Systems & Qualitative Reasoning
Group of the Technical University of Munich SS 15 KBSIA 4 - 51
Recording Dependencies
Behavior
Modes M1 M4 M3 M2
C4 C1 C2 C3 Constraints
P3 P1 P2 Predictions
Discrepancies
Model
composition { { Behavior Prediction
{ Discrepancy
Detection
{M1} {M4} {M3} {M2}
{M1} {M1 M2}
{M3
M4}
{M1 M2 M3
M1 M2 M4}
Model-Based Systems & Qualitative Reasoning
Group of the Technical University of Munich SS 15 KBSIA 4 - 52
ATMS: Basic Concepts
General Tool:
Assumption-based Truth-
Maintenance System
ATMS node
- (Elementary) proposition
Assumption
- Truth of a proposition
Justification
- Elementary inference
E.g. P1 C2 P2
M1 M4 M3 M2
C4 C1 C2 C3
P3 P1 P2
{M1} {M4} {M3} {M2}
{M1} {M1 M2}
{M3 }
{M4}
{M1 M2 M3
M1 M2 M4}
M1
Model-Based Systems & Qualitative Reasoning
Group of the Technical University of Munich SS 15 KBSIA 4 - 53
ATMS: Recording Dependencies in Labels
Environment:
- (Consistent) set
(conjunction) of assumptions
deriving a node
E.g. M1 M2
Label:
- Set (disjunction) of
environments that are minimal
w.r.t. set inclusion
Nogood:
- Inconsistent set
(conjunction) of assumptions
M1 M4 M3 M2
C4 C1 C2 C3
P3 P1 P2
{M1} {M4} {M3} {M2}
{M1} {M1 M2}
{M3 }
{M4}
{M1 M2 M3
M1 M2 M4}
M1
Model-Based Systems & Qualitative Reasoning
Group of the Technical University of Munich SS 15 KBSIA 4 - 54
Task of the ATMS
Computes and maintains
labels:
- when justifications and
assumptions are added
- removes inconsistent
environments
- minimizes environments
Computes (minimal) nogoods
M1 M4 M3 M2
C4 C1 C2 C3
P3 P1 P2
{M1} {M4} {M3} {M2}
{M1} {M1 M2}
{M3
M4}
{M1 M2 M3
M1 M2 M4}
M1
For diagnosis:
- computes minimal conflicts
(= negated minimal inconsistent mode assignments)
(= negated minimal nogoods)
Model-Based Systems & Qualitative Reasoning
Group of the Technical University of Munich SS 15 KBSIA 4 - 55
Conflict Generation Using an ATMS
Model Revision
Conflict
Fault Localization
Discrepancy
Diagnosis
Predictor
Observations/Goals
Behavior Model
Library
ok Modes
Model Composer ? Dependencies
ATMS
Conflict Generator