Description of the mat file format output by the TSMaster XCP module

Table of Contents for this article.

I. mat variable format definition

1. Fixed variable definition

2. Time resolution method

3. Time-correlated signal resolution methods

4. build timeseries

 

II. Simulink Signal Playback

1. Playback workspace variables in the model

 

I. mat variable format definition

The TSMaster XCP module supports direct output of compressed HDF5 format mat files (Matlab version 7.3 and above), which facilitates the development of Simulink-based models. mat files output by TSMaster are loaded into Matlab with the following workspace variables.


1、Fixed variable definition

Description of the mat file format output by the TSMaster XCP module

The list of fixed variables is as follows.

Description of the mat file format output by the TSMaster XCP module


1、Time analysis method

First separate the time series and obtain all time axes.

Description of the mat file format output by the TSMaster XCP module

>The time series TIME_LIST string variable for the signal recorded in AN0001, for example, is as follows.

ecu1_TIME_DAQ_Cyclic,ecu1_TIME_DAQ_10_ms,ecu1_TIME_DAQ_100ms,ecu1 _TIME_POLL_noiseSignal,TIME_XCPSimBus__engine_speed

Each time axis array can be associated with one or a group of signals, and there are three types of time axes: DAQ time (one time axis contains one or a group of signals); Poll time (one time axis corresponds to one signal) and system variable time (one time axis corresponds to one signal).

Description of the mat file format output by the TSMaster XCP module

>The absolute time in seconds of each time axis can be extracted according to the name of each time axis array, as shown in ecu1_TIME_DAQ_100ms for example.

Description of the mat file format output by the TSMaster XCP module


3、Signal analysis method of time correlation

>After obtaining the timeline, you need to obtain the list of signals associated with the timeline, and locate the signals according to their names in the list. Take ecu1_TIME_DAQ_100ms as an example, the corresponding signal list is stored in a comma-separated string variable named ecu1_TIME_DAQ_100ms_LIST, and the variable name rule is

Timeline Name_LIST

>Expand the string variable ecu1_TIME_DAQ_100ms_LIST in a comma-separated manner to get the name of the variable or group of variables corresponding to the timeline ecu1_TIME_DAQ_100ms, in this case, only one name.

ecu1_triangleSignal

>This variable name eventually leads to the signal array "ecu1_triangleSignal", where each element of the signal array corresponds in time to each element of the time signal array.

>Right-click on this signal to plot the signal distribution by point (without time information), as shown in the following figure.

Description of the mat file format output by the TSMaster XCP module


4、Build timeseries

>If you need to construct a sequence of signal values with time information, you need to execute an additional m-script to construct timeseris. Taking the signal ecu1_triangleSignal as an example, whose corresponding time axis is ecu1_TIME_DAQ_100ms, timeseries can be constructed by the following script.

Triangle_signal = timeseries(ecu1_triangleSignal, ecu1_TIME_DAQ_100ms)

>After the construction, a new signal "Triangle_signal" appears in the workspace.

Description of the mat file format output by the TSMaster XCP module

> Right click to plot its change curve, you can see that the horizontal and vertical coordinates are time and value respectively.

Description of the mat file format output by the TSMaster XCP module

II. Simulink Signal Playback

1. Playback workspace variables in the model

There are several steps to play back the XCP signal in the model.

Open the Simulink module, double-click in the module margin and select "FromWorkspace".

Description of the mat file format output by the TSMaster XCP module

Change the name of the signal in Simulink to "Triangle_signal" according to the names of the timeseries, i.e., you can participate in the simulation and testing process of the algorithm related to the model.

Description of the mat file format output by the TSMaster XCP module

After connecting Scope, the simulation results are as follows.

Description of the mat file format output by the TSMaster XCP module
en_USEnglish
×
×

产品入口: 产品添加到购物车

Download location

Please click the download button below to start experiencing the powerful TSMaster features. Thank you for your support!

Beta version updated weekly, full version updated monthly
Installation environment
  • 1
    Windows 7 SP1 or higher, supports Win10, and WIn11.

    Operating System

  • 2
    8GB

    random access memory (RAM)

  • 3
    At least 550MB of free space

    disk space

  • 4
    Dual-core (2-core) or higher

    CPU

Please ensure that your computer meets at least these requirements in order to install and run the TSMaster software successfully. If your computer does not meet these requirements, it may cause performance problems or not run the software properly. You may want to consider upgrading your hardware if you need smoother running features.