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

43
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 · Growing Complexity of Automotive Controls Engine Management...

Page 1: Vision for Systematic V&V · Growing Complexity of Automotive Controls Engine Management Transmission Control Forward Camera Electric Power Steering ... Lighting Power Window 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 · Growing Complexity of Automotive Controls Engine Management Transmission Control Forward Camera Electric Power Steering ... Lighting Power Window 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 · Growing Complexity of Automotive Controls Engine Management Transmission Control Forward Camera Electric Power Steering ... Lighting Power Window 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 · Growing Complexity of Automotive Controls Engine Management Transmission Control Forward Camera Electric Power Steering ... Lighting Power Window 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 · Growing Complexity of Automotive Controls Engine Management Transmission Control Forward Camera Electric Power Steering ... Lighting Power Window 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 · Growing Complexity of Automotive Controls Engine Management Transmission Control Forward Camera Electric Power Steering ... Lighting Power Window Power

6

Development Challenges

Representing complex systems

Coordinating work across teams

Working efficiently

Ensuring quality

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

7

Traditional Development Process

Textual

Requirements

Design

Specification

C/C++

Hand code

Object

code

Compilation

and Linking

Manual

Coding

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

8

Models for Specification

Textual

Requirements

C/C++

Hand code

Object

code

Compilation

and Linking

Manual

Coding

Executable

Specification

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

9

Model Abstraction – Work at an appropriate level of detail

Simulink

Simulink

Stateflow MATLAB

Simscape

Driveline

Simscape Multibody

Simscape Fluids

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

10

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 11: Vision for Systematic V&V · Growing Complexity of Automotive Controls Engine Management Transmission Control Forward Camera Electric Power Steering ... Lighting Power Window Power

11

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 12: Vision for Systematic V&V · Growing Complexity of Automotive Controls Engine Management Transmission Control Forward Camera Electric Power Steering ... Lighting Power Window Power

12

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 13: Vision for Systematic V&V · Growing Complexity of Automotive Controls Engine Management Transmission Control Forward Camera Electric Power Steering ... Lighting Power Window Power

13

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 14: Vision for Systematic V&V · Growing Complexity of Automotive Controls Engine Management Transmission Control Forward Camera Electric Power Steering ... Lighting Power Window Power

14

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

Review and

static analysis

Equivalence

testing

Equivalence

checking

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

15

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

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

16

Ad-Hoc Simulation: Explore Behavior Virtually

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

17

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

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

18

Test Harnesses

From any subsystem …

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

19

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 20: Vision for Systematic V&V · Growing Complexity of Automotive Controls Engine Management Transmission Control Forward Camera Electric Power Steering ... Lighting Power Window Power

20

Test Sequence Block

A test sequence block can drive

inputs

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

21

Test Sequence Block

A test sequence block can drive

inputs and asses outputs

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

22

Test Sequence Block Syntax

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

23

Test Sequence Block Syntax

Define

Inputs

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

24

Defining Pass/Fail Criteria

x

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

25

Model Coverage

Identify testing gaps:

• Untested switch positions

• Subsystems not executed

• Transitions not taken

• Many more …

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

26

Addressing Missing Coverage

Test Cases

Partial Coverage

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

27

Test

Generator

Simulink Design Verifier

Addressing Missing Coverage

Test Cases

Partial Coverage

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

28

Addressing Missing Coverage

Test Cases

Partial Coverage

Test

Generator

Simulink Design Verifier

New Test Cases

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

29

Addressing Missing Coverage

Test Cases

Full Coverage

New Test Cases

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

30

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

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

31

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

Component and system

testing

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

32

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 33: Vision for Systematic V&V · Growing Complexity of Automotive Controls Engine Management Transmission Control Forward Camera Electric Power Steering ... Lighting Power Window Power

33

Detecting Hidden Run-Time Design Errors

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

34

Detecting Hidden Run-Time Design Errors

Page 35: Vision for Systematic V&V · Growing Complexity of Automotive Controls Engine Management Transmission Control Forward Camera Electric Power Steering ... Lighting Power Window 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

Equivalence

checking

• Perform SIL Testing

• Measure code coverage

• Verify code with Polyspace

• Verify consistency with Simulink

Code Inspector

Review and

static analysis

Component and system

testing

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

36

Coverage for Generated Code (R2016a)

Press Play

Generated Code Coverage

cruise_control

(SIL)

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

37

Coverage for Generated Code (R2016a)

Press Play

Can also be highlighted on model

cruise_control

(SIL)

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

38

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

• Perform PIL Testing

• Perform HIL Testing

Equivalence

testingEquivalence

checkingReview and

static analysis

Component and system

testing

Page 39: Vision for Systematic V&V · Growing Complexity of Automotive Controls Engine Management Transmission Control Forward Camera Electric Power Steering ... Lighting Power Window 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

Component and system

testing

Review and

static analysis

Equivalence

testing

Equivalence

checking

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

40

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 41: Vision for Systematic V&V · Growing Complexity of Automotive Controls Engine Management Transmission Control Forward Camera Electric Power Steering ... Lighting Power Window Power

41

• Essential activity

Test and Verification

• Expensive to repeat

• Complex to execute

Pain Points

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

42

→ Faster

Test and Verification

• Essential

• Expensive

• Complex

→ More Complete

→ Simpler

Frequent,

Incremental

T&V

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

43

Thank You!