Top Banner
1 © 2015 The MathWorks, Inc. Simplifying Requirements Based Verification with Model-Based Design Vamshi Kumbham Pilot Engineering
33

Simplifying Requirements-Based Verification with Model ...

May 05, 2023

Download

Documents

Khang Minh
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Simplifying Requirements-Based Verification with Model ...

1© 2015 The MathWorks, Inc.

Simplifying Requirements Based

Verification with Model-Based

Design

Vamshi Kumbham

Pilot Engineering

Page 2: Simplifying Requirements-Based Verification with Model ...

2

Key takeaways

▪ Verify and validate requirements earlier

▪ Identify inconsistencies in requirements by using unambiguous

assessments

▪ Traceability from requirements to design and test

“By enabling us to analyze requirements quickly, reuse designs from previous products,

and eliminate manual coding errors, Model-Based Design has reduced development

times and enabled us to shorten schedules to meet the needs of our customers.”

- MyoungSuk Ko, LS Automotive

Page 3: Simplifying Requirements-Based Verification with Model ...

3

Requirements

Challenge: Errors introduced early but found late

Specification C/C++

Generated code

Most errors

introduced

Unit test finds some

errors

Errors found during

integration or in field

Page 4: Simplifying Requirements-Based Verification with Model ...

4

Requirements

Cost of finding errors increases over time

Specification C/C++

Generated code

Time

TestingCost

Page 5: Simplifying Requirements-Based Verification with Model ...

5

Requirements

Challenges with requirements based verification

Specification C/C++

Generated code

Is requirement

interpreted

correctly?

Is the implementation

functioning correctly?

Are all

requirements

implemented?

How to avoid

modifying the

design for test?

Page 6: Simplifying Requirements-Based Verification with Model ...

6

Simulink models for specification

Requirements C/C++Design

Model

Generated code

Model-Based Design enables:

▪ Early testing to increase confidence in your design

▪ Delivery of higher quality software throughout the workflow

Page 7: Simplifying Requirements-Based Verification with Model ...

7

Multiple languages to describe complex systems

Requirements C/C++Design

Model

Generated code

Page 8: Simplifying Requirements-Based Verification with Model ...

8

Ad-Hoc Testing: Explore behavior and design alternatives

Requirements C/C++Design

Model

Generated code

Page 9: Simplifying Requirements-Based Verification with Model ...

9

Validate behavior earlier with simulation

Page 10: Simplifying Requirements-Based Verification with Model ...

10

Validate Behavior Earlier with Simulation

Page 11: Simplifying Requirements-Based Verification with Model ...

11

Complete Model Based Design

Code

Generation

RequirementsDesign

Model

Model used for

production code

generation

Simulink Models

C/C++

Generated code

Page 12: Simplifying Requirements-Based Verification with Model ...

12

Systematically verify requirements

RequirementsDesign

Model

Model used for

production code

generation

Simulink Models

C/C++

Generated code

Are all requirements implemented?

Is the implementation functioning correctly?

Are designs and requirements consistent?Requirements

Based Testing

Page 13: Simplifying Requirements-Based Verification with Model ...

13

Integrate with requirements tools and author requirements

Simulink Requirements

Authored Requirements

External Requirements

External

Requirements

Requirements

Managements

Tools

• Import from:

• Word / Excel

• IBM® Rational®

DOORS®

• ReqIF™ standard

• Update synchronizes

changes from source

• Edit and add further

details to import

• Author requirements

• Export ReqIF

• Enables roundtrip with

external tools

Import

Update

Export

Page 14: Simplifying Requirements-Based Verification with Model ...

14

Roundtrip workflow with external tools thru ReqIF

Simulink Requirements

Authored Requirements

External Requirements

External

Requirements

Requirements

Managements

Tools

• Import from:

• Word / Excel

• IBM® Rational®

DOORS®

• ReqIF™ standard

• Update synchronizes

changes from source

• Edit and add further

details to import

• Author requirements

• Export ReqIF

• Enables roundtrip with

external tools

Page 15: Simplifying Requirements-Based Verification with Model ...

15

Test Case

Requirements Verification with Simulink

Implemented

By

Test Harness

Inputs

Test Sequence

Signal Editor

Assessments

Test

Assessments

MATLAB Unit Test

Verified

By

