Fault Diagnosis Plug-In

Detailed Description

Overview

This plug-in implements failure diagnosis for discrete-event systems in libFAUDES.

Failures are assumed to be unobservable events in DES that might lead to an undesired or unpredictable behaviour of the system. In order to be able to react to occurring failures, fault detection and isolation became an active area of research since the 1990s. In [1], Sampath et al. introduced the notion of diagnosability and diagnosers which observe the on-line behaviour of the system under investigation.

Diagnoser automata are FSMs that estimate the occurrence of certain failure events by tracking the observable events triggered by the plant under observation.

Diagnosability is a system property that states a system to be diagnosable with respect to a failure partition or specification, if the occurrence of a failure or violation of the specification can be determined within a bounded number of transitions.

The basic structure and handling of diagnoser automata is realized in faudes::TdiagGenerator according to [1] and a diagnoser can be computed from the failure-based model of the observed plant using the function ComputeDiagnoser().

Additionally, several functions are provided to determine the diagnosability of a system with respect to a given failure partition or specification:

  • The test for standard diagnosability with respect to a failure partition is implemented in IsDiagnosable(const System&, const AttributeFailureTypeMap&, std::string&) according to [2].
  • Testing I-diagnosability (which is a special case of diagnosability where failures only have to be detected after the occurrence of associated indicator events) is done by IsIdiagnosable(const System&, const AttributeFailureTypeMap&, std::string&) that is an enhancement of the algorithm presented in [2].
  • Diagnosability with respect to a specification (which we also refer to as language diagnosability) is tested by IsDiagnosable(const System&, const System&, std::string&) by attributing it to the known diagnosability problem in [2].
  • Decentralized diagnosability is handled by the function IsDecentralizedDiagnosable(const std::vector<System>&, const std::vector<System>&, const std::vector<EventSet>&, std::string&) that tests a modular system's diagnosability from the models of its local subsystems and specifications as presented in [3].

[1] "Diagnosability of discrete-event systems" by Sampath, M. and Sengupta, R. and Lafortune, S. and Sinnamohideen, K. and Teneketzis, D. Automatic Control, IEEE Transactions on, 40(9):1555-1575, Sep 1995.
[2] "A polynomial algorithm for testing diagnosability of discrete-event systems" by Jiang, S. and Huang, Z. Chandra, V. and Kumar, R. Automatic Control, IEEE Transactions on, 46(8):1318-1321, Aug 2001.
[3] "Hierarchical Fault Diagnosis for Discrete Event Systems: Theoretical Development and Application" by Tobias Barthel, Lehrstuhl für Regelungstechnik, Universität Erlangen-Nürnberg, 2009 (associated diploma thesis).

License

The initial implementation of this plug-in was part of Tobias Barthel's diploma thesis [3], supervised by Klaus Schmidt. The code is distributed with libFAUDES and under the terms of the LGPL.


Copyright (c) 2009, Tobias Barthel, Klaus Schmidt, Thomas Moor.
Copyright (c) 2009, Klaus Schmidt, Thomas Moor.

Classes

class  faudes::AttributeDiagnoserState
 Implements state estimates for the current status of the generator. More...
 
class  faudes::AttributeFailureEvents
 Stores the failure and indicator events for a particular failure type. More...
 
class  faudes::AttributeFailureTypeMap
 Partitions the failure and indicator events. More...
 
class  faudes::DiagLabelSet
 Implements the label representation for state estimates. More...
 
class  faudes::TdiagGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >
 Provides the structure and methods to build and handle diagnosers. More...
 

Functions

bool faudes::DecentralizedDiagnoser (const System &rGen, const Generator &rSpec, const std::vector< const EventSet * > &rAlphabets, std::vector< Diagnoser * > &rDiags, std::string &rReportString)
 Computes decentralized diagnosers for multiple local sites. More...
 
FAUDES_API bool faudes::IsModularDiagnosable (const std::vector< const System * > &rGsubs, const std::vector< const Generator * > &rKsubs, std::string &rReportString)
 Checks modular diagnosability for a system G (which consists of the subsystems rGsubs) with respect to the specification K (consisting of local specifications rKsubs) and the local abstraction alphabets rHighAlphSubs. More...
 
bool faudes::ModularDiagnoser (const std::vector< const System * > &rGsubs, const std::vector< const Generator * > &rKsubs, std::vector< Diagnoser * > &rDiagsubs, std::string &rReportString)
 Checks modular diagnosability for a system G (which consists of the subsystems rGsubs) with respect to the specification K (consisting of local specifications rKsubs) and the local abstraction alphabets rHighAlphSubs. More...
 

