Vision for Systematic V&V - MathWorks · Growing Complexity of Automotive Controls Engine...

50
1 © 2016 The MathWorks, Inc. MathWorks Vision for Systematic Verification and Validation Bill Aldrich Senior Development Manager Simulink Verification and Validation, Simulink Design Verifier

Transcript of Vision for Systematic V&V - MathWorks · Growing Complexity of Automotive Controls Engine...

Page 1: Vision for Systematic V&V - MathWorks · Growing Complexity of Automotive Controls Engine Management Transmission Control Forward Camera Electric Power Steering ... Lighting Power

1© 2016 The MathWorks, Inc.

MathWorks Vision for Systematic

Verification and Validation

Bill Aldrich

Senior Development Manager

Simulink Verification and Validation, Simulink Design Verifier

Page 2: Vision for Systematic V&V - MathWorks · Growing Complexity of Automotive Controls Engine Management Transmission Control Forward Camera Electric Power Steering ... Lighting Power

2

Growing Complexity of Automotive Controls

Engine Management

Transmission Control

Forward Camera

Electric Power Steering

Smart Junction Box

Smart Junction Box

Battery Management

Propulsion Motor Control

DC/DC Converter

Stability Control

Infotainment

HVAC Control

Navigation

Instrument Panel

Vehicle-to-Vehicle

Vehicle-to-

Infrastructure

Short-Range Radar

Ultrasonic Sensor

Long-Range Radar

Stability Control

AirbagEmergency Braking

Automatic Parking

Adaptive Cruise Control

All-Wheel Drive

Active Damping

4-Wheel Steer

Back-up Camera

Body Control Module

Tire Pressure Monitor

Voice Recognition

Adaptive Front

Lighting

Power Window

Power Seat

Keyless Entry

Power Liftgate

E-Call

Source of graphic: http://360.here.com/2013/11/28/putting-firmly-drivers-seat/

Page 3: Vision for Systematic V&V - MathWorks · Growing Complexity of Automotive Controls Engine Management Transmission Control Forward Camera Electric Power Steering ... Lighting Power

3

Growing Complexity of Automotive Controls

Engine Management

Transmission Control

Forward Camera

Electric Power Steering

Smart Junction Box

Smart Junction Box

Battery Management

Propulsion Motor Control

DC/DC Converter

Stability Control

Infotainment

HVAC Control

Navigation

Instrument Panel

Vehicle-to-Vehicle

Vehicle-to-

Infrastructure

Short-Range Radar

Ultrasonic Sensor

Long-Range Radar

Stability Control

AirbagEmergency Braking

Automatic Parking

Adaptive Cruise Control

All-Wheel Drive

Active Damping

4-Wheel Steer

Back-up Camera

Body Control Module

Tire Pressure Monitor

Voice Recognition

Adaptive Front

Lighting

Power Window

Power Seat

Keyless Entry

Power Liftgate

E-Call

2000 2015Lines of Code

16 M

2-3M

6 M

Siemens, “Ford Motor Company Case Study,” Siemens PLM Software, 2014

McKendrick, J. “Cars become ‘datacenters on wheels’, carmakers become software companies,” ZDJNet, 2013

Page 4: Vision for Systematic V&V - MathWorks · Growing Complexity of Automotive Controls Engine Management Transmission Control Forward Camera Electric Power Steering ... Lighting Power

4

Growing Complexity of Automotive Controls

Engine Management

Transmission Control

Forward Camera

Electric Power Steering

Smart Junction Box

Smart Junction Box

Battery Management

Propulsion Motor Control

DC/DC Converter

Stability Control

Infotainment

HVAC Control

Navigation

Instrument Panel

Vehicle-to-Vehicle

Vehicle-to-

Infrastructure

Short-Range Radar

Ultrasonic Sensor

Long-Range Radar

Stability Control

AirbagEmergency Braking

Automatic Parking

Adaptive Cruise Control

All-Wheel Drive

Active Damping

4-Wheel Steer

Back-up Camera

Body Control Module

Tire Pressure Monitor

Voice Recognition

Adaptive Front

Lighting

Power Window

