Model-based Design of Diagnostics Applications Using GRAFCET ...

15 downloads 2275 Views 2MB Size Report
Mar 23, 2011 ... Using GRAFCET (DIN EN 60848) ... visualisation with GRAFCET. □ .... synthesis of error-free programs from modules with a ... model series identification: reachability graph. S. 0. = initial state. S. 1 ... manual VIN input. S. 5.
Excellence in Automotive Computing. Informationstechnik München

Model-based Design of Diagnostics Applications Using GRAFCET (DIN EN 60848)

Confidential

23 March 2011, 2:45pm Dr Mario Schweigler, IFS Informationstechnik Munich 8th International CTI Forum “Automotive Diagnostic Systems” 23 March 2011 IFS Informationstechnik GmbH Trausnitzstraße 8 81671 Munich Headquarters: Munich Commercial Register: Amtsgericht Munich HRB 126547 CEO: Dr.-Ing. Markus A. Stulle Dipl.-Ing. Thomas Frey

Outline



challenges facing modern software



discrete-event dynamic models





mathematical definition



visualisation with GRAFCET



description form for DEDS models

vehicle diagnostics as a control plant 

basic idea



synthesis of complex workflows



tool-assisted verification

Confidential Excellence in Automotive Computing. Page 2

23 March 2011

Informationstechnik München

Challenges Facing Modern Software







reduced time for development 

shorter product and development cycles



acceleration crisis

growing complexity 

concurrency



higher demand for correctness

proof of correctness 



approach: synthesis of complex workflows by combining formally proven modules

adopting formal methods from the theory of discrete-event dynamic systems

Confidential Excellence in Automotive Computing. Page 3

23 March 2011

Informationstechnik München

Terms



system: a group of entities in relation with each other 

static



involving time: dynamic



model: abstraction of a system



aspects: time evolution and possible values and states

continuous

discrete

figures taken from “Modelling and Control of Discrete-event Dynamic Systems”, B. Hrúz und M.C. Zhou

Confidential hybrid forms Excellence in Automotive Computing. Page 4

23 March 2011

Informationstechnik München

Discrete-event Dynamic Models – Classification



discrete-event dynamic system (DEDS) 

discrete



dynamic



Confidential

state evolution triggered by asynchronous events

figures taken from “Modelling and Control of Discrete-event Dynamic Systems”, B. Hrúz und M.C. Zhou

Excellence in Automotive Computing. Page 5

23 March 2011

Informationstechnik München

Discrete-event Dynamic Models – General Mathematical Definition



description of a system with discrete states



transitions between states triggered by discrete events



mathematical notation (“basic transition system”): 

Π: set of state variables



Q: set of states with particular values for the variables from Π





Σ: set of transitions leading from one state to another if a defined condition is met

Ө: initial state

Confidential Excellence in Automotive Computing. Page 6

23 March 2011

Informationstechnik München

Discrete-event Dynamic Models – Further Definitions



situation 



reachability graph 



set of coexistent states in a concurrent system (marking of a Petri net)

state machine with reachable situations as nodes and transitions as directed edges

error 



Martin Weingardt: “Given an alternative, an error is the variant which is classified by a subject – in relation to a correlating context and a specific interest – to be so unfavourable as to appear undesirable.” in this context: an undesired situation

Confidential Excellence in Automotive Computing. Page 7

23 March 2011

Informationstechnik München

Discrete-event Dynamic Models – Controller and Plant



controller 





plant 

event sources



sensors



actuators

system boundaries 

Confidential

basis: DEDS

environment as part of the plant

Excellence in Automotive Computing. Page 8

23 March 2011

Informationstechnik München

Discrete-event Dynamic Models – Example: Controller for a Coffee Vendor

Confidential Excellence in Automotive Computing. Page 9

23 March 2011

Informationstechnik München

GRAFCET – Introduction (I)



graphical design language for describing the behaviour of controlled systems based on discrete-event dynamic models



GRAphe Fonctionnel de Commande Etapes/Transitions (en. control function graph with steps and transitions)



standardised in DIN EN 60848



successor of DIN 40719 part 6 “function plan”



standard valid throughout Europe

Confidential Excellence in Automotive Computing. Page 10

23 March 2011

Informationstechnik München

GRAFCET – Introduction (II)



workflow consisting of alternating steps and transitions



individual steps can be associated with actions



branching of workflows possible





alternative paths



parallel paths ( concurrent situations)

structuring possible

Confidential Excellence in Automotive Computing. Page 11

23 March 2011

Informationstechnik München

GRAFCET – Visualisation of Elements (I)



Confidential

separation of structure and effect

structure

effect

Excellence in Automotive Computing. Page 12

23 March 2011

Informationstechnik München

GRAFCET – Visualisation of Elements (II)





structure: 

steps, initial step



corresponds to set Q and Ө



transitions and conditions



corresponds to set Σ

effect: 

steps can be associated with actions

Confidential Excellence in Automotive Computing. Page 13

23 March 2011

