Diagnosis of Discrete Event Systems Meir Kalech Partly based on slides of Gautam Biswass.

Slides:



Advertisements
Similar presentations
Recognising Languages We will tackle the problem of defining languages by considering how we could recognise them. Problem: Is there a method of recognising.
Advertisements

Non-Deterministic Finite Automata
4b Lexical analysis Finite Automata
1 Fault Diagnosis for Timed Automata Stavros Tripakis VERIMAG.
Nondeterministic Finite Automata CS 130: Theory of Computation HMU textbook, Chapter 2 (Sec 2.3 & 2.5)
Deterministic Finite Automata (DFA)
Finite Automata Section 1.1 CSC 4170 Theory of Computation.
CS21 Decidability and Tractability
Introduction to Computability Theory
Finite Automata Great Theoretical Ideas In Computer Science Anupam Gupta Danny Sleator CS Fall 2010 Lecture 20Oct 28, 2010Carnegie Mellon University.
CS5371 Theory of Computation
Courtesy Costas Busch - RPI1 Non Deterministic Automata.
Finite Automata Finite-state machine with no output. FA consists of States, Transitions between states FA is a 5-tuple Example! A string x is recognized.
Lecture 3 Goals: Formal definition of NFA, acceptance of a string by an NFA, computation tree associated with a string. Algorithm to convert an NFA to.
FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY
Lecture 3 Goals: Formal definition of NFA, acceptance of a string by an NFA, computation tree associated with a string. Algorithm to convert an NFA to.
Pushdown Automaton (PDA)
FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY
1 Non-Deterministic Finite Automata. 2 Alphabet = Nondeterministic Finite Automaton (NFA)
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
Great Theoretical Ideas in Computer Science.
Formal Language Finite set of alphabets Σ: e.g., {0, 1}, {a, b, c}, { ‘{‘, ‘}’ } Language L is a subset of strings on Σ, e.g., {00, 110, 01} a finite language,
Nondeterministic Finite Automata CS 130: Theory of Computation HMU textbook, Chapter 2 (Sec 2.3 & 2.5)
Lecture 23: Finite State Machines with no Outputs Acceptors & Recognizers.
CSCI 2670 Introduction to Theory of Computing August 24, 2005.
REGULAR LANGUAGES.
Lecture 05: Theory of Automata:08 Kleene’s Theorem and NFA.
Athasit Surarerks THEORY OF COMPUTATION 07 NON-DETERMINISTIC FINITE AUTOMATA 1.
Great Theoretical Ideas in Computer Science.
CS 367: Model-Based Reasoning Lecture 5 (01/29/2002) Gautam Biswas.
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 3 Mälardalen University 2010.
Lecture # 12. Nondeterministic Finite Automaton (NFA) Definition: An NFA is a TG with a unique start state and a property of having single letter as label.
INHERENT LIMITATIONS OF COMPUTER PROGAMS CSci 4011.
Deterministic Finite Automata COMPSCI 102 Lecture 2.
Lecture Notes 
Great Theoretical Ideas in Computer Science for Some.
Algorithms for hard problems Automata and tree automata Juris Viksna, 2015.
Finite Automata Great Theoretical Ideas In Computer Science Victor Adamchik Danny Sleator CS Spring 2010 Lecture 20Mar 30, 2010Carnegie Mellon.
CS 367: Model-Based Reasoning Lecture 7 (02/05/2002) Gautam Biswas.
CS 404Ahmed Ezzat 1 CS 404 Introduction to Compiler Design Lecture 1 Ahmed Ezzat.
1 Chapter 2 Finite Automata (part a) Hokkaido, Japan.
Theory of Computation Automata Theory Dr. Ayman Srour.
Theory of Computation Automata Theory Dr. Ayman Srour.
Recap: Nondeterministic Finite Automaton (NFA) A deterministic finite automaton (NFA) is a 5-tuple (Q, , ,s,F) where: Q is a finite set of elements called.
Lecture Three: Finite Automata Finite Automata, Lecture 3, slide 1 Amjad Ali.
Lexical analysis Finite Automata
Non Deterministic Automata
Chapter 2 Finite Automata
Pushdown Automata PDAs
Pushdown Automata.
Nondeterministic Finite Automata
Finite Automata & Regular Languages
Chapter 2 FINITE AUTOMATA.
CSC 4170 Theory of Computation Nondeterminism Section 1.2.
Non-Determinism 12CS45 Finite Automata.
Non-Deterministic Finite Automata
Non-Deterministic Finite Automata
CSE322 Definition and description of finite Automata
Nondeterministic Finite Automata
Non Deterministic Automata
NFAs and Transition Graphs
Finite Automata.
4b Lexical analysis Finite Automata
Chapter Five: Nondeterministic Finite Automata
CS21 Decidability and Tractability
4b Lexical analysis Finite Automata
Instructor: Aaron Roth
CSC 4170 Theory of Computation Nondeterminism Section 1.2.
Chapter 1 Regular Language
Non Deterministic Automata
Presentation transcript:

Diagnosis of Discrete Event Systems Meir Kalech Partly based on slides of Gautam Biswass

Outline  Last lecture: 1. Optimal CSP 2. Conflict-directed A*  Today’s lecture: 1. Automata (brief tutorial) 1. Deterministic automata 2. Non-deterministic automata 2. Discrete event system 3. Observer automata 4. Diagnostics approach 5. Diagnoser automata 6. Diagnosability

0 0, The machine accepts a string if the process ends in a double circle Borrowed from CMU / COMPSCI 102 Brief notes on Automata

0 0, The machine accepts a string if the process ends in a double circle Anatomy of a Deterministic Finite Automaton states q0q0 q1q1 q2q2 q3q3 start state (q 0 ) accept states (F)

