58
1 © 2020 The MathWorks, Inc. June 30, 2020 | Europe Model-Based Engineering Platform to Manage Complexity and Scale Ramamurthy Mani Engineering Director, Simulink Semantics The MathWorks Inc.

Model-Based Engineering Platform to Manage Complexity and ... · Design Complexity 3. Collaborative Engineering. 4 Evolving for ... Strategy: Continuously evolve Simulink to be a

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Model-Based Engineering Platform to Manage Complexity and ... · Design Complexity 3. Collaborative Engineering. 4 Evolving for ... Strategy: Continuously evolve Simulink to be a

1© 2020 The MathWorks, Inc.

June 30, 2020 | Europe

Model-Based Engineering Platform to

Manage Complexity and Scale

Ramamurthy ManiEngineering Director, Simulink Semantics

The MathWorks Inc.

Page 2: Model-Based Engineering Platform to Manage Complexity and ... · Design Complexity 3. Collaborative Engineering. 4 Evolving for ... Strategy: Continuously evolve Simulink to be a

2

Our theme today:

Evolution

1990

Simulab

Simulink

StateflowSimscape

RTW

Coder

V&V

Page 3: Model-Based Engineering Platform to Manage Complexity and ... · Design Complexity 3. Collaborative Engineering. 4 Evolving for ... Strategy: Continuously evolve Simulink to be a

3

The Three Evolutionary Forces at Play

1. Simulation Scale

2. Design Complexity

3. Collaborative Engineering

Page 4: Model-Based Engineering Platform to Manage Complexity and ... · Design Complexity 3. Collaborative Engineering. 4 Evolving for ... Strategy: Continuously evolve Simulink to be a

4

Evolving for Simulation Scale

https://www.quantamagazine.org/how-humans-evolved-supersize-brains-20151110/

Page 5: Model-Based Engineering Platform to Manage Complexity and ... · Design Complexity 3. Collaborative Engineering. 4 Evolving for ... Strategy: Continuously evolve Simulink to be a

5

Trend: Demand for scaled up simulation capabilities

Full Vehicle Simulation

Page 6: Model-Based Engineering Platform to Manage Complexity and ... · Design Complexity 3. Collaborative Engineering. 4 Evolving for ... Strategy: Continuously evolve Simulink to be a

6

Strategy: Continuously evolve Simulink to be a best in class

Simulation Integration Platform

3rd party tool 3rd party tool

Simscape

Windows

Linux

S-Function

Hand C/C++ Code

MATLAB

Deep Learning NN

Page 7: Model-Based Engineering Platform to Manage Complexity and ... · Design Complexity 3. Collaborative Engineering. 4 Evolving for ... Strategy: Continuously evolve Simulink to be a

7

The primary challenges for simulation scale

PerformanceIntegration Operationalization

Page 8: Model-Based Engineering Platform to Manage Complexity and ... · Design Complexity 3. Collaborative Engineering. 4 Evolving for ... Strategy: Continuously evolve Simulink to be a

8

Integration of algorithms with multiple simulation interfaces is key

PerformanceIntegration

Models

Code

Other tools

Integration

Platform for

Operationalization

Page 9: Model-Based Engineering Platform to Manage Complexity and ... · Design Complexity 3. Collaborative Engineering. 4 Evolving for ... Strategy: Continuously evolve Simulink to be a

9

Interface Management

For Models, core modularity principles underpin integration

Data Encapsulation

Models

Code

Tools

[Ts] = 0.1 NCyl = 4

SLDD

[Ts] = 0.2 NCyl = 4

SLDD

Common types, constants, …

SLDD

Model reference Subsystem reference Libraries

Componentization

Page 10: Model-Based Engineering Platform to Manage Complexity and ... · Design Complexity 3. Collaborative Engineering. 4 Evolving for ... Strategy: Continuously evolve Simulink to be a

10

You can easily bring C/C++ code into Simulink

Basic Advanced

S-FunctionS-Function

BuilderC Function

C Caller

Models

Code

Tools

Page 11: Model-Based Engineering Platform to Manage Complexity and ... · Design Complexity 3. Collaborative Engineering. 4 Evolving for ... Strategy: Continuously evolve Simulink to be a

11

You can use MATLAB algorithms like the Deep Learning Toolbox in

Simulink