Informationstechnik München

GRAFCET – Visualisation of Workflow Structures (I)



chain 



every step is followed by a transition (except the final step) every transition is followed by a step

Confidential Excellence in Automotive Computing. Page 14

23 March 2011

Informationstechnik München

GRAFCET – Visualisation of Workflow Structures (II)



alternative branching 



a step is followed by two or more mutually exclusive transitions partial workflows may be of arbitrary length (empty partial workflows are ‘skipped’)

Confidential Excellence in Automotive Computing. Page 15

23 March 2011

Informationstechnik München

GRAFCET – Visualisation of Workflow Structures (III)



parallel branching 

a transition activates several partial workflows



partial workflows are processed independently



synchronised convergence via shared transition

Confidential Excellence in Automotive Computing. Page 16

23 March 2011

Informationstechnik München

GRAFCET – Visualisation of Workflow Structures (IV)



jumps and loopback 

jumps allow for clearer visualisation



loopback allows for cyclic workflows

2

3

1

Confidential Excellence in Automotive Computing. Page 17

23 March 2011

Informationstechnik München

GRAFCET – Structuring (I)



macro step 

visual structuring from coarse to fine



macro step visualises a partial GRAFCET



macro step is left when partial GRAFCET has been processed

Confidential Excellence in Automotive Computing. Page 18

23 March 2011

Informationstechnik München

GRAFCET – Structuring (II)



macro step: vehicle diagnostics example

Confidential Excellence in Automotive Computing. Page 19

23 March 2011

Informationstechnik München

GRAFCET – Structuring (III)



inclusive step 

hierarchical structuring



inclusive step contains a partial GRAFCET





partial GRAFCET is active until inclusive step is exited (controllable from outside) enables exception handling without ‘bloated’ code

Confidential Excellence in Automotive Computing. Page 20

23 March 2011

Informationstechnik München

GRAFCET – Structuring (IV)



inclusive step: vehicle diagnostics example

Confidential Excellence in Automotive Computing. Page 21

23 March 2011

Informationstechnik München

Canonical Description Form (KBF) (I)

Confidential



XML document



contains description of DEDS model



allows expression of concurrency



modelling of the following elements:





inputs: sensors  events



outputs: actuators  actions



states (incl. macro steps and inclusive steps)



conditions, transitions

tool enables GRAFCET visualisation of KBF

Excellence in Automotive Computing. Page 22

23 March 2011

Informationstechnik München

Canonical Description Form (KBF) (II)





combination of sensors to events combination of actuators to actions

Confidential Excellence in Automotive Computing. Page 23

23 March 2011

Informationstechnik München

Canonical Description Form (KBF) (III)

Confidential Excellence in Automotive Computing. Page 24

23 March 2011

Informationstechnik München

Vehicle Diagnostics As a Control Plant – Basic Idea



idea: transferring processes used in automation technology to vehicle diagnostics workflows



synthesis of error-free programs from modules with a well-known behaviour



tool for analysis, verification and visualisation of discrete-event dynamic models

Confidential Excellence in Automotive Computing. Page 25

23 March 2011

Informationstechnik München

Vehicle Diagnostics As a Control Plant – Elements of the Control Plant







Confidential

event sources 

vehicle



user

sensors 

data read from vehicle



user inputs

actuators 

telegrams sent to vehicle



information displayed to user

Excellence in Automotive Computing. Page 26

23 March 2011

Informationstechnik München

Vehicle Diagnostics As a Control Plant – Requirements Document



requirements document specifies the reachability graph of the diagnostics use case



definition of error: 



situation reachable which is explicitly prohibited by requirements document situation not reachable which is explicitly demanded by requirements document

Confidential Excellence in Automotive Computing. Page 27

23 March 2011

Informationstechnik München

Vehicle Diagnostics As a Control Plant – Synthesis of Complex Workflows (I)





prerequisite: the intended workflow can be combined from modules with a well-known reachability graph examples: 

model series identification



read-out and interpretation of diagnostic trouble codes



recording of symptoms



combination of these partial workflows to a full diagnostics workflow



prevention of errors by utilising formal methods 



Confidential

calculation of the effective reachability graph

tool-assisted comparison with the reachability graph specified in requirements document

Excellence in Automotive Computing. Page 28

23 March 2011

Informationstechnik München

Vehicle Diagnostics As a Control Plant – Synthesis of Complex Workflows (II)

Confidential Excellence in Automotive Computing. Page 29

23 March 2011

Informationstechnik München

Vehicle Diagnostics As a Control Plant – Tool-assisted Verification (I)



example of a diagnostics module: model series identification

Confidential Excellence in Automotive Computing. Page 30

23 March 2011

Informationstechnik München

Vehicle Diagnostics As a Control Plant – Tool-assisted Verification (II)



model series identification: reachability graph

S0 = initial state S1 = initialising database S2 = reading VIN S3 = waiting for database S4 = manual VIN input S5 = database error S6 = database query

Confidential

S7 = final state

