Verification, Validation and Test in Model Based Design · Verification, Validation and Test in...
Transcript of Verification, Validation and Test in Model Based Design · Verification, Validation and Test in...
![Page 1: Verification, Validation and Test in Model Based Design · Verification, Validation and Test in Model Based Design Manohar Reddy. 2 Continuous Model & Code System & Component Dynamic](https://reader030.fdocuments.us/reader030/viewer/2022040411/5ed348213194825a414974d0/html5/thumbnails/1.jpg)
1© 2015 The MathWorks, Inc.
Verification, Validation and Test
in Model Based Design
Manohar Reddy
![Page 2: Verification, Validation and Test in Model Based Design · Verification, Validation and Test in Model Based Design Manohar Reddy. 2 Continuous Model & Code System & Component Dynamic](https://reader030.fdocuments.us/reader030/viewer/2022040411/5ed348213194825a414974d0/html5/thumbnails/2.jpg)
2
Continuous
Model & Code
System & Component
Dynamic testing & Static analysis
Test & Verification
Model & Code
Dynamic testing & Static analysis
System & Component
Productivity
continuous
Needs verification!
Quality
+
![Page 3: Verification, Validation and Test in Model Based Design · Verification, Validation and Test in Model Based Design Manohar Reddy. 2 Continuous Model & Code System & Component Dynamic](https://reader030.fdocuments.us/reader030/viewer/2022040411/5ed348213194825a414974d0/html5/thumbnails/3.jpg)
3
Multi-Mode Hybrid Electric Vehicle
Higuchi, N., Sunaga, Y., Tanaka, M., Shimada, H.: Development of a New Two-Motor Plug-In Hybrid
System, SAE 2013-01-1476 (2013)
EV Mode Serial HEV Mode Engine Mode
with Model Based Design
![Page 4: Verification, Validation and Test in Model Based Design · Verification, Validation and Test in Model Based Design Manohar Reddy. 2 Continuous Model & Code System & Component Dynamic](https://reader030.fdocuments.us/reader030/viewer/2022040411/5ed348213194825a414974d0/html5/thumbnails/4.jpg)
4
Define
Requirements
System-Level
Specification
Subsystem
Design
Battery
Engine
Energy Management
Subsystem
Implementation
Production
C-Code
Simulink
Plant Model
Subsystem
Integration & Test
Multi-Mode Hybrid Electric Vehicle
Complete
Integration &Test
System-Level
Integration & Test
Failure
![Page 5: Verification, Validation and Test in Model Based Design · Verification, Validation and Test in Model Based Design Manohar Reddy. 2 Continuous Model & Code System & Component Dynamic](https://reader030.fdocuments.us/reader030/viewer/2022040411/5ed348213194825a414974d0/html5/thumbnails/5.jpg)
5
Continuous Test and Verification Framework
Repeat
Slice
Fix
Check
Test
Reproduce the failure at the simulation level
Isolate the problematic behavior
Fix and Perform Unit Testing
Check for further design errors
Test Systematically and Test Completely
Productivity
+Quality
continuous
needs verification!
![Page 6: Verification, Validation and Test in Model Based Design · Verification, Validation and Test in Model Based Design Manohar Reddy. 2 Continuous Model & Code System & Component Dynamic](https://reader030.fdocuments.us/reader030/viewer/2022040411/5ed348213194825a414974d0/html5/thumbnails/6.jpg)
6
Reproduce the Failure in Simulation
Confirm the problem
In the Lab/Desktop
Simulation
Repeat
Slice
Fix
Check
Test
![Page 7: Verification, Validation and Test in Model Based Design · Verification, Validation and Test in Model Based Design Manohar Reddy. 2 Continuous Model & Code System & Component Dynamic](https://reader030.fdocuments.us/reader030/viewer/2022040411/5ed348213194825a414974d0/html5/thumbnails/7.jpg)
7
Failure Report
Reproduce Failure
Drive cycle
![Page 8: Verification, Validation and Test in Model Based Design · Verification, Validation and Test in Model Based Design Manohar Reddy. 2 Continuous Model & Code System & Component Dynamic](https://reader030.fdocuments.us/reader030/viewer/2022040411/5ed348213194825a414974d0/html5/thumbnails/8.jpg)
8
Simulation Environment
Controller Plant
![Page 9: Verification, Validation and Test in Model Based Design · Verification, Validation and Test in Model Based Design Manohar Reddy. 2 Continuous Model & Code System & Component Dynamic](https://reader030.fdocuments.us/reader030/viewer/2022040411/5ed348213194825a414974d0/html5/thumbnails/9.jpg)
9
Modeling the Test
Controller Plant
Drive cycle
![Page 10: Verification, Validation and Test in Model Based Design · Verification, Validation and Test in Model Based Design Manohar Reddy. 2 Continuous Model & Code System & Component Dynamic](https://reader030.fdocuments.us/reader030/viewer/2022040411/5ed348213194825a414974d0/html5/thumbnails/10.jpg)
10
Modeling the Test
Safety Property
Engine RPM must remain
within operating bounds limits
Controller Plant
![Page 11: Verification, Validation and Test in Model Based Design · Verification, Validation and Test in Model Based Design Manohar Reddy. 2 Continuous Model & Code System & Component Dynamic](https://reader030.fdocuments.us/reader030/viewer/2022040411/5ed348213194825a414974d0/html5/thumbnails/11.jpg)
11
Battery State of Charge
Controller Plant
Sweep from 100% to 50%
Initial state of charge?
![Page 12: Verification, Validation and Test in Model Based Design · Verification, Validation and Test in Model Based Design Manohar Reddy. 2 Continuous Model & Code System & Component Dynamic](https://reader030.fdocuments.us/reader030/viewer/2022040411/5ed348213194825a414974d0/html5/thumbnails/12.jpg)
12
![Page 13: Verification, Validation and Test in Model Based Design · Verification, Validation and Test in Model Based Design Manohar Reddy. 2 Continuous Model & Code System & Component Dynamic](https://reader030.fdocuments.us/reader030/viewer/2022040411/5ed348213194825a414974d0/html5/thumbnails/13.jpg)
13
Model Slicing: Isolate the problematic behavior
Simulation
Scenario
Isolate the problem
Repeat
Slice
Fix
Check
Test
![Page 14: Verification, Validation and Test in Model Based Design · Verification, Validation and Test in Model Based Design Manohar Reddy. 2 Continuous Model & Code System & Component Dynamic](https://reader030.fdocuments.us/reader030/viewer/2022040411/5ed348213194825a414974d0/html5/thumbnails/14.jpg)
14
Challenge of Understanding Behavior
Complexity of Plant
![Page 15: Verification, Validation and Test in Model Based Design · Verification, Validation and Test in Model Based Design Manohar Reddy. 2 Continuous Model & Code System & Component Dynamic](https://reader030.fdocuments.us/reader030/viewer/2022040411/5ed348213194825a414974d0/html5/thumbnails/15.jpg)
15
Challenge of Understanding Behavior
Complexity of Plant
Complexity of Controller
![Page 16: Verification, Validation and Test in Model Based Design · Verification, Validation and Test in Model Based Design Manohar Reddy. 2 Continuous Model & Code System & Component Dynamic](https://reader030.fdocuments.us/reader030/viewer/2022040411/5ed348213194825a414974d0/html5/thumbnails/16.jpg)
16
Challenge of Understanding Behavior
Complexity of Plant
Complexity of Controller
Complexity of Dynamics
Turning
backwards
![Page 17: Verification, Validation and Test in Model Based Design · Verification, Validation and Test in Model Based Design Manohar Reddy. 2 Continuous Model & Code System & Component Dynamic](https://reader030.fdocuments.us/reader030/viewer/2022040411/5ed348213194825a414974d0/html5/thumbnails/17.jpg)
17
Model Slicing
![Page 18: Verification, Validation and Test in Model Based Design · Verification, Validation and Test in Model Based Design Manohar Reddy. 2 Continuous Model & Code System & Component Dynamic](https://reader030.fdocuments.us/reader030/viewer/2022040411/5ed348213194825a414974d0/html5/thumbnails/18.jpg)
18
Complete Model Slicer Workflow
Original
Design
Model
Highlighted
Model
Slice
Model
Updated Slice
Model
Identify
Interest
Iterate
Create
Slice Model
MBD Work:
• Simulate/Debug
• Formal analysis
• Update
Incorporate
Changes
![Page 19: Verification, Validation and Test in Model Based Design · Verification, Validation and Test in Model Based Design Manohar Reddy. 2 Continuous Model & Code System & Component Dynamic](https://reader030.fdocuments.us/reader030/viewer/2022040411/5ed348213194825a414974d0/html5/thumbnails/19.jpg)
19
Controller
Plant
Isolating Troubling Behavior with Model Slicer
Simulation
Scenario
Model Slicer Area of Interest
Highlight of
Relevant Parts
Stateflow
Highlighting
Original
Design Model
Highlighted
Model
Slice
Model
Updated Slice
Model
Identify
Interest
Iterate
Create
Slice Model MBD Work
Incorporate
Changes
![Page 20: Verification, Validation and Test in Model Based Design · Verification, Validation and Test in Model Based Design Manohar Reddy. 2 Continuous Model & Code System & Component Dynamic](https://reader030.fdocuments.us/reader030/viewer/2022040411/5ed348213194825a414974d0/html5/thumbnails/20.jpg)
20
Fixing the failure and Unit Testing
Simulation
Scenario
Repeat & isolate the problem
…
Fix faulty
components
Repeat
Isolate
Fix
Check
Test
![Page 21: Verification, Validation and Test in Model Based Design · Verification, Validation and Test in Model Based Design Manohar Reddy. 2 Continuous Model & Code System & Component Dynamic](https://reader030.fdocuments.us/reader030/viewer/2022040411/5ed348213194825a414974d0/html5/thumbnails/21.jpg)
21
State Synchronization Error
Missing Transition
Isolate and Fix
Engine Turning Backwards
Turning
backwards
![Page 22: Verification, Validation and Test in Model Based Design · Verification, Validation and Test in Model Based Design Manohar Reddy. 2 Continuous Model & Code System & Component Dynamic](https://reader030.fdocuments.us/reader030/viewer/2022040411/5ed348213194825a414974d0/html5/thumbnails/22.jpg)
22
Unit Testing Workflow
Main Model
1. Separate
2. Reproduce
Bug and Fix
4. Synchronize 3. Confirm
Test Harness
![Page 23: Verification, Validation and Test in Model Based Design · Verification, Validation and Test in Model Based Design Manohar Reddy. 2 Continuous Model & Code System & Component Dynamic](https://reader030.fdocuments.us/reader030/viewer/2022040411/5ed348213194825a414974d0/html5/thumbnails/23.jpg)
23
![Page 24: Verification, Validation and Test in Model Based Design · Verification, Validation and Test in Model Based Design Manohar Reddy. 2 Continuous Model & Code System & Component Dynamic](https://reader030.fdocuments.us/reader030/viewer/2022040411/5ed348213194825a414974d0/html5/thumbnails/24.jpg)
24
In-model Verification
Isolate Component in Test
HarnessVerification Result streamed to
Data Inspector
In-model Verification with verify keyword
![Page 25: Verification, Validation and Test in Model Based Design · Verification, Validation and Test in Model Based Design Manohar Reddy. 2 Continuous Model & Code System & Component Dynamic](https://reader030.fdocuments.us/reader030/viewer/2022040411/5ed348213194825a414974d0/html5/thumbnails/25.jpg)
25
Check for further design errors
Simulation
Scenario
Repeat & isolate the
problem
…
Fix faulty components
…
Check
everything
Repeat
Isolate
Fix
Check
Test
![Page 26: Verification, Validation and Test in Model Based Design · Verification, Validation and Test in Model Based Design Manohar Reddy. 2 Continuous Model & Code System & Component Dynamic](https://reader030.fdocuments.us/reader030/viewer/2022040411/5ed348213194825a414974d0/html5/thumbnails/26.jpg)
26
Develop a Robust Design with
Static Checking
Model Advisor Model Metrics
Simulink Design Verifier
Property
Proving
Test
Generation
Static Analysis Capabilities
Design Error
Detection
![Page 27: Verification, Validation and Test in Model Based Design · Verification, Validation and Test in Model Based Design Manohar Reddy. 2 Continuous Model & Code System & Component Dynamic](https://reader030.fdocuments.us/reader030/viewer/2022040411/5ed348213194825a414974d0/html5/thumbnails/27.jpg)
27
Find Hidden Issues with
Design Error Detection
U: [0,10]
h1 = 15
h2 = 5
Transition not possible
given range of u, h1, h2
![Page 28: Verification, Validation and Test in Model Based Design · Verification, Validation and Test in Model Based Design Manohar Reddy. 2 Continuous Model & Code System & Component Dynamic](https://reader030.fdocuments.us/reader030/viewer/2022040411/5ed348213194825a414974d0/html5/thumbnails/28.jpg)
28
Demo
![Page 29: Verification, Validation and Test in Model Based Design · Verification, Validation and Test in Model Based Design Manohar Reddy. 2 Continuous Model & Code System & Component Dynamic](https://reader030.fdocuments.us/reader030/viewer/2022040411/5ed348213194825a414974d0/html5/thumbnails/29.jpg)
29
Cond1 Cond2
~Cond1 ~Cond2
![Page 30: Verification, Validation and Test in Model Based Design · Verification, Validation and Test in Model Based Design Manohar Reddy. 2 Continuous Model & Code System & Component Dynamic](https://reader030.fdocuments.us/reader030/viewer/2022040411/5ed348213194825a414974d0/html5/thumbnails/30.jpg)
30
Cond1 Cond2
~Cond1 ~Cond2X
![Page 31: Verification, Validation and Test in Model Based Design · Verification, Validation and Test in Model Based Design Manohar Reddy. 2 Continuous Model & Code System & Component Dynamic](https://reader030.fdocuments.us/reader030/viewer/2022040411/5ed348213194825a414974d0/html5/thumbnails/31.jpg)
31
Fixing-as-you go
Demo
![Page 32: Verification, Validation and Test in Model Based Design · Verification, Validation and Test in Model Based Design Manohar Reddy. 2 Continuous Model & Code System & Component Dynamic](https://reader030.fdocuments.us/reader030/viewer/2022040411/5ed348213194825a414974d0/html5/thumbnails/32.jpg)
32
Prevent errors by
Fixing-as-you go
Edit-time checking
– Simulink
– Stateflow
– Modeling Standards
Prohibited blocks violations
Block and port name violations
Invalid port name Duplicate Data StoreMissing Default Transition
Customize rules to
corporate standards
![Page 33: Verification, Validation and Test in Model Based Design · Verification, Validation and Test in Model Based Design Manohar Reddy. 2 Continuous Model & Code System & Component Dynamic](https://reader030.fdocuments.us/reader030/viewer/2022040411/5ed348213194825a414974d0/html5/thumbnails/33.jpg)
33
Test : Systematically and Completely
Simulation
Scenario
Repeat & isolate the problem
…
Fix faulty components
…
Check everything
…
Test Systematically
and
Test Completely
Repeat
Isolate
Fix
Check
Test
![Page 34: Verification, Validation and Test in Model Based Design · Verification, Validation and Test in Model Based Design Manohar Reddy. 2 Continuous Model & Code System & Component Dynamic](https://reader030.fdocuments.us/reader030/viewer/2022040411/5ed348213194825a414974d0/html5/thumbnails/34.jpg)
34
Test Manager PlatformSystematic authoring, management, execution,
and reporting of test cases
Unites together a broad set of
capabilities
Simulink Test
![Page 35: Verification, Validation and Test in Model Based Design · Verification, Validation and Test in Model Based Design Manohar Reddy. 2 Continuous Model & Code System & Component Dynamic](https://reader030.fdocuments.us/reader030/viewer/2022040411/5ed348213194825a414974d0/html5/thumbnails/35.jpg)
35
MATLAB Script Criteria
![Page 36: Verification, Validation and Test in Model Based Design · Verification, Validation and Test in Model Based Design Manohar Reddy. 2 Continuous Model & Code System & Component Dynamic](https://reader030.fdocuments.us/reader030/viewer/2022040411/5ed348213194825a414974d0/html5/thumbnails/36.jpg)
36
Value
Tolerance
Time
Tolerance
![Page 37: Verification, Validation and Test in Model Based Design · Verification, Validation and Test in Model Based Design Manohar Reddy. 2 Continuous Model & Code System & Component Dynamic](https://reader030.fdocuments.us/reader030/viewer/2022040411/5ed348213194825a414974d0/html5/thumbnails/37.jpg)
37
Top-It-Off Workflow
Run Existing Tests
Aggregate Coverage
1
Simulink Design Verifier
Generate Test Cases
2
Run New Tests
Aggregate Coverage
3
![Page 38: Verification, Validation and Test in Model Based Design · Verification, Validation and Test in Model Based Design Manohar Reddy. 2 Continuous Model & Code System & Component Dynamic](https://reader030.fdocuments.us/reader030/viewer/2022040411/5ed348213194825a414974d0/html5/thumbnails/38.jpg)
38
![Page 39: Verification, Validation and Test in Model Based Design · Verification, Validation and Test in Model Based Design Manohar Reddy. 2 Continuous Model & Code System & Component Dynamic](https://reader030.fdocuments.us/reader030/viewer/2022040411/5ed348213194825a414974d0/html5/thumbnails/39.jpg)
39
Any continuous integration system that supports
Test Anything Protocol (TAP)
Integration with Test Automation Servers
![Page 40: Verification, Validation and Test in Model Based Design · Verification, Validation and Test in Model Based Design Manohar Reddy. 2 Continuous Model & Code System & Component Dynamic](https://reader030.fdocuments.us/reader030/viewer/2022040411/5ed348213194825a414974d0/html5/thumbnails/40.jpg)
40
Reuse model-based tests
Equivalence testing
Code Coverage
Code-to-Model Verification
C
Dynamic
Test Manager
Software-In-Loop
(SIL)
Code Generator
Static
Polyspace
![Page 41: Verification, Validation and Test in Model Based Design · Verification, Validation and Test in Model Based Design Manohar Reddy. 2 Continuous Model & Code System & Component Dynamic](https://reader030.fdocuments.us/reader030/viewer/2022040411/5ed348213194825a414974d0/html5/thumbnails/41.jpg)
41
Equivalence Checking and Code Coverage (Software-In-Loop)
![Page 42: Verification, Validation and Test in Model Based Design · Verification, Validation and Test in Model Based Design Manohar Reddy. 2 Continuous Model & Code System & Component Dynamic](https://reader030.fdocuments.us/reader030/viewer/2022040411/5ed348213194825a414974d0/html5/thumbnails/42.jpg)
42
Justification for Code Coverage
Justify
![Page 43: Verification, Validation and Test in Model Based Design · Verification, Validation and Test in Model Based Design Manohar Reddy. 2 Continuous Model & Code System & Component Dynamic](https://reader030.fdocuments.us/reader030/viewer/2022040411/5ed348213194825a414974d0/html5/thumbnails/43.jpg)
43
Continuous Test and Verification Framework helps to…
Repeat
Slice
Fix
Check
Test
Reproduce the failure in simulation
Isolate the problematic behavior
Fix and Perform Unit Testing
Check for further design errors
Test Systematically and Test
Completely
“Reactively” Reproduce the Field Issues
in Simulation
“Proactively” Prove that Implementation
satisfies Requirements
Check
Fix
Slice
Test
Prove
Check for design errors early
Fix and Perform Unit Testing
Isolate the problematic behavior to
simplify debugging
Test Systematically and Test
Completely
Prove Safety Properties/Requirements
![Page 44: Verification, Validation and Test in Model Based Design · Verification, Validation and Test in Model Based Design Manohar Reddy. 2 Continuous Model & Code System & Component Dynamic](https://reader030.fdocuments.us/reader030/viewer/2022040411/5ed348213194825a414974d0/html5/thumbnails/44.jpg)
44
Model Based Design helps to…
Productivity
+Quality
Check
Fix
Slice
Test
Prove
Continuous Test &
Verification
Repeat
Slice
Fix
Check
Test
![Page 45: Verification, Validation and Test in Model Based Design · Verification, Validation and Test in Model Based Design Manohar Reddy. 2 Continuous Model & Code System & Component Dynamic](https://reader030.fdocuments.us/reader030/viewer/2022040411/5ed348213194825a414974d0/html5/thumbnails/45.jpg)
45
MathWorks Training Offerings
http://www.mathworks.com/services/training/
![Page 46: Verification, Validation and Test in Model Based Design · Verification, Validation and Test in Model Based Design Manohar Reddy. 2 Continuous Model & Code System & Component Dynamic](https://reader030.fdocuments.us/reader030/viewer/2022040411/5ed348213194825a414974d0/html5/thumbnails/46.jpg)
46
Speaker Details
Manohar Reddy
Email: [email protected]
Contact MathWorks India
Call: 080-6632-6000
Email: [email protected]