Functions (decentralized diagnosability)

FAUDES_API bool faudes::IsCoDiagnosable (const System &rGen, const Generator &rSpec, const std::vector< const EventSet * > &rAlphabets, std::string &rReportString)
 Checks co-diagnosability for a system G with respect to the specification K and the local observation alphabets rAlphabets. More...
 

Functions (modular diagnoser computation)

void faudes::DecentralizedModularDiagnoser (const std::vector< const System * > &rGens, const Generator &rSpec, std::vector< Diagnoser * > &rDiags, std::string &rReportString)
 Function that computes decentralized diagnosers for the respective subsystems of a composed (modular) system. More...
 
FAUDES_API bool faudes::ModularDiagnoser (const SystemVector &rGsubs, const GeneratorVector &rKsubs, GeneratorVector &rDiagSubs, std::string &rReportString)
 Function that computes diagnosers for the respective subsystems of a composed system. More...
 

Functions (diagnosability with respect to a failure partition)

FAUDES_API bool faudes::IsEventDiagnosable (const System &rGen, const AttributeFailureTypeMap &rFailureTypeMap, std::string &rReportString)
 Test a system's diagnosability with respect to a given failure partition. More...
 
FAUDES_API bool faudes::IsIndicatorEventDiagnosable (const System &rGen, const AttributeFailureTypeMap &rFailureTypeMap, std::string &rReportString)
 Test a system's I-diagnosability with respect to a given failure partition. More...
 
FAUDES_API bool faudes::MeetsDiagnosabilityAssumptions (const System &rGen, const AttributeFailureTypeMap &rFailureTypeMap, std::string &rReportString)
 Check if a generator meets the general assumptions of diagnosability as required by IsDiagnosable(const System&, const AttributeFailureTypeMap&, std::string&) and IsIndicatorDiagnosable(const System&, const AttributeFailureTypeMap&, std::string&). More...
 

Functions (diagnoser computation)

void faudes::EventDiagnoser (const System &rOrigGen, const AttributeFailureTypeMap &rAttrFTMap, Diagnoser &rDiagGen)
 Compute a standard diagnoser from an input generator and a failure partition. More...
 
void faudes::LanguageDiagnoser (const System &rGen, const System &rSpec, Diagnoser &rDiagGen)
 Compute a standard diagnoser from an input generator and a specification. More...
 

Functions (diagnosability with respect to a specification)

FAUDES_API bool faudes::IsLanguageDiagnosableX (const System &rGen, const System &rSpec, std::string &rReportString)
 Tests a system's diagnosability with respect to a given specification. More...
 

Functions (verification and computation of loop-preserving observers)

bool faudes::IsLoopPreservingObserver (const System &rGen, const EventSet &rHighAlph)
 Verifies a loop-preserving observer. More...
 
void faudes::LoopPreservingObserver (const System &rGen, const EventSet &rInitialHighAlph, EventSet &rHighAlph)
 Computes a loop-preserving observer with minimal state size of the abstraction. More...
 

Functions (modular diagnosability)

FAUDES_API bool faudes::IsModularDiagnosable (const SystemVector &rGsubs, const GeneratorVector &rKsubs, std::string &rReportString)
 Checks modular diagnosability for a system G (which consists of the subsystems rGsubs) with respect to the specification K (consisting of local specifications rKsubs) and the local abstraction alphabets rHighAlphSubs. More...
 

Function Documentation

◆ DecentralizedDiagnoser()

FAUDES_API bool faudes::DecentralizedDiagnoser ( const System rGen,
const Generator rSpec,
const std::vector< const EventSet * > &  rAlphabets,
std::vector< Diagnoser * > &  rDiags,
std::string &  rReportString 
)

Computes decentralized diagnosers for multiple local sites.

Parameters
rGenPlant automaton.
rSpecSpecification automaton.
rAlphabetsObservable events of the local sites.
rDiagsDecentralized diagnosers
rReportStringUser-readable information of violating condition (in case of negative test result).
Exceptions
Exception
  • Number of alphabets does not equal number of local sites (id 305).
Returns
True if system G is co-diagnosable. The result is allocated on the heap, ownership is with the calling function.

Definition at line 293 of file diag_decentralizeddiagnosis.cpp.

◆ DecentralizedModularDiagnoser()

FAUDES_API void faudes::DecentralizedModularDiagnoser ( const std::vector< const System * > &  rGens,
const Generator rSpec,
std::vector< Diagnoser * > &  rDiags,
std::string &  rReportString 
)