Power Seat

Keyless Entry

Power Liftgate

E-Call

2000 2015Lines of Code

16 M

2-3M

6 M500K

50M+

3-4M

100MToday cars

Ford Taurus

2012

Boeing 777

Space

Shuttle

Source:

https://interact.gsa.gov/sites/default/files/J3061%20JP%20presentation.pdf

Page 5: Vision for Systematic V&V - MathWorks · Growing Complexity of Automotive Controls Engine Management Transmission Control Forward Camera Electric Power Steering ... Lighting Power

5

Growing Complexity of Automotive Controls

Engine Management

Transmission Control

Forward Camera

Electric Power Steering

Smart Junction Box

Smart Junction Box

Battery Management

Propulsion Motor Control

DC/DC Converter

Stability Control

Infotainment

HVAC Control

Navigation

Instrument Panel

Vehicle-to-Vehicle

Vehicle-to-

Infrastructure

Short-Range Radar

Ultrasonic Sensor

Long-Range Radar

Stability Control

AirbagEmergency Braking

Automatic Parking

Adaptive Cruise Control

All-Wheel Drive

Active Damping

4-Wheel Steer

Back-up Camera

Body Control Module

Tire Pressure Monitor

Voice Recognition

Adaptive Front

Lighting

Power Window

Power Seat

Keyless Entry

Power Liftgate

E-Call

Source of graphic: http://360.here.com/2013/11/28/putting-firmly-drivers-seat/

Page 6: Vision for Systematic V&V - MathWorks · Growing Complexity of Automotive Controls Engine Management Transmission Control Forward Camera Electric Power Steering ... Lighting Power

6

Development Challenges

Page 7: Vision for Systematic V&V - MathWorks · Growing Complexity of Automotive Controls Engine Management Transmission Control Forward Camera Electric Power Steering ... Lighting Power

7

Development Challenges

Representing complex systems

Page 8: Vision for Systematic V&V - MathWorks · Growing Complexity of Automotive Controls Engine Management Transmission Control Forward Camera Electric Power Steering ... Lighting Power

8

Development Challenges

Representing complex systems

Coordinating work across teams

Page 9: Vision for Systematic V&V - MathWorks · Growing Complexity of Automotive Controls Engine Management Transmission Control Forward Camera Electric Power Steering ... Lighting Power

9

Development Challenges

Representing complex systems

Coordinating work across teams

Working efficiently

Page 10: Vision for Systematic V&V - MathWorks · Growing Complexity of Automotive Controls Engine Management Transmission Control Forward Camera Electric Power Steering ... Lighting Power

10

Development Challenges

Representing complex systems

Coordinating work across teams

Working efficiently

Ensuring quality

Page 11: Vision for Systematic V&V - MathWorks · Growing Complexity of Automotive Controls Engine Management Transmission Control Forward Camera Electric Power Steering ... Lighting Power

11

Traditional Development Process

Textual

Requirements

Design

Specification

C/C++

Hand code

Object

code

Compilation

and Linking

Manual

Coding

Page 12: Vision for Systematic V&V - MathWorks · Growing Complexity of Automotive Controls Engine Management Transmission Control Forward Camera Electric Power Steering ... Lighting Power

12

Models for Specification

Textual

Requirements

C/C++

Hand code

Object

code

Compilation

and Linking

Manual

Coding

Executable

Specification

Page 13: Vision for Systematic V&V - MathWorks · Growing Complexity of Automotive Controls Engine Management Transmission Control Forward Camera Electric Power Steering ... Lighting Power

13

Model Abstraction – Work at an appropriate level of detail

Simulink

Simulink

Stateflow MATLAB

Simscape

Driveline

Simscape Multibody

Simscape Fluids

Page 14: Vision for Systematic V&V - MathWorks · Growing Complexity of Automotive Controls Engine Management Transmission Control Forward Camera Electric Power Steering ... Lighting Power

14

Complete Model Based Design Workflow, Concept to Code

Textual

Requirements

Generated

C/C++ code

Object

code

ModellingCompilation

and Linking

Code

Generation

Executable

Specification

Model used for

production code

generation