Simulink / Stateflow

Simulink Test

MAT / Excel

file (input)

MAT / Excel

File (baseline)

Requirements

Page 16: Simplifying Requirements-Based Verification with Model ...

16

Test Case

Requirements Verification with Simulink

Implemented

By

Test Harness

Inputs

Test Sequence

Signal Editor

Assessments

Test

Assessments

MATLAB Unit Test

Verified

By

Simulink / Stateflow

Simulink Test

MAT / Excel

file (input)

MAT / Excel

File (baseline)

Requirements

Page 17: Simplifying Requirements-Based Verification with Model ...

17

Example: Verifying Heat Pump Controller Requirements

Requirements in DOORS

Page 18: Simplifying Requirements-Based Verification with Model ...

18

Example: Heat Pump Controller Implementation

Page 19: Simplifying Requirements-Based Verification with Model ...

19

Link requirements to implementation in model

Page 20: Simplifying Requirements-Based Verification with Model ...

20

Work with Model and Requirements with Requirements

Perspective

Requirement

Annotations

Badges

Implementation and

Verification Status

Browser

Property

Inspector

Page 21: Simplifying Requirements-Based Verification with Model ...

23

Isolate Component Under Test with Test Harness

Page 22: Simplifying Requirements-Based Verification with Model ...

24

Test Sequence Block: Step-based and temporal test sequences

Page 23: Simplifying Requirements-Based Verification with Model ...

25

Test Assessments: Formalize and execute requirements

Activate Heat Pump

If the temperature difference

exceeds 2 degrees for more

than 2 seconds, then the

pump shall activate for at

least 2 seconds

Page 24: Simplifying Requirements-Based Verification with Model ...

26

Author temporal assessments using form based editor

Page 25: Simplifying Requirements-Based Verification with Model ...

27

Execute assessments to verify requirements

Page 26: Simplifying Requirements-Based Verification with Model ...

28

Locate implementation of requirement using link

Page 27: Simplifying Requirements-Based Verification with Model ...

29

Translate textual requirements into unambiguous Temporal

Assessments

• Compose assessments

using form based editor

• View assessments as

English-like sentence

• Review and debug

temporal assessment

results

• Link to requirements

Temporal Assessment Editor

View and Debug Assessment Results

Page 28: Simplifying Requirements-Based Verification with Model ...

30

Track Implementation and Verification

Implemented

Justified

Implementation Status

Missing

Passed

Failed

Unexecuted

Missing

Verification Status

Page 29: Simplifying Requirements-Based Verification with Model ...

31

Observers: Separate test/verification logic from design

• Access nested signals

without signal lines or

changing dynamic response

• Avoid modifying interface

for testing

• Simplify design and test by

avoiding additional signal

lines

Design Model

Page 30: Simplifying Requirements-Based Verification with Model ...

32

Observers: Separate test/verification logic from design

• Access nested signals

without signal lines or

changing dynamic

response

• Avoid modifying interface

for testing

• Simplify design and test by

avoiding additional signal

lines

Observer Model

Design Model

Page 31: Simplifying Requirements-Based Verification with Model ...

33

LS Automotive Reduces Development Time for Automotive

Component Software with Model-Based Design

Challenge

Shorten development times for embedded control

software used in automotive switches and components

Solution

Use Model-Based Design to model controller designs,

run simulations, verify customer specifications, and

generate error-free production code

Results

▪ Specification errors detected early

▪ Proven development approach established

▪ 80% Coding errors eliminated

“By enabling us to analyze requirements quickly, reuse designs

from previous products, and eliminate manual coding errors,

Model-Based Design has reduced development times and

enabled us to shorten schedules to meet the needs of our

customers.”

- MyoungSuk Ko, LS Automotive

Link to user story

An LS Automotive door area unit.

Page 32: Simplifying Requirements-Based Verification with Model ...

34

Summary

▪ Verify and validate requirements earlier

▪ Identify inconsistencies in requirements

by using unambiguous assessments

▪ Traceability from requirements to design

and test

Page 33: Simplifying Requirements-Based Verification with Model ...

35

Learn More

Key products covered in this presentation:

▪ Simulink Requirements

▪ Simulink Test

Learn more at Verification, Validation and Test Solution Page:

mathworks.com/solutions/verification-validation.html