Deep Learning Toolbox

Tensorflow-

Keras Importer

obj.DLModel = coder.loadDeepLearningNetwork( ‘mydnn.mat’ , ‘network’ )

Models

Code

Tools

Page 12: Model-Based Engineering Platform to Manage Complexity and ... · Design Complexity 3. Collaborative Engineering. 4 Evolving for ... Strategy: Continuously evolve Simulink to be a

12

Simulink has simulation interfaces to 190 connection partner

products and services primarily through the S-Function interface

Models

Code

Tools

Page 13: Model-Based Engineering Platform to Manage Complexity and ... · Design Complexity 3. Collaborative Engineering. 4 Evolving for ... Strategy: Continuously evolve Simulink to be a

13

Using FMUs inside Simulink is easy and expressive

3rd party tool

Models

Code

Tools

Page 14: Model-Based Engineering Platform to Manage Complexity and ... · Design Complexity 3. Collaborative Engineering. 4 Evolving for ... Strategy: Continuously evolve Simulink to be a

14

System-level simulations are computationally expensive

Simulation

Performance

Integrating models

and components

Maximize single thread performance

Exploit parallelism

Enable massive simulation runsOperationalization

Page 15: Model-Based Engineering Platform to Manage Complexity and ... · Design Complexity 3. Collaborative Engineering. 4 Evolving for ... Strategy: Continuously evolve Simulink to be a

15

Maximizing performance by discovering speed-up opportunities:

Performance Advisor

• Consolidated advice

on performance

• Gives advice that

works!

• Helps discover

performance focused

capabilities

Page 16: Model-Based Engineering Platform to Manage Complexity and ... · Design Complexity 3. Collaborative Engineering. 4 Evolving for ... Strategy: Continuously evolve Simulink to be a

16

Host 1 Host 3

Invest in multiple parallelization techniques for boosting performance

MATLAB Function GPU acceleration

ForEach Subsystem Parallelization

Compute Clusters

Fcn

Model block, S-function, FMU import

Dataflow SIMD

Page 17: Model-Based Engineering Platform to Manage Complexity and ... · Design Complexity 3. Collaborative Engineering. 4 Evolving for ... Strategy: Continuously evolve Simulink to be a

17

Design envelope studies require a large number of simulations

Full vehicle modelDriving cycle

100 drive cycles × 10 vehicle loadings × 10 weather conditions

100 simulations1000 simulations10,000 simulations Optimize gear ratios100,000 simulations

Page 18: Model-Based Engineering Platform to Manage Complexity and ... · Design Complexity 3. Collaborative Engineering. 4 Evolving for ... Strategy: Continuously evolve Simulink to be a

18

Setup Simulate Analyze

Simulink enables massive simulation workflows

batchsim

parsim

Simulation

Manager Simulation

Manager

Page 19: Model-Based Engineering Platform to Manage Complexity and ... · Design Complexity 3. Collaborative Engineering. 4 Evolving for ... Strategy: Continuously evolve Simulink to be a

19

Extend simulations to Operational phases of the system

Simulation

Performance

Integrating models

and components

Enable simulation deployment

Operationalization

Page 20: Model-Based Engineering Platform to Manage Complexity and ... · Design Complexity 3. Collaborative Engineering. 4 Evolving for ... Strategy: Continuously evolve Simulink to be a

20

Simulink Compiler enables deployment of simulations

Simulink Compiler

Web

App

Integrate

as

Enterprise

Application

Page 21: Model-Based Engineering Platform to Manage Complexity and ... · Design Complexity 3. Collaborative Engineering. 4 Evolving for ... Strategy: Continuously evolve Simulink to be a

21

Trend: Demand for simulating complex scenarios with multiple

actors is increasing

Scenario Simulations for Autonomy

Page 22: Model-Based Engineering Platform to Manage Complexity and ... · Design Complexity 3. Collaborative Engineering. 4 Evolving for ... Strategy: Continuously evolve Simulink to be a

22

Strategy: Create a platform for system-of-systems (scenario)

simulations Virtual Testbed

Performance

Evaluator

Test Manager

Application

under TestMetrics

Sensor

Models

Scenarios

Scenario

Designer

Cuboid Driving Simulation

Unreal Engine Driving Simulation RoadRunner