Function that computes decentralized diagnosers for the respective subsystems of a composed (modular) system.

doxygen group

Parameters
rGensLocal subsystem automata
rSpecSpecification automaton.
rDiagsDecentralized diagnosers
rReportStringUser-readable information of violating condition (in case of negative test result).
Exceptions
Exception
  • Number of modular components does not equal number of decentralized diagnosers (id 306).

Definition at line 317 of file diag_decentralizeddiagnosis.cpp.

◆ EventDiagnoser()

FAUDES_API void faudes::EventDiagnoser ( const System rOrigGen,
const AttributeFailureTypeMap rAttrFTMap,
Diagnoser rDiagGen 
)

Compute a standard diagnoser from an input generator and a failure partition.

doxygen group

Parameters
rOrigGenInput plant including failure events.
rAttrFTMapFailure type map of plant.
rDiagGenDiagnoser generator for output.
Exceptions
Exception
  • Input generator has no unique initial state (id 301).

Definition at line 824 of file diag_eventdiagnosis.cpp.

◆ IsCoDiagnosable()

FAUDES_API bool faudes::IsCoDiagnosable ( const System rGen,
const Generator rSpec,
const std::vector< const EventSet * > &  rAlphabets,
std::string &  rReportString 
)

Checks co-diagnosability for a system G with respect to the specification K and the local observation alphabets rAlphabets.

doxygen group

Parameters
rGenPlant automaton.
rSpecSpecification automaton.
rAlphabetsLocal observation alphabets (for decentralized diagnosis)
rReportStringUser-readable information of violating condition (in case of negative test result).
Returns
True if system G is co-diagnosable.

◆ IsEventDiagnosable()

FAUDES_API bool faudes::IsEventDiagnosable ( const System rGen,
const AttributeFailureTypeMap rFailureTypeMap,
std::string &  rReportString 
)

Test a system's diagnosability with respect to a given failure partition.

doxygen group Standard diagnosability of a plant is validated with respect to a given failure partition. According to: "A Polynomial Algorithm for Testing Diagnosability of Discrete Event Systems" by Shengbing Jiang, Zhongdong Huang, Vigyan Chandra, and Ratnesh Kumar.

Parameters
rGenInput generator, is a model of the original plant containing the relevant failures events.
rFailureTypeMapFailure partition: maps failure type names to failure events.
rReportStringUser-readable information of violating condition (in case of negative test result).

◆ IsIndicatorEventDiagnosable()

FAUDES_API bool faudes::IsIndicatorEventDiagnosable ( const System rGen,
const AttributeFailureTypeMap rFailureTypeMap,
std::string &  rReportString 
)

Test a system's I-diagnosability with respect to a given failure partition.

Validates I-Diagnosability with respect to a given failure and indicator partition. The algorithm is a modification of IsDiagnosable().

Parameters
rGenInput generator, is a model of the original plant containing the relevant failures events.
rFailureTypeMapFailure partition: maps failure type names to failure events and indicator events.
rReportStringUser-readable information of violating condition (in case of negative test result).

◆ IsLanguageDiagnosableX()

FAUDES_API bool faudes::IsLanguageDiagnosableX ( const System rGen,
const System rSpec,
std::string &  rReportString 
)

Tests a system's diagnosability with respect to a given specification.

doxygen group

Parameters
rGenInput generator.
rSpecSpecification automaton.
rReportStringUser-readable information of violating condition (in case of negative test result).
Returns
True if input generator is diagnosable.

◆ IsLoopPreservingObserver()

FAUDES_API bool faudes::IsLoopPreservingObserver ( const System rGen,
const EventSet rHighAlph 
)

Verifies a loop-preserving observer.

doxygen group

Parameters
rGenOriginal generator.
rHighAlphAbstraction alphabet.
Returns
True if natural projection is a loop-preserving observer

Definition at line 645 of file diag_languagediagnosis.cpp.

◆ IsModularDiagnosable() [1/2]

FAUDES_API bool faudes::IsModularDiagnosable ( const std::vector< const System * > &  rGsubs,
const std::vector< const Generator * > &  rKsubs,
std::string &  rReportString 
)

Checks modular diagnosability for a system G (which consists of the subsystems rGsubs) with respect to the specification K (consisting of local specifications rKsubs) and the local abstraction alphabets rHighAlphSubs.

Parameters
rGsubsLocal subsystem automata.
rKsubsLocal specification automata of the subsystems.
rReportStringUser-readable information of violating condition (in case of negative test result).
Exceptions
Exception
  • Number of specifications does not equal number of subsystems (id 304).
