canape + matlab/simulink5 step 1 (mil): early model development phase in matlab/simulink in the...

21
V1.0 | 2017-11-27 The perfect team for model-based software development CANape + MATLAB/Simulink

Upload: others

Post on 30-Jan-2020

10 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: CANape + MATLAB/Simulink5 Step 1 (MIL): Early model development phase in MATLAB/Simulink In the context of model-based software development > Functions of the application are tested

V1.0 | 2017-11-27

The perfect team for model-based software development

CANape + MATLAB/Simulink

Page 2: CANape + MATLAB/Simulink5 Step 1 (MIL): Early model development phase in MATLAB/Simulink In the context of model-based software development > Functions of the application are tested

2

1. Motivation

2. CANape Option “Simulink XCP Server”

3. CANape/vSignalyzer Target

4. Bypassing

5. Summary

Agenda

Page 3: CANape + MATLAB/Simulink5 Step 1 (MIL): Early model development phase in MATLAB/Simulink In the context of model-based software development > Functions of the application are tested

3

CANape well-known for

ECU calibration and measurement > Parameter handling

> Visualization

> Data recording (multiple sources)

Support of standard formats

High-end access to ECUs> Time synchronous

> Data rate

MATLAB/Simulink well-known for

Handle big and complex models

Function development (rapid prototyping)

Code generation

Image processing

Simulation

CANape + MATLAB/Simulink

Motivation

The perfect team for model-based software development?

Page 4: CANape + MATLAB/Simulink5 Step 1 (MIL): Early model development phase in MATLAB/Simulink In the context of model-based software development > Functions of the application are tested

4

1. Motivation

2. CANape Option “Simulink XCP Server”

3. CANape/vSignalyzer Target

4. Bypassing

5. Summary

Agenda

Page 5: CANape + MATLAB/Simulink5 Step 1 (MIL): Early model development phase in MATLAB/Simulink In the context of model-based software development > Functions of the application are tested

5

Step 1 (MIL): Early model development phase in MATLAB/Simulink

In the context of model-based software development> Functions of the application are tested in an iterative process

> The model is executed iteratively in Simulink

> Initial parameter calibration is necessary

With the CANape Option “Simulink XCP Server”> CANape can be used as a familiar GUI for the models running in Simulink

> Access to the model running in Simulink via XCP

> CANape projects/configuration can be reused in a later development phase

Use CANape During The Entire Development Process

CANape Option “Simulink XCP Server”

CANape Simulink Model

XCP on Ethernet

(XCP Master)

(XCP Slave)

Page 6: CANape + MATLAB/Simulink5 Step 1 (MIL): Early model development phase in MATLAB/Simulink In the context of model-based software development > Functions of the application are tested

6

Live demonstration

Live demonstration

CANape Option “Simulink XCP Server”

Page 7: CANape + MATLAB/Simulink5 Step 1 (MIL): Early model development phase in MATLAB/Simulink In the context of model-based software development > Functions of the application are tested

8

Solution

CANape Option “Simulink XCP Server”

Advantages:

Algorithms can be optimized in an early development phase

No hardware is available

Full access to all signals/parameters

Use of measurement/calibration window

All CANape features (e.g. measurement analysis, calibration data management, …) can be used

Better usability than in MATLAB/Simulink

Use of captured real data in Simulink

Working with standards

How to use the Simulink XCP Server:

Only one block must be added

Configure Simulink XCP Server

Automatic file generation

A2l

Model explorer

CANape project

Start CANape project within Simulink

Simulink model behave like virtual ECU

Page 8: CANape + MATLAB/Simulink5 Step 1 (MIL): Early model development phase in MATLAB/Simulink In the context of model-based software development > Functions of the application are tested

9

1. Motivation

2. CANape Option “Simulink XCP Server”

3. CANape/vSignalyzer Target

4. Bypassing

5. Summary

Agenda

Page 9: CANape + MATLAB/Simulink5 Step 1 (MIL): Early model development phase in MATLAB/Simulink In the context of model-based software development > Functions of the application are tested

10

Step 2 (SIL): First Rapid Prototyping

Initial development of model is finished> Model testing with real data (online/offline) in real time

> The model is executed on the PC (DLL)

> Parameter calibration with real ECU environment

CANape/vSignalyzer Target and Simulink Coder generates Windows DLL> Visualization and cascading of DLLs via “Algorithm Designer” window in CANape> Connect real data from various sources to the DLL input/output ports

> Measurement and calibration by integrated XCP driver

Use CANape During The Entire Development Process

CANape/vSignalyzer Target

Simulink Coderwith

CANape/vSignalyzer Target

Simulink Model

A2L MAP

INIEMF

EMFEMF

Contains XCP driver to run in CANape

Model description files for displaying model in CANape

DLL

Page 10: CANape + MATLAB/Simulink5 Step 1 (MIL): Early model development phase in MATLAB/Simulink In the context of model-based software development > Functions of the application are tested

11

Live demonstration

Live demonstration

CANape/vSignalyzer Target

Page 11: CANape + MATLAB/Simulink5 Step 1 (MIL): Early model development phase in MATLAB/Simulink In the context of model-based software development > Functions of the application are tested

13

Solution

CANape/vSignalyzer Target

Advantages:

Model/algorithm can run with real data (online/offline)

CANape acts as interface to real data

No HW and no MATLAB necessary

Model can be used by multiple engineers

The model itself can be measured and calibrated (like an ECU)

No rebuild of the model necessary

All CANape features can be used

Working with standards

How to use CANape/vSignalyzer Target:

Add CANape input/output blocks to the ports of your model

Configure the CANape Target