Excellence in Automotive Computing. Page 31

23 March 2011

Informationstechnik München

Vehicle Diagnostics As a Control Plant – Tool-assisted Verification (III) erroneous situation (S3, S4): manual VIN input despite successful read-out





impossible according to reachability graph

Confidential Excellence in Automotive Computing. Page 32

23 March 2011

Informationstechnik München

Vehicle Diagnostics As a Control Plant – Tool-assisted Verification (IV) erroneous situation (S5, S6): database query despite initialisation error





impossible according to reachability graph

Confidential Excellence in Automotive Computing. Page 33

23 March 2011

Informationstechnik München

Vehicle Diagnostics As a Control Plant – Example: Start of a Diagnostics Session (I) 



workflow of a diagnostics session modelled as a discrete-event dynamic system 

synthesis from modules



using inclusive steps and macro steps

example demonstrates the beginning of a session 

session start



connection to runtime system



model series identification

Confidential Excellence in Automotive Computing. Page 34

23 March 2011

Informationstechnik München

Vehicle Diagnostics As a Control Plant – Example: Start of a Diagnostics Session (II)

Confidential Excellence in Automotive Computing. Page 35

23 March 2011

Informationstechnik München

Vehicle Diagnostics As a Control Plant – Example: Start of a Diagnostics Session (III)

Confidential Excellence in Automotive Computing. Page 36

23 March 2011

Informationstechnik München

Vehicle Diagnostics As a Control Plant – Example: Start of a Diagnostics Session (IV)

Confidential Excellence in Automotive Computing. Page 37

23 March 2011

Informationstechnik München

Conclusion



discrete-event dynamic models are helpful in creating error-free workflows



GRAFCET constitutes an adequate visualisation standard for discrete-event dynamic models



tool-assisted verification to secure the correctness of workflows



formal methods are a profitable tool for creating diagnostics workflows

Confidential Excellence in Automotive Computing. Page 38

23 March 2011

Informationstechnik München

End of Presentation



Thank you for your attention!

Confidential Excellence in Automotive Computing. Page 39

23 March 2011

Informationstechnik München

Appendix: GRAFCET Example – Controller for a Coffee Vendor (I)

Confidential Excellence in Automotive Computing. Page 40

23 March 2011

Informationstechnik München

Appendix: GRAFCET Example – Controller for a Coffee Vendor (II)

Confidential Excellence in Automotive Computing. Page 41

23 March 2011

Informationstechnik München

Appendix: GRAFCET Example – Controller for a Coffee Vendor (III)

Confidential Excellence in Automotive Computing. Page 42

23 March 2011

Informationstechnik München

Appendix: KBF Example – Controller for a Coffee Vendor (I)

Confidential Excellence in Automotive Computing. Page 43

23 March 2011

Informationstechnik München

Appendix: KBF Example – Controller for a Coffee Vendor (II)

Confidential Excellence in Automotive Computing. Page 44

23 March 2011

Informationstechnik München

Appendix: KBF Example – Controller for a Coffee Vendor (III)

Confidential Excellence in Automotive Computing. Page 45

23 March 2011

Informationstechnik München

Appendix: KBF Example – Controller for a Coffee Vendor (IV)

Confidential Excellence in Automotive Computing. Page 46

23 March 2011

Informationstechnik München

Appendix: KBF Example – Controller for a Coffee Vendor (V)

Confidential Excellence in Automotive Computing. Page 47

23 March 2011

Informationstechnik München

Appendix: KBF Example – Controller for a Coffee Vendor (VI)

Confidential Excellence in Automotive Computing. Page 48

23 March 2011

Informationstechnik München

Appendix: KBF Example – Controller for a Coffee Vendor (VII)

Confidential Excellence in Automotive Computing. Page 49

23 March 2011

Informationstechnik München

Appendix: KBF Example – Controller for a Coffee Vendor (VIII)

Confidential Excellence in Automotive Computing. Page 50

23 March 2011

Informationstechnik München

Appendix: KBF Example – Controller for a Coffee Vendor (IX)

Confidential Excellence in Automotive Computing. Page 51

23 March 2011

Informationstechnik München

Appendix: KBF Example – Controller for a Coffee Vendor (X)

Confidential Excellence in Automotive Computing. Page 52

23 March 2011

Informationstechnik München

Appendix: KBF Example – Controller for a Coffee Vendor (XI)

Confidential Excellence in Automotive Computing. Page 53

23 March 2011

Informationstechnik München

Appendix: KBF Example – Controller for a Coffee Vendor (XII)

Confidential Excellence in Automotive Computing. Page 54

23 March 2011

Informationstechnik München

Appendix: KBF Example – Controller for a Coffee Vendor (XIII)

Confidential Excellence in Automotive Computing. Page 55

23 March 2011

Informationstechnik München

Appendix: KBF Example – Controller for a Coffee Vendor (XIV)

Confidential Excellence in Automotive Computing. Page 56

23 March 2011

Informationstechnik München