3. 3
• Convergence of Two Trends
Trend in System Design
Model-Based
Development
Automated
Analysis
A Revolutionary Change in How
We Design and Build Systems
13. 13
System Design
• Present day system design integrated with High-Integrity Applications
Source : Buncefield Investigation Glossary www.buncefieldinvestigation.gov.uk/glossary.htm
14. 14
System Design…
• Challenges
– Exploding code sizes and complexity of software
– Increase the productivity of the individual engineer
– Agility of applications, technologies, platforms
– Coordinate the resources of people with expertise in a wide range of
disciplines
15. 15
System Design…
• History
– General Systems Theory (GST) was the fundamental underpinning of most
commercial software design techniques by the 1970s
– Computer-Aided Software Engineering (CASE) tools developed in the
1980s
– Creating the Unified Modeling Language (UML) inthe 1990s
– Model Driven Architecture (MDA) launched in 2001
16. 16
System Design…
• When engineers build systems…
– Focus on Software-Centric Design
Methodologies:
▫ Treat software as main entity
▫ Overlook domain knowledge
▫ Dominate the functional design
23. 23
System Design…
• Design Failure and Time-to-Market in Embedded Systems
– Across industries:
▫ 50% of projects behind schedule
▫ 1/3 fail to meet 50% of performance/feature requirements
Source: Embedded Market Forecasters
29. 29
Modeling
• A model is a simplified representation of an object or a process.
F = ma
30. 30
Modeling…
• Representation
– A model represents some thing.
– Model and thing are connected by a morphism.
• Abstraction
– The model suppresses irrelevant detail and focuses on important aspects.
• Pragmatics
– The model is created for a purpose
34. 34
System Modeling
• From Paper-based approach to Executable Model
• System Model captures all information about concept, design,
implementation
• System Model is used in all development stages (Research, Design,
Implementation and Verification & Validation)
• System Model is continuously updated and elaborated
35. 35
System Modeling…
• Uses of System Models
– Simulation, Visualization
– Static System Analysis, Formal Verification
– Virtual Fault Injection
– Synthesis of Implementations & Test Suites
– Documentation, Presentation
36. 36
System Modeling…
• Key steps in the system modeling approach
– System Identification (modeling the plant) is an iterative process
▫ By acquiring and processing raw data from a real world system and choosing a
mathematical model to represent the plant behavior
– Controller analysis and synthesis
▫ Identify dynamic characteristics of the plant model and synthesize an
appropriate controller.
– Offline simulation
▫ Simulation allows specification, requirements, and modeling errors to be found
early
– Deployment
37. 37
System Modeling…
• System Model Simulation
– Software in the Loop
▫ Non real-time simulation, e.g. using SimuLink
▫ Using plant model and system controller model
– Hardware in the Loop
▫ Real-time simulation of plant model
▫ Controller implemented on target (code generation)
– Simulation Goals
▫ Verification and Validation
▫ Collect Data to Improve Models
53. F = ma
53
• Model-based design enables simulation-driven product development
(or virtual product development).
– A model is a simplified representation of an object or a process
– A model is a mental, physical or virtual cognitive tool
– With the term model, limit our scope to computer-based models
– In the context of Engineering Design, a model is a cognitive tool with the
purpose to assist the process!
Model Based Design
55. 55
Does Model-Based Development Scale?
Systems Developed Using MBD
• Flight Control
• Auto Pilot
• Fight Warning
• Cockpit Display
• Fuel Management
• Landing Gear
• Braking
• Steering
• Anti-Icing
• Electrical Load Management
Airbus A380
Length 239 ft 6 in
Wingspan 261 ft 10 in
Maximum Takeoff Weight 1,235,000 lbs
Passengers Up to 840
Range 9,383 miles
YES
57. 57
• Benefits of Model-Based Design
– Models: Core of the Development
Process
– Unambiguous Description of
Requirements (Executable
Specification)
– Fast Evaluation of Design Variants
– Frontloading - Early Test and
Verification
– Automatic Code Generation
– Better Cooperation, Communication
and Collaboration
– Higher Product Quality
Model Based Design…
58. 58
Model Based Design…
Cheaper Than Manual Analysis Finds the Really Hard Errors
Requirements
Elicitation
Modeling
Simulation
Automated
Analysis
Autocode
Autotest
Reuse
Clear Specifications
Improves Communication
Easy Validation
Finds Errors Early
Eliminates Manual Coding
Makes Model Primary Artifact
Reduces Cost of Testing
Enables More Testing
10%
10%
15%
5%
10% - 20%
• How to Reduce Development Costs & Improve Quality?
59. 59
• Major used tool for Model-Based Design to Accelerating the Pace of
Engineering and Science
Model Based Design…
62. 62
Model-based Design and Verification
RA
FD
CD
HwA
SY
DPL
Functional
Mod/Sim
Arch Mod/Sim
Alloc./Sched.
Analysis
HW Pwr/
Perf Est
Latency/RT
Analysis
SwA
Requirement Specification
Control Design
Component Design
Software
Architecture
HW Arch. Design
System Arch. Design
Code Gen.
Verif.
SW Deployment
MSD-1
MSD-2
MSD-3
MSD-4
63. 63
Model-based Design and Verification…
• MSD-1. Model-Integrated Computing (MIC)
– Formal, meta model-based semantic foundations for domain-specific
modeling languages (DSML), based on the concept of semantic anchoring,
and model transformations.
• MSD-2. Embedded Software Composition Platforms
– Heterogeneous software composition platform that offers middleware
support for a well-defined suite of models of computations (MoC),
incorporating dynamic type checking for system-level types and seamless
interfaces towards underlying systems platforms such as Time Triggered
Architecture and towards higher-level modeling environments.
• MSD-3. Automated Source-code Verification and Testing
– New static analysis techniques for programming languages widely used in
embedded software development. (Presentation by Prof. Clarke)
• MSD-4. Model-Based Runtime Testing and Verification
– Algorithms for the runtime, passive conformance testing of system
behavior to a set of approximate models.
92. 92
• What Are Model Checkers?
– Breakthrough Technology of the 1990’s
– Widely Used in Hardware Verification (Intel, Motorola, IBM, …)
– Several Different Types of Model Checkers
▫ Explicit, Symbolic, Bounded, Infinite Bounded, …
– Exhaustive Search of the Global State Space
▫ Consider All Combinations of Inputs and States
▫ Equivalent to Exhaustive Testing of the Model
▫ Produces a Counter Example if a Property is Not True
– Easy to Use
▫ “Push Button” Formal Methods
▫ Very Little Human Effort Unless You’re at the Tool’s Limits
– Limitations
▫ State Space Explosion (10100 – 10300 States)
Developing the Technology…
93. 93
• Advantage of Model Checking
Developing the Technology…
Testing Checks Only the Values We Select
Even Small Systems Have Trillions (of Trillions) of Possible Tests!
94. 94
• Advantage of Model Checking
Developing the Technology…
Model Checker Tries Every Possible Input and State!
95. 95
• Model Checking Process
Developing the Technology…
Properties
Does the system
have property X?
Model
SMV
Automatic Translation
SMV Properties
Yes!
Counter Example
SMV
Spec.
Automatic Translation
Note : Symbolic Model Verifier(SMV)
97. 97
• Validate Requirements through Model Checking
– Proved Over 280 Properties in Less Than an Hour
– Found Several Errors
– Some Were Errors in the Model
– Most Were Incorrect Shalls
– Revised the Shalls to Improve the Requirements
Developing the Technology…
98. 98
• What are Theorem Provers?
– A theorem prover is a tool for logical reasoning, like a calculator is a tool
for arithmetic.
– Available Since Late 1980’s
▫ Widely Used on Security and Safety-Critical Systems
– Use Rules of Inference to Prove New Properties
▫ Also Consider All Combinations of Inputs and States
▫ Also Equivalent to Testing with an Infinite Set of Test Cases
▫ Generate An Unprovable Proof Obligation if a Property is False
– Not Limited by State Space
▫ Applicable to Almost Any Formal Specification
– Limitations
▫ Require Experience - About Six Months to Become Proficient
▫ Constructing Proofs is Labor Intensive
Developing the Technology…
99. 99
• Theorem Proving Using PVS
Developing the Technology…
Does the system
have property X?
Model
Engineer
Automatic Translation
PVS
Spec.
PVS
Why not?
Guru
Automatic Translation
PVS Properties
Properties
http://pvs.csl.sri.com/index.shtmlNote : Prototype Verification System (PVS)
100. 100
• Searching for Potential Sources of Mode Confusion
– Used Theorem Proving to Search For
▫ Entry and Exit of Off Normal Modes
▫ Ignored Operator Commands
▫ Certain Forms of Lack of Feedback
▫ Hidden Modes
▫ Unintended Side Effects
▫ Lack of Feedback from Multiple Operators
Developing the Technology…
Discrepancy between the perceived and
actual state of an automated system.
101. 101
• Validate Requirements Using Theorem Proving
– Proved Several Hundred Properties Using PVS
– More Time Consuming that Model-Checking
– Use When Model-Checking Won’t Work
▫ Models that are Numerically Intensive
▫ Automated Safety (Fault Tree) Analysis
Developing the Technology…
104. 104
• Need
– Software defects originate from all
stages of the development process
▫ Model-based function
development
▫ Software code generation
▫ Software build and integration
▫ Hardware development
▫ …
– Errors are often found far too late
▫ High pressure and risk at the end
of the engineering cycle
Functional Testing for MBD…
105. 105
• When do I need to start testing ?
• Is Frontloading new ?
Functional Testing for MBD…
106. 106
• Need : How to test Models ?
Functional Testing for MBD…
111. 111
• ETAS RT2: Find and Fix Errors Early
• ETAS RT2 is a product with a new approach to design, execute and
manage tests across development platforms for:
– Functional models (Simulink or ASCET)
– Software-in-the-loop platforms (e.g. C-code .exe, ISOLAR-EVE)
– Consistency check between model and code: automated comparison of test
results between model and software
Functional Testing for MBD…
120. 120
• More time on design Less time on implementation and test
MBD Summary
Source: Arthur D. Little GmbH - Studie "Kosten-/Nutzenanalyse der modellbasierten Softwareentwicklung im Automobil“, January 2007.
[chart translated]
122. 122
• Systems that are SMARTER
– ACTIVE – vs. passive
▫ Adaptive cruise control; Adaptive structures; Self-adjusting washing machines;
Driver warning systems for approaching a curve too fast
– AUTONOMOUS – vs. human-in-the-loop
▫ Robotics; UAVs; Drones; Medical dosing systems; Self-guided agricultural
equipment
– COLLABORATIVE – vs. individual
▫ Mobile robots that cooperate to accomplish a task; Intelligent transportation
systems
– MULTI-FUNCTION – vs. single-function
▫ HEV engine management; PDAs; Utility grid management
MBD Summary…
123. 123
• Dramatic innovation in how systems are
designed, implemented, and tested
– Increase math and algorithmic content
– Drive innovation through early design
iterations
– Eliminate hand coding of C/C++/HDL
– Improve quality through early verification
and validation
– Enable collaboration across disciplines
– Cause collaboration across development
stages
MBD Summary…