Vehicle body domain controller hardware-in-loop simulation method under AUTOSAR architecture
By building a modular HIL simulation test system under the AUTOSAR architecture, the problems of complexity and poor scalability of the vehicle domain controller test bench were solved, and efficient test environment construction and full life cycle verification capabilities were achieved.
Patent Information
- Application Number
- CN202511398274.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-28
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2045-09-28
AI Technical Summary
Existing technologies for vehicle domain controller development suffer from high test bench complexity, high maintenance costs, poor scalability, high migration costs, and poor testing timeliness.
Based on the AUTOSAR architecture, a modular and reusable HIL simulation test system is built. Through standardized interface definitions and a three-layer decoupled architecture, a closed-loop simulation model of the subsystem is built, realizing cross-project reuse and dynamic binding of hardware channel resources, and synchronous development and testing processes.
Significantly improves test bench development efficiency, enhances the flexibility and scalability of the test environment, optimizes the testing and verification capabilities throughout the entire lifecycle, and meets the need for rapid switching between different testing stages.
Smart Images

Figure CN120871821A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of automotive electronic and electrical testing technology, and in particular to a hardware-in-the-loop simulation method for a vehicle body domain controller under the AUTOSAR architecture. Background Technology
[0002] As automotive electronic and electrical architectures evolve towards domain centralization, the vehicle domain controller (VIU: one of the core control modules in automotive electronic and electrical architecture, integrating vehicle electronic functions such as lights, door locks, and windows, developed in accordance with the AUTOSAR architecture) needs to integrate the functions of dozens of traditional ECUs.
[0003] During the development of the vehicle domain controller, it is necessary to verify its functional reliability in a real hardware environment. The current testing scheme has at least the following shortcomings:
[0004] 1) In addition to the controller, a real load needs to be connected, resulting in high complexity of the test bench, high maintenance costs, and poor scalability;
[0005] 2) The test bench hardware is highly bound to the test environment and simulation model, resulting in poor reusability and high migration costs;
[0006] 3) Bench development can only begin after the controller product development is completed, resulting in poor timeliness. Summary of the Invention
[0007] In view of the above, the present invention aims to provide a hardware-in-the-loop simulation method for a vehicle body domain controller under the AUTOSAR architecture, so as to solve the aforementioned technical problems.
[0008] The technical solution adopted in this invention is as follows:
[0009] This invention provides a hardware-in-the-loop simulation method for a vehicle domain controller under an AUTOSAR architecture, including:
[0010] Based on the standardized interface definition of the AUTOSAR basic software layer, a standardized mapping relationship library for HIL cabinet hardware channels is established.
[0011] A configuration file is constructed to map the controller's physical interface to the HIL cabinet channel using a mapping library;
[0012] Based on different functional specifications, subsystem closed-loop simulation models were built for each functional module controlled by the vehicle domain controller.
[0013] A three-layer decoupled architecture is constructed to achieve dynamic binding between test software logic and hardware channels; the three-layer decoupled architecture includes: application layer, interface mapping layer, and hardware execution layer;
[0014] Based on the actual hardware interface and software function definition of the vehicle domain controller, configure the hardware channel of the HIL cabinet and the models of each subsystem in the model library, and build a simulation test bench.
[0015] The vehicle body domain controller was validated using a simulation test bench;
[0016] After verification, automatic test cases are generated based on the functional specifications, and functional tests of each subsystem of the vehicle domain controller are carried out in the test environment of the current simulation test bench.
[0017] In at least one of the possible implementations, the step of building a subsystem closed-loop simulation model for each functional module controlled by the vehicle domain controller includes: establishing at least a load characteristic model, a sensor simulation model, and a vehicle network model, and forming a parameterizable Simulink subsystem model library.
[0018] In at least one of the possible implementations, the verification of the vehicle domain controller using a simulation test bench includes: performing real-time closed-loop verification based on a real hardware-in-the-loop simulation test environment, and monitoring whether the state machine transitions of the vehicle domain controller meet the preset functional specifications.
[0019] In at least one possible implementation, the simulation method further includes: maintaining the simulation test bench according to changes in the software version of the vehicle domain controller: adjusting the hardware channels and the selected subsystem simulation model, and conducting multiple rounds of regression testing after adjustment.
[0020] In at least one possible implementation, establishing the HIL cabinet hardware channel standardization mapping library includes at least:
[0021] CAN / LIN communication interface configured for fixed rack access;
[0022] The power drive interface uses a unified hardware board;
[0023] The sensor input interface is configured with a standardized signal conditioning unit.
[0024] In at least one of the possible implementations, the configuration file that combines the mapping relationship library to construct the correspondence between the controller physical interface and the HIL cabinet channel includes: establishing the mapping relationship between the controller pins and the HIL cabinet channel through the hardware abstraction layer configuration file to form a reusable hardware interface configuration template.
[0025] In at least one possible implementation, the complete simulation test bench includes: a vehicle body domain controller, a HIL cabinet containing at least I / O and communication boards and a real-time machine, and a host computer; wherein the vehicle body domain controller and the HIL cabinet are connected by hardwire, and the HIL cabinet and the host computer are connected by Ethernet cable.
[0026] Compared with existing technologies, the main design concept of this invention lies in constructing a modular and reusable HIL simulation test system based on the hardware and software layering characteristics of the AUTOSAR architecture, and simultaneously developing the test process to achieve forward development of the test bench: According to the AUTOSAR interface definition, fixed HIL cabinet hardware channel resources are configured for the standardized hardware interfaces and loads of the vehicle domain controller; and for different functional modules, closed-loop simulation models of subsystems are built using functional specifications and a model library is established; in the actual testing phase, the HIL test bench is quickly built and testing activities are carried out based on the standardized hardware interface pool and subsystem simulation model library; subsequently, in the maintenance phase, an association matrix between the model version and the vehicle domain controller software version is established to support the accurate selection of hardware interfaces and simulation models for regression testing.
[0027] As can be seen, the technical solution of this invention, based on the standardized interface and model decoupling design of the AUTOSAR architecture, combined with a modular simulation model library and automated testing process, achieves the following beneficial effects:
[0028] 1) Test bench development efficiency is significantly improved: By building a standardized hardware interface resource pool (such as fixed configuration CAN / LIN channel groups and unified power drive modules), the hardware channel resources can be reused across projects, reducing the amount of repetitive development work; based on AUTOSAR interface definition and hardware abstraction layer configuration file, it is possible to simultaneously configure the HIL cabinet hardware channel resource pool during the controller development requirements stage, thus shortening the test bench development cycle.
[0029] 2) Enhanced flexibility and scalability of the testing environment: A three-layer decoupled architecture (application layer, interface mapping layer, and hardware execution layer) is adopted to achieve dynamic binding between test software logic and hardware channels; based on the parameterized Simulink subsystem model library, it can quickly adapt to the configuration requirements of different software versions.
[0030] 3) Optimized full lifecycle testing and verification capabilities, enabling rapid switching of testing environments at different testing stages and meeting the closed-loop verification requirements of different subsystems of the controller software. Attached Figure Description
[0031] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described below with reference to the accompanying drawings, wherein:
[0032] Figure 1A flowchart of a hardware-in-the-loop simulation method for a vehicle domain controller under the AUTOSAR architecture provided in an embodiment of the present invention;
[0033] Figure 2 This is a schematic diagram of the hardware-in-the-loop simulation framework for the vehicle domain controller under the AUTOSAR architecture provided in this embodiment of the invention. Detailed Implementation
[0034] Embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0035] This invention proposes an embodiment of a hardware-in-the-loop simulation method for a vehicle body domain controller under the AUTOSAR architecture. Specifically, as follows: Figure 1 and Figure 2 As shown, it includes:
[0036] Step S1: Based on the standardized interface definition of the AUTOSAR basic software layer, establish a standardized mapping relationship library for hardware channels in the hardware-in-the-loop (HIL) cabinet.
[0037] For reference, the CAN / LIN communication interface is configured with a fixed cabinet channel (such as CAN1-channel group A, LIN1-channel group B); the power drive interface (PWM / HSD) adopts a unified hardware board (such as the power drive module of dSPACE SCALEXIO); and the sensor input interface (ADC / DIG) is configured with a standardized signal conditioning unit.
[0038] Step S2: Construct a configuration file that maps the controller's physical interface to the HIL cabinet channel using the mapping relationship library;
[0039] Specifically, the mapping relationship between controller pins and HIL cabinet channels is established through the hardware abstraction layer configuration file, forming a hardware interface configuration template that can be reused across projects;
[0040] Step S3: Based on different functional specifications, build a closed-loop simulation model of the subsystem for each functional module controlled by the vehicle domain controller.
[0041] For example, load characteristic models can be established for vehicle lights (incandescent / LED with different impedance models), window motors (including stall characteristics modeling), door lock actuators, etc.
[0042] In addition, simulation models of sensors such as rain gauges (based on PWM duty cycle modeling) and seat pressure sensors (multi-region pressure distribution model) can be established.
[0043] In addition, vehicle network models such as CAN bus load simulation and LIN master node simulation are established.
[0044] The establishment of the aforementioned subsystem models also includes: forming a parameterizable Simulink subsystem model library.
[0045] Step S4: Construct a three-layer decoupled architecture to achieve dynamic binding between test software logic and hardware channels; wherein, the three-layer decoupled architecture includes: application layer, interface mapping layer, and hardware execution layer;
[0046] To elaborate, the key test logic of the application layer (such as the light gradient control logic) is written in MATLAB and is independent of hardware; the interface mapping layer realizes the dynamic binding of model output signals and HIL cabinet channels through the aforementioned configuration file (such as window position signal → HIL cabinet AI channel 1); the HIL cabinet, as the hardware execution layer, automatically allocates physical channel resources according to the mapping relationship.
[0047] Step S5: Based on the actual hardware interface and software function definition of the vehicle domain controller, configure the HIL cabinet hardware channel and the models of each subsystem in the model library, and build a simulation test bench.
[0048] After the above steps have provided a standardized hardware interface resource pool and a closed-loop simulation model library from both hardware and software perspectives, we can proceed to the simulation test integration development stage. This involves selecting a specific controlled functional module (node), choosing the hardware interface and subsystem simulation model, and building the test environment in conjunction with the hardware-in-the-loop test system architecture.
[0049] It can be added here that, apart from the vehicle domain controller, all other system nodes can be simulated using HIL cabinet. In some preferred embodiments, the complete hardware-in-the-loop test bench of the present invention includes: vehicle domain controller, HIL cabinet (I / O and communication boards, real-time machine), and host computer. The vehicle domain controller and the HIL cabinet are connected by hardwire, and the HIL cabinet and the host computer are connected by Ethernet cable.
[0050] Step S6: Verify the vehicle domain controller using a simulation test bench;
[0051] Specifically, this refers to performing real-time closed-loop verification in a real hardware-in-the-loop simulation test environment to monitor whether the state machine transitions of the VIU meet the preset functional specifications.
[0052] For example, the HIL cabinet real-time system simulates door opening and closing signals and motor stall scenarios (such as a sudden increase in window resistance). It injects CAN bus commands (such as window raising commands) and sensor feedback signals (Hall pulse counting) into the VIU with 100μs-level closed-loop control. At the same time, it monitors the state machine transitions inside the VIU in real time through bus tools and simultaneously collects the PWM output duty cycle change curve. It compares the results with the trigger conditions defined in the aforementioned functional specifications. If the measured state machine transition timing and logic conform to the design specifications, then the design specifications are deemed to be met.
[0053] The closed-loop verification process described above covers the entire chain from signal input to logical judgment to execution output, ensuring that the behavior of the VIU is consistent with the design.
[0054] Step S7: After verification, generate automatic test cases based on the functional specifications, and conduct functional tests of each subsystem of the vehicle domain controller in the test environment of the current simulation test bench.
[0055] Finally, it can be added that in some other preferred embodiments of the present invention, the simulation test bench can also be maintained according to the software version changes of VIU, including: adjusting the hardware channels and the selected subsystem simulation model, and carrying out multiple rounds of regression testing after adjustment.
[0056] In summary, the main concept of this invention lies in establishing a standardized mapping relationship library for HIL cabinet hardware channels based on the standardized interface definition of the AUTOSAR basic software layer, thereby constructing hardware correspondence configuration file templates. Combining different functional specifications, subsystem simulation models are built for each functional module, and a three-layer decoupled architecture is constructed to achieve dynamic binding between test software and hardware channels. Subsequently, based on the actual hardware interfaces and software function definitions, a simulation test bench is built and verification is completed. Finally, automatic test cases are generated based on the functional specifications, and functional tests of each subsystem of the vehicle domain controller are conducted in the current test environment. This invention significantly shortens the test bench development cycle and improves the flexibility and scalability of the test environment, optimizing the full lifecycle testing and verification capabilities.
[0057] In this invention, when directional terms are mentioned, they are relative concepts based on the embodiments. Furthermore, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent the existence of A alone, A and B simultaneously, or B alone. A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects have an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, and c can represent: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, and c can be single or multiple.
[0058] The above description of the structure, features, and effects of the present invention is based on the embodiments shown in the figures. However, the above are only preferred embodiments of the present invention. It should be noted that the technical features involved in the above embodiments and their preferred methods can be reasonably combined and matched by those skilled in the art to form a variety of equivalent solutions without departing from or changing the design concept and technical effects of the present invention. Therefore, the present invention is not limited to the scope of implementation shown in the figures. Any changes made in accordance with the concept of the present invention, or modifications to equivalent embodiments, that do not exceed the spirit covered by the specification and figures, should be within the protection scope of the present invention.
Claims
1. A hardware-in-the-loop simulation method for a vehicle domain controller under an AUTOSAR architecture, characterized in that, include: Based on the standardized interface definition of the AUTOSAR basic software layer, a standardized mapping relationship library for HIL cabinet hardware channels is established. A configuration file is constructed to map the controller's physical interface to the HIL cabinet channel using a mapping library; Based on different functional specifications, subsystem closed-loop simulation models were built for each functional module controlled by the vehicle domain controller. A three-layer decoupled architecture is constructed to achieve dynamic binding between test software logic and hardware channels; the three-layer decoupled architecture includes: application layer, interface mapping layer, and hardware execution layer; Based on the actual hardware interface and software function definition of the vehicle domain controller, configure the hardware channel of the HIL cabinet and the models of each subsystem in the model library, and build a simulation test bench. The vehicle body domain controller was validated using a simulation test bench; After verification, automatic test cases are generated based on the functional specifications, and functional tests of each subsystem of the vehicle domain controller are carried out in the test environment of the current simulation test bench.
2. The hardware-in-the-loop simulation method for the vehicle domain controller under the AUTOSAR architecture according to claim 1, characterized in that, The construction of subsystem closed-loop simulation models for each functional module controlled by the vehicle domain controller includes: establishing at least a load characteristic model, a sensor simulation model, and a vehicle network model, and forming a parameterizable Simulink subsystem model library.
3. The hardware-in-the-loop simulation method for the vehicle domain controller under the AUTOSAR architecture according to claim 1, characterized in that, The verification of the vehicle domain controller using a simulation test bench includes: performing real-time closed-loop verification based on a real hardware-in-the-loop simulation test environment, and monitoring whether the state machine transitions of the vehicle domain controller meet the preset functional specifications.
4. The hardware-in-the-loop simulation method for the vehicle domain controller under the AUTOSAR architecture according to claim 1, characterized in that, The simulation method further includes: maintaining the simulation test bench according to changes in the software version of the vehicle domain controller: adjusting the hardware channels and the selected subsystem simulation model, and conducting multiple rounds of regression testing after adjustment.
5. The hardware-in-the-loop simulation method for the vehicle domain controller under the AUTOSAR architecture according to claim 1, characterized in that, The establishment of the standardized mapping relationship library for HIL cabinet hardware channels includes at least the following: CAN / LIN communication interface configured for fixed rack access; The power drive interface uses a unified hardware board; The sensor input interface is configured with a standardized signal conditioning unit.
6. The hardware-in-the-loop simulation method for the vehicle domain controller under the AUTOSAR architecture according to claim 1, characterized in that, The configuration file that combines the mapping relationship library to construct the correspondence between the controller physical interface and the HIL cabinet channel includes: establishing the mapping relationship between the controller pins and the HIL cabinet channel through the hardware abstraction layer configuration file to form a reusable hardware interface configuration template.
7. The hardware-in-the-loop simulation method for the vehicle domain controller under the AUTOSAR architecture according to any one of claims 1 to 6, characterized in that, The complete simulation test bench includes: a vehicle body domain controller, a HIL cabinet containing at least I / O and communication boards and a real-time machine, and a host computer; wherein, the vehicle body domain controller and the HIL cabinet are connected by hardwire, and the HIL cabinet and the host computer are connected by Ethernet cable.
Citation Information
Patent Citations
Automobile hardware-in-loop simulation system
CN104794258A
Test system based on new energy automobile intelligent cabin domain and construction method thereof
CN114779744A
HIL automatic test method and system suitable for CAN signal interface of hybrid gearbox controller, and storage medium
CN117499284A
HIL test system and test method for air suspension
CN117631646A
HIL simulation test system of commercial vehicle domain controller
CN120143798A
Cited By
Domain controller automatic test scheduling method and system based on hierarchical software architecture
CN121578793A