Page 15: Vision for Systematic V&V - MathWorks · Growing Complexity of Automotive Controls Engine Management Transmission Control Forward Camera Electric Power Steering ... Lighting Power

15

Complete Model Based Design Workflow, Concept to Code

Textual

Requirements

Executable

Specification

Model used for

production code

generation

Generated

C/C++ code

Object

code

ModellingCompilation

and Linking

Code

Generation

How do you ensure correctness?

Page 16: Vision for Systematic V&V - MathWorks · Growing Complexity of Automotive Controls Engine Management Transmission Control Forward Camera Electric Power Steering ... Lighting Power

16

Model-Based Design Maturity, Automotive Industry

0

20

40

60

80

100

Modeling

Simulation and Analysis

Implementation

Verification andValidation

Process, Toolsand Infrastructure

Enterprise Management

Page 17: Vision for Systematic V&V - MathWorks · Growing Complexity of Automotive Controls Engine Management Transmission Control Forward Camera Electric Power Steering ... Lighting Power

17

Model-Based Design Maturity, Automotive and Aerospace

0

20

40

60

80

100

Modeling

Simulation and Analysis

Implementation

Verification andValidation

Process, Toolsand Infrastructure

Enterprise Management

Automotive

Aerospace

Page 18: Vision for Systematic V&V - MathWorks · Growing Complexity of Automotive Controls Engine Management Transmission Control Forward Camera Electric Power Steering ... Lighting Power

18

Model Based Design Verification Workflow

Textual

Requirements

Executable

Specification

Model used for

production code

generation

Generated

C/C++ code

Object

code

ModellingCompilation

and Linking

Code

Generation

Component and system

testingEquivalence

testing

Equivalence

checking

Review and

static analysis

Simulink Models

Page 19: Vision for Systematic V&V - MathWorks · Growing Complexity of Automotive Controls Engine Management Transmission Control Forward Camera Electric Power Steering ... Lighting Power

19

Model Based Design Verification Workflow

Textual

Requirements

Executable

Specification

Model used for

production code

generation

Generated

C/C++ code

Object

code

ModellingCompilation

and Linking

Code

Generation

Component and system

testing

• Perform simulation

• Link and review requirements

• Isolate and test components

• Measure model coverage

• Address missing coverage

• Property proving

Simulink Models

Page 20: Vision for Systematic V&V - MathWorks · Growing Complexity of Automotive Controls Engine Management Transmission Control Forward Camera Electric Power Steering ... Lighting Power

20

Ad-Hoc Simulation: Explore Behavior Virtually

Page 21: Vision for Systematic V&V - MathWorks · Growing Complexity of Automotive Controls Engine Management Transmission Control Forward Camera Electric Power Steering ... Lighting Power

21

Model Based Design Verification Workflow

Textual

Requirements

Executable

Specification

Model used for

production code

generation

Generated

C/C++ code

Object

code

ModellingCompilation

and Linking

Code

Generation

Component and system

testing

• Perform simulation

• Link and review requirements

• Isolate and test components

• Measure model coverage

• Generate tests for missing coverage

• Manage and organize tests

• Property proving

Simulink Models

Page 22: Vision for Systematic V&V - MathWorks · Growing Complexity of Automotive Controls Engine Management Transmission Control Forward Camera Electric Power Steering ... Lighting Power

22

Test Harnesses

From any subsystem …

Page 23: Vision for Systematic V&V - MathWorks · Growing Complexity of Automotive Controls Engine Management Transmission Control Forward Camera Electric Power Steering ... Lighting Power

23

Test Harnesses

Isolate it with content it to

drive inputs and analyze

outputs

Can be embedded in design

model file.

From any subsystem …

Simulate

independently

Page 24: Vision for Systematic V&V - MathWorks · Growing Complexity of Automotive Controls Engine Management Transmission Control Forward Camera Electric Power Steering ... Lighting Power

24

Test Sequence Block

A test sequence block can drive

inputs

Page 25: Vision for Systematic V&V - MathWorks · Growing Complexity of Automotive Controls Engine Management Transmission Control Forward Camera Electric Power Steering ... Lighting Power

