Hardware‑in‑the‑loop (HIL) testing is done in real time and is comparable to the assumption of an absolute universal time in classical physics. But ever since Einstein's special theory of relativity came along, we've all known that time is relative.
The rapid development of electromobility has made efficient testing solutions indispensable. Time is the critical factor. HIL testing has been established on the market for many years and it is a key component in keeping pace with today's requirements for good reason. In comparison to real-world tests, HIL testing offers significant advantages such as reduced costs, high reproducibility, and an increased number of test kilometers per day. You can even scale testing and execute many tests in parallel. But one restriction remains: All tests run in real time. To overcome this restriction and to accelerate beyond real time, you can implement software‑in‑the‑loop testing for simulation and validation.
Generating virtual ECUs for SIL testing
To implement a shift‑left approach in your software development, you have to be able to start testing your application software as early as possible.
You can achieve this with SIL testing and the generation of virtual twins of the ECUs under development (V-ECUs). Depending on what you want to test, it may be sufficient to generate a V-ECU that includes only the application software. It may also be necessary to include the run‑time environment as well as parts of the basic software, for example. If you would like to have more information on the suitable abstraction level of a V-ECU for your specific use case, do not hesitate to contact us.
What are Software‑in‑the‑loop (SIL) tests?
Key developments such as electromobility and software‑defined‑vehicles are driving developments in the automotive industry at an unprecedented speed and require new approaches for simulation and validation. Economically, HIL testing alone seems to be no longer viable.
dSPACE offers powerful solutions for SIL testing with the following advantages:
- Testing application software as early as possible even without any hardware.
- Reduced costs, since no hardware is required.
- Controlling the simulation speed from step‑wise testing for debugging purposes beyond real‑time speed.
- Seamless transition from SIL to HIL, i.e., reuse of simulation components, layouts, and test cases.
- VEOS as a simulation and integration platform that is highly scalable from a desktop PC to the cloud.
- Co-simulation interface to integrate third-party tools into VEOS simulations.
Smart Charging Solution
Charging plays an important role in the development of electromobility, and charging speed has become a competitive advantage. A prerequisite for fast charging is seamless communication between the electric vehicle (EV) and the electric vehicle supply equipment (EVSE) in every conceivable combination of different manufacturers. Tests must also cover different charging standards and features, such as encryption and Plug & Charge. dSPACE offers the best‑in‑class solution for charging systems and supports all established charging standards (DIN SPEC 70121, ISO 15118, CHAdeMO, GB/T, and ChaoJi) and features.
With SIL testing, you can accelerate your software development and start testing and validating as early as possible even before a real ECU exists. The Smart Charging Solution provides all required simulation models for a smooth start with SIL testing. All you have to do before you can start testing is to virtualize the supply equipment communication controller (SECC) and the electric vehicle communication controller (EVCC). To simplify the start with SIL testing even further, you can also use scripts instead of a virtualized EVCC as a counterpart for a virtualized SECC. In this case, the scripts simulate the complete charging communication of the EVCC.
The Smart Charging Solution also provides demos for SIL testing that you can use for the following use cases:
- Simulation of direct current (DC) charging.
- Simulation of transport layer security (TLS) encryption, a cryptographic protocol to establish secure communication. It is mandatory, e.g., for Plug & Charge.
- Simulation of Plug & Charge, a mechanism to authenticate an EV at an EVSE for contract‑based payment methods.
- Simulation of message timings.
- Simulation of expired certificates.
BMS Testing Solution
The battery is the most important and the most expensive part of an electric vehicle. This is why the battery management system (BMS) of an electric vehicle is essential. It ensures the best possible operation of the battery and a long service life.
The BMS provides the following functionality:
- Calculating the state of charge (SoC)
- Controlling cell balancing
- Monitoring cell temperatures
Seamless transition from SIL to HIL
At first glance, the integration of SIL testing seems to generate additional effort, but the benefits and the seamless transition from SIL to HIL testing far outweigh the initial effort.
Some of the biggest advantages of using solutions from dSPACE are the following:
- You can reuse simulation components such as plant, environment, and restbus models.
- You can reuse the experiment layouts you created in ControlDesk.
- You can reuse the test cases you created in AutomationDesk.
It is even possible to combine HIL and SIL testing in hybrid simulation environments, i.e., you can perform tests with real and virtual ECUs at the same time in your test environment.
What are we working on right now?
One of the challenging tasks dSPACE is working on is the implementation of an electric motor simulation for SIL testing. Ultra‑short simulation steps in the range of nanoseconds are the reason why such simulations currently only run on FPGAs and why dSPACE is taking up the race against time again.
To understand Einstein's famous statement: "Time is relative", you can study the theory of relativity and its implications. Or you can simply start tweaking time yourself by using SIL testing to run more tests in less time.
No matter how challenging upcoming requirements for testing and validation may become, dSPACE is on the pulse of time and offers you tailor-made solutions to accelerate your steps in electromobility even further.
About the Author
Sebastian Zuenkeler
Technical Author, User Documentation & Language Services, dSPACE GmbH