Anatomy of a Deterministic Finite Automaton 0 0, q0q0 q1q1 q2q2 q3q3 The alphabet of a finite automaton is the set where the symbols come from: The language of a finite automaton is the set of strings that it accepts {0,1}

0,1 q0q0 L(M) = All strings of 0s and 1s  The Language of Machine M

q0q0 q1q L(M) = { w | w has an even number of 1s}

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| isthe length of x Notation A language over Σ is a set of strings over Σ

Q is the set of states Σ is the alphabet  : Q  Σ → Q is the transition function q 0  Q is the start state F  Q is the set of accept states A finite automaton is a 5-tuple M = (Q, Σ, , q 0, F) L(M) = the language of machine M = set of all strings machine M accepts

Q = {q 0, q 1, q 2, q 3 } Σ = {0,1}  : Q  Σ → Q transition function * q 0  Q is start state F = {q 1, q 2 }  Q accept states M = (Q, Σ, , q 0, F) where  01 q0q0 q0q0 q1q1 q1q1 q2q2 q2q2 q2q2 q3q3 q2q2 q3q3 q0q0 q2q2 * q2q2 0 0, q0q0 q1q1 q3q3 M

qq q0q0 q ,1 Build an automaton that accepts all and only those strings that contain 001

Outline  Last lecture: 1. Optimal CSP 2. Conflict-directed A*  Today’s lecture: 1. Automata (brief tutorial) 1. Deterministic automata 2. Non-deterministic automata 2. Discrete event system 3. Observer automata 4. Diagnostics approach 5. Diagnoser automata 6. Diagnosability

Alphabet = Nondeterministic Finite Accepter (NFA)

Two choices Alphabet = Nondeterministic Finite Accepter (NFA)

No transition Two choices No transition Alphabet = Nondeterministic Finite Accepter (NFA)

First Choice

“accept” First Choice

Second Choice

No transition: the automaton hangs

Second Choice “reject”

Equivalent automata Automata G 1 and G 2 are equivalent if

Examples of Equivalent Automata

Outline  Last lecture: 1. Optimal CSP 2. Conflict-directed A*  Today’s lecture: 1. Automata (brief tutorial) 2. Discrete event system 3. Observer automata 4. Diagnostics approach 5. Diagnoser automata 6. 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: 1. Optimal CSP 2. Conflict-directed A*  Today’s lecture: 1. Automata (brief tutorial) 2. Discrete event system 3. Observer automata 4. Diagnostics approach 5. Diagnoser automata 6. 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 Note: G nd is non-deterministic, G obs is deterministic G nd and G obs are equivalent. a and b are observable events

Observer example 2:

Outline  Last lecture: 1. Optimal CSP 2. Conflict-directed A*  Today’s lecture: 1. Automata (brief tutorial) 2. Discrete event system 3. Observer automata 4. Diagnostics approach 5. Diagnoser automata 6. Diagnosability

Daignostics  Determine whether certain events with certainty are fault events  Build new automata like observer, but attach “labels” to the states of G diag  To build Attach N label to states that can be reached from x 0 by unobservable strings Attach Y label to states that can be reached from x 0 by unobservable strings that contain at least one occurrence of e d (fault event). If state z can be reached both with and without executing e d then create two entries in the initial state set of G diag : zN and zY.

Diagnoser Automata

Diagnosability

Diagnosability: informal definition  Let s be any trace generated by the system that ends in a failure event from set E fi and t is a sufficiently long continuation of s  Diagnosability  Diagnosability implies 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 E fi  Along every continuation t of s, one can detect the failure of type F i with finite delay, specifically in at most n i 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: 1. Optimal CSP 2. Conflict-directed A*  Today’s lecture: 1. Automata (brief tutorial) 2. Discrete event system 3. Observer automata 4. Diagnostics approach 5. Diagnoser automata 6. Diagnosability

Diagnosability by Diagnoser To determine diagnosability of a system we use a diagnoser: 1. The diagnoser traces all possible trajectories of the system. 2. The diagnoser records the possible failures in each state. 3. If a state contains an ambiguity failure: “F i occurs or F i not occurs” then the system is not diagnosable.

Diagnoser: example

F1 is indicated anyway F2 only for the bottom path Therefore there is ambiguity ‘A’

Outline  Last lecture: 1. Optimal CSP 2. Conflict-directed A*  Today’s lecture: 1. Automata (brief tutorial) 2. Discrete event system 3. Observer automata 4. Diagnostics approach 5. Diagnoser automata 6. Diagnosability

Diagnosability: necessary and sufficient conditions Theorem: A language L is diagnosable if and only if its diagnoser G diag satisfies the following two conditions: 1. No state in G diag is ambiguous. 2. There are no F i -indeterminate cycles in G diag, for all failure types F i.

Certain and uncertain failures Meaning – if a state contains only failure F i label then this failure will occur in certain. State id label Meaning – if a state contains failure F i and another failure or N label, then this failure will occur with uncertain.

F i -indeterminate cycle in G diag Meaning – an F i -indeterminate cycle in G diag indicates the presence of two cycled traces s1 and s2 with the same observable projection, where s1 contains F i and s2 does not.

Example: F i -indeterminate cycle

Example: F i -uncertain cycle but not F i -indeterminate cycle This is an F i -uncertain cycle BUT: it is not F i - indeterminate cycle since the cycles are not corresponding

Diagnosability: necessary and sufficient conditions Theorem: A language L is diagnosable if and only if its diagnoser G diag satisfies the following two conditions: 1. No state in G diag is ambiguous. 2. There are no F i -indeterminate cycles in G diag, for all failure types F i.