Page 23: Model-Based Engineering Platform to Manage Complexity and ... · Design Complexity 3. Collaborative Engineering. 4 Evolving for ... Strategy: Continuously evolve Simulink to be a

23

Simulink platform is evolving to meet the demands of scaled up

simulations

Full Vehicle SimulationScenario Simulations for Autonomy

Simulation

Performance

Integrating models

and components Operationalization Scenario Simulation

Page 24: Model-Based Engineering Platform to Manage Complexity and ... · Design Complexity 3. Collaborative Engineering. 4 Evolving for ... Strategy: Continuously evolve Simulink to be a

24

Evolving for Design Complexity

https://en.wikipedia.org/wiki/Tiktaalik

Page 25: Model-Based Engineering Platform to Manage Complexity and ... · Design Complexity 3. Collaborative Engineering. 4 Evolving for ... Strategy: Continuously evolve Simulink to be a

25

Trend: Some rumblings in the force

MAB Breakout session 2012 on System Architecture

“Not sure you get it…”

Wonder what’s

for lunch?

Page 26: Model-Based Engineering Platform to Manage Complexity and ... · Design Complexity 3. Collaborative Engineering. 4 Evolving for ... Strategy: Continuously evolve Simulink to be a

26

Stakeholder

Needs

Why the discontent?

Descriptive

Architectures

Implementations

Customer quote:

“We have tried to build the architecture model in

SysML and connect it to the design in Simulink …

… does not work without rework both in the

architecture and design worlds whenever a

change is needed. It is broken and we need a

more integrated approach”

Page 27: Model-Based Engineering Platform to Manage Complexity and ... · Design Complexity 3. Collaborative Engineering. 4 Evolving for ... Strategy: Continuously evolve Simulink to be a

27

Happy8%

Meh48%

Sad44%

Survey @ Modeling System Architecture Breakout

Newton MAB - 2018

Are you happy with your current

tool choices for Modeling System

Architecture?

Page 28: Model-Based Engineering Platform to Manage Complexity and ... · Design Complexity 3. Collaborative Engineering. 4 Evolving for ... Strategy: Continuously evolve Simulink to be a

28

0 10 20 30 40 50 60

Not analyzeable

Hard to use

Not synchronized with designs

Not Executable

Percentage %

Newton MAB Survey 2019

More specifically, what are the pains?“We do not like our current System Architecture solution because they are:”

Page 29: Model-Based Engineering Platform to Manage Complexity and ... · Design Complexity 3. Collaborative Engineering. 4 Evolving for ... Strategy: Continuously evolve Simulink to be a

29

Strategy: Build an MBSE Ecosystem that fits with MBD

Requirements Coverage Reporting and Impact Analysis

Simulink Requirements

Simulink

Be Intuitive Facilitate Analysis Tackle Complexity Enable Implementation

MATLAB

System Composer

Page 30: Model-Based Engineering Platform to Manage Complexity and ... · Design Complexity 3. Collaborative Engineering. 4 Evolving for ... Strategy: Continuously evolve Simulink to be a

30

Page 31: Model-Based Engineering Platform to Manage Complexity and ... · Design Complexity 3. Collaborative Engineering. 4 Evolving for ... Strategy: Continuously evolve Simulink to be a

31

“Sketch” system interfaces and

elaborate incrementally

Page 32: Model-Based Engineering Platform to Manage Complexity and ... · Design Complexity 3. Collaborative Engineering. 4 Evolving for ... Strategy: Continuously evolve Simulink to be a

32

Extend elements with your own custom metadata

using Profiles & Stereotypes

Page 33: Model-Based Engineering Platform to Manage Complexity and ... · Design Complexity 3. Collaborative Engineering. 4 Evolving for ... Strategy: Continuously evolve Simulink to be a

33

Analyze system characteristics and

quantitatively evaluate choices using MATLAB

Endurance

4.0997877

Mass

85

PowerDraw

40

Page 34: Model-Based Engineering Platform to Manage Complexity and ... · Design Complexity 3. Collaborative Engineering. 4 Evolving for ... Strategy: Continuously evolve Simulink to be a

34

Trace to system requirements

Refine requirements alongside the architecture

With Simulink Requirements

Page 35: Model-Based Engineering Platform to Manage Complexity and ... · Design Complexity 3. Collaborative Engineering. 4 Evolving for ... Strategy: Continuously evolve Simulink to be a

