+ All Categories
Home > Documents > Verification, Validation and Test in Model Based...

Verification, Validation and Test in Model Based...

Date post: 18-May-2018
Category:
Upload: vuongtu
View: 234 times
Download: 0 times
Share this document with a friend
46
1 © 2015 The MathWorks, Inc. Verification, Validation and Test in Model Based Design Manohar Reddy
Transcript

1© 2015 The MathWorks, Inc.

Verification, Validation and Test

in Model Based Design

Manohar Reddy

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

+

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

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

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!

6

Reproduce the Failure in Simulation

Confirm the problem

In the Lab/Desktop

Simulation

Repeat

Slice

Fix

Check

Test

7

Failure Report

Reproduce Failure

Drive cycle

8

Simulation Environment

Controller Plant

9

Modeling the Test

Controller Plant

Drive cycle

10

Modeling the Test

Safety Property

Engine RPM must remain

within operating bounds limits

Controller Plant

11

Battery State of Charge

Controller Plant

Sweep from 100% to 50%

Initial state of charge?

12

13

Model Slicing: Isolate the problematic behavior

Simulation

Scenario

Isolate the problem

Repeat

Slice

Fix

Check

Test

14

Challenge of Understanding Behavior

Complexity of Plant

15

Challenge of Understanding Behavior

Complexity of Plant

Complexity of Controller

16

Challenge of Understanding Behavior

Complexity of Plant

Complexity of Controller

Complexity of Dynamics

Turning

backwards

17

Model Slicing

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

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

20

Fixing the failure and Unit Testing

Simulation

Scenario

Repeat & isolate the problem

Fix faulty

components

Repeat

Isolate

Fix

Check

Test

21

State Synchronization Error

Missing Transition

Isolate and Fix

Engine Turning Backwards

Turning

backwards

22

Unit Testing Workflow

Main Model

1. Separate

2. Reproduce

Bug and Fix

4. Synchronize 3. Confirm

Test Harness

23

24

In-model Verification

Isolate Component in Test

HarnessVerification Result streamed to

Data Inspector

In-model Verification with verify keyword

25

Check for further design errors

Simulation

Scenario

Repeat & isolate the

problem

Fix faulty components

Check

everything

Repeat

Isolate

Fix

Check

Test

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

27

Find Hidden Issues with

Design Error Detection

U: [0,10]

h1 = 15

h2 = 5

Transition not possible

given range of u, h1, h2

28

Demo

29

Cond1 Cond2

~Cond1 ~Cond2

30

Cond1 Cond2

~Cond1 ~Cond2X

31

Fixing-as-you go

Demo

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

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

34

Test Manager PlatformSystematic authoring, management, execution,

and reporting of test cases

Unites together a broad set of

capabilities

Simulink Test

35

MATLAB Script Criteria

36

Value

Tolerance

Time

Tolerance

37

Top-It-Off Workflow

Run Existing Tests

Aggregate Coverage

1

Simulink Design Verifier

Generate Test Cases

2

Run New Tests

Aggregate Coverage

3

38

39

Any continuous integration system that supports

Test Anything Protocol (TAP)

Integration with Test Automation Servers

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

41

Equivalence Checking and Code Coverage (Software-In-Loop)

42

Justification for Code Coverage

Justify

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

44

Model Based Design helps to…

Productivity

+Quality

Check

Fix

Slice

Test

Prove

Continuous Test &

Verification

Repeat

Slice

Fix

Check

Test

45

MathWorks Training Offerings

http://www.mathworks.com/services/training/

46

Speaker Details

Manohar Reddy

Email: [email protected]

Contact MathWorks India

Call: 080-6632-6000

Email: [email protected]


Recommended