25

Test Sequence Block

A test sequence block can drive

inputs and asses outputs

Page 26: Vision for Systematic V&V - MathWorks · Growing Complexity of Automotive Controls Engine Management Transmission Control Forward Camera Electric Power Steering ... Lighting Power

26

Test Sequence Block Syntax

Page 27: Vision for Systematic V&V - MathWorks · Growing Complexity of Automotive Controls Engine Management Transmission Control Forward Camera Electric Power Steering ... Lighting Power

27

Test Sequence Block Syntax

Define

Inputs

Page 28: Vision for Systematic V&V - MathWorks · Growing Complexity of Automotive Controls Engine Management Transmission Control Forward Camera Electric Power Steering ... Lighting Power

28

Defining Pass/Fail Criteria

x

Page 29: Vision for Systematic V&V - MathWorks · Growing Complexity of Automotive Controls Engine Management Transmission Control Forward Camera Electric Power Steering ... Lighting Power

29

Model Coverage

Identify testing gaps:

• Untested switch positions

• Subsystems not executed

• Transitions not taken

• Many more …

Page 30: Vision for Systematic V&V - MathWorks · Growing Complexity of Automotive Controls Engine Management Transmission Control Forward Camera Electric Power Steering ... Lighting Power

30

Addressing Missing Coverage

Test Cases

Partial Coverage

Page 31: Vision for Systematic V&V - MathWorks · Growing Complexity of Automotive Controls Engine Management Transmission Control Forward Camera Electric Power Steering ... Lighting Power

31

Test

Generator

Simulink Design Verifier

Addressing Missing Coverage

Test Cases

Partial Coverage

Page 32: Vision for Systematic V&V - MathWorks · Growing Complexity of Automotive Controls Engine Management Transmission Control Forward Camera Electric Power Steering ... Lighting Power

32

Addressing Missing Coverage

Test Cases

Partial Coverage

Test

Generator

Simulink Design Verifier

New Test Cases

Page 33: Vision for Systematic V&V - MathWorks · Growing Complexity of Automotive Controls Engine Management Transmission Control Forward Camera Electric Power Steering ... Lighting Power

33

Addressing Missing Coverage

Test Cases

Full Coverage

New Test Cases

Page 34: Vision for Systematic V&V - MathWorks · Growing Complexity of Automotive Controls Engine Management Transmission Control Forward Camera Electric Power Steering ... Lighting Power

34

Model Based Design Verification Workflow

Textual

Requirements

Executable

Specification

Model used for

production code

generation

Generated

C/C++ code

Object

code

ModellingCompilation

and Linking

Code

Generation

Component and system

testing

• Perform simulation

• Link and review requirements

• Isolate and test components

• Measure model coverage

• Generate tests for missing coverage

• Manage and organize tests

• Property proving

Simulink Models

Page 35: Vision for Systematic V&V - MathWorks · Growing Complexity of Automotive Controls Engine Management Transmission Control Forward Camera Electric Power Steering ... Lighting Power

35

Model Based Design Verification Workflow

Textual

Requirements

Executable

Specification

Model used for

production code

generation

Generated

C/C++ code

Object

code

ModellingCompilation

and Linking

Code

Generation

Review and

static analysis

• Manual review

• Standards compliance checking

• Design error detection

• Complexity analysis

Simulink Models

Page 36: Vision for Systematic V&V - MathWorks · Growing Complexity of Automotive Controls Engine Management Transmission Control Forward Camera Electric Power Steering ... Lighting Power

36

Detecting Hidden Run-Time Design Errors

Design Model

Design error detection

Highlighted Model Integer overflow

Division by zero

Array out-of-bounds

Range violations

Dead Logic

Page 37: Vision for Systematic V&V - MathWorks · Growing Complexity of Automotive Controls Engine Management Transmission Control Forward Camera Electric Power Steering ... Lighting Power

37

Detecting Hidden Run-Time Design Errors

Page 38: Vision for Systematic V&V - MathWorks · Growing Complexity of Automotive Controls Engine Management Transmission Control Forward Camera Electric Power Steering ... Lighting Power

38

