610 likes | 827 Views
Diagnosis of Discrete Event Systems. Meir Kalech Partly based on slides of Gautam Biswass. Outline. Last lecture: Optimal CSP Conflict-directed A* Today’s lecture: Automata (brief tutorial) Deterministic automata Non-deterministic automata Discrete event system Observer automata
E N D
Diagnosis of Discrete Event Systems Meir Kalech Partly based on slides of Gautam Biswass
Outline • Last lecture: • Optimal CSP • Conflict-directed A* • Today’s lecture: • Automata (brief tutorial) • Deterministic automata • Non-deterministic automata • Discrete event system • Observer automata • Diagnostics approach • Diagnoser automata • Diagnosability
Brief notes on Automata 11 1 0 0,1 1 0111 111 1 0 0 1 The machine accepts a string if the process ends in a double circle Borrowed from CMU / COMPSCI 102
1 0 0,1 accept states (F) states 1 0 0 1 states Anatomy of a Deterministic Finite Automaton q1 q0 q2 The machine accepts a string if the process ends in a double circle start state (q0) q3
1 0 0,1 1 q1 0 0 1 q0 q2 q3 Anatomy of a Deterministic Finite Automaton The alphabet of a finite automaton is the set where the symbols come from: {0,1} The language of a finite automaton is the set of strings that it accepts
0,1 q0 All strings of 0s and 1s L(M) = The Language of Machine M
0 0 1 q0 q1 1 { w | w has an even number of 1s} L(M) =
Notation An alphabetΣ is a finite set (e.g., Σ = {0,1}) A string over Σ is a finite-length sequence of elements of Σ For x a string, |x| is the length of x A language over Σ is a set of strings over Σ
A finite automaton is a 5-tuple M = (Q, Σ, , q0, F) Q is the set of states Σ is the alphabet : Q Σ → Q is the transition function q0 Q is the start state F Q is the set of accept states L(M) = the language of machine M = set of all strings machine M accepts
q1 1 0 0,1 1 M q0 q2 0 0 1 q3 M = (Q, Σ, , q0, F) where Q = {q0, q1, q2, q3} Σ = {0,1} : Q Σ → Q transition function* q0 Q is start state F = {q1, q2} Q accept states *
0,1 1 0 0 0 1 q q0 q00 q001 1 Build an automaton that accepts all and only those strings that contain 001
Outline • Last lecture: • Optimal CSP • Conflict-directed A* • Today’s lecture: • Automata (brief tutorial) • Deterministic automata • Non-deterministic automata • Discrete event system • Observer automata • Diagnostics approach • Diagnoser automata • Diagnosability
Nondeterministic Finite Accepter (NFA) Alphabet =
Nondeterministic Finite Accepter (NFA) Alphabet = Two choices
Nondeterministic Finite Accepter (NFA) Alphabet = Two choices No transition No transition
First Choice “accept”
Second Choice No transition: the automaton hangs
Second Choice “reject”
Equivalent automata Automata G1 and G2 are equivalent if
Outline • Last lecture: • Optimal CSP • Conflict-directed A* • Today’s lecture: • Automata (brief tutorial) • Discrete event system • Observer automata • Diagnostics approach • Diagnoser automata • Diagnosability
What is a Discrete-Event System? • Structure with ‘states’ having duration in time, ‘events’ happening instantaneously and asynchronously. • States: machine is idle, is operating, is broken down, is under repair. • Events: machine starts work, breaks down, completes work or repair. • State space discrete in time and space. • State transitions ‘labeled’ by events.
DES Example: heating ventilation and air conditioning Diagnosis goal: given a composite DES including observable and unobservable events (faulty events are part of the unobservable events), find the faulty events.
Outline • Last lecture: • Optimal CSP • Conflict-directed A* • Today’s lecture: • Automata (brief tutorial) • Discrete event system • Observer automata • Diagnostics approach • Diagnoser automata • Diagnosability
Observer Automata • In DES we partition the events to observable and unobservable events. • Unobservable events: • absence of sensors • event occurred remotely, not communicated • fault events • Observer is an equivalent deterministic automata to the original which contains only observable events.
Observer - Example a and b are observable events Note:Gnd is non-deterministic, Gobs is deterministic Gnd and Gobs are equivalent.
Outline • Last lecture: • Optimal CSP • Conflict-directed A* • Today’s lecture: • Automata (brief tutorial) • Discrete event system • Observer automata • Diagnostics approach • Diagnoser automata • Diagnosability
Daignostics • Determine whether certain events with certainty are fault events • Build new automata like observer, but attach “labels” to the states of Gdiag • To build • Attach N label to states that can be reached from x0 by unobservable strings • Attach Y label to states that can be reached from x0 by unobservable strings that contain at least one occurrence of ed (fault event). • If state z can be reached both with and without executing edthen create two entries in the initial state set of Gdiag: zN and zY.
Diagnosability: informal definition • Let s be any trace generated by the system that ends in a failure event from set Efiandtis a sufficiently long continuation of s • Diagnosabilityimplies that every trace that belongs to the language that produces the same record of observable events as st should contain in it a failure event from Efi • Along every continuation t of s, one can detect the failure of type Fi with finite delay, specifically in at most ni transitions of the system after s • Alternately, diagnosability requires that every failure event leads to observations distinct enough to enable unique identification of failure type with a finite delay
Diagnosability: example The system is diagnosable
Diagnosability: example The system is not diagnosable
Outline • Last lecture: • Optimal CSP • Conflict-directed A* • Today’s lecture: • Automata (brief tutorial) • Discrete event system • Observer automata • Diagnostics approach • Diagnoser automata • Diagnosability
Diagnosability by Diagnoser To determine diagnosability of a system we use a diagnoser: • The diagnoser traces all possible trajectories of the system. • The diagnoser records the possible failures in each state. • If a state contains an ambiguity failure: “Fi occurs or Fi not occurs” then the system is not diagnosable.