Integrated Model-based Software Development and Testing with CSD and Andreas Rau / Mirko Conrad / Helmut Keller / Ines Fey / Christian Dziobek DaimlerChrysler AG, Germany fa-stz-andreas.rau Mirko.Conrad Helmut.Keller Ines.Fey Christian.Dziobek @DaimlerChrysler.com @DaimlerChrysler.com @DaimlerChrysler.com @DaimlerChrysler.com @DaimlerChrysler.com FT3/SM/ EP/VIS / EP/VRS - A. Rau / M.Conrad / H.Keller / I.Fey / C.Dziobek, 10.05.00, 1 Overview  Model-based Development  Environment and and Status Quo Quo  Idea Idea and and Advantages  Caveats and and Strategy  Control System Design with with CSD CSD  Development Cycle  Tool Tool Integration, Components  Guidelines  Model-based Testing with with  Abstract Description of of Test Test Scenarios  Definition of of Test Test Data Data  Generation of of Test Test Harness // Test Test Execution  Test Test Evaluation and and Documentation (Mirko Conrad)  Summary and and Future Work FT3/SM/ EP/VIS / EP/VRS - A. Rau / M.Conrad / H.Keller / I.Fey / C.Dziobek, 10.05.00, 2 1
Overview  Model-based Development Process  Environment and and Status Quo Quo  Idea Idea and and Advantages  Caveats and and Strategy  Control System Design with with CSD CSD  Development Cycle  Tool Tool Integration, Components  Guidelines  Model-based Testing with with  Abstract Description of of Test Test Scenarios  Definition of of Test Test Data Data  Generation of of Test Test Harness // Test Test Execution  Test Test Evaluation and and Documentation (Mirko Conrad)  Summary and and Future Work FT3/SM/ EP/VIS / EP/VRS - A. Rau / M.Conrad / H.Keller / I.Fey / C.Dziobek, 10.05.00, 3 Model-based Development Process -- Environment and Status Quo Environment  Competitive Market (need for for speed and and innovation)  Limited Resources (time, money, people)  Increasing importance of of software (cost, flexibility, power)  Increasing system complexity (distribution, safety-criticality) Status Quo  Low Low level level of of abstraction  Late Late feedback // expensive bugfixing  Different notations // representations  Communication problems Marketing Department R&D Department Product Department 6RIWZDUH 5HTXLUHPHQWV 6RIWZDUH 'HVLJQ,QWHJUDWLRQ 7HVW 6RIWZDUH,QWHJUDWLRQ 0RGXOH 7HVW,PSOHPHQWDWLRQ FT3/SM/ EP/VIS / EP/VRS - A. Rau / M.Conrad / H.Keller / I.Fey / C.Dziobek, 10.05.00, 4 2
Model-based Development Process -- Idea Idea  Integrated models instead of of separate documents and and code code throughout the the process Model as as high-level language with with high-level compiler  Early feedback by by simulation  System integration capability  Encapsulation of of know-how  Iterative refinement + FT3/SM/ EP/VIS / EP/VRS - A. Rau / M.Conrad / H.Keller / I.Fey / C.Dziobek, 10.05.00, 5 Model-based Development Process -- Advantages t Separate Documents + Classical Prototyping or Simulation Manual Implementation Saved Time Integrated Model with Simulation and Code Generation Advantages  High High level level of of abstraction  Executable specification  Integrated tool tool environment  Single-source system description  Common system integration platform  Reuse of of functions and and components  Continuous validation by by simulation  Reduction of of time time and and costs FT3/SM/ EP/VIS / EP/VRS - A. Rau / M.Conrad / H.Keller / I.Fey / C.Dziobek, 10.05.00, 6 3
Model-based Development Process -- High-Level Compiler Prose Model Source Executable System Designer RTW/TargetLink + Compiler (target language) (target hardware) High-Level Compiler with sourcecode as an internal representation FT3/SM/ EP/VIS / EP/VRS - A. Rau / M.Conrad / H.Keller / I.Fey / C.Dziobek, 10.05.00, 7 Model-based Development Process -- Caveats Caveats  Benefits are are not not available for for free! free! Model-based development must must be be embedded in in an an adequate process  Such a process is is different from from the the existing process (early test test loops, no no coding)  But: But: Implementation is is not not really eliminated but but only only lifted lifted to to a higher level!  Tool Tool chain must must support the the process during all all phases FT3/SM/ EP/VIS / EP/VRS - A. Rau / M.Conrad / H.Keller / I.Fey / C.Dziobek, 10.05.00, 8 4
Model-based Development Process -- Strategy Specification Modelling Testing Visualization Diagnostics Application Documentation Specialized Tools Matlab/Simulink/Stateflow General Purpose Platform Strategy  Matlab/Simulink/Stateflow are are a powerful family of of tools tools  The The tool-familiy is is general-purpose, not not all all specific needs are are addressed  The The tool-family by by itself itself is is not not sufficient to to support system development  Use Use Matlab as as a powerful platform for for tool-development and and integration instead  Step Step by by step step introduction of of an an open open integrated tool-chain for for software development  Definition of of interfaces in in the the tool-chain for for cooperation based on on standards  Productizing of of the the existing tool-chains based on on the the experience in in pilot pilot projects  Alignment of of processes, tools tools and and interfaces with with strategic partners FT3/SM/ EP/VIS / EP/VRS - A. Rau / M.Conrad / H.Keller / I.Fey / C.Dziobek, 10.05.00, 9 Model-based Development Process -- Summary and Toolchain 6RIWZDUH 5HTXLUHPHQWV,QWHJUDWLRQ 7HVW CANape SIL HIL ACT-SG Matlab Simulink Stateflow 6RIWZDUH,QWHJUDWLRQ TargetLink Real-Time Workshop 6RIWZDUH 'HVLJQ 0RGXOH 7HVW TESSY OSEK Compiler Debugger,PSOHPHQWDWLRQ FT3/SM/ EP/VIS / EP/VRS - A. Rau / M.Conrad / H.Keller / I.Fey / C.Dziobek, 10.05.00, 10 5
Overview  Model-based Development Process  Environment and and Status Quo Quo  Idea Idea and and Advantages  Caveats and and Strategy  Control System Design with with CSD CSD  Development Cycle  Tool Tool Integration, Components  Guidelines  Model-based Testing with with  Abstract Description of of Test Test Scenarios  Definition of of Test Test Data Data  Generation of of Test Test Harness // Test Test Execution  Test Test Evaluation and and Documentation (Mirko Conrad)  Summary and and Future Work FT3/SM/ EP/VIS / EP/VRS - A. Rau / M.Conrad / H.Keller / I.Fey / C.Dziobek, 10.05.00, 11 CSD -- Development Cycle Control system design by use of ML/SL/SF and automatic code generation Use results for system refinement Rapid system prototyping on different hardware platforms Early feedback from simulation Offline-simulation of recorded test manoevres and evaluation of the results System validation and fine-tuning in the car FT3/SM/ EP/VIS / EP/VRS - A. Rau / M.Conrad / H.Keller / I.Fey / C.Dziobek, 10.05.00, 12 6
CSD -- Intention and Description Intention  Offer Offer specific support to to satisfy individual developer needs  Support the the whole process  Easy Easy to to use use Description  Built Built on on top top of of the the Matlab tool-family  Platform for for system development (Control System Design)  Platform for for tool tool integration (plug-ins for for various process activities, e.g. e.g. testing)  Functions and and libraries for for  controller design (building blocks)  simulation (context model)  identification/modelling  software specification  documentation  diagnostics  Modelling guidelines FT3/SM/ EP/VIS / EP/VRS - A. Rau / M.Conrad / H.Keller / I.Fey / C.Dziobek, 10.05.00, 13 CSD -- Tool Integration Car Parameters or Measurement Data CAD-Data Parameters of Actuators or Measurement Data 3D Animation of Driving Manoeuvers Test Automation () Modelling Identification Specification CSD- Environment Controller Design Simulation Tests... HiL- Environment Controller-Models, ECU Function Software Generation of Documentation for models, test cases,... Interface for Parameter Tuning Tool FT3/SM/ EP/VIS / EP/VRS - A. Rau / M.Conrad / H.Keller / I.Fey / C.Dziobek, 10.05.00, 14 7
CSD -- Context Model and Component Libraries Controller Models for for Driving Systems ÂConstruction Kit Kit ÂEasy Exchange of of Plant and and Controller Models ÂEasy Implementation of of Controller Model Plant and and Controller Models of of Actuators Car Car Model FT3/SM/ EP/VIS / EP/VRS - A. Rau / M.Conrad / H.Keller / I.Fey / C.Dziobek, 10.05.00, 15 CSD -- Guidelines ÂAchieve consistent style style (mutual understanding of of models) ÂAvoid common traps traps and and pitfalls (restrictions and and workarounds) ÂOffer patterns for for systems and and algorithms (reuse and and visual recognition) ÂTry to to establish a widely accepted best-practice Simulink module pattern with explicit interface Stateflow flowchart if-pattern Note: Tools and and notations by by themselves are are not not sufficient for for a practically usable software technology. Guidelines are are necessary for for their their adaption and and application, but but not not sufficient either. In In particular, they they are are not not an an end end in in themselves and and no no replacement for for human experience, good good judgement and and creativity. [Condition] { action; } FT3/SM/ EP/VIS / EP/VRS - A. Rau / M.Conrad / H.Keller / I.Fey / C.Dziobek, 10.05.00, 16 8
CSD -- Model-Code Analogy double compute(single x, int16 y) { double z;... return z; } void main(void) { struct { double a1, a2, a3 } s; double b,c;... c = compute(s.a1*3.6,b); /* x = (single) s.a1 * 3.6; y = (int16) b; -- computation -- c = (double) z; Model/Code analogy should be be */ exploited } for for additional benefits! FT3/SM/ EP/VIS / EP/VRS - A. Rau / M.Conrad / H.Keller / I.Fey / C.Dziobek, 10.05.00, 17 Overview  Model-based Development Process  Environment and and Status Quo Quo  Idea Idea and and Advantages  Caveats and and Strategy  Control System Design with with CSD CSD  Development Cycle  Tool Tool Integration, Components  Guidelines  Model-based Testing with with  Abstract Description of of Test Test Scenarios  Definition of of Test Test Data Data  Generation of of Test Test Harness // Test Test Execution  Test Test Evaluation and and Documentation (Mirko Conrad)  Summary and and Future Work FT3/SM/ EP/VIS / EP/VRS - A. Rau / M.Conrad / H.Keller / I.Fey / C.Dziobek, 10.05.00, 18 9
0 m -- Module Test Environment for for Matlab/Simulink 13.5 m Classification tree 24.5 m 38 m Te st00 4 ' ) &  Methodological and and tool tool support support for for the the entire entire model-based testing testing cycle cycle Tight Tight integration of of simulation, model model and and software testing testing  Different approaches: -- systematic testing testing (S) (S) -- interactive simulation // testing testing (I) (I) -- regression testing testing (R) (R)  Integration into into CSD CSD environment FT3/SM/ EP/VIS / EP/VRS - A. Rau / M.Conrad / H.Keller / I.Fey / C.Dziobek, 10.05.00, 19 -- Tool Support for for Model-based Testing S I R n o p q r Test Organization Selection Abstract and Description Structuring of of Test Test Scenarios Aspects Definition of Test Data Generation of Test Harness Test Execution Test Evaluation and Documentation FT3/SM/ EP/VIS / EP/VRS - A. Rau / M.Conrad / H.Keller / I.Fey / C.Dziobek, 10.05.00, 20 10
c -- Abstract Definition of of Test Scenarios 0 m 13.5 m  Utilization of of classification-tree method method // Classifiction Tree Tree Editor Editor (CTE/ES) Automatic examination of of test test object's object's interface (input (input signals, signals, parameters)  Semi-automatic generation of of interface-based classification-trees (Model (Model Extractor) Classification Tree 24.5 m 38 m Test Test Scenario FT3/SM/ EP/VIS / EP/VRS - A. Rau / M.Conrad / H.Keller / I.Fey / C.Dziobek, 10.05.00, 21 d -- Definition of of Test Data Tabular Tabular Test Test Data Data Editor Editor Signal Corridor Graphical Test Test Data Data Editor Editor Signal Course Interactive Panel Panel Interactive test  Automatic generation of of test test data data framework from from CTE/ES CTE/ES -- test test data data restrictions (signal (signal corridors) -- suggestion of of input input signal signal courses courses  Definition or or refinement by by different different test test data data editors editors FT3/SM/ EP/VIS / EP/VRS - A. Rau / M.Conrad / H.Keller / I.Fey / C.Dziobek, 10.05.00, 22 11
e / f -- Generation of of Test Harness // Test Execution Tes t00 4 Test Test data Data Test Test Object object Tes Test t output Output  Automatic generation of of test test harness harness for for model model tests tests -- incorporation of of necessary stimuli stimuli (test (test data) data) and and evaluation blocks blocks (test (test output) output) -- manual manual extension of of test test harness harness possible  Selection between two two modi modi of of test test execution -- Automatic batch batch testing testing -- Interactive testing testing (manual (manual change change of of test test data) data) FT3/SM/ EP/VIS / EP/VRS - A. Rau / M.Conrad / H.Keller / I.Fey / C.Dziobek, 10.05.00, 23 g -- Test Evaluation and Documentation Unit Test Documentation VehicleDynamics Test Sequence VehicleDynamics_TSeq1 test001 Mirko Conrad Ines Fey Andy Yap (Mirko.Conrad@DaimlerChrysler.com) Chapter 2. Test Sequences (Ines.Fey@ DaimlerChrysler.com) (Andy.Yap@DaimlerChrysler.com) 2.1. Classification Tree with combination table Table of Contents 1. Unit Under Test 2. Test Sequences 3. Test Data 4.... Automatically generated: 18:40 18.Feb. 2000 2.2....  Automatic generation of of test test documentation Utilization of of Matlab/Simulink Report Report Generator or or generation of of ASCII ASCII reports reports  Different levels levels of of test test documentation possible  Test Test evaluation: comparison between FT3/SM/ EP/VIS nominal / EP/VRS nominal and - A. Rau and actual / M.Conrad actual values values / H.Keller / I.Fey / C.Dziobek, 10.05.00, 24 12
Integration CSD Model Test CTE/ES Classification-Tree Editor for Embedded Systems Abstract Definition of Test Scenarios 5 1 Model Test Activities 3/4 Test004 2 Definition of Test Data Test Evaluation and Documentation Generation of Test Harness / Test Execution FT3/SM/ EP/VIS / EP/VRS - A. Rau / M.Conrad / H.Keller / I.Fey / C.Dziobek, 10.05.00, 25 Overview  Model-based Development Process  Environment and and Status Quo Quo  Idea Idea and and Advantages  Caveats and and Strategy  Control System Design with with CSD CSD  Development Cycle  Tool Tool Integration, Components  Guidelines  Model-based Testing with with  Abstract Description of of Test Test Scenarios  Definition of of Test Test Data Data  Generation of of Test Test Harness // Test Test Execution  Test Test Evaluation and and Documentation (Mirko Conrad)  Summary and and Future Work FT3/SM/ EP/VIS / EP/VRS - A. Rau / M.Conrad / H.Keller / I.Fey / C.Dziobek, 10.05.00, 26 13
Summary  Model-based development is is the the key key enabler for for complex and and innovative systems  Notation must must be be supported by by a sound process and and tools tools to to earn earn the the benefits  General-purpose tools tools must must be be supplemented with with domain-specific solutions  Toolchain must must be be integrated and and support the the whole development process  Tool-supported validation and and testing should be be an an integral part part of of the the process  Validation and and testing could could // should start start in in early early development stages speed-up in in functional development by by support of of heuristic tests tests quality increase by by systematic testing reduction of of costly costly test test iterations (regression test) test) reuse of of test test cases throughout the the whole development process  Full Full integration of of modelling and and testing process into into Matlab environment ª Considerable decrease of of development and and testing time time and and costs FT3/SM/ EP/VIS / EP/VRS - A. Rau / M.Conrad / H.Keller / I.Fey / C.Dziobek, 10.05.00, 27 Future Work Tool Tool Aspects  Develop additional tools tools to to cover the the remaining process steps  Improve support for for Version and and Change Management  Improve support for for Distributed Development  Improve support for for Model Reuse Process Aspects  Semantically refine the the notation (standard blocksets, interface semantics)  Establish a sound modelling methodology (notation elements vs vs phases)  Adopt classical V&V V&V methods to to models FT3/SM/ EP/VIS / EP/VRS - A. Rau / M.Conrad / H.Keller / I.Fey / C.Dziobek, 10.05.00, 28 14
Andreas Rau Control System Design Advanced System Development Driving Functions (EP/VRS) Phone +49-(0)7031-90 -77881 Fax +49-(0)7031-90 -77884 e-mail: fa-stz-andreas.rau@daimlerchrysler.com Mirko Conrad Software Technology Methods and Tools (FT3/SM) e-mail: Mirko.Conrad@DaimlerChrysler.com DaimlerChrysler AG Research and Technology Alt-Moabit 96 A D-10559 Berlin Phone +49-(0)30-39982-263 Fax +49-(0)30-39982-107 Dr. Helmut Keller Manager Control System Design Advanced Development System Development Driving Functions (EP/VRS) e-mail: Helmut.Keller@DaimlerChrysler.com DaimlerChrysler AG Mercedes Technology Center HPC X910 D-71059 Sindelfingen Phone +49-(0)7031-90 -77860 Fax +49-(0)7031-90 -77884 Ines Fey Software Technology Methods and Tools (FT3/SM) e-mail: Ines.Fey@DaimlerChrysler.com DaimlerChrysler AG Research and Technology Alt-Moabit 96 A D-10559 Berlin Phone +49-(0)30-39982-246 Fax +49-(0)30-39982-107 Cristian Dziobek System Integration Advanced Development Software Technologies (EP/VIS) e-mail: Cristian.Dziobek@DaimlerChrysler.com DaimlerChrysler AG Mercedes Technology Center HPC X974 D-71059 Sindelfingen Phone +49-(0)7031-90 -81559 Fax +49-(0)7031-90 -74856 FT3/SM/ EP/VIS / EP/VRS - A. Rau / M.Conrad / H.Keller / I.Fey / C.Dziobek, 10.05.00, 29 15