Generate code/DLL

Add the DLL to CANape and connect the ports to real data

Optional:

Create a device with the generated Simulink DLL & A2L

Measure and calibrate the DLL

Page 12: CANape + MATLAB/Simulink5 Step 1 (MIL): Early model development phase in MATLAB/Simulink In the context of model-based software development > Functions of the application are tested

14

1. Motivation

2. CANape Option “Simulink XCP Server”

3. CANape/vSignalyzer Target

4. Bypassing

5. Summary

Agenda

Page 13: CANape + MATLAB/Simulink5 Step 1 (MIL): Early model development phase in MATLAB/Simulink In the context of model-based software development > Functions of the application are tested

15

Step 3: SIL, HIL and target platform

Model testing on real time hardware and target ECU> Fast modification of ECU algorithm, without complete ECU SW generation/flashing

> HIL on test benches or real car verification

> Final parameter calibration and variant parametrization

DLL execution on real time hardware VN8900> Configuration in CANape execution on external hardware

CANape/vSignalyzer Target DLL as bypass/fullpass solution

Reuse of CANape project/configurations > One calibration tool from step 1 to step 3> Same configuration for final validation in

cars and first model development

Use CANape During The Entire Development Process

Bypassing

Page 14: CANape + MATLAB/Simulink5 Step 1 (MIL): Early model development phase in MATLAB/Simulink In the context of model-based software development > Functions of the application are tested

16

Fast modification of ECU algorithm or code segments without

complete ECU SW generation

flash re-programming

The existing ECU hardware has insufficient RAM, flash ROM or CPU speed

Possibility to test the new application

Switching between original ECU application and the new algorithm

Compare both under real conditions

Vector´s Solution:

Bypass execution on the PC or on the real-time VN8900 hardware

High-end ECU access with our VX1000 solution

High amount of signals or increased sample rates

Time synchronous write and read

All signal sources in CANape can be used as additional inputs/outputs

Motivation and Solution for Bypassing

Bypassing

ECU

1.

Bypass Function

4.

Runtime Environment (PC or VN8900)

Runtime

Page 15: CANape + MATLAB/Simulink5 Step 1 (MIL): Early model development phase in MATLAB/Simulink In the context of model-based software development > Functions of the application are tested

17

Live demonstration

Live demonstration

Bypassing

Page 16: CANape + MATLAB/Simulink5 Step 1 (MIL): Early model development phase in MATLAB/Simulink In the context of model-based software development > Functions of the application are tested

18

Real-time Solution with VN8900

Bypassing

ECU

USB

VN8900 – Atom/i7 CPU

Bypassing

function

USB

XCP Slave

XCP Master

CANape

ECU

XCPUSB

Runtime Kernel

Bypassing MC

XCPonCANXCPonEthernet

Advantages:

Vector real-time bypassing platform

No/small jitter and latency times

Support of “Extended Real Time” on VN8911 or VN8912A

Bypass can also be measured and calibrated if it runs on the VN8900

Bypass can run standalone on VN8900

Page 17: CANape + MATLAB/Simulink5 Step 1 (MIL): Early model development phase in MATLAB/Simulink In the context of model-based software development > Functions of the application are tested

20

1. Motivation

2. CANape Option “Simulink XCP Server”

3. CANape/vSignalyzer Target

4. Bypassing

5. Summary

Agenda

Page 18: CANape + MATLAB/Simulink5 Step 1 (MIL): Early model development phase in MATLAB/Simulink In the context of model-based software development > Functions of the application are tested

21

The perfect team for model-based SW development

SummaryS

imu

lin

k

CANape

MA

TLA

B

Simulink XCP Server

Target ECU

Embedded Coder Code generation Target Platform

Parameter export

CANape MC3 MATLAB Interface

DLL

M-file to parameter file converter

Read & export MAT 7.3 files (HDF5-based)

Simulink Coder CANape/vSignalyzer

Target

PC VN8900

Model Explorer

Red = Part of Vector MATLAB/Simulink MC Add-on / Blue = Part of CANape

Page 19: CANape + MATLAB/Simulink5 Step 1 (MIL): Early model development phase in MATLAB/Simulink In the context of model-based software development > Functions of the application are tested

24

Precondition

Summary

Vector MATLAB/Simulink MC Add-on

CANape/vSignalyzer Target

Simulink XCP Server

CANape MC3 MATLAB Interface

Software-in-the-loop:Compile model to run in CANape/on VN8900

Model-in-the-loop:Measure/calibrate model from CANape at run-time in Simulink

From within MATLAB execute M-scripts to access all data sources CANape offers

MATLAB/Simulink *)

Included with CANape setup or can be downloaded from www.vector.com(requires installed MATLAB/Simulink)

*) up to R2017b

Simulink Coder

Page 20: CANape + MATLAB/Simulink5 Step 1 (MIL): Early model development phase in MATLAB/Simulink In the context of model-based software development > Functions of the application are tested

25

Get in touch with us:

Support:Tel: +49 711 80670-200E-Mail: [email protected]: https://vector.com/vi_support-request_de.html

Training on Vector products:Tel: +49 711 80670-5770E-Mail: [email protected]: https://vector.com/vi_training_de.html

Need Help?

Summary

Page 21: CANape + MATLAB/Simulink5 Step 1 (MIL): Early model development phase in MATLAB/Simulink In the context of model-based software development > Functions of the application are tested

26 © 2017. Vector Informatik GmbH. All rights reserved. Any distribution or copying is subject to prior written approval by Vector. V1.0 | 2017-11-27

Author:Gernot König and Stephan HerzogVector Germany

Your questions are welcome!