Simulation platform and computer-implemented method for operating simulation platform

By introducing virtual microcontroller abstraction layer and acceleration hardware on the simulation platform, the problem of the existing technology being difficult to simulate and control peripheral hardware on real-time or faster time scales is solved, and a fast and real-time simulation effect is achieved, reducing CPU load and maintaining high real-time factors.

CN119987229APending Publication Date: 2025-05-13ROBERT BOSCH GMBH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411615732.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2023-11-13
Filing Date
2024-11-13
Publication Date
2025-05-13

Smart Images

  • Figure CN119987229A_ABST
    Figure CN119987229A_ABST
Patent Text Reader

Abstract

The invention relates to a simulation platform (10) for a simulation system having a control device (2) and peripheral hardware (PH) by means of which hardware functions are implemented, comprising: simulation hardware having a microprocessor (11), a memory (12) and acceleration hardware (13); a software module in the memory (12), which is designed as software for implementing control device functions in the microprocessor (11); -acceleration hardware (13) configured to implement or simulate or emulate hardware functions of the peripheral hardware; -a virtual microcontroller abstraction layer (vMCAL) (24) designed as software in order to provide function calls to the acceleration hardware (13) for the interface functions for register access and for the hardware functions of the peripheral hardware (PH).
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a simulation platform, in particular a simulation platform for real-time or faster simulation to verify and validate electronic control devices for operating electric motors, actuators, battery management systems, power electronics and other peripheral hardware.

[0002] The invention also relates to the use of acceleration hardware, in particular FPGA hardware, in the verification and validation of electronic control devices. Background Art

[0003] Today, verification and validation of electronic control devices, in particular electronic control devices for controlling and operating peripheral hardware with fast hardware functions, such as occur, for example, in the control and regulation of electric motors or actuators, battery management systems, etc., are mainly performed on simulation platforms corresponding to hardware-in-the-loop test benches. The main reason for this is the complex interaction between the control device software and the peripheral hardware with fast hardware functions in the control device electronics, such as occur, for example, in control loops. For simulating fast hardware functions of peripheral hardware, software-in-the-loop test systems cannot be used as simulation platforms, because accurately simulating the hardware functions of the peripheral hardware usually exceeds the computing power of the simulation platform and results in very slow simulation durations. Therefore, real-time execution is practically impossible.

[0004] By means of a simulation platform accelerated by acceleration hardware, such a control device can simulate the fast hardware functions of the peripheral hardware by dividing the functions between the CPU and the acceleration hardware of the simulation platform, wherein the acceleration hardware is used to simulate the hardware functions of the peripheral hardware. However, there is a problem in adapting the conventional architecture of the simulation platform to a software-in-the-loop test system on the CPU extended by acceleration hardware. Summary of the invention

[0005] According to the invention, a simulation platform for verifying and validating a system to be simulated is proposed, which has a control unit and peripheral hardware, wherein hardware functions are implemented by means of the peripheral hardware.

[0006] Further refinements are described in the dependent claims.

[0007] According to a first aspect, a simulation platform for simulating a system having a control device and peripheral hardware is provided, wherein hardware functions are implemented by means of the peripheral hardware, the simulation platform comprising:

[0008] -Simulation hardware with microprocessor, memory and acceleration hardware;

[0009] - a software module in the memory, the software module being designed to implement a control device function in the microprocessor;

[0010] - acceleration hardware, wherein the acceleration hardware is configured to implement hardware functions of the peripheral hardware;

[0011] A virtual microcontroller abstraction layer (vMCAL) configured to provide interface functions for register access and function calls for hardware functions of peripheral hardware to the acceleration hardware.

[0012] In particular, the peripheral hardware to be simulated with the aid of the system can have one or more external components, in particular complex physical systems and in particular one or more electric motors, one or more actuators such as electromechanical actuators, battery management systems or simulation circuits.

[0013] In addition, vMCAL can be a software interface between the control device functions and the microprocessor.

[0014] Control devices in motor vehicles usually use microcontrollers as computing units, which are run with the help of software that complies with the AUTOSAR Classic standard. Depending on their Automotive Safety Integrity Level (ASIL), different test scenarios are possible, including testing with the help of model-in-the-loop, software-in-the-loop, hardware-in-the-loop, on test benches or in real vehicles.