35

Link design models to components and

ensure consistent interfaces

Page 36: Model-Based Engineering Platform to Manage Complexity and ... · Design Complexity 3. Collaborative Engineering. 4 Evolving for ... Strategy: Continuously evolve Simulink to be a

36

Simplify the complex with Filters

and autogenerated Views

Stereotype isa ElectricalComponent x

Page 37: Model-Based Engineering Platform to Manage Complexity and ... · Design Complexity 3. Collaborative Engineering. 4 Evolving for ... Strategy: Continuously evolve Simulink to be a

37

Simplify the complex with Filters

and autogenerated Views

Stereotype isa ElectricalComponent x

Page 38: Model-Based Engineering Platform to Manage Complexity and ... · Design Complexity 3. Collaborative Engineering. 4 Evolving for ... Strategy: Continuously evolve Simulink to be a

38

And we are only getting started. Coming soon:

• Behavior modeling using Sequence Diagrams

• Architecture Allocations though Analysis (e.g.

Logical to Physical)

• Software Architecture Modeling

• Link to AUTOSAR (R2019b)

• Other middlewares such as DDS

• And much more!

Page 39: Model-Based Engineering Platform to Manage Complexity and ... · Design Complexity 3. Collaborative Engineering. 4 Evolving for ... Strategy: Continuously evolve Simulink to be a

39

Evolving for Collaborative Engineering

https://en.wikipedia.org/wiki/Symbiogenesis

1x

100x

Prokaryote

Eukaryote

1x

Page 40: Model-Based Engineering Platform to Manage Complexity and ... · Design Complexity 3. Collaborative Engineering. 4 Evolving for ... Strategy: Continuously evolve Simulink to be a

40

Trend: An increased demand for Agile team-based workflows

Shared team

environment

Continuous Integration & Test

Collaboration

Simulate

Page 41: Model-Based Engineering Platform to Manage Complexity and ... · Design Complexity 3. Collaborative Engineering. 4 Evolving for ... Strategy: Continuously evolve Simulink to be a

41

Strategy: Continued investments to facilitate Continuous Integration as a

critical lynch-pin in Agile workflows

SubmitDevelopers &

Test Authors

MATLAB Project

Page 42: Model-Based Engineering Platform to Manage Complexity and ... · Design Complexity 3. Collaborative Engineering. 4 Evolving for ... Strategy: Continuously evolve Simulink to be a

42

Can I do CI today in Simulink?

Yes, lets consider an example from

Page 43: Model-Based Engineering Platform to Manage Complexity and ... · Design Complexity 3. Collaborative Engineering. 4 Evolving for ... Strategy: Continuously evolve Simulink to be a

43

Lane Following Assist Example

Simulink Check Checks

SIL Code Generation

SIL Testing Simulink Test

Page 44: Model-Based Engineering Platform to Manage Complexity and ... · Design Complexity 3. Collaborative Engineering. 4 Evolving for ... Strategy: Continuously evolve Simulink to be a

44

How Does It All Fit Together?

Execute Tests in Simulink

Test

Generate Controller

Code

Simulink CheckChecks

Page 45: Model-Based Engineering Platform to Manage Complexity and ... · Design Complexity 3. Collaborative Engineering. 4 Evolving for ... Strategy: Continuously evolve Simulink to be a

45

1. Trigger

Trigger

Page 46: Model-Based Engineering Platform to Manage Complexity and ... · Design Complexity 3. Collaborative Engineering. 4 Evolving for ... Strategy: Continuously evolve Simulink to be a

46

1. Trigger

Verify

Continuous

Integration

Trigger

Running LaneFollowingModelAdvisorChecks

.

Done LaneFollowingModelAdvisorCheck

Simulink Check

Page 47: Model-Based Engineering Platform to Manage Complexity and ... · Design Complexity 3. Collaborative Engineering. 4 Evolving for ... Strategy: Continuously evolve Simulink to be a

47

1. Trigger

Verify

Continuous

Integration

Trigger

Running LaneFollowingModelAdvisorChecks

.

Done LaneFollowingModelAdvisorCheck

Simulink Check

## Caching model source code

.......................................

.......................................

### Writing header file rtGetNaN.h

