Calibrate Parameters with ETAS Inca
This example shows how to view signals and tune parameters by using ETAS® Inca. You must have already completed the steps in Prepare ASAP2 Data Description File.
You also must be familiar with the ETAS Inca user interface. For information about the user interface, see the
vendor documentation (www.etas.com
).
Prepare Database
Open model
slrt_ex_osc_cal
.openExample('slrt_ex_osc_cal');
Build and download real-time application
slrt_ex_osc_cal
.Start the real-time application by selecting REAL-TIME > RUN ON TARGET > Start Application.
Disconnect the connection from MATLAB:
You can then connect to third-party calibration tools.tg = slrealtime disconnect(tg)
Open ETAS Inca.
Add an ETAS Inca database by using the folder named
SLRTDatabase
.Add subfolders named
Experiment
,Project
, andWorkspace
.
Prepare Project
Under folder
Project
, add an ECU project.When prompted, select A2L file
slrt_ex_osc_cal.a2l
, which is extracted from the project file. Ignore the prompt for a HEX file.If you change and rebuild the real-time application, delete the ECU project and recreate it with the new A2L file.
Prepare Workspace
Under folder
Workspace
, add workspaceslrt_ex_osc_cal_wksp
.Add project
slrt_ex_osc_cal_slrt
to workspaceslrt_ex_osc_cal_wksp
.When prompted, add an Ethernet system XCP device to the workspace.
Configure the XCP device and initialize it. Autoconfigure the ETAS network.
To upload data from the device hardware, use enhanced operations on memory pages.
Data is uploaded from the real-time application on the target computer.
Prepare Experiment
Under folder
Experiment
, add experimentslrt_ex_osc_cal_exp
.Add experiment
slrt_ex_osc_cal_exp
to workspaceslrt_ex_osc_cal_wksp
.
Configure Signals and Parameters
Start experiment
slrt_ex_osc_cal_exp
.To create graphic controls for the variables, add variables
Kg
,DampedOsc
,SignalGenerator
,L_1D
, andL_2D
.Add YT oscilloscopes for
DampedOsc
,SignalGenerator
,L_1D
, andL_2D
.For each signal, set the sample time to the base sample time of the real-time application (
250
µs).
Measure Signals and Calibrate Parameters
Start the ETAS Inca measurement.
To shorten the ring time on
DampedOsc
,L_1D
, andL_2D
, set parameterKg
to800
.As required, toggle between the reference page and the working page.
When using the Run on Target button on the Simulink Editor Real-Time tab to run the simulation, there is a time lag of a couple of seconds between the start of the real-time application on the target computer and the connect model operation on the development computer. If you are examining signals at or very close to application start, consider using the step-by-step approach to connect model and then using an SSH connection (for example, using PuTTY) start the real-time application. For more information, see Execute Real-Time Application in Simulink External Mode by Using Step-by-Step Commands and Execute Target Computer RTOS Commands at Target Computer Command Line.