Using Simulink for Fullpass Bypass SiL - Vector...6 Step 1 (MIL): Early model development phase in...
Transcript of Using Simulink for Fullpass Bypass SiL - Vector...6 Step 1 (MIL): Early model development phase in...
![Page 1: Using Simulink for Fullpass Bypass SiL - Vector...6 Step 1 (MIL): Early model development phase in MATLAB/Simulink With the CANape Option “Simulink XCP Server” CANape can be used](https://reader031.fdocuments.us/reader031/viewer/2022011820/5ea88f29f265de1f5a2135b6/html5/thumbnails/1.jpg)
V1.0 | 2018-11-10
Measurement and Calibration User Day – November 13th 2018
Using Simulink for Fullpass, Bypass and SiL
![Page 2: Using Simulink for Fullpass Bypass SiL - Vector...6 Step 1 (MIL): Early model development phase in MATLAB/Simulink With the CANape Option “Simulink XCP Server” CANape can be used](https://reader031.fdocuments.us/reader031/viewer/2022011820/5ea88f29f265de1f5a2135b6/html5/thumbnails/2.jpg)
2
1. Motivation
2. CANape Option “Simulink XCP Server”
3. CANape/vSignalyzer Target
4. Bypassing, Fullpassing
5. Summary
Agenda
![Page 3: Using Simulink for Fullpass Bypass SiL - Vector...6 Step 1 (MIL): Early model development phase in MATLAB/Simulink With the CANape Option “Simulink XCP Server” CANape can be used](https://reader031.fdocuments.us/reader031/viewer/2022011820/5ea88f29f265de1f5a2135b6/html5/thumbnails/3.jpg)
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
![Page 4: Using Simulink for Fullpass Bypass SiL - Vector...6 Step 1 (MIL): Early model development phase in MATLAB/Simulink With the CANape Option “Simulink XCP Server” CANape can be used](https://reader031.fdocuments.us/reader031/viewer/2022011820/5ea88f29f265de1f5a2135b6/html5/thumbnails/4.jpg)
4
1. Motivation
2. CANape Option “Simulink XCP Server”
3. CANape/vSignalyzer Target
4. Bypassing, Fullpassing
5. Summary
Agenda
![Page 5: Using Simulink for Fullpass Bypass SiL - Vector...6 Step 1 (MIL): Early model development phase in MATLAB/Simulink With the CANape Option “Simulink XCP Server” CANape can be used](https://reader031.fdocuments.us/reader031/viewer/2022011820/5ea88f29f265de1f5a2135b6/html5/thumbnails/5.jpg)
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
Use CANape During The Entire Development Process
CANape Option “Simulink XCP Server”
![Page 6: Using Simulink for Fullpass Bypass SiL - Vector...6 Step 1 (MIL): Early model development phase in MATLAB/Simulink With the CANape Option “Simulink XCP Server” CANape can be used](https://reader031.fdocuments.us/reader031/viewer/2022011820/5ea88f29f265de1f5a2135b6/html5/thumbnails/6.jpg)
6
Step 1 (MIL): Early model development phase in MATLAB/Simulink
� 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 7: Using Simulink for Fullpass Bypass SiL - Vector...6 Step 1 (MIL): Early model development phase in MATLAB/Simulink With the CANape Option “Simulink XCP Server” CANape can be used](https://reader031.fdocuments.us/reader031/viewer/2022011820/5ea88f29f265de1f5a2135b6/html5/thumbnails/7.jpg)
7
How it works
CANape Option “Simulink XCP Server”
o
![Page 8: Using Simulink for Fullpass Bypass SiL - Vector...6 Step 1 (MIL): Early model development phase in MATLAB/Simulink With the CANape Option “Simulink XCP Server” CANape can be used](https://reader031.fdocuments.us/reader031/viewer/2022011820/5ea88f29f265de1f5a2135b6/html5/thumbnails/8.jpg)
8
� Drag & drop Simulink XCP Server block to your model (on root level)
How it works
CANape Option “Simulink XCP Server”
A2LCANapeProject
Configure & Generate:
Measure & Calibrate during simulation
![Page 9: Using Simulink for Fullpass Bypass SiL - Vector...6 Step 1 (MIL): Early model development phase in MATLAB/Simulink With the CANape Option “Simulink XCP Server” CANape can be used](https://reader031.fdocuments.us/reader031/viewer/2022011820/5ea88f29f265de1f5a2135b6/html5/thumbnails/9.jpg)
9
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 10: Using Simulink for Fullpass Bypass SiL - Vector...6 Step 1 (MIL): Early model development phase in MATLAB/Simulink With the CANape Option “Simulink XCP Server” CANape can be used](https://reader031.fdocuments.us/reader031/viewer/2022011820/5ea88f29f265de1f5a2135b6/html5/thumbnails/10.jpg)
10
1. Motivation
2. CANape Option “Simulink XCP Server”
3. CANape/vSignalyzer Target
4. Bypassing, Fullpassing
5. Summary
Agenda
![Page 11: Using Simulink for Fullpass Bypass SiL - Vector...6 Step 1 (MIL): Early model development phase in MATLAB/Simulink With the CANape Option “Simulink XCP Server” CANape can be used](https://reader031.fdocuments.us/reader031/viewer/2022011820/5ea88f29f265de1f5a2135b6/html5/thumbnails/11.jpg)
11
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
Use CANape During The Entire Development Process
CANape/vSignalyzer Target
![Page 12: Using Simulink for Fullpass Bypass SiL - Vector...6 Step 1 (MIL): Early model development phase in MATLAB/Simulink With the CANape Option “Simulink XCP Server” CANape can be used](https://reader031.fdocuments.us/reader031/viewer/2022011820/5ea88f29f265de1f5a2135b6/html5/thumbnails/12.jpg)
12
Step 2 (SIL): First Rapid Prototyping
� 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 13: Using Simulink for Fullpass Bypass SiL - Vector...6 Step 1 (MIL): Early model development phase in MATLAB/Simulink With the CANape Option “Simulink XCP Server” CANape can be used](https://reader031.fdocuments.us/reader031/viewer/2022011820/5ea88f29f265de1f5a2135b6/html5/thumbnails/13.jpg)
13
How it works
CANape/vSignalyzer Target
…
DLL
o
ECU
![Page 14: Using Simulink for Fullpass Bypass SiL - Vector...6 Step 1 (MIL): Early model development phase in MATLAB/Simulink With the CANape Option “Simulink XCP Server” CANape can be used](https://reader031.fdocuments.us/reader031/viewer/2022011820/5ea88f29f265de1f5a2135b6/html5/thumbnails/14.jpg)
14
Setup
CANape/vSignalyzer Target
� With the CANape/vSignalyzer Target, the model is compiled into a DLL and can be used in real time with real data
� Add DLL to any CANape project and connect the ports to real data (CAN, CCP/XCP, I/O …, even signals from measurement files) inside CANape
![Page 15: Using Simulink for Fullpass Bypass SiL - Vector...6 Step 1 (MIL): Early model development phase in MATLAB/Simulink With the CANape Option “Simulink XCP Server” CANape can be used](https://reader031.fdocuments.us/reader031/viewer/2022011820/5ea88f29f265de1f5a2135b6/html5/thumbnails/15.jpg)
15
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 16: Using Simulink for Fullpass Bypass SiL - Vector...6 Step 1 (MIL): Early model development phase in MATLAB/Simulink With the CANape Option “Simulink XCP Server” CANape can be used](https://reader031.fdocuments.us/reader031/viewer/2022011820/5ea88f29f265de1f5a2135b6/html5/thumbnails/16.jpg)
16
1. Motivation
2. CANape Option “Simulink XCP Server”
3. CANape/vSignalyzer Target
4. Bypassing, Fullpassing
5. Summary
Agenda
![Page 17: Using Simulink for Fullpass Bypass SiL - Vector...6 Step 1 (MIL): Early model development phase in MATLAB/Simulink With the CANape Option “Simulink XCP Server” CANape can be used](https://reader031.fdocuments.us/reader031/viewer/2022011820/5ea88f29f265de1f5a2135b6/html5/thumbnails/17.jpg)
17
Use CANape During The Entire Development Process
Bypassing, Fullpassing
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
![Page 18: Using Simulink for Fullpass Bypass SiL - Vector...6 Step 1 (MIL): Early model development phase in MATLAB/Simulink With the CANape Option “Simulink XCP Server” CANape can be used](https://reader031.fdocuments.us/reader031/viewer/2022011820/5ea88f29f265de1f5a2135b6/html5/thumbnails/18.jpg)
18
� Fast modification of ECU algorithm or code segments without
� Complete ECU SW generation
� Flash programming
� The existing ECU hardware has insufficient RAM, flash ROM or CPU speed
� Possibility to test the new application
� Switch between original ECU application and the new algorithm
� Compare both under real conditions
Motivation for Bypassing
Bypassing, Fullpassing
![Page 19: Using Simulink for Fullpass Bypass SiL - Vector...6 Step 1 (MIL): Early model development phase in MATLAB/Simulink With the CANape Option “Simulink XCP Server” CANape can be used](https://reader031.fdocuments.us/reader031/viewer/2022011820/5ea88f29f265de1f5a2135b6/html5/thumbnails/19.jpg)
19
� 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
Solution for Bypassing
Bypassing, Fullpassing
![Page 20: Using Simulink for Fullpass Bypass SiL - Vector...6 Step 1 (MIL): Early model development phase in MATLAB/Simulink With the CANape Option “Simulink XCP Server” CANape can be used](https://reader031.fdocuments.us/reader031/viewer/2022011820/5ea88f29f265de1f5a2135b6/html5/thumbnails/20.jpg)
20
How it works
Bypassing, Fullpassing
ECU
…
DLL
DAQ STIM
o
![Page 21: Using Simulink for Fullpass Bypass SiL - Vector...6 Step 1 (MIL): Early model development phase in MATLAB/Simulink With the CANape Option “Simulink XCP Server” CANape can be used](https://reader031.fdocuments.us/reader031/viewer/2022011820/5ea88f29f265de1f5a2135b6/html5/thumbnails/21.jpg)
21
Real-time Solution with VN8900
Bypassing, Fullpassing
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 22: Using Simulink for Fullpass Bypass SiL - Vector...6 Step 1 (MIL): Early model development phase in MATLAB/Simulink With the CANape Option “Simulink XCP Server” CANape can be used](https://reader031.fdocuments.us/reader031/viewer/2022011820/5ea88f29f265de1f5a2135b6/html5/thumbnails/22.jpg)
22
� The complete ECU software runs on VN8900 as model
� The models receive data from > CAN, LIN, FlexRay
> ECUs (VX1000) – only ECU I/O´s
� Models can be executed on VN8900 stand-alone
� Optional:
� The model internals can be measured/calibrated by CANape
Fullpass with VN8900
Bypassing, Fullpassing
VN8900 in stand-alone Mode
XCPonEthernet
CANape
CAN, LIN, FlexRay
ECU
Simulink model(s) running stand-alone
Measure/calibratemodel internals
Advantages:
� Run models autonomously
� Combine your control algorithm
� with your HIL system
� with the setup in a car
� Optional: measure/calibrate model by CANape
� Configuration and download of the model to VN8900 is done in CANape
VX1000
![Page 23: Using Simulink for Fullpass Bypass SiL - Vector...6 Step 1 (MIL): Early model development phase in MATLAB/Simulink With the CANape Option “Simulink XCP Server” CANape can be used](https://reader031.fdocuments.us/reader031/viewer/2022011820/5ea88f29f265de1f5a2135b6/html5/thumbnails/23.jpg)
23
1. Motivation
2. CANape Option “Simulink XCP Server”
3. CANape/vSignalyzer Target
4. Bypassing, Fullpassing
5. Summary
Agenda
![Page 24: Using Simulink for Fullpass Bypass SiL - Vector...6 Step 1 (MIL): Early model development phase in MATLAB/Simulink With the CANape Option “Simulink XCP Server” CANape can be used](https://reader031.fdocuments.us/reader031/viewer/2022011820/5ea88f29f265de1f5a2135b6/html5/thumbnails/24.jpg)
24
The complete picture
Summary
Sim
uli
nk
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 25: Using Simulink for Fullpass Bypass SiL - Vector...6 Step 1 (MIL): Early model development phase in MATLAB/Simulink With the CANape Option “Simulink XCP Server” CANape can be used](https://reader031.fdocuments.us/reader031/viewer/2022011820/5ea88f29f265de1f5a2135b6/html5/thumbnails/25.jpg)
25
� Get access to CANape with its measurement and calibration data from within MATLAB
CANape MC3 MATLAB Interface - Overview
Summary
CAN, LIN, FlexRay ...
M-Script
CANape API
CANape
ECU 1
XCP
ECU 2
CCP
ECU 3
UDS
ECU n
MATLAB
![Page 26: Using Simulink for Fullpass Bypass SiL - Vector...6 Step 1 (MIL): Early model development phase in MATLAB/Simulink With the CANape Option “Simulink XCP Server” CANape can be used](https://reader031.fdocuments.us/reader031/viewer/2022011820/5ea88f29f265de1f5a2135b6/html5/thumbnails/26.jpg)
26
CANape MC3 MATLAB Interface - Solution
Summary
Advantages:
� MATLAB as the front-end for all measurement and calibration tasks
� CANape works in the background and ensures access to data sources
� Buses
� XCP data
� Analog signals
� …
![Page 27: Using Simulink for Fullpass Bypass SiL - Vector...6 Step 1 (MIL): Early model development phase in MATLAB/Simulink With the CANape Option “Simulink XCP Server” CANape can be used](https://reader031.fdocuments.us/reader031/viewer/2022011820/5ea88f29f265de1f5a2135b6/html5/thumbnails/27.jpg)
27
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)
Simulink Coder
![Page 28: Using Simulink for Fullpass Bypass SiL - Vector...6 Step 1 (MIL): Early model development phase in MATLAB/Simulink With the CANape Option “Simulink XCP Server” CANape can be used](https://reader031.fdocuments.us/reader031/viewer/2022011820/5ea88f29f265de1f5a2135b6/html5/thumbnails/28.jpg)
28
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 29: Using Simulink for Fullpass Bypass SiL - Vector...6 Step 1 (MIL): Early model development phase in MATLAB/Simulink With the CANape Option “Simulink XCP Server” CANape can be used](https://reader031.fdocuments.us/reader031/viewer/2022011820/5ea88f29f265de1f5a2135b6/html5/thumbnails/29.jpg)
29 © 2017. Vector Informatik GmbH. All rights reserved. Any distribution or copying is subject to prior written approval by Vector. V1.0 | 2018-11-10
Author:König, GernotVector Germany
For more information about Vectorand our products please visit
www.vector.com