View
229
Download
0
Category
Preview:
Citation preview
1© 2015 The MathWorks, Inc.
DAS LASTENHEFT ZUM ANFASSENWie Softwarefunktionen bereits vor ihrer Entwicklung
ausgeführt werden können
23. September 2015
Regensburg
Denis Worschow
Application Engineer
Christina Eschenbach
Sales Manager
Dr. Elmar Selbach
Vertrieb
MathWorks
2
Do you know these Questions?
Where is this
requirement
addressed?
What are the
requirements
for this?
?
Can you show me a
requirements traceability report?
4
Requirements Traceability - OverviewSimulink Verification and Validation
Bi-directional linking with external
documents
– Requirements consistency checks
– Extensibility API
– Report generation
Embedded Coder integration– Embeds requirements as comments in
source code
Model used for
production
code generation
C Source
Code
Executable
Object Code
Textual
Requirements
Executable
Specification
…
IBM Rational DOORS®
Microsoft Word ®
Microsoft Excel ®
HTML
Text
Supported document formats
Simulink
Stateflow
Embedded Coder
6
Tracing ModelSource Code
Bi-directional navigation between the model and the generated code
8
Summary of Traceability
Benefits
End-to-end traceability
Helps finding objects not designed
according to specification
Helps finding missing requirements
Generates report document(needed for ISO 26262-6, 8.4.6)
Model used for
production
code generation
C Source
Code
Executable
Object Code
Textual
Requirements
Executable
Specification
…
9
Test Generation for ModulesOverview
Input
– Model
– Coverage metric
Results
– Harness model
– Input test signals
– Unreachable objects
– Detailed reports
Test generation
Optional Input
– Modifiable parameter sets
– Existing coverage data
Simulink
Design
Verifier
Decision coverage
Condition coverage
MC/DC
Custom Objectives
10
Suitable Model Characteristics for Simulink Design Verifier
Test Generation
Property Proving
Decision-, State-, or Event-Based
Control– Examples
Automatic transmission
Power window
– Best modeled in
Stateflow, Truth Tables, and
Simulink decision logics
Compensator Design– For systems where actuation is based on
deviation from a commanded value (e.g. PID)
– Examples Robot position
Motor speed
– Best modeled with Simulink Control Design and other control design tools
1st Gear
2nd Gear
3rd Gear
4th Gear
Speed > 24km/h
Speed > 64km/h
Speed > 96km/hSpeed < 32 km/h
Speed < 56 km/h
Speed < 88km/h
+-
good
dt
diLRiKv m
windwindme
bad
11
Model used for
production
code generation
C Source
Code
Executable
Object Code
Textual
Requirements
Executable
Specification
…
Equivalence Tests
Manual & Regression
Functional
Tests
Design Verification
Code Verification
Automatic Test GenerationSimulink Design Verifier
Benefits
Push-button technique, no
effort required
Up to 100% coverage
Custom test objectives
All unreachable code detected
Best suited for equality tests
13
MathWorks V&V Product Portfolio
Product Capabilities
Simulink Test Author, execute, and manage simulation-based tests for
models and generated code
Simulink Verification & Validation Trace to requirements, check model standards, perform
coverage analysis
Simulink Design Verifier Identify design errors, automatically generate test
vectors, verify designs against requirements
Report Generator Design and generate reports from MATLAB applications
Polyspace Bug Finder Find software bugs and check compliance to MISRA
Polyspace Code Prover Prove the absence of run-time errors in software
Simulink Code Inspector Automate source code reviews for safety standards
Simulink Real-Time Build, run, and test real-time applications
14
Simulink Test
Capabilities to test simulation outputs throughout the project lifecycle
Concept Create Test Modify FinalizeIterate
Reuse
Do legacy subsystem models work in new application?
The model worked last week… does it still?
Another engineer modified the algorithm…still working ok?
Does the generated code performance match the model?
Does subsystem/system meet the design requirements?
15
Common Pain Points
Not testing or conducting limited testing “We don’t have any process for testing subsystem models before checking them
into our larger system models” – Beta customer
In-house testing solution
– Based on MATLAB or other technology
“Our internal solution is too time intensive and difficult to maintain” – Beta
customer
3rd Party – “We are looking for tools that are deeply integrated with ML, SL, SF and we
would prefer single vendor solutions” - Beta customer
16
1. Test Harnesses 2. Test Sequence Block 3. Test Manager
•Synchronized,
simulatable test
environment
• Inputs and assessments
based on logical,
temporal conditions
•Author, execute,
manage test cases
•Review, export, report
Product Overview
Main Model
Test Harness
Component
under test
17
Simulink TestTool for authoring, managing, and executing simulation-based tests
1. Test Harnesses
Synchronized testing environment
Enables unit testing without
requiring new model
Component or system
Configure, build, simulate
Supports SIL, or PIL
Supports direct “adhoc” testingMain Model
Test Harness
Component under testExercise Analyze
18
Simulink TestTool for authoring, managing, and executing simulation-based tests
2. Test Sequence Block
MATLAB Action Language
Steps are temporal or logic-based
Create complex test inputs and
assessments
Trouble shooting aids
“Formerly referred to as the reactive
testing block”
Test Sequence/Assessment Block
19
Simulink TestTool for authoring, managing, and executing simulation-based tests
3. Test Manager
Create Test Cases
Group into Suites and Test Files
Execute individual or batch
View summary and detailed results
Archive, export, report
Recommended