Returns
True if system G is modular diagnosable.

◆ IsModularDiagnosable() [2/2]

FAUDES_API bool faudes::IsModularDiagnosable ( const SystemVector rGsubs,
const GeneratorVector rKsubs,
std::string &  rReportString 
)

Checks modular diagnosability for a system G (which consists of the subsystems rGsubs) with respect to the specification K (consisting of local specifications rKsubs) and the local abstraction alphabets rHighAlphSubs.

doxygen group

Parameters
rGsubsLocal subsystem automata.
rKsubsLocal specification automata of the subsystems.
rReportStringUser-readable information of violating condition (in case of negative test result).
Exceptions
Exception
  • Number of specifications does not equal number of subsystems (id 304).
Returns
True if system G is modular diagnosable.

◆ LanguageDiagnoser()

FAUDES_API void faudes::LanguageDiagnoser ( const System rGen,
const System rSpec,
Diagnoser rDiagGen 
)

Compute a standard diagnoser from an input generator and a specification.

doxygen group

Parameters
rGenInput plant
rSpecSpecification generator.
rDiagGenDiagnoser generator for output.

Definition at line 275 of file diag_languagediagnosis.cpp.

◆ LoopPreservingObserver()

FAUDES_API void faudes::LoopPreservingObserver ( const System rGen,
const EventSet rInitialHighAlph,
EventSet rHighAlph 
)

Computes a loop-preserving observer with minimal state size of the abstraction.

Parameters
rGenOriginal generator
rInitialHighAlph% Initial abstraction alphabet
rHighAlphResulting abstraction alphabet

Definition at line 687 of file diag_languagediagnosis.cpp.

◆ MeetsDiagnosabilityAssumptions()

FAUDES_API bool faudes::MeetsDiagnosabilityAssumptions ( const System rGen,
const AttributeFailureTypeMap rFailureTypeMap,
std::string &  rReportString 
)

Check if a generator meets the general assumptions of diagnosability as required by IsDiagnosable(const System&, const AttributeFailureTypeMap&, std::string&) and IsIndicatorDiagnosable(const System&, const AttributeFailureTypeMap&, std::string&).

It is examined if the following assumptions hold:

  1. The failure and indicator events are part of the generator's alphabet.
  2. The generator is live.
  3. There do not exist any cycles of unobservable events.
  4. All failure events are unobservable.
Parameters
rGenInput generator, is a model of the original plant containing the relevant failures events.
rFailureTypeMapFailure partition: maps failure type names to failure events and indicator events.
rReportStringUser-readable information of violationg condition (in case of negative result).
Returns
True if all assumptions are met.
Exceptions
Exception
  • A failure event does not form part of the alphabet of the generator (id 302).
  • A indicator event does not form part of the alphabet of the generator (id 303).

◆ ModularDiagnoser() [1/2]

FAUDES_API bool faudes::ModularDiagnoser ( const std::vector< const System * > &  rGsubs,
const std::vector< const Generator * > &  rKsubs,
std::vector< Diagnoser * > &  rDiagsubs,
std::string &  rReportString 
)

Checks modular diagnosability for a system G (which consists of the subsystems rGsubs) with respect to the specification K (consisting of local specifications rKsubs) and the local abstraction alphabets rHighAlphSubs.

Parameters
rGsubsLocal subsystem automata.
rKsubsLocal specification automata of the subsystems.
rDiagsubsModular diagnosers
rReportStringUser-readable information of violating condition (in case of negative test result).
Exceptions
Exception
  • Number of specifications does not equal number of subsystems (id 304).
Returns
True if system G is modular diagnosable. The result is allocated on the heap, ownership is with the calling function.

Definition at line 165 of file diag_modulardiagnosis.cpp.

◆ ModularDiagnoser() [2/2]

FAUDES_API bool faudes::ModularDiagnoser ( const SystemVector rGsubs,
const GeneratorVector rKsubs,
GeneratorVector rDiagSubs,
std::string &  rReportString 
)

Function that computes diagnosers for the respective subsystems of a composed system.

doxygen group

Parameters
rGsubsLocal subsystem automata
rKsubsLocal specification automata of the subsystems.
rDiagSubsModular diagnosers
rReportStringUser-readable information of violating condition (in case of negative test result).
Exceptions
Exception
  • Number of specifications does not equal number of subsystems (id 304).
Returns
True if system G is modular diagnosable.

libFAUDES 2.32b --- 2024.03.01 --- c++ api documentaion by doxygen