Modelbased diagnosis history and state of the art
Model-based diagnosis history and state of the art Luca Console Dipartimento di Informatica Università di Torino e-mail: Luca. Console@di. unito. it Luca Console - Model Based Diagnosis - Monet School 2000
Summary • Introduction to diagnostic problem solving • The ‘ 70 s: heuristic approaches to diagnosis • The ‘ 80 s: the start of Model-Based Diagnosis – critique to the heuristic approach – model-based diagnosis: the beginnings and the basic techniques • The ‘ 90 s: state of the art of Model-Based Diagnosis • The ‘ 00: opportunities for the future Luca Console - Model Based Diagnosis - Monet School 2000 2
Diagnostic Problem Solving • A definition: Given – a system (device, physical system, physiological system, …) – a set of observations (measurements, tests, symptoms, examinations. . . ) corresponding to abnormal (unexpected, anomalous. . ) behavior Determine – what is wrong with the system In order to – re-establish the system normal behavior (therapy, repair, reconfiguration …) Luca Console - Model Based Diagnosis - Monet School 2000 3
An example The system Observations: the car does not start Possible diagnoses: flat battery, starter broken, ECU problems, …. Repair: plain tests in order to discriminate among diagnoses and then replace the broken component Luca Console - Model Based Diagnosis - Monet School 2000 4
Diagnostic problem solving • A fundamental area for AI from the ‘ 70 s: – Many AI methodologies originated from diagnosis and then spread to other areas of AI – An area of experimentation of different ideas and techniques – A meeting point for many methodologies – A blend of theoretical and experimental research Luca Console - Model Based Diagnosis - Monet School 2000 5
The ‘ 70 s: heuristic diagnosis • diagnosis is one of the main experimentation areas for expert systems – a well-defined problem with definite boundaries • specific domain knowledge to be represented • specific reasoning and problem solving strategies • Basic assumptions: diagnosis = heuristic process – experts rely on associational knowledge of the form symptoms faults (diseases) – knowledge derives from experience – knowledge can be elicited from domain experts and represented using suitable KR languages Luca Console - Model Based Diagnosis - Monet School 2000 6
diagnosis = heuristic classification domain expert heuristic - associational knowledge Heuristic match data abstractions Data abstraction data (observations) solution abstractions Refinement solutions “heuristic classification” [Clancey, 85] “hierarchical classification” [Chandrasekaran, 83] Luca Console - Model Based Diagnosis - Monet School 2000 7
Diagnostic expert systems (II) • many different implementation of the conceptual scheme – E. g. : heuristic (associational) knowledge represented using • production rules • frames • hybrid formalisms integrating rules and frames Many of these formalisms originated from diagnosis (the use of rules, integrating frames and rules. . . ) • many different applications – medicine, industrial processes, mechanics, aereonautics, . . . Luca Console - Model Based Diagnosis - Monet School 2000 8
Case study 1: Mycin [Stanford Univ. 72 -79] • Diagnosis and therapy of bacterial infections • Knowledge base: production rules (original proposal) if (1) the stain of the organism is gram-negative (2) the morphology of the organisms is coccus (3) the growth configuration of the organism is chains then there is a suggestive evidence (0. 7) that the identity of the organisms is streptococcus • • • Inference strategy: backward chaining Approximate reasoning: ad-hoc heuristic approach Explanations: HOW, WHY-NOT. . . Meta-rules for control from Mycin to Emycin and many other applications Luca Console - Model Based Diagnosis - Monet School 2000 9
Case study 2: DELTA-CATS 1 [General Electric] • Diagnosis and repair of diesel locomotives • goal: support the technicians’ work • Knowledge representation: production rules with forward chaining • Sophisticated approach to uncertain reasoning • graphical interface for providing explanations on drawings of the devices; the repair sequences (stored on the disk) are shown to the technician • [Bonissone et al. 84] Luca Console - Model Based Diagnosis - Monet School 2000 10
Case study 3: PIP [MIT, 72 -78] • Diagnosis of spleen diseases • Knowledge base: stereotypical descriptions based on frames Triggers: <set of symptoms used to evoke the hypothesis> Decision Criteria is-sufficient: < set of symptoms > must-have: < set of symptoms > must-not-have: < set of symptoms > Complementary relation to other diseases caused-by: <set of diseases> cause-of: < set of diseases > complicated-by: < set of diseases > complication-of: < set of diseases > associated-with: < set of diseases > Competing Hypotheses alternative-to: < set of diseases > Score evaluation functions • Inference: – triggering, match and depending on the degree of match, activation of associated or alternative hypotheses • from PIP to a shell and to other applications Luca Console - Model Based Diagnosis - Monet School 2000 11
Case study 4: hierarchical classification • many systems: Internist/Caduceous/QMR [CMU, 77 . . . ], MDX [Ohio State, 81 -85] LITO [Torino, 79 -86] • Hierarchy of diagnostic hypotheses (specialists) • Each specialists: frame and rules • Hierarchical visit based on match and specialization • Experiences are fundamental for many expert system shells of the ‘ 80 s (e. g. KEE/kappa, Nexpert Object, CLIPS. . . ) • Example: Internist/QMR Internal Medicine Lung diseases cirrhosis . . . Liver diseases hepatitis . . tumours . . . Luca Console - Model Based Diagnosis - Monet School 2000 12
A summary of the approach: diagnosis of devices • Physical device to be diagnosed • Heuristic knowledge elicited from a domain expert: associations symptoms faults • rules: if sympt 1 and … and sympt. N then (0. 75) fault=P • stereotypical descriptions fault P: trigger: car win’t start symptoms: necessary (. . . ) sufficient (. . ). . . Luca Console - Model Based Diagnosis - Monet School 2000 13
Critiques to the heuristic approach • The heuristic approach allows one to build diagnostic systems suitable for many problems and applications – well consolidated approach – many tools available – many validated applications in use • Some serious problems – difficulties in acquiring and maintaining the knowledge base – experience knowledge • it is not easy to find experts who are usually not available • subjective knowledge dependent on the specific expert • how to diagnose “new” devices or “new” cases? Luca Console - Model Based Diagnosis - Monet School 2000 14
Critiques to the heuristic approach (II) • some serious problems (contd) – approach based on classification • it is impossible to deal with cases not considered a-priori • it is difficult to deal with multiple faults • brittleness – Knowledge base specific for diagnosis and not reusable in other tasks – lack of generality and strict dependence on the specific device • it is impossible to reuse knowledge in similar devices or even in new versions of the same device – limited explanation capabilities Luca Console - Model Based Diagnosis - Monet School 2000 15
The ‘ 80 s: model-based reasoning • New tendency (late 70 s - beginning of the 80’s) experience heuristic knowledge model of the system to be diagnosed • “objective” model, not specific for diagnosis (task independent) • New approach to knowledge-based systems – – based on “deep knowledge” based on “first principles” second-generation expert systems “model-based” Luca Console - Model Based Diagnosis - Monet School 2000 16
Model-based diagnosis • “knowledge level” view: design textbook first principles. . actual system model of the system observed behaviour predicted behaviour diagnosis • Different approaches (types of models and definitions of diagnosis Luca Console - Model Based Diagnosis - Monet School 2000 17
Basic principles • Compositional models – models of generic components • interfaces • internal details • description of behavior – model of the structure of a device • Simulation of the device behavior under the assumptions about the mode of its components • Diagnostic strategies Luca Console - Model Based Diagnosis - Monet School 2000 18
A simple (classical) example Mult 1 Add 1 Mult 2 Add 2 Mult 3 Compositional modelling - component types adder, multiplier • interfaces • behavior - component instances - structure of the device Luca Console - Model Based Diagnosis - Monet School 2000 19
A simple (classical) example (2) Model of a component type: the ADDER • interface variables – two inputs – one output • no internal variables (state) • Correct behavior Adder(X) not AB(X) out(X) = inp 1(X) + inp 2(X) Similarly for the MULTIPLIER • Correct behavior Mult(X) not AB(X) out(X) = inp 1(X) * inp 2(X) Luca Console - Model Based Diagnosis - Monet School 2000 20
A simple (classical) example (3) Mult 1 Model of the device Add 1 Mult 2 Add 2 Mult 3 Component instances Multiplier(Mult 1), Multiplier(Mult 2), Multiplier(Mult 3), Adder(Add 1), Adder(Add 2) Connections out(Mult 1) = inp 1(Add 1) out(Mult 2) = inp 2(Add 1) = inp 1(Add 2) out(Mult 3) = inp 2(Add 2) Luca Console - Model Based Diagnosis - Monet School 2000 21
Computing diagnoses (overview) actual system model of the system observed behaviour predicted behaviour discrepancies Expected behavior diagnosis Luca Console - Model Based Diagnosis - Monet School 2000 22
Computing diagnoses (1) • Step 1: Given the observations simulate the device to compute is expected behavior 2 3 2 3 prediction Mult 1 Add 1 A = 10 12 Add 2 B = 12 12 Mult 3 Luca Console - Model Based Diagnosis - Monet School 2000 23
Computing diagnoses (2) • Step 2: Compare predictions and observation to determine discrepancies 2 3 2 3 prediction Mult 1 Add 1 A = 10 12 Add 2 B = 12 12 discrepancy Mult 2 Mult 3 Luca Console - Model Based Diagnosis - Monet School 2000 24
Computing diagnoses (3) • Step 3: discrepancies indicate that some component is faulty conflict = set of components involved in the discrepancy; they cannot be all working properly 2 3 2 3 Mult 1 Add 1 A = 10 12 Add 2 B = 12 12 Mult 2 two conflicts: {Add 1, Mult 2} {Add 1, Mult 3, Add 2} Mult 3 Luca Console - Model Based Diagnosis - Monet School 2000 25
Computing diagnoses (4) • Step 4: Diagnoses can be computed from conflict at least one component from each conflict = hitting sets mnimal candidates 2 3 2 3 two conflicts: {Add 1, Mult 2} {Add 1, Mult 3, Add 2} Mult 1 Add 1 A = 10 12 Mult 2 Add 2 Mult 3 B = 12 12 single faults {Add 1} {Mult 1} double faults {Mult 2, Mult 3}, {Add 2, Mult 2} Luca Console - Model Based Diagnosis - Monet School 2000 26
Computing diagnoses (5) • Optional step: exonerate all the components involved in each concordance between observed and predicted behavior 2 3 2 3 two conflicts: {Add 1, Mult 2} {Add 1, Mult 3, Add 2} Mult 1 Add 1 A = 10 12 Mult 2 Add 2 Mult 3 B = 12 12 single faults {Add 1} {Mult 1} double faults {Mult 2, Mult 3}, {Add 2, Mult 2} Luca Console - Model Based Diagnosis - Monet School 2000 27
Characterizing diagnoses • Logical characterization: consistency-based diagnosis [Reiter 87] – SD: system description (the model) – COMPS: the set of components – Obs: the observations – Diagnoses minimal sets COMPS such that SD Obs {AB(c) | c } {not AB(c) | c COMPS - } is consistent Luca Console - Model Based Diagnosis - Monet School 2000 28
Characterizing diagnoses (II) • diagnosis = form of default reasoning – default: each component behaves normal, if this is consistent: : not AB(c) – diagnoses: extensions of a default theory whose logical theory is the models and whose defaults are as above [Reiter, 87] Luca Console - Model Based Diagnosis - Monet School 2000 29
Exploiting models of correct/faulty behaviour • Initial proposal: using only models of correct behaviour – 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] [de Kleer, Williams 89] • “weak” models of physical impossibility [Friedrich et al. 90] • behavioural models [Console, Torasso, 91] Luca Console - Model Based Diagnosis - Monet School 2000 30
The need for fault models: a motivating example W-1 S B-1 W-2 W-3 W-5 B-2 B-3 W-4 W-6 Model of the correct behaviour battery(S) not AB(S) voltage. Out(S, ok) bulb(B) not AB(B) voltage. In(B, X) light(B, X) wire(W) not AB(B) voltage. In(W, X) voltage. Out(W, X) • Observations: light(B-1, off), light( B-2, off), light( B-3, ok) • Candidates: {B-1, B-2}, {S, B-3}, {S, W-3}, {W 1, W 3}. . . NONSENSE!!!!! • Fault models are needed – predictive: bulb(B) AB(B) voltage. In(B, X) light(B, off) – weak: “physical impossibility” : not(AB(W) and voltage. Out(W, ok) Luca Console - Model Based Diagnosis - Monet School 2000 31
Behavioural models Model of a component type: • interface variables • internal variables • Modes of behavior • correct behavior (ok mode) • fault modes • (possibly) unknown mode • A set of constraints (equations, rules) for each mode Example: ADDER Modes: ok, stuck-at-0 Adder(X) ok(X) out(X) = inp 1(X) + inp 2(X) Adder(X) stuck-at-0(X) out(X) = 0 Luca Console - Model Based Diagnosis - Monet School 2000 32
Diagnosis with behavioral models • Given SD, Obs, Comps, Modes(c) for each c Comps • Determine an assignment of modes to components = {mi(ci) | mi Modes(ci) } one and only one mode for each component • such that SD Obs is consistent • different notions of minimality • Kernel diagnoses [de Kleer, Mackworth, Reiter 92] characterize in a compact way all the diagnoses Luca Console - Model Based Diagnosis - Monet School 2000 33
Abductive diagnosis • The definition above is based on consistency, i. e. explain the observations consistent with the observations • Weak notion of explanation • A stronger notion of explanation explain the observations consistent with the observations • An alternative characterization: abductive diagnosis [Poole 87][Console, Torasso, 89] Luca Console - Model Based Diagnosis - Monet School 2000 34
Abductive diagnosis (2) • Given – SD – Modes – Observations, with the distiction between contextual data (Cxt) and observations (Obs) • Determine – an assigment of modes of behavior to the components = {mi(ci) | mi Modes(ci) } such that SD Cxt |= Obs (SD Cxt consistent) minimality wrt fault modes Luca Console - Model Based Diagnosis - Monet School 2000 35
A continuum of definitions Given Obs, partition it into Obs 1 Obs 2 SD Cxt Obs 2 |= Obs 1 SD Cxt Obs 1 Obs 2 consistent) - varying Obs 1 we have a continuum of definitions - Abduction provides a subset of the solutions provided by consistency-based diagnosis abduction Obs 1 = Obs consistency-based ordering: set inclusion consistency-based Obs 1 =of definitions lattice abduction Lattice of sets of solutions [Console, Torasso, 1991] Luca Console - Model Based Diagnosis - Monet School 2000 36
A continuum of definitions (II) • 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 Luca Console - Model Based Diagnosis - Monet School 2000 37
An historical digression genesis of the MBD approach • Two different evolutions – Diagnosis on causal models • “process centered” approach • born in medical domains, then application to diagnosis of industrial processes and devices • model: causal description of the behavior of the system, in normal and/or faulty conditions – Diagnosis on models of structure and function • “component centered” approach • born in technical domains, then other applications • model: description of the structure of a device and of the function of each type of component Luca Console - Model Based Diagnosis - Monet School 2000 38
Diagnosis on models of structure and function • Originated in technical domains (hardware diagnosis) from – – difficulties in gaining experience with devices (short life cycle) need of diagnosing “new” devices” need of reusing models Three main projects at the beginning of the ‘ 80 s • Sophie (MIT U. Cal Irvine, BBN, poi Xero. X) – seminal paper “How Circuit works“ [de. Kleer, 76] – tutoring system for HW diagnosis • HT project at MIT [Davis, 83, 84] – models of structure and function, reasoning techniques • DART project at Stanford [Genesereth, 84] – logical languages for modeling for diagnosis and design • Application to other domains Luca Console - Model Based Diagnosis - Monet School 2000 39
Diagnosis on causal models • Born in medical applications from the need of modeling physiological and pathophysiological processes for – avoid knowledge which is too heuristic and based on experience – being able to provide causal explanations – need of separating different types of knowledge that are often mixed in the heuristic approach (e. g. , domain and control knowledge) – Casnet [Weiss, Kulikowski, 78], ABEL [Patil, 81], SC [Reggia, 83] HEART_FAILURE [Long, 83], CHECK [Console, Torasso, 86] MDX-II [Chandrasekaran, Sticklen, 87] • Similar techniques also in other domains, – mechanics: IDM [Fink et al. 85], DIVA [David et al. 88] CHECK [Console, Torasso, 87] – industrial processes: IDS [Pan, 84] – geology, GTD [Simmons, 88] Luca Console - Model Based Diagnosis - Monet School 2000 40
Computing diagnoses • Computing consistency-based diagnoses Predictor (simulator) ATMS Candidate generator – Predictor: simulation on the model (constraint propagator) – ATMS: caching, re-using inferences, computation of conflicts – candidate generator: computes candidate diagnoses from conflict Luca Console - Model Based Diagnosis - Monet School 2000 41
How to use the ATMS GDE [de Kleer, Williams 1987] • Assumptions: modes of behavior of the components • Nodes: predictions – having as labels the contexts in which they hold, i. e. , the assumptions on modes of behavior under which they hold • Nogood: discrepancy between prediction and observations – labels: conflicts • Dealing only with minimal conflicts • Candidate generation can be performed using the ATMS Luca Console - Model Based Diagnosis - Monet School 2000 42
Efficient Algorithms Many strategies for computing diagnoses efficiently • probabilistic focusing [de. Kleer 92] – a-priori probability of faults – a-posteriori probability, given the observations – computing only preferred conflicts and diagnosis [Struss, Dressler] • focusing on some classes of faults – e. g. Single fault, double-faults, only some types of faults • focused ATMS – strategies for controlling the assumptions in the ATMS [Dressler] • Working hypotheses [Struss, 92] • “meta-level” techniques for controlling the diagnostic process Luca Console - Model Based Diagnosis - Monet School 2000 43
Computing diagnoses (II) • Computing abductive diagnoses – backward search from observations to be explained – focusing strategies – caching for the re-use of inferences (possibly using an ATMS) Luca Console - Model Based Diagnosis - Monet School 2000 44
Computing abductive diagnoses: an example Model: oil_cup normal holed oil_loss radiator normal holed oil_level normal water_level low oil_below_carnormal low oil_cup(normal) oil_level(normal) oil_cup(holed) oil_loss(present) oil_below_car(present) oill_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) . . . oil_gauge normal red water_temp normal high engine_on normal high engine_temp • Obs 1 = {engine_temp(high)} Two minimal candidate explanations – E 1 = { oil_cup(holed) } – E 2 = {radiator(holed)} Luca Console - Model Based Diagnosis - Monet School 2000 45
Diagnosis as a process generation of the candidates from initial observations Yes Stop? No generate - probe - test for discrimination update candidates • Diagnosis is an iterative process • Different halting conditions for different goals: – fault detection – fault localization – fault identification • Overall goal: repair the system, not only diagnose it Luca Console - Model Based Diagnosis - Monet School 2000 46
Generation of tests/probes • Test: test vector that can be applied to the system – assumption: the mode of behavior of the component does not change between tests – approaches to select the test that can discriminate between faults of different components (e. g. [Williams]) • probe: measuring some unknown – Selection of the probe based on • predictions generated by each candidate on unknown measurable points • cost/risk/benefits of the different tests/probes • fault probability of the various components Luca Console - Model Based Diagnosis - Monet School 2000 47
Generation of tests/probes (II) • Approach based on entropy [de. Kleer, 87, 92] – a-priori probability of the faults (even a rough estimate) – given set D 1, D 2, . . . Dn of candidates to be discriminated • generate predictions from each candidate • for each probe/test, compute the a-posteriori probability p(Di|T(x)), for each possible outcome x of T • select the test/probe for which the distribution p(Di|T(x)) has a minimal entropy (this is the test that on average best discriminates between the candidates) Luca Console - Model Based Diagnosis - Monet School 2000 48
Example • Two candidates D 1 e D 2 with the same a-priori probability • Two probes are possible – A with possible values 0 e 1 – B with possible values 0 e 1 • Prediction: – D 1 predicts A(0) e B(1) – D 2 predicts A(1) e B(1) • Discrimination: – P(D 1 | A(0)) = 1, P(D 2 | A(0) =0, P(D 1 | A(1)) = 0, P(D 2 | A(1) =1 – P(D 1 | B(0)) = 0, P(D 2 | B(0) =0, P(D 1 | B(1)) =. 5, P(D 2 | B(1) =. 5 • Then A is the test that on average best discriminates Luca Console - Model Based Diagnosis - Monet School 2000 49
Example 2 3 2 3 Mult 1 Add 1 A = 10 Mult 2 Add 2 B = 12 – Candidates • single faults {Add 1} {Mult 1} Measurement Mult 3 Luca Console - Model Based Diagnosis - Monet School 2000 50
Integrating diagnosis and repair • Diagnosis is not the final goal: • Goal: repair • Defining repair strategies – replacement of components – reconfiguring the system – taking into account the cost of the system breakdown, real time constraints –. . . Luca Console - Model Based Diagnosis - Monet School 2000 51
Integrating diagnosis and repair (2) • Integrating diagnosis and repair planning – repair strategies define criteria for halting the diagnosis loop (e. g. it is useless to discriminate between faults that are repaired in the same way) – In some cases it is better to perform a repair action before a complete discrimination between the candidates – opportunistic reasoning strategies [Friedrich, Gottlob, Nejdl, 90] Luca Console - Model Based Diagnosis - Monet School 2000 52
Example Power transm nets [Friedrich et al] Observation: no power in t 2 (house) and in t 3(hospital) candidates: {I 1}, {I 2} immediate reconfiguration action: switch breaker b to serve t 3 then discrimination (measuring power in t 1) and repair - t 3 - t 5 t 4 t 2 b l 4 l 3 g 1 t 1 l 2 ~ ~ g 2 l 1 Luca Console - Model Based Diagnosis - Monet School 2000 53
Models of real devices • Modeling is the critical aspect of model-based diagnosis • Each model is an abstraction of the actual system – different choices and assumption in modeling – different dimensions (aspects) are captured by different types of models – choosing the models depend on many factors • • • which pieces of information are available which are the goals of diagnosis which observations (and in which form) can be available which repair and test action can be made temporal constraints on the behavior of the device and on the diagnostic process • . . Luca Console - Model Based Diagnosis - Monet School 2000 54
Dimensions in modeling for MBD (not exhaustive !) process oriented component oriented structural models . . . functional models behavioural models causal models process models teleological (similar to comp. oriented. ). . . models . . . correct behaviour crisp fault models probabilistic . … static dynamic discrete state change timequantitative varying derivatives landmarks qualitative intervals . … intensional extensional orders of magnitude Luca Console - Model Based Diagnosis - Monet School 2000 flat hierarchical . . . 55
Multiple models • Usually need of combining different types of models – each type of models captures some aspects and some types of faults “pathways of interaction” [Davis, 84] • Example: electronic (electric) circuit – Model of structure (functional) and function (see above) • captures faults to components • pathways of interaction: input-output behaviour of the components – Model of the physical structure (layout) • captures layout faults (e. g. bridge faults) • pathways of interaction: adjacency of components – teleological model • capture faults in design or in the construction of the device Luca Console - Model Based Diagnosis - Monet School 2000 56
Analysis of some modeling techniques for MBD • Many techniques in use in real systems • Analysis of some of the dimensions listed before – – use of qualitative models temporal, dynamic and time-varying models hierarchical models probabilistic models Luca Console - Model Based Diagnosis - Monet School 2000 57
Qualitative models in MBD • Why? – In many cases they are sufficient for diagnostic purposes (but there are cases where quantitative or semi -quantitative models are needed) – They are close to the way expert diagnosticians operate – in many cases imprecise knowledge makes numerical models useless (e. g. model of the combustion in an engine) – usually imprecision in the observations – easier to use (in some cases) Luca Console - Model Based Diagnosis - Monet School 2000 58
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 – need of constraint solvers for prediction Luca Console - Model Based Diagnosis - Monet School 2000 59
A simple example pump 1 pipe 2 tank Structure: Fout= F 1, Pout= P 1 , P 2= Ptank , F 2= Fin • Pump: – interface variables: • Pout, Fout (0, +) – constraints (pump ON) • Pump OK Pout= + Fout=0, Pout=0 Fout=+ • Pump blocked Fout=0 • Pipe (flow direction from 1 to 2): – interface variables: • P 1, P 2, F 1, F 2 (0, +) – constraints • Pipe Ok F 2= F 1 P 1=P 2 • Pipe occluded F 2=0, P 1=+ • Pipe leaking F 2=0, P 1=0 • Tank: – interface variables: Fin, Ltank, Ptank (0, +) – internal variable d. Ltank (0, +, -) – constraints • Tank Ok Ptank=Ltank, d. Ltank= Fin • Pipe leaking Ptank=0, d. Ltank= - Luca Console - Model Based Diagnosis - Monet School 2000 60
A simple example (2) • Diagnosis (using pump and pipe only, we will return later to considering the tank) – Obs {F 2=0, P 2=0 } – the set of assumptions {ok(pump), ok(pipe)} is a conflict • from P 2=0 and ok(pipe) we predict P 1=0 and from the structure Pout=0 (for the pump) • then from ok(pump) we predict Fout=+ i. e. , F 1=0 (for the pipe) • and finally using again ok(pipe) we predict F 2=+ (CONFLICT!!!!) – Three set of assumptions explain the observations (are candidate diagnoses) • D 1 { blocked(pump) } • D 2 { occluded(pipe)} • D 3 { leaking(pipe)} Luca Console - Model Based Diagnosis - Monet School 2000 61
A second example pump 1 pipe 1 pump 2 join • Diagnosis – if: Obs = {Fout=0, Pout=0 } – Then several minimal explanations pipe 2 • D 1 { blocked(pump 1) } • D 2 { occluded(pipe 1)} • Join – interface variables: • Pout, Fout, Pin 1, Fin 1 Pin 2, Fin 2 (0, +) – constraints • Pump OK Pin 1= Pin 2= Pout Fout= Fin 1 Fin 2 ( qualitative add) • • 0 + ? ? D 3 { leaking(pipe 1)} D 1 { blocked(pump 2) } D 2 { occluded(pipe 2)} D 3 { leaking(pipe 2)} 0 0 + + ? ? + + Luca Console - Model Based Diagnosis - Monet School 2000 62
Models based on deviations • In previous examples: qualitative representation of absolute values of a quantity • In many applications it may be useful to reason in terms of deviations of a quantity from its reference value: this is more relevant for diagnosis than absolute values • Example – Pipe in which the flow changes in time (e. g. , as an effect of a control system) – In the model it is useful to reason in terms of f (deviation from the correct value) rather than in terms of f (where f(t) = fact (t) - fref (t)) Luca Console - Model Based Diagnosis - Monet School 2000 63
Models based on deviations (2) • Can be obtained from qualitative equations from equation A=B derive [A] = [B] A = B [ A] = [ B] where [X] is the sign of X (values: -, 0, +) • similarly for derivatives • Observations: – deviation of the observed value wrt the expected one Luca Console - Model Based Diagnosis - Monet School 2000 64
Models based on deviations: an example • An example: a pump – Interface variables Fin, Fout, Pout, S (0, +, -) – parameter C (positive constant) – modes: • OK: C= Cref blocked: C= 0 insuff: [ cp]= - – Qualitative equation • Fout = Fin *S * C / Pout (actually rathern than =) – Equation in terms of deviations • [ Fout ] = [C] [ Fin ] [ C ] [ S ] - [ Pout ] – if we observe [ Fout ]= -, we have several exaplanations (involving faults of the pump or propagating the devation before the pump) Luca Console - Model Based Diagnosis - Monet School 2000 65
Models based on deviations: an example (2) • If we observe [ Fout ]= -, (the flow from the pump is less than it should be • From [ Fout ] = [C] [ Fin ] [ C ] [ S ] - [ Pout ] – and [ Fout ] = – we have (single fault explanations) • [ C ] = - (pump insuff) • C = 0 (pump blocked) • [ Fin ] = - (flow to the pump is less than it should be) • [ S ] = - (signal to the pump is less than it should be) • [ Pout ] = + (pressure after the pump is more than it should be) Luca Console - Model Based Diagnosis - Monet School 2000 66
Time-dependent models • The examples discussed before abstract from time, no time dependency in the models • Time is a fundamental dimension in diagnosis [Console et al. AIJ 98] – time-varying contexts: different sets of observations gathered at different time points (e. g. test vectors) – temporal behaviour: symptoms manifest themselves in time (for some time and some time after the fault. usually dynamic behaviour: the device (component) has an internal state (memory) on which the behaviour depends – time-varying behaviour: the device (component) has different faults across time Luca Console - Model Based Diagnosis - Monet School 2000 67
Time-varying contexts • Application of different test vectors to a device across time • If static models are adopted (i. e. , time is abstracted): – if C 1 is the set of candidates for the test vector V 1 – if C 2 is the set of candidates for the test vector V 2 – then the resulting set of candidates is C 1 C 2 • Strategies for selecting the test vector in the most appropriate way • More complex if the model is not static, i. e. , if temporal behaviour is taken into account (next slides) Luca Console - Model Based Diagnosis - Monet School 2000 68
Temporal behaviour • representation of the temporal patterns corresponding to the manifestation of a fault (abstracting dynamics) • Example ( [Long, 83] causal model in a medical domain): water. Retention(T 1), fluid. Theraphy(absent, T 2) blood. Volume(high, T 3) { start(T 1) at. Least 9 hours before start(T 3) end(T 1) at. Most 6 hours before end(T 3) start(T 2) at. Least 48 hours before start(T 1) end(T 2) after end(T 3) } Example (digital circuit) inverter(X), not AB(X, I), input(X, In, T) out(X, not In, T 1) { T, T 1 during I, T 1 = T+1 } Luca Console - Model Based Diagnosis - Monet School 2000 69
Diagnosis on temporal models • Diagnosis: explaining the symptoms, consistently with their temporal extents • Integration between diagnostic and temporal reasoning • More complex from the computational point of view • Focusing and greater discrimination power Example – fault 1 sympt 1 and sympt 2 {sympt 1 before sympt 2 } – fault 2 sympt 1 and sympt 2 {sympt 1 during sympt 2 } If the observation is sympt 1[8. 30, 16. 30] sympt 2[12, 14] then only fault 2 is a consistent diagnosis Luca Console - Model Based Diagnosis - Monet School 2000 70
Modeling dynamics • Almost all the devices have an internal state and their behaviour is influenced (and influences) such a state • Modeling dynamics is in most cases fundamental for performing diagnosis correctly – but in some cases dynamics can be conveniently abstracted • Many approaches to dynamic modeling; they can be roughly divided into two groups – models based on differential equations (usually qualitative) approach suitable for states corresponding to physical quantities that can change in a continuous way – discrete representation of state changes approach suitable in case of discrete states Luca Console - Model Based Diagnosis - Monet School 2000 71
Dynamic models with discrete state • Example: diagnosis of sequential circuits, model of an SR flip-flop SRFlip. Flop(d) and ok(d, T) and inp(d, 0, 1, T 1) and state(d, empty, T 1) out(d, 1, 0, T 2) and state(d, full, T 2) {T 1 during T, T 2 = T 1 +1} Luca Console - Model Based Diagnosis - Monet School 2000 72
Dynamic models with qualitative differential equations • Example: a Tank: – interface variables: Fin, Ltank, Ptank (0, +) – internal variable d. Ltank (0, +, -) – constraints • Tank Ok Ptank=Ltank, d. Ltank= Fin • Pipe leaking Ptank=0, d. Ltank= - • Prediction – t = 0: Ltank = 0 Fin = + we can infer: d. Ltank = + and then – t = 1: Ltank = + – …. Luca Console - Model Based Diagnosis - Monet School 2000 73
Diagnosis on dynamic models • same definition as in the case of temporal models (which is indeed an abstraction) but – observations in different states – reconstructing the state transitions of the system that allow to explain the observations • Complex problem in case of partial observations (or observations only in some states) – many alternatives in the possible evolution of a system, especially in case of qualitative models – in many cases the problem is underconstrained [Hamscher & Davis, 1984] Luca Console - Model Based Diagnosis - Monet School 2000 74
Diagnosis on dynamic models: an example Common Rail [Cascio, Console et al 99] P PR d. Prail = [ Fpump ] - [ Fpr ] - [ Finj ] - [ Fleak ] EFP ETK We observe for [ Prail ] the sequence of values t=0 t=1 t=2 t=3 t=4 0 0 0 - Explanation: at t=2 d. Prail = Candidate faults: Pump(blocked), Pump(insuff), pr(leaking), pr(blocked_open), rail(leaking), cyl(blocked_open), . . Luca Console - Model Based Diagnosis - Monet School 2000 75
Diagnosis on dynamic models: approaches • Computing diagnoses is difficult • Exploiting other knowledge (heuristics) to speed-up the process (possibly giving up completeness) – more expressive qualitative models [Dague, Taillibert] – state-based diagnosis [Struss et al 97] • performing diagnosis on multiple snapshots • without simulation – exploiting causality in the simulation [Theseider, Panati 98] • causality constrains the way changes may occur • causality constrains simulation – Bond graphs [Biswas et al] Luca Console - Model Based Diagnosis - Monet School 2000 76
Time-varying systems • A device (component) may have different faults across time • Not all the evolutions are possible; graph of the allowed mode transitions for a device Example: pump ok partially occluded (partially occluded is a fault that may be reversible) temporal constraints may be associated with the transitions • time-varying behaviour is usually coupled with dynamic behaviour Luca Console - Model Based Diagnosis - Monet School 2000 77
Diagnosis on time-varying models • Observations in different states (labeled) • Diagnosis – Atemporal diagnosis in each state in which there are observations, it produces a set of candidates for each state – Determine the evolutions that are consistent with the graph of mode transitions (and, possibly temporal constraints on such transitions) – focusing techniques for using the mode transition graphs in an active way for generating predictions about future states • [Console et al 92] [Nayak, Williams, 95] Luca Console - Model Based Diagnosis - Monet School 2000 78
Which type of temporal model? • It depends on the goals of the diagnostic process and on the aspects (dimensions) that have to be modeled [Console et al. AIJ 98] – Granularity of the phenomena is a fundamental parameter, especially granularity of faults, observation, state change, . . – Temporal window for diagnosis – For example one may adopt a dynamic model abstracting timevarying behavior if the modes (faults) change slowly wrt the dynamics of the system and the temporal window for diagnosis – on the other hand a model of the time-varying behaviour is needed in case the system has to be monitored across time Luca Console - Model Based Diagnosis - Monet School 2000 79
Approaches to time in diagnosis (examples) Ref. Brusoni et al 97 Console et al 91 Console et al. 94 Dague et al 91 De. Coste 91 Downing 92 Dvorak Kuipers 89 Friedrich et al 91 Guckenbiehl 90 Hamscher 91 Hamsch. Davis 84 Long 83 (96) Moster. , Biswas 97 Nejdl et al 94 (97) Ng 91 Pan 84 Struss 97 Williams Nayak 96 Type of phenomena Temp Dyn time var. cont disc X X X X X X X X Ontology of time metric qualit state ad-hoc seq abs X X X X X X X Luca Console - Model Based Diagnosis - Monet School 2000 Def. A Te C Tc A/C Tc/e A Tc C Tc C Tc A Tc C Tc A Te C Tc Tc C 80
MBD: AI and engineering approaches • Two approaches to MBD – the AI approach (what we have seen up to now) – the engineering approach (FDI community) • Based on different techniques • Some similarities • First attempts to compare the two approaches only recently [Cordier et al. 2000] Luca Console - Model Based Diagnosis - Monet School 2000 81
FDI approaches • Models usually based on quantitative differential equations • Given set of available sensors – computation of residual matrices that indicate which sensor may suggest which faults, given sensor redings – some sort of “potential conflict” [Cordier et al 2000] • Relations with AI MBD yet to be clarifies • Some applications • An example Luca Console - Model Based Diagnosis - Monet School 2000 82
Hierarchical models • many devices have a huge number of components • Usually the structure can be decomposed hierarchically – macro-components with connections – macro-components exploded in a number of sub-components (with connection only within the macro-component) • Interesting if a model for macro-components is available • Diagnosis: – determine the faulty macro-components this can be done efficiently if there are few macro components – refinement focusing on the sub-components of candidate macrocomponents Luca Console - Model Based Diagnosis - Monet School 2000 83
Hierarchical models: example • Circuit – macro-components adder, multiplier (with a model) – diagnosis at the level of logical gates Add 1 Mult 2 Add 2 • Diagnosis – determine which macro-component is faulty (e. g. Add 1) – consider the structure of an Adder in terms of logical gates and perform diagnosis on that component Luca Console - Model Based Diagnosis - Monet School 2000 84
Probabilistic models • Imprecise knowledge in many domains • Representation of uncertainty by means of probability distributions • Bayesian networks [Pearl, 88]: a powerful framework for probabilistic reasoning • Used for diagnosis in many different ways – probabilistic causal models extension of causal models with conditional probabilities associated with the causal relations – reconstruction of the approaches based on structure and function as bayesian networks Luca Console - Model Based Diagnosis - Monet School 2000 85
Probabilistic causal models: a simple example cold pneumonia p 2 p 1 p 3 sneezing fever • The importance of probabilistic independence • Given the observation fever one can compute the probability of cold and pneumonia as explanations of the symptom • if a observe also sneezing then the probability of cold will increase and the one of pneumonia will decrease Luca Console - Model Based Diagnosis - Monet School 2000 86
In conclusion • Modeling is the real issue in model-based diagnosis • many different choices and assumptions • Choosing the “right” model is not easy at all and require “sensibility” Luca Console - Model Based Diagnosis - Monet School 2000 87
Advantages of the model-based approach • The model-based approach has significant advantages with respect to the other ones. . . – reusable models; a library of components model can be built and the models in the library re-used for the diagnosis of different devices or for other tasks – building and maintaining models is less critical – the models are “objective” and do not rely on experience – possibility of diagnosing “new” devices – it is natural to deal with dynamic and time-varying behaviour – it is natural and simpler to deal with multiple faults and with fault masking – detailed explanations Luca Console - Model Based Diagnosis - Monet School 2000 88
Problems of the model-based approach • . . . but new problems arise – building models is not easy at all • many dimensions have to be taken into account • many alternatives have to be considered along each dimension • each model is based on some assumptions and thus it may be adequate in some cases and inadequate in other cases – the diagnostic process is more complex from the computational point of view (mainly if and because more complex aspects such as multiple faults, masking, time-dependent behaviour, … are taken into account) – There are not yet tools available for developing model-based applications –. . . Luca Console - Model Based Diagnosis - Monet School 2000 89
3 Multiplier. Applications s and 2 Adde rs: 3 * + 2 3 3 2 3 * * + F = 10 G = 12 * + F = 10 + G = 12 * * 1979 1989 1999 Luca Console - Model Based Diagnosis - Monet School 2000 2009 90
Co-Evolution of Research & Applications Research Established results Economic opportunities First Solutions 2 * 3 + A + B Open problems …. Applications Luca Console - Model Based Diagnosis - Monet School 2000 91
Applications areas • Many applications – many application areas • • electronic and electric components telecommunication systems power plants and power distribution Automotives Aereonautics and aerospatial industrail processes …. – different types of models – different approaches to diagnosis • Moreover, application of the model-based technology to other problem solving problems Luca Console - Model Based Diagnosis - Monet School 2000 92
Open problems • • Modelling Dynamic systems Embedded systems Diagnosis and planning Tools … The challenge: MBD in the product life-cycle Only partial solutions available Research effort needed Luca Console - Model Based Diagnosis - Monet School 2000 93
Modelling choose the right modelling assumptions Given • requirements for diagnosis (repair/recovery) • type of behavior • observability Luca Console - Model Based Diagnosis - Monet School 2000 94
Modelling: an example Requirements Solution P PR EFP few observables no “absolute” correct behavior safety and recovery actions ETK dynamic behavior with active control aggregate components according to actions/obs qualitative models based on deviations qualitative differential equations Luca Console - Model Based Diagnosis - Monet School 2000 95
Modelling: the challenge Modelling today …. Modelling tomorrow. . . An intelligent model library P EFP PR We need • guidelines for analyzing modelling assumptions • Requirements support for selecting the “right” model Model ETK Luca Console - Model Based Diagnosis - Monet School 2000 96
Dealing with dynamics interaction with other fields, especially in engineering Several approaches when can dynamic behavior be abstracted ? when can one use simplified approaches? how to model and deal with active control? Luca Console - Model Based Diagnosis - Monet School 2000 97
Integration of diagnosis and planning • Taking into account actions, costs, trade-offs constraints, . . . • A general framework for integrating diagnosis and planning for repair/reconfiguration • new planning techniques Luca Console - Model Based Diagnosis - Monet School 2000 98
Embedded systems • New requirements and constraints – real time, any time, memory, recovery • New problems and opportunities – preventive diagnosis – tele-diagnosis (network diagnosis) – optimal control Luca Console - Model Based Diagnosis - Monet School 2000 99
Tools Component models ! Diagnostic system A set of software components rather than one monolithic system Algorithms Luca Console - Model Based Diagnosis - Monet School 2000 10 0
The big challnege: diagnosis in products lifecycle Today Design Diagnostic authoring • sensors placed for control purposes, not for diagnosis • modify the system? sacrifice diagnosis? . . Luca Console - Model Based Diagnosis - Monet School 2000 10 1
Diagnosis along the process: an example only one sensor in the “Common rail” P OK for control PR EFP NOT for diagnosis ETK Optimal sensor placement for diagnosis Luca Console - Model Based Diagnosis - Monet School 2000 10 2
Diagnosis along the life-cycle: the goal Tomorrow Diagnostics authoring Design Luca Console - Model Based Diagnosis - Monet School 2000 10 3
g inin ing tur fac Failure Modes and Effects Analysis Testing Pr Tra u d an an M es od sis M ly re Ana ilu s g Fa ect n f e rin tio Ef lu ee nc Va gin Fu nt y En lit me ua y Q plo De Tutoring M even ai tiv nt e en an M ce on ito rin g Diagnosis along the life-cycle: the goal (2) Monitoring is s o gn Dia r ve y o Design for Diagnosability c Re Model Design ir a ep R Service Luca Console - Model Based Diagnosis - Monet School 2000 10 4
Relations with other research areas • As for heuristic diagnosis in the ‘ 70 s, in the ‘ 80 s modelbased diagnosis has been an area with strong connections with other research areas in AI – new methodologies originated from MBD and moved to other areas – MDB has been the application area of other methodologies • Theories of diagnosis – strict connection with non-monotonic reasoning • new methodologies, e. g. abduction, use of TMS, ATMS • application of techniques for computational approaches to non monotonic reasoning • application area for probabilistic reasoning and Bayesian nets • Qualitative reasoning: a very strict connection • Constraint-based reasoning Luca Console - Model Based Diagnosis - Monet School 2000 10 5
Relations with other research areas (2) • Knowledge representation – strict relations for modeling techniques • Temporal Reasoning e theories of action and change – in particular for per dynamic systems • Control Theory – a parallel model-based approach to diagnosis in control theory; based on mathematical models but interesting interchanges and relations • Case-based Reasoning • Machine Learning – machine learning techniques for compiling knowledge from models – new approaches to learning exploiting models • Cooperative problem solving: integration between tasks Luca Console - Model Based Diagnosis - Monet School 2000 10 6
. . . and the story continues. . . • Heuristic diagnosis was one of the central areas for AI in the ‘ 70 s • Model-based diagnosis inherited such a role from the mid ‘ 80 s – an area in which theories and application blended and grew in parallel • a lot of research work • many project in North America, in the EU and in Japan • many application in use on the field – an area with many research opportunities for the ‘ 00 s Luca Console - Model Based Diagnosis - Monet School 2000 10 7
To learn more • • • Introductory chapters to heuristic diagnosis in books such as – Jackson: Introduction to Expert Systems, Second Edition, Addison Wesley 1990. – M. Stefik: Introduction to knowledge systems, Morgan Kaufmann, 1995. the former has a small section on model-based <diagnosis, the second a larger section with an introduction and case studies A conceptual analysis of the heuristic approach can be found in – W. Clancey: “Heuristic Classification”, Artificial Intelligence Journal, 25(3), 1985, pp. 289 -350 A collection of seminal papers on model-based diagnosis with introductions and an annotated bibliography can be found in – W. Hamscher, L. Console, J. de Kleer: Readings in Model-based Diagnosis, Morgan Kaufmann 1992 Research papers can eb found in the main AI conferences (IJCAI, AAAI, ECAI, . . . ) and in – Proceedings of the annual workshop DX (Intl. W. on Principles of Diagnosis) – Interesting papers, especially on modeling, also in the proceeding of the annual QR (Qualitative Reasoning) workshop Moreover papers in the main AI journals Papers describing application in application conferences (such as IAAI or IEEE CAIA) and in journals such as: IEEE Expert, AI in Engineering, Applied AI, . . . Luca Console - Model Based Diagnosis - Monet School 2000 10 8
Credits • Some slides from a joint invited talk at IJCAI 99 with Oskar Dressler • Some slides from the VMBD project (Brite Euram IV Framework with Bosch, Centro Ricerche Fiat, Daimler Chrysler, dassault Electronique (Thomson CSF Detexis), Magneti Marelli, Volvo, Univ. of Paris Nord, Univ. of Wales Aberystwyth • Comments and discussions with many people Luca Console - Model Based Diagnosis - Monet School 2000 10 9
- Slides: 109