1 / 36

Model-based Development

Model-based Development. By Ryan Mowry. Modeling Basics. Graphical models of system Entire system or just parts Complex systems easier to understand “Capture key requirements and demonstrate correct behavior in simulation”. Software Process. Starts after requirements

hoai
Download Presentation

Model-based Development

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. Model-based Development By Ryan Mowry

  2. Modeling Basics • Graphical models of system • Entire system or just parts • Complex systems easier to understand • “Capture key requirements and demonstrate correct behavior in simulation”

  3. Software Process • Starts after requirements • Can cover design, development, and testing

  4. Design and Analysis • Representation of system • Inputs • Outputs • Mathematical Operations

  5. Design and Analysis • Match model to target architecture • Correct data types for input/output • Interactions with other systems

  6. Design Example

  7. Simulation • Simulate model based on inputs and parameters • Observe actual outputs of the model compared to expected • Allows testing parallel to design

  8. Simulation Advantages • Earlier error detection • Easy to test all input ranges • Improve Verification • Able to make changes to the model to reach expected results

  9. Model-in-the-Loop Testing • Testing a model using input from another model • Models interact with one another so useful data can be obtained by testing current model with a working existing model • Earlier error detection

  10. Software-in-the-Loop Testing • Testing model in conjunction with generated or handwritten code on one machine • Useful when parts of generated code are updated to test compatibility with old code • Also for handwritten code that will be used with generated code

  11. Software-in-the-Loop Testing • Test software algorithm using model instead of needing actual hardware

  12. Processor-in-the-Loop Testing • Generated code executes on target processor • Test code on target processor with system model using actual I/O (CAN) • One step from hardware testing allows for more error detecting before needing actual expensive hardware

  13. Hardware-in-the-Loop Testing • Use generated code for both target architectures to test code functionality • Real-time system simulates actual target device to detect more errors between systems • Last testing before integrated testing

  14. PIL and HIL

  15. Implementation • Verify model and simulation meet requirements • Auto-Generate code from model • Code and filenames very abstract • Hard to follow and understand

  16. Implementation • Code already tested • Changes to model if necessary • Regenerate code from corrected model instead of changing code • Floating and fixed point conversion

  17. Is Model-based Development Worthwhile? • High costs in new software • Time and cost to learn the model-based approach • Greater time spent during analysis and design of the system

  18. Research in Automotive Industry • Model-based Development became popular among automotive companies • Some companies thought lowered cost, others thought no difference or even higher cost • Global research study by Altran Technologies, chair of software and systems engineering, and the chair of Information Management of the University of Technology in Munich

  19. Goals of Research • Cost difference in each software phase • Analysis of amount of modeling used • Error Detection • Cost Difference • Quality Criteria • Overall Cost

  20. Software Phase Analysis

  21. Requirements Cost Change

  22. Number of Errors Detected

  23. Quality Criteria

  24. Overall Cost

  25. Research Study Findings • Modeling helped cut overall costs of the project • Increased quality and bug detection • Less than 60% implementation of model-based development yielded the best results but depends on project

  26. Advantages of Model-based • Do not need to know programming languages • Testing sooner leads to earlier bug detection • Better overall quality • Design reuse for upgraded systems

  27. Disadvantages of Model-based • New Software costs • Training on new software and approach • Abstract code • Lengthy Simulations • Advantages outweigh disadvantages

  28. Simulate, then Design • New methodology in automotive industry • New technologies create major design changes • Simulations help find balance in subsystems • Design comes after balance found through simulating

  29. Model-based Embedded Tools • LMS Imagine Lab • Modelica • CyDesign • Dymola • MapleSim • VisSim • MATLAB and Simulink • EicasLab • Rational Rhapsody

  30. MATLAB and Simulink • Block diagram of desired system • Diagram hierarchy of components • Useful in sharing components with other models

  31. Block Diagram Example

  32. Component Hierarchy

  33. Running Simulation • Graphical output to view results • Debug Simulation • Step forward to find when state changes • Or step backwards (Rewind Simulation) • Run on target hardware

  34. Generating Code • Once model and simulation meet requirements and errors have been fixed, code can be generated for system. • Simulink allows for generating code in C,C++,HDL, and PLC

  35. Simulink demo • Demo Simulink Simulation process

  36. Sources • Broy, M.; Krcmar, H.; Zimmerman, J.; Kirstan, S.: Model-based Software Development – Its Real Benefit. EETimes, March 2011 • Gegic, G,: In-the-Loop Testing Aids Embedded System Validation. http://www2.electronicproducts.com/In_the_loop_testing_aids_embedded_system_validation-article-FAJH_Mathworks_Jul2009-html.aspx, August 3, 2009 • Ledin, J.; Dickens, M.: Automatic Embedded Code Generation from Simulation Models. RTC Magazine. http://www.rtcmagazine.com/articles/view/100276, December 2004 • Morey, B: ‘Simulate, then Design’ Emerges as New Engineering Methodology. SAE OHE, September 1, 2011 • "Simulink." Simulation and Model-Based Design. N.p., n.d. Web. 24 Oct. 2012. <http://www.mathworks.com/products/simulink/>.

More Related