model-based development
DESCRIPTION
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 - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Model-based Development](https://reader034.vdocument.in/reader034/viewer/2022051621/56814aa5550346895db7be8e/html5/thumbnails/1.jpg)
Model-based Development
By Ryan Mowry
![Page 2: Model-based Development](https://reader034.vdocument.in/reader034/viewer/2022051621/56814aa5550346895db7be8e/html5/thumbnails/2.jpg)
Graphical models of system
Entire system or just parts
Complex systems easier to understand
“Capture key requirements and demonstrate correct behavior in simulation”
Modeling Basics
![Page 3: Model-based Development](https://reader034.vdocument.in/reader034/viewer/2022051621/56814aa5550346895db7be8e/html5/thumbnails/3.jpg)
Software Process Starts after
requirements
Can cover design, development, and testing
![Page 4: Model-based Development](https://reader034.vdocument.in/reader034/viewer/2022051621/56814aa5550346895db7be8e/html5/thumbnails/4.jpg)
Representation of system
Inputs
Outputs
Mathematical Operations
Design and Analysis
![Page 5: Model-based Development](https://reader034.vdocument.in/reader034/viewer/2022051621/56814aa5550346895db7be8e/html5/thumbnails/5.jpg)
Match model to target architecture
Correct data types for input/output
Interactions with other systems
Design and Analysis
![Page 6: Model-based Development](https://reader034.vdocument.in/reader034/viewer/2022051621/56814aa5550346895db7be8e/html5/thumbnails/6.jpg)
Design Example
![Page 7: Model-based Development](https://reader034.vdocument.in/reader034/viewer/2022051621/56814aa5550346895db7be8e/html5/thumbnails/7.jpg)
Simulate model based on inputs and parameters
Observe actual outputs of the model compared to expected
Allows testing parallel to design
Simulation
![Page 8: Model-based Development](https://reader034.vdocument.in/reader034/viewer/2022051621/56814aa5550346895db7be8e/html5/thumbnails/8.jpg)
Earlier error detection
Easy to test all input ranges
Improve Verification
Able to make changes to the model to reach expected results
Simulation Advantages
![Page 9: Model-based Development](https://reader034.vdocument.in/reader034/viewer/2022051621/56814aa5550346895db7be8e/html5/thumbnails/9.jpg)
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
Model-in-the-Loop Testing
![Page 10: Model-based Development](https://reader034.vdocument.in/reader034/viewer/2022051621/56814aa5550346895db7be8e/html5/thumbnails/10.jpg)
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
Software-in-the-Loop Testing
![Page 11: Model-based Development](https://reader034.vdocument.in/reader034/viewer/2022051621/56814aa5550346895db7be8e/html5/thumbnails/11.jpg)
Software-in-the-Loop Testing Test software algorithm using model instead
of needing actual hardware
![Page 12: Model-based Development](https://reader034.vdocument.in/reader034/viewer/2022051621/56814aa5550346895db7be8e/html5/thumbnails/12.jpg)
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
![Page 13: Model-based Development](https://reader034.vdocument.in/reader034/viewer/2022051621/56814aa5550346895db7be8e/html5/thumbnails/13.jpg)
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
![Page 14: Model-based Development](https://reader034.vdocument.in/reader034/viewer/2022051621/56814aa5550346895db7be8e/html5/thumbnails/14.jpg)
PIL and HIL
![Page 15: Model-based Development](https://reader034.vdocument.in/reader034/viewer/2022051621/56814aa5550346895db7be8e/html5/thumbnails/15.jpg)
Verify model and simulation meet requirements
Auto-Generate code from model
Code and filenames very abstract
Hard to follow and understand
Implementation
![Page 16: Model-based Development](https://reader034.vdocument.in/reader034/viewer/2022051621/56814aa5550346895db7be8e/html5/thumbnails/16.jpg)
Code already tested
Changes to model if necessary
Regenerate code from corrected model instead of changing code
Floating and fixed point conversion
Implementation
![Page 17: Model-based Development](https://reader034.vdocument.in/reader034/viewer/2022051621/56814aa5550346895db7be8e/html5/thumbnails/17.jpg)
High costs in new software
Time and cost to learn the model-based approach
Greater time spent during analysis and design of the system
Is Model-based Development Worthwhile?
![Page 18: Model-based Development](https://reader034.vdocument.in/reader034/viewer/2022051621/56814aa5550346895db7be8e/html5/thumbnails/18.jpg)
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
Research in Automotive Industry
![Page 19: Model-based Development](https://reader034.vdocument.in/reader034/viewer/2022051621/56814aa5550346895db7be8e/html5/thumbnails/19.jpg)
Cost difference in each software phase
Analysis of amount of modeling used Error Detection
Cost Difference
Quality Criteria
Overall Cost
Goals of Research
![Page 20: Model-based Development](https://reader034.vdocument.in/reader034/viewer/2022051621/56814aa5550346895db7be8e/html5/thumbnails/20.jpg)
Software Phase Analysis
![Page 21: Model-based Development](https://reader034.vdocument.in/reader034/viewer/2022051621/56814aa5550346895db7be8e/html5/thumbnails/21.jpg)
Requirements Cost Change
![Page 22: Model-based Development](https://reader034.vdocument.in/reader034/viewer/2022051621/56814aa5550346895db7be8e/html5/thumbnails/22.jpg)
Number of Errors Detected
![Page 23: Model-based Development](https://reader034.vdocument.in/reader034/viewer/2022051621/56814aa5550346895db7be8e/html5/thumbnails/23.jpg)
Quality Criteria
![Page 24: Model-based Development](https://reader034.vdocument.in/reader034/viewer/2022051621/56814aa5550346895db7be8e/html5/thumbnails/24.jpg)
Overall Cost
![Page 25: Model-based Development](https://reader034.vdocument.in/reader034/viewer/2022051621/56814aa5550346895db7be8e/html5/thumbnails/25.jpg)
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
Research Study Findings
![Page 26: Model-based Development](https://reader034.vdocument.in/reader034/viewer/2022051621/56814aa5550346895db7be8e/html5/thumbnails/26.jpg)
Do not need to know programming languages
Testing sooner leads to earlier bug detection
Better overall quality
Design reuse for upgraded systems
Advantages of Model-based
![Page 27: Model-based Development](https://reader034.vdocument.in/reader034/viewer/2022051621/56814aa5550346895db7be8e/html5/thumbnails/27.jpg)
New Software costs
Training on new software and approach
Abstract code
Lengthy Simulations
Advantages outweigh disadvantages
Disadvantages of Model-based
![Page 28: Model-based Development](https://reader034.vdocument.in/reader034/viewer/2022051621/56814aa5550346895db7be8e/html5/thumbnails/28.jpg)
New methodology in automotive industry
New technologies create major design changes
Simulations help find balance in subsystems
Design comes after balance found through simulating
Simulate, then Design
![Page 29: Model-based Development](https://reader034.vdocument.in/reader034/viewer/2022051621/56814aa5550346895db7be8e/html5/thumbnails/29.jpg)
LMS Imagine Lab Modelica CyDesign Dymola MapleSim VisSim MATLAB and Simulink EicasLab Rational Rhapsody
Model-based Embedded Tools
![Page 30: Model-based Development](https://reader034.vdocument.in/reader034/viewer/2022051621/56814aa5550346895db7be8e/html5/thumbnails/30.jpg)
Block diagram of desired system
Diagram hierarchy of components
Useful in sharing components with other models
MATLAB and Simulink
![Page 31: Model-based Development](https://reader034.vdocument.in/reader034/viewer/2022051621/56814aa5550346895db7be8e/html5/thumbnails/31.jpg)
Block Diagram Example
![Page 32: Model-based Development](https://reader034.vdocument.in/reader034/viewer/2022051621/56814aa5550346895db7be8e/html5/thumbnails/32.jpg)
Component Hierarchy
![Page 33: Model-based Development](https://reader034.vdocument.in/reader034/viewer/2022051621/56814aa5550346895db7be8e/html5/thumbnails/33.jpg)
Graphical output to view results
Debug Simulation
Step forward to find when state changes
Or step backwards (Rewind Simulation)
Run on target hardware
Running Simulation
![Page 34: Model-based Development](https://reader034.vdocument.in/reader034/viewer/2022051621/56814aa5550346895db7be8e/html5/thumbnails/34.jpg)
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
Generating Code
![Page 35: Model-based Development](https://reader034.vdocument.in/reader034/viewer/2022051621/56814aa5550346895db7be8e/html5/thumbnails/35.jpg)
Demo Simulink Simulation process
Simulink demo
![Page 36: Model-based Development](https://reader034.vdocument.in/reader034/viewer/2022051621/56814aa5550346895db7be8e/html5/thumbnails/36.jpg)
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/>.