### Writing source file rtGetNaN.cpp

### Writing header file rt_defines.h

### Writing header file rt_nonfinite.h

### Writing source file rt_nonfinite.cpp

Code Generation

Page 48: Model-Based Engineering Platform to Manage Complexity and ... · Design Complexity 3. Collaborative Engineering. 4 Evolving for ... Strategy: Continuously evolve Simulink to be a

48

2. Detect

Verify

Continuous

Integration

Trigger

Failure Summary:

Name Failed Incomplete Reason(s)

===================================================================================================================

LaneFollowingTestScenarios > Scenarios/LFACC_Curve_CutInOut_TooClose X Failed by verification.

ERROR: MATLAB error Exit Status: 0x00000001

Build step 'Run MATLAB Tests' changed build result to FAILURE

Finished: FAILURE

Simulink Test

Page 49: Model-Based Engineering Platform to Manage Complexity and ... · Design Complexity 3. Collaborative Engineering. 4 Evolving for ... Strategy: Continuously evolve Simulink to be a

49

3. Reproduce

Developers &

Test Authors

Development

ReproduceLocally

Verify

Continuous

Integration

Trigger

Page 50: Model-Based Engineering Platform to Manage Complexity and ... · Design Complexity 3. Collaborative Engineering. 4 Evolving for ... Strategy: Continuously evolve Simulink to be a

50

4. Fix Locally

Developers &

Test Authors

Development

ReproduceLocally

Verify

Continuous

Integration

Trigger

Page 51: Model-Based Engineering Platform to Manage Complexity and ... · Design Complexity 3. Collaborative Engineering. 4 Evolving for ... Strategy: Continuously evolve Simulink to be a

51

5. Test Locally

Developers &

Test Authors

Development

ReproduceLocally

Verify

Continuous

Integration

Trigger

Page 52: Model-Based Engineering Platform to Manage Complexity and ... · Design Complexity 3. Collaborative Engineering. 4 Evolving for ... Strategy: Continuously evolve Simulink to be a

52

6. Merge

Developers &

Test Authors

Development

ReproduceLocally

Verify

Continuous

Integration

Trigger

Page 53: Model-Based Engineering Platform to Manage Complexity and ... · Design Complexity 3. Collaborative Engineering. 4 Evolving for ... Strategy: Continuously evolve Simulink to be a

53

6. Review

Developers &

Test Authors

Development

ReproduceLocally

Verify

Continuous

Integration

Trigger

Page 54: Model-Based Engineering Platform to Manage Complexity and ... · Design Complexity 3. Collaborative Engineering. 4 Evolving for ... Strategy: Continuously evolve Simulink to be a

54

7. Commit

SubmitDevelopers &

Test Authors

Development

Version

Control

ReproduceLocally

Verify

Continuous

Integration

Trigger

Page 55: Model-Based Engineering Platform to Manage Complexity and ... · Design Complexity 3. Collaborative Engineering. 4 Evolving for ... Strategy: Continuously evolve Simulink to be a

55

8. Verify, Build, Test

SubmitDevelopers &

Test Authors

Development

Verify

Continuous

Integration

Version

Control

ReproduceLocally

Verify

Continuous

Integration

Trigger

Finished: SUCCESS

Page 56: Model-Based Engineering Platform to Manage Complexity and ... · Design Complexity 3. Collaborative Engineering. 4 Evolving for ... Strategy: Continuously evolve Simulink to be a

56

Continuous Integration Success is within your reach

Tooling

1Jenkins

Plugin

MATLAB

Unit

Simulink

Test

Future

3DashboardsTest Results

Online

Server

Workflows

Pipeline

Documentation

2Documentation

Hub

Solutions

Page

Technical

Article

Page 57: Model-Based Engineering Platform to Manage Complexity and ... · Design Complexity 3. Collaborative Engineering. 4 Evolving for ... Strategy: Continuously evolve Simulink to be a

57

Lets go back to the broad forces that shape our platform evolution

1. Simulation Scale

2. Design Complexity

3. Collaborative Engineering

YOU!

Page 58: Model-Based Engineering Platform to Manage Complexity and ... · Design Complexity 3. Collaborative Engineering. 4 Evolving for ... Strategy: Continuously evolve Simulink to be a

Please contact us with questions

[email protected]