Detecting Hidden Run-Time Design Errors

Page 39: Vision for Systematic V&V - MathWorks · Growing Complexity of Automotive Controls Engine Management Transmission Control Forward Camera Electric Power Steering ... Lighting Power

39

Model Based Design Verification Workflow

Textual

Requirements

Executable

Specification

Model used for

production code

generation

Generated

C/C++ code

Object

code

ModellingCompilation

and Linking

Code

Generation

Equivalence

checking

• Perform SIL Testing

• Measure code coverage

• Verify code with Polyspace

• Verify consistency with Simulink

Code Inspector

Page 40: Vision for Systematic V&V - MathWorks · Growing Complexity of Automotive Controls Engine Management Transmission Control Forward Camera Electric Power Steering ... Lighting Power

40

Coverage for Generated Code (R2016a)

cruise_control

(SIL)

Page 41: Vision for Systematic V&V - MathWorks · Growing Complexity of Automotive Controls Engine Management Transmission Control Forward Camera Electric Power Steering ... Lighting Power

41

Coverage for Generated Code (R2016a)

Press Play

cruise_control

(SIL)

Page 42: Vision for Systematic V&V - MathWorks · Growing Complexity of Automotive Controls Engine Management Transmission Control Forward Camera Electric Power Steering ... Lighting Power

42

Coverage for Generated Code (R2016a)

Press Play

Generated Code Coverage

cruise_control

(SIL)

Page 43: Vision for Systematic V&V - MathWorks · Growing Complexity of Automotive Controls Engine Management Transmission Control Forward Camera Electric Power Steering ... Lighting Power

43

Coverage for Generated Code (R2016a)

Press Play

Can also be highlighted on model

cruise_control

(SIL)

Page 44: Vision for Systematic V&V - MathWorks · Growing Complexity of Automotive Controls Engine Management Transmission Control Forward Camera Electric Power Steering ... Lighting Power

44

Model Based Design Verification Workflow

Textual

Requirements

Executable

Specification

Model used for

production code

generation

Generated

C/C++ code

Object

code

ModellingCompilation

and Linking

Code

Generation

Equivalence

testing

• Perform PIL Testing

• Perform HIL Testing

Page 45: Vision for Systematic V&V - MathWorks · Growing Complexity of Automotive Controls Engine Management Transmission Control Forward Camera Electric Power Steering ... Lighting Power

45

Model Based Design Verification Workflow

Textual

Requirements

Executable

Specification

Model used for

production code

generation

Generated

C/C++ code

Object

code

ModellingCompilation

and Linking

Code

Generation

Component and system

testingEquivalence

testing

Equivalence

checking

Review and

static analysis

Simulink Models

Page 46: Vision for Systematic V&V - MathWorks · Growing Complexity of Automotive Controls Engine Management Transmission Control Forward Camera Electric Power Steering ... Lighting Power

46

Model Based Design Verification Workflow

Page 47: Vision for Systematic V&V - MathWorks · Growing Complexity of Automotive Controls Engine Management Transmission Control Forward Camera Electric Power Steering ... Lighting Power

47

Systematic Verification

Simulink Design Verifier

Simulink Verification & Validation

Simulink Test

Ensure that verification

is systematically

performed across:

– All requirements

– Complete model structure

– Complete code structure

– All design behaviors

Page 48: Vision for Systematic V&V - MathWorks · Growing Complexity of Automotive Controls Engine Management Transmission Control Forward Camera Electric Power Steering ... Lighting Power

48

• Essential activity

Test and Verification

• Expensive to repeat

• Complex to execute

Pain Points

Page 49: Vision for Systematic V&V - MathWorks · Growing Complexity of Automotive Controls Engine Management Transmission Control Forward Camera Electric Power Steering ... Lighting Power

49

→ Faster

Test and Verification

• Essential

• Expensive

• Complex

→ More Complete

→ Simpler

Frequent,

Incremental

T&V

Page 50: Vision for Systematic V&V - MathWorks · Growing Complexity of Automotive Controls Engine Management Transmission Control Forward Camera Electric Power Steering ... Lighting Power

50

Thank You!