Main Content

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

  1. Open model slrt_ex_osc_cal.

    openExample('slrt_ex_osc_cal');
  2. Build and download real-time application slrt_ex_osc_cal.

  3. Start the real-time application by selecting REAL-TIME > RUN ON TARGET > Start Application.

  4. Disconnect the connection from MATLAB:

    tg = slrealtime
    disconnect(tg)
    You can then connect to third-party calibration tools.

  5. Open ETAS Inca.

  6. Add an ETAS Inca database by using the folder named SLRTDatabase.

  7. Add subfolders named Experiment, Project, and Workspace.

Prepare Project

  1. Under folder Project, add an ECU project.

  2. 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

  1. Under folder Workspace, add workspace slrt_ex_osc_cal_wksp.

  2. Add project slrt_ex_osc_cal_slrt to workspace slrt_ex_osc_cal_wksp.

  3. When prompted, add an Ethernet system XCP device to the workspace.

  4. Configure the XCP device and initialize it. Autoconfigure the ETAS network.

  5. 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

  1. Under folder Experiment, add experiment slrt_ex_osc_cal_exp.

  2. Add experiment slrt_ex_osc_cal_exp to workspace slrt_ex_osc_cal_wksp.

Configure Signals and Parameters

  1. Start experiment slrt_ex_osc_cal_exp.

  2. To create graphic controls for the variables, add variables Kg, DampedOsc, SignalGenerator, L_1D, and L_2D.

  3. Add YT oscilloscopes for DampedOsc, SignalGenerator, L_1D, and L_2D.

  4. For each signal, set the sample time to the base sample time of the real-time application (250 µs).

Measure Signals and Calibrate Parameters

  1. Start the ETAS Inca measurement.

  2. To shorten the ring time on DampedOsc, L_1D, and L_2D, set parameter Kg to 800.

  3. 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.

Related Topics

External Websites