[0015] In order to test physical control devices, hardware-in-the-loop solutions are usually used for verification and validation. Here, external components connected to the control device are simulated, which components may include the driver, the vehicle (including its vehicle bus, sensors, actuators) and other components. The hardware-in-the-loop solution provides the following advantages: the control device electronics are included in the system to be tested, making it possible to verify the control device software by monitoring the influence of the control device software on the generation and detection of analog and digital input and output signals at the terminals of the control device. The simulation of the hardware functions of the peripheral hardware, where the time components for controlling the external components are critical, requires the use of hardware-in-the-loop simulation platforms, because the hardware-in-the-loop simulation platforms ensure real-time operation. Since the cycle time of the hardware functions of the peripheral hardware that can realize the hardware-in-the-loop simulation platform is in the range of 10ns to 10μs, it is usually proposed that specific electronic devices or acceleration hardware, such as FPGA hardware (FPGA: Field Programmable Gate Array), are set up for control at a fast time scale, and the hardware functions of the peripheral hardware are mapped with the help of the acceleration hardware.

[0016] Verification and validation of control devices based on software-in-the-loop concepts is significantly less complex, since almost unlimited computing power is available. However, this requires that a virtual representation of the control device, a so-called virtual control device, a so-called virtual ECU (vECU), be provided for verification and validation in software-in-the-loop concepts. Since a virtual control device can be implemented purely in software, a software-in-the-loop test setup can be instantiated when required, for example as part of a continuous integration or continuous delivery pipeline.

[0017] Software-in-the-loop solutions enable scalable simulation and testing and are significantly more cost-effective than hardware-in-the-loop simulation platforms.

[0018] In most cases, the virtual control device contains only the microcontroller software but no electronics or other hardware. Therefore, the test coverage of the control device to be tested is smaller in a software-in-the-loop solution than in a hardware-in-the-loop solution.

[0019] One major difference when simulating control units with the aid of software-in-the-loop concepts is that the time execution of hardware functions of the peripheral hardware occurs faster or slower than in the real system consisting of control unit and peripheral hardware. Depending on the complexity of the simulation model and the number of virtual control units, a real-time factor is obtained, which describes the time relationship between the control unit time and the real time.

[0020] Traditional virtual control devices can be composed of complete microcontroller processing software, in which the lowest abstraction layer, i.e., microcontroller abstraction layer (MCAL), is not present. When using such virtual control devices, MCAL must be replaced by virtualized MCAL (vMCAL) because MCAL accesses registers of the actual hardware of the control device that are connected to the peripheral hardware. The registers do not exist in the virtual control device executed on the CPU. Since at least some or all interfaces from the microcontroller to the peripheral hardware do not exist on the CPU, most software-in-the-loop simulations cannot manipulate the hardware functions of the peripheral hardware, which would be feasible with the help of hardware-in-the-loop solutions.

[0021] Until now, only graphics processing units for software-in-the-loop simulations have been available to accelerate numerically intensive calculations. These graphics processing units implement vector operations that are optimized for the parallel processing of mathematically identical operations. Typical areas of application are the verification and validation of driver assistance systems or autonomous driving functions.

[0022] In addition to local computers or computing units, software-in-the-loop simulations can also be performed with the aid of cloud computing. This can be used for a wide range of applications, where acceleration hardware (e.g. FPGA hardware) can be used for applications that require fast response times and are computationally intensive. The applications are offered by such cloud computing providers as a platform as a service.

[0023] Due to the short cycle times in the range of 10 ns to 10 μs, it is difficult to reliably simulate control devices with fast control device functions, such as control devices for battery management systems, electric motor control, etc. Hardware-in-the-loop systems are therefore used for this purpose, since they are usually equipped with acceleration hardware (FPGA accelerator) in order to simulate the behavior of the hardware components connected to the control device.

[0024] Peripheral hardware, fast hardware functions such as control loops, etc. cannot be simulated for many verification and validation processes, which has made it impossible to use simulation platforms or virtual control devices and the concept of software-in-the-loop simulation for these hardware functions, which cannot be simulated in real time in software due to the sequential execution of the simulation platform and the CPU clock limitations.

[0025] However, it is feasible to use the above-mentioned simulation platform to use software-in-the-loop simulation for control devices that are used to manipulate fast hardware functions of peripheral hardware, especially in real time or faster than real time. To this end, the simulation platform is provided with virtual control devices and acceleration hardware. Compared with the prior art, this makes it possible to simulate fast processes in conjunction with peripheral hardware on a time scale of 10ns to 10μs without significantly loading the CPU of the simulation platform and without reducing the real-time factor of the simulation. Thus, the possibility of software-in-the-loop simulation of virtual control devices and hardware simulation of peripheral hardware with fast hardware functions should be created. In traditional software-in-the-loop simulations that only use the CPU of the simulation platform, the calculation of the hardware functions will be too computationally intensive, making the software-in-the-loop simulation slower than the hardware-in-the-loop solution.

[0026] The simulation platform thus enables verification and validation of virtual control devices for simulating control devices, the simulation being implemented with the aid of the fast hardware functions for controlling peripheral hardware. In particular, the simulation platform enables verification and validation of control devices for controlling power electronics of electric motors, for battery management systems and for operating control loops with short cycle times with the aid of acceleration hardware.

[0027] Software-in-the-loop simulation implementation combined with acceleration hardware: The CPU load of the simulation platform is reduced by using acceleration hardware for the hardware functions of the peripheral hardware of the system to be simulated. The acceleration hardware enables short latency and parallel execution processes and can be reconfigured when needed.

[0028] In a typical control device development project, most software sources are generated by a code generator. Every time the code is changed to generate a virtual control device, simulation is required. In addition, the testing of the control device software should be performed under conditions that are as realistic as possible. For this reason, the above-mentioned simulation platform can hardly make any changes to the source code used to call the fast hardware functions implemented in the accelerated hardware. Any changes related to the extension for using the accelerated hardware can be performed in the virtual microcontroller abstraction layer vMCAL, which always replaces the original MCAL in order to use the virtual control device in the software-in-the-loop solution. Therefore, the scope of code modification for creating a hardware-accelerated virtual control device is the same as when creating a traditional virtual control device.

[0029] The above-mentioned simulation platform includes a combination of a virtual control device and acceleration hardware, wherein the virtual control device is implemented on simulation hardware with dedicated software components. The simulation of the virtual control device and the control device software running on it is performed in a simulation system having a microprocessor (CPU) and acceleration hardware, on which the virtual control device and the control device software are executed, and on which the hardware functions are implemented. This achieves: expanding the range of time scales that can be actually achieved in software-in-the-loop simulations.

[0030] The virtual microcontroller abstraction layer (vMCAL module) runs on the simulated hardware and is a software component of the virtual control device, which connects the virtual control device to the acceleration hardware. This enables standardized manipulation of hardware functions in the usual way by the virtual control device. Therefore, the software component is provided as a standardized virtual MCAL driver, which provides, on the one hand, a standard API (API: Application Programming Interface) adapted to most control devices and virtual control devices, and on the other hand, a connection to a reconfigurable hardware accelerator, which can map the behavior of almost all possible components of the peripheral hardware. Compared to hardware-in-the-loop simulations in which real wiring harnesses and control device electronics are preset, changes in the wiring or electronics of the control device can be performed in the virtual control device completely and without manual intervention in the hardware of the simulation platform.

[0031] According to a further aspect, the use of the above-mentioned simulation platform for simulating control devices and peripheral hardware for a motor vehicle is proposed. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Below, the embodiments are explained in more detail with reference to the attached drawings, wherein:

[0033] Figure 1 An exemplary view showing a system to be simulated;

[0034] Figure 2A schematic diagram of a simulation platform for verifying and validating a system having at least one control device and peripheral hardware is shown. DETAILED DESCRIPTION

[0035] Figure 1 First, an example for a system 1 to be tested is shown. The system 1 comprises a control device 2 with a microcontroller having a computing unit 21 and internal interface hardware 22. The interface hardware 22 is used to communicate with external components of peripheral hardware by means of analog and / or digital signals and can, for example, include a gate driver circuit 22a for generating a pulse width modulation signal PWM and a sensor interface 22b for evaluating a position sensor. The external components can include an electric motor unit 3, which has a power driver circuit 31 controlled by means of a pulse width modulation signal PWM. The power driver circuit 31 is used to preset the phase voltage of a synchronous motor 32. The rotor position of the synchronous motor 32 is determined by a position sensor 33, the position signal p of which is evaluated via the sensor interface 22b.

[0036] In general, peripheral hardware PH refers here to external components of the system including specific communication hardware of the control unit, which is usually an integrated part of the hardware of the control unit to be tested. The aim is to take all peripheral hardware into account in the simulation.

[0037] Figure 2 The structure of a simulation platform 1 for verifying and validating a system 1 by simulation is schematically shown.

[0038] The hardware of the simulation platform 10 includes a microprocessor 11 (CPU) and a memory 12 for storing software modules.

[0039] In the software-in-the-loop simulation, the software functions for realizing the virtual control device 20 together with the control device functions to be executed thereon include: a virtual control device module (microcontroller abstraction layer MCAL) 21, which maps the basic functions and interface hardware of the control device; a runtime environment (Runtime-Environment RTE) 22 and the control device functions running on the control device (application software ASW) 23. In order to simulate the system, interaction is performed between the virtual control device 20 and the hardware functions of the peripheral hardware, which are functionally implemented in the configurable acceleration hardware 13 (FPGA).

[0040] The description of the functions of the peripheral hardware may be performed in a hardware definition language (HDL), which is converted into the configuration of the acceleration hardware 13 .

[0041] The functionality of the peripheral hardware includes simulation models of all components used in the fast hardware functionality of the peripheral hardware. The advantage is that the acceleration hardware can handle the internal connections with much lower latency than is the case in the CPU.

[0042] In order to simulate the control of the interface hardware 21, a virtual microcontroller abstraction layer (24) (vMCAL) is provided, which, on the one hand, implements the coding for implementing the software functions of the virtual control device 20 for execution in the CPU, and on the other hand is an interface, which calls and controls the hardware functions implemented in the acceleration hardware. Therefore, vMCAL24 can set the writing or reading of registers or access to virtual registers by the virtual control device, which the virtual control device needs to implement the hardware functions. vMCAL24 then calls the hardware functions in the accelerator hardware by using the register entries of the virtual registers. The results of the hardware simulation in the acceleration hardware 13 are correspondingly written into the virtual registers and can be read out by the virtual control device accordingly. As in the real control device, the virtual MCAL accesses the registers of the peripheral hardware components implemented in the acceleration hardware 13.

[0043] By means of vMCAL 24, the simulation platform 10 provides software components that communicate with both the microprocessor and the acceleration hardware 13 and thus enable the distribution of the functions of the virtual control device according to the location of implementation. An alternative for integrating acceleration hardware is a virtual device driver that directly describes the registers of the acceleration hardware.

Claims

1. A simulation platform (10) for simulating a system, the system having a control device (2) and peripheral hardware (PH), the peripheral hardware being used to implement hardware functions, the simulation platform comprising: - simulation hardware having a microprocessor (11), a memory (12) and acceleration hardware (13); - a software module in the memory (12), the software module being designed as software for implementing a control device function in the microprocessor (11); - acceleration hardware (13), the acceleration hardware being configured to implement or simulate or emulate the hardware functions of the peripheral hardware; A virtual microcontroller abstraction layer (vMCAL) (24) which is designed as software in order to provide interface functions for register access and function calls for hardware functions of the peripheral hardware (PH) to the acceleration hardware (13).

2. The simulation platform (10) according to claim 1, wherein the simulation hardware is set up based on a cloud, and wherein the acceleration hardware (13) corresponds to FPGA hardware.

3. A simulation platform (10) according to claim 1 or 2, wherein the peripheral hardware (PH) to be simulated with the aid of the system comprises external components, in particular an electric motor (3), a battery management system or a simulation circuit.

4. The simulation platform (10) according to any one of claims 1 to 3, wherein the vMCAL is also an interface between the control device function and the microprocessor (11).

5. Use of a simulation platform (10) according to any one of claims 1 to 4 for simulating control devices and peripheral hardware for a motor vehicle.