1 / 23

Testing of Hybrid Systems

Testing of Hybrid Systems. Harald Brandl TU Graz. Outline. Challenge Hybrid languages Abstractions of Hybrid Systems Introduction to Qualitative Reasoning and Modeling Test Case Generation and an Example Outlook/Conclusion. Motivation.

fordon
Download Presentation

Testing of Hybrid Systems

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Testing of Hybrid Systems Harald Brandl TU Graz

  2. Outline • Challenge • Hybrid languages • Abstractions of Hybrid Systems • Introduction to Qualitative Reasoning and Modeling • Test Case Generation and an Example • Outlook/Conclusion

  3. Motivation • Introduction of continuous interaction between embedded systems and their environment results in hybrid behavior. • The continuous sensor and actuator data leads to infinite state spaces and quantization does not make it much better. • One has to find abstractions of the system that still reflect the requirements of interest, e.g. timing constraints, flow conditions. • We need an appropriate language to express the testing domain.

  4. Languages - Timed Automata (Alur et al.) • are defined over the set of timed languages. • Timed Automata (TA) have a set of clocks that can be independently reset. • TA have all information on the edges, i.e. the reset of timers, time guards, and labels denoting events. • TA in UPPAAL (model checkerfor TA) representation:

  5. Languages – Hybrid Automata (Henzinger) • Hybrid Automata (HA) extend TA • The nodes (control modes) comprise the following: • initialization predicate • flow conditions • invariants • On the edges there are events and predicates for jump conditions • Example: Thermostat automaton

  6. Languages – Hybrid Action Systems (Back et al.) • Action systems are written in the syntax of guarded commands g  a. When the guard is satisfied the action is enabled and executed. • The parallel composition operator allows to gradually extend and refine the system. • In the case of several enabled actions one is chosen nondeterministically. • Hybrid action systems are an extension of action systems with differential actions: dX/dt = F inv Ewhere the ordinary differential equation (ODE) dX/dt = Fis partially defined stated by the invariant E.

  7. Languages - (Chi) Group in Eindhoven • Is a process algebra to specify hybrid systems. • The underlying semantics of processes are hybrid transition systems, i.e. transition systems with continuous and discrete labels. • The trajectories of continuous labels also provide realtime in the system. • The conformance relation HIOCO is defined on hybrid input/output transition systems HIOTS.

  8. Languages - Example

  9. Abstractions to analyse Hybrid Systems • Piecewise affine (PWA) systems represent the system dynamics as trajectories. The state space is abstracted by partitioning it into n-dimensional boxes of a certain size. • A similar abstraction method is used by model checkers for hybrid systems, e.g. HyTech (Henzinger). The containment of a trajectory in a n-dim. box is called differential inclusion. • We use the AI technique of Qualitative Reasoning to abstract the continuous behavior to discrete, time-abstract behavior. We get a finite state model that we use for conformance testing.

  10. Qualitative Reasoning (QR) • By observing the behavior of entities in a domain and by comprehending the relations between domain entities we can build a model. • The language to model physical systems are differential equation. • QDEsare an abstractionof ODEs. • Simulation of a systemof QDEs yield a discretestategraphreflectingthepossiblebehaviorover time from a certaininitialstate.

  11. Qualitative Reasoning (QR) – cont. • QR is a means to reason about physical systems with possibly incomplete domain knowledge. • QR uses constraint solving. Hence incomplete domain knowledge leads to underconstraint system specifications. • In order to exclude undesired behavior additional constraints, expressed with QDEs, are added. • As the behavior graph reflects all possible futures of a system, state space is an issue. • The qualitative variables (quantities) have abstract domains consisting of intervals separated by points.

  12. Qualitative Modeling • As an small example we want to model a sine oscillation, described with the following ODE plus initial condition: • The QR tool (Garp3) we are currently using can not express derivation but integration via influences: • Further, proportional relations state that A changes in the same direction as B does. • It is necessary to rewrite differential equations to integral equations, in our case:

  13. Garp3 Model of a Sine Oscillator • We introduce three variables to get the required integrals and set up the QDEs: • Based on the obtained QDEs we can directly build the Garp3 model with according initial scenario:

  14. Simulation Result • The generated state graph is deterministic and is an abstract, discrete representation of continuous behavior. • The two-fold integration step causes an additional 180° phase shift.

  15. Generation of Qualitative Test Cases • Use Qualitative Reasoning (QR) for modeling • Simulate the QR model to obtain a QR transition system (TS) • Add a test purpose to the QR TS and minimize it • Extract qualitative test cases (TCs) • Map the qualitative TC to its quantitative counter part.

  16. QR Testing Example

  17. QR Testing Example – cont. • We want to test the conformance between an abstract QR model and a Simulink model. • As conformance relation we propose qrioconf which is an adaptation of Tretmans‘ ioconf. • In order to evaluate the approach we introduce two mutations into the Simulink model. • We execute the abstract test cases on the Simulink model by mapping between abstract and concrete domains.

  18. QR Testing Example – Simulink Model • M1 and M2 are mutations that we have to find with generated test cases.

  19. QR Testing Example – Garp3 Model • Model frament for modes S0 and S1

  20. Execution of a TC on the Impl. and M1

  21. Outlook • Evaluation of the QR tool QSIM on bigger models. • Use of On-the-fly testing to avoid state space explosion. • Unification of our approach with a hybrid formalism, e.g. Hybrid Action Systmes. • Consideration of timing constraints on qualitative behavior.

  22. Conclusion • No matter what hybrid languageweusetherearisesthequestionofthelevelofabstractionforcontinuousbehavior: • Realtimeevents [(t0,e0),(t1,e1),…(tn,en)] • Time abstract qualitative behavior • Combinationof 1. and 2. • Differential inclusionoftrajectories (subsumes 1 – 3) • Papers regarding 2.: • A report on QR-based testing. - in: 22nd International Workshop on Qualitative Reasoning (2008) • Coverage-based Testing Using Qualitative Reasoning Models. - in: Proceedings of the 20th International Conference on Software Engineering and Knowledge Engineering (2008) • Conformance Testing of Hybrid Systems with Qualitative Reasoning Models. (FASE 2009, under review)

  23. Thank you

More Related