How can you start testing new technology as early as possible? Virtual control units (V-ECUs) are a big step in this direction. The leading Indian engineering service provider Tata Elxsi has now proven how V-ECUs can be used to speed up development.

Shifting the Validation Cycle to the Left-Hand Side

Tata Elxsi’s aim was to develop a fully-fledged level-3 V-ECU for an electric power steering system based on the Vector MICROSAR Classic basic software (BSW). V-ECUs are classified in different levels according to the software that they contain. Level 3 offers a good compromise for integration testing. It contains all the production code that is not specific to the target hardware and therefore exhibits a high level of detail of the real ECU’s behavior. At the same time, it enables high simulation performance as it is compiled for the simulation platform.

Tata Elxsi‘s customer, a tier 1 supplier, wanted to set up a software-in-the-loop validation environment to be able to run tests in advance. Also, it wanted to integrate continuous integration/continuous delivery (CI/CD) workflows and offer digital twins as an extended service towards OEMs. Tata Elxsi already has configured, integrated, and validated AUTOSAR and non-AUTOSAR ECUs as a service to OEMs and suppliers and was therefore able to use this experience for creating the digital twin of an ECU.

Level 3 V-ECUs offer a good compromise for integration testing because they contain all the production code and exhibit a high level of detail of the real ECU’s behavior.

Not an Easy Task

One of the biggest challenges for Tata Elxsi was to substitute the hardware-dependent code of the Micro Controller Abstraction Layer (MCAL) and the operating system with modules that can be compiled and created for PC-based simulation. As this project involves electric power steering (EPS), safety level D (ASIL-D) for motor vehicles must be achieved. In addition, the internal variables including the run-time environment (RTE) variables had to be calibrated and measured and the non-volatile memory management needed to be simulated.

Solution Found

Thanks to Tata Elxsi's engineering expertise in the software’s internal details and the support of dSPACE, all challenges in the V-ECU development were successfully resolved. SystemDesk’s flexible way of supporting and converting MCAL module configurations and generating the substitution code for the PC simulation especially helped a lot.  Tata Elxsi was able to import AUTOSAR configurations for scheduling and the CAN communication into SystemDesk and automatically generate code for the simulation. The resulting V-ECU shows realistic behavior on the CAN bus. For example, the V-ECU remains in a standby mode until the network management (NM) messages are sent on the simulated CAN bus. As with the test on a SCALEXIO HIL system, the remaining bus simulation is configured and generated with the dSPACE Bus Manager.

Because the virtual ECU contains all the basic software modules (BSW), it includes all the diagnostic features as well. ControlDesk was used to access the diagnostic messages via the simulated CAN bus. To validate the V-ECU’s proper behavior, Tata Elxsi simulated the V-ECU, the plant model, and the CAN traffic in dSPACE VEOS.
 

Thanks to the flexibility of SystemDesk, all MCAL module configurations could be imported, and converted and the substitution code generated for the PC simulation. 

Automatic Updating of the Module Code

For MCAL modules, SystemDesk provides a customizable code generator for the simulation module. The concept is that the configuration is imported from the BSW tool and converted directly to an equivalent configuration of the simulation MCAL module. In reality, the default conversion does not always fit perfectly, and this is why SystemDesk can generate a Python script template for customizations. 

For example, the CAN module has been subject to several iterations of reorganization by the AUTOSAR standardization. With the help of the Python script template, it is now easy to create a configuration converter that will allow automatic conversion of the MCAL module for future ECU code releases. This means that continuous and automatic updating of the V-ECU code during the project was possible. The dSPACE tools have an open and well-documented API so that all steps can be integrated into CI/CD pipelines. 

In addition to the internal V-ECU format, SystemDesk supports V-ECU export as FMU 2.0 and 3.0. dSPACE is also actively involved in the development of the "Layered Standard" for residual bus simulation and its implementation in the dSPACE tool chain. In addition, dSPACE can create V-ECU containers with IP protection. All these factors, along with the support of dSPACE India, ultimately contributed to the success of this project.

Significantly Faster Simulation

Thanks to the powerful tools, Tata Elxsi was able to generate V-ECUs and set up this process for future projects. Compared to solutions that work with ECU target binary files, a significantly faster simulation was possible. This ultimately also enabled scaling up the validation of functions to be scaled up.

The team at Tata Elxsi that worked on the development of the level 3 V-ECU.

What’s Next?

In the near future, Tata Elxsi will work on creating the complete CI/CD pipeline, including the virtual environment for AUTOSAR and non-AUTOSAR-based ECU development for tier 1. As a result, the manufacturer intends to offer a similar implementation as a service for other tier 1s and OEMs.

Courtesy of Tata Elxsi

dSPACE MAGAZINE, PUBLISHED JULY2024

Stay up-to-date with our dSPACE direct newsletter service.

With our dSPACE newsletter service, we will keep you informed about current use cases and new solutions and products, as well as trainings and events. Sign up here for a free subscription.

Enable form call

At this point, an input form from Click Dimensions is integrated. This enables us to process your newsletter subscription. The form is currently hidden due to your privacy settings for our website.

External input form

By activating the input form, you consent to personal data being transmitted to Click Dimensions within the EU, in the USA, Canada or Australia. More on this in our privacy policy.