Vehicle controller test method and device and electronic equipment
By using a universal virtual powertrain model and hardware in-loop testing system, the problem of high performance testing of vehicle controllers is solved, and an efficient and flexible testing method is achieved, suitable for a variety of vehicle models and power configurations.
Patent Information
- Application Number
- CN202510396339.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-31
- Publication Date
- 2025-07-08
Smart Images

Figure CN120276410A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of vehicles, and in particular, to a test method, device, and electronic device for a vehicle controller. Background Art
[0002] In the field of new energy vehicles, as the core control unit, the Vehicle Control Unit (VCU for short) is responsible for coordinating and controlling the operation of the entire vehicle's power system, battery management system, and transmission system to ensure the safe and stable operation of the vehicle. The control performance of the vehicle controller directly affects the overall performance and safety of the vehicle.
[0003] In related technologies, when testing the control performance of a vehicle, an independent Hardware-in-the-Loop (HIL for short) test system is usually established for each vehicle model's power configuration to simulate the behavior of the vehicle's power system, so as to accurately evaluate the performance of the controller in a laboratory environment. However, with the increase in vehicle models and power configurations, the number of HIL test systems that need to be maintained has increased exponentially, which not only increases the development cost but also significantly increases the workload of maintenance and update. Especially when the parameters of the powertrain components change, corresponding adjustments need to be made in each HIL test system, which is undoubtedly a time-consuming and laborious process, and there is a technical problem of relatively high cost for testing the performance of vehicle controllers.
[0004] For the above technical problems, no effective solution has been proposed yet. Summary of the Invention
[0005] Embodiments of the present invention provide a test method, device, and electronic device for a vehicle controller, so as to at least solve the technical problem of relatively high cost for testing the performance of vehicle controllers in related technologies.
[0006] According to one aspect of the embodiments of the present invention, a test method for a vehicle controller is provided. The method may include: in response to a test request for a controller in a vehicle to be tested, obtaining the powertrain configuration information of the vehicle to be tested; based on the powertrain configuration information, identifying a target virtual powertrain model that matches the powertrain system of the vehicle to be tested from a general virtual powertrain model, where the general virtual powertrain model at least includes power component models for simulating the powertrain systems of multiple vehicle models, model parameters of the power component models, and topological connection relationships between the power component models in the powertrain systems of multiple vehicle models; based on the target virtual powertrain model, invoking a hardware-in-the-loop test system to test the controller, and obtaining a test result, where the test result is used to represent the control performance of the controller for the powertrain system of the vehicle to be tested.
[0007] Optionally, the powertrain configuration information at least includes the types of various powertrain components in the powertrain system of the vehicle to be tested, the configuration parameters of the various powertrain components, and the topological connection relationships among the various powertrain components. Based on the powertrain configuration information, a target virtual powertrain model that matches the powertrain system of the vehicle to be tested is identified from the general virtual powertrain model, including: identifying various target powertrain component models that match the various powertrain components from the general virtual powertrain model based on the types of the various powertrain components in the powertrain system of the vehicle to be tested; adjusting the model parameters of the various target powertrain component models based on the configuration parameters of the various powertrain components in the powertrain system of the vehicle to be tested to obtain the adjusted various target powertrain component models; and combining the various target powertrain component models in the general virtual powertrain model based on the topological connection relationships among the various powertrain components to obtain a target virtual powertrain model that matches the powertrain system of the vehicle to be tested.
[0008] Optionally, the method for testing the vehicle's controller further includes: adjusting the operating states of the various target powertrain component models in the general virtual powertrain model to the working state, and adjusting the operating states of the powertrain component models other than the various target powertrain component models in the general virtual powertrain model to the non-working state.
[0009] Optionally, based on the target virtual powertrain model, the hardware-in-the-loop test system is called to test the controller, and the test result is obtained, including: controlling the connection between the target virtual powertrain model and the controller to form a closed-loop test system; calling the hardware-in-the-loop test system to send a test signal to the controller; and controlling the controller to control the target virtual powertrain model based on the test signal to obtain the test result, where the test result is used to at least represent the matching degree between the control instruction of the controller of the vehicle to be tested and the response result of the target virtual powertrain model.
[0010] Optionally, the method for testing the vehicle's controller further includes: determining the control performance of the controller for the powertrain system of the vehicle to be tested based on the test result.
[0011] Optionally, determining the control performance of the controller for the powertrain system of the vehicle to be tested based on the test result includes: in response to the test result indicating that the matching degree between the control instruction of the controller of the vehicle to be tested and the response result of the target virtual powertrain model is greater than or equal to the matching threshold, determining that the control performance of the controller of the vehicle to be tested meets the standard; and in response to the test result indicating that the matching degree between the control instruction of the controller of the vehicle to be tested and the response result of the target virtual powertrain model is less than the matching threshold, determining that the control performance of the controller of the vehicle to be tested does not meet the standard.
[0012] Optionally, the method for testing the controller of a vehicle further includes: respectively obtaining the types of multiple power components in the powertrain systems of multiple vehicle models and the configuration parameters of the multiple power components; based on the types of the multiple power components in the powertrain systems of the multiple vehicle models, constructing a power component model library, where the power component model library includes power component models corresponding to the multiple power components respectively; based on the configuration parameters of the multiple power components in the powertrain systems of the multiple vehicle models, respectively configuring the model parameters of the power component models in the power component model library; based on the topological connection relationships between the multiple power components in the powertrain systems of the multiple vehicle models, constructing the topological connection relationships between the power component models in the power component model library to obtain a general virtual powertrain model.
[0013] According to another aspect of the embodiments of the present invention, there is also provided a testing device for a controller of a vehicle. The device may include: an obtaining unit, configured to obtain the powertrain configuration information of a vehicle to be tested in response to a test request for the controller in the vehicle to be tested; an identifying unit, configured to identify a target virtual powertrain model that matches the powertrain system of the vehicle to be tested from the general virtual powertrain model, where the general virtual powertrain model at least includes power component models for simulating the powertrain systems of multiple vehicle models, the model parameters of the power component models, and the topological connection relationships between the power component models in the powertrain systems of the multiple vehicle models; a testing unit, configured to, based on the target virtual powertrain model, call a hardware-in-the-loop testing system to test the controller to obtain a test result, where the test result is used to represent the control performance of the controller for the powertrain system of the vehicle to be tested.
[0014] According to another aspect of the embodiments of the present invention, there is also provided an electronic device, including: a memory storing an executable program; a processor configured to run the program, where when the program runs, it executes the methods in the various embodiments of the present invention.
[0015] According to another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium, where the computer-readable storage medium includes a stored executable program, and when the executable program runs, it controls the device where the computer-readable storage medium is located to execute the methods in the various embodiments of the present invention.
[0016] According to another aspect of the embodiments of the present invention, there is also provided a computer program product, including a computer program that implements the methods in the various embodiments of the present invention when executed by a processor.
[0017] According to another aspect of the embodiments of the present invention, there is also provided a computer program product, including a non-volatile computer-readable storage medium storing a computer program, where the computer program, when executed by a processor, implements the methods in the various embodiments of the present invention.
[0018] According to another aspect of the embodiments of the present invention, there is also provided a computer program, which, when executed by a processor, implements the methods in the various embodiments of the present invention.
[0019] In the embodiments of the present invention, in response to a test request of a controller in a vehicle to be tested, power-train configuration information of the vehicle to be tested is obtained; based on the power-train configuration information, a target virtual power-train model matching the power-train system of the vehicle to be tested is identified from a general virtual power-train model, where the general virtual power-train model at least includes power-component models in the power-train systems for simulating multiple vehicle models, model parameters of the power-component models, and topological connection relationships between the power-component models in the power-train systems of multiple vehicle models; based on the target virtual power-train model, a hardware-in-the-loop test system is called to test the controller, and a test result is obtained, where the test result is used to represent the control performance of the controller for the power-train system of the vehicle to be tested. That is to say, in the embodiments of the present invention, the general virtual power-train model integrates power-component models, configuration parameters, and their topological connection relationships of the power-train systems of multiple vehicle models. That is, the general virtual power-train model has high scalability and flexibility. In this way, when it is necessary to test the control performance of the controller of the vehicle to be tested, a model matching the power-train system of the vehicle to be tested can be automatically identified from the general virtual power-train model through the power-train configuration information of the vehicle to be tested, without separately establishing and maintaining a virtual power-train model for each vehicle model, significantly reducing the hardware purchase cost, software development cost, and related maintenance cost of the test system, and thus solving the technical problem of the high cost of testing the performance of vehicle controllers in the related art. Description of the Drawings
[0020] The drawings described herein are used to provide a further understanding of the present invention, form a part of this application, and the illustrative embodiments and descriptions of the present invention are used to explain the present invention and do not constitute an improper limitation to the present invention. In the drawings:
[0021] Figure 1 is a flowchart of a method for testing a controller of a vehicle according to an embodiment of the present invention;
[0022] Figure 2 is a schematic diagram of a general virtual power-train model according to an embodiment of the present invention;
[0023] Figure 3It is a schematic diagram of the powertrain configuration of a single-motor reducer vehicle model according to an embodiment of the present invention;
[0024] Figure 4 It is a schematic diagram of the powertrain configuration of a dual-motor multi-speed transmission vehicle model according to an embodiment of the present invention;
[0025] Figure 5 It is a schematic diagram of the powertrain configuration of a two-axle drive multi-speed transmission vehicle model according to an embodiment of the present invention;
[0026] Figure 6 It is a schematic diagram of the powertrain configuration of a two-axle drive dual-motor multi-speed transmission vehicle model according to an embodiment of the present invention;
[0027] Figure 7 It is a schematic diagram of the powertrain configuration of a single-motor P2 hybrid vehicle model according to an embodiment of the present invention;
[0028] Figure 8 It is a schematic diagram of the powertrain configuration of a dual-motor P2 hybrid vehicle model according to an embodiment of the present invention;
[0029] Figure 9 It is a schematic diagram of the powertrain configuration of a rear single-motor multi-speed P4 hybrid vehicle model according to an embodiment of the present invention;
[0030] Figure 10 It is a schematic diagram of the powertrain configuration of a rear dual-motor multi-speed P4 hybrid vehicle model according to an embodiment of the present invention;
[0031] Figure 11 It is a schematic diagram of a test device for the controller of a vehicle according to an embodiment of the present invention. Detailed implementation manners
[0032] In order to enable those skilled in the art to better understand the solution of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0033] It should be noted that the terms "first", "second", etc. in the description, claims and the above drawings of the present invention are used to distinguish similar objects and do not necessarily have to be used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances so that the embodiments of the present invention described here can be implemented in an order different from those illustrated or described here. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, functional component or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, functional components or devices.
[0034] According to an embodiment of the present invention, an embodiment of a method for testing a controller of a vehicle is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. And although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that here.
[0035] Figure 1 is a flowchart of a method for testing a controller of a vehicle according to an embodiment of the present invention, as Figure 1 shown, the method may include the following steps:
[0036] Step S101, in response to a test request for a controller in a vehicle to be tested, obtain the powertrain configuration information of the vehicle to be tested.
[0037] In the technical solution provided in step S101 of the present invention above, the test request is used to represent testing the control performance of the controller in the vehicle to be tested. The powertrain configuration information of the vehicle to be tested includes the types of various powertrain components in the powertrain system of the vehicle to be tested, the configuration parameters of various powertrain components, and the topological connection relationship between various powertrain components.
[0038] In this embodiment, during the development or verification stage of the vehicle, it is necessary to perform hardware-in-the-loop (HIL) testing on the controller in the vehicle to test the control performance of the controller of the vehicle on the powertrain system of the vehicle. Among them, the controller in the vehicle to be tested can be any controller in the vehicle, for example, a vehicle controller, a transmission controller, a motor controller, a battery management controller, etc., and no specific limitation is made here.
[0039] Optionally, before testing the control performance of the controller in the vehicle to be tested, a test request can be triggered to be sent by the controller in the vehicle to be tested. After responding to the test request of the controller in the vehicle to be tested, the powertrain configuration information of the vehicle to be tested can be obtained, where the powertrain configuration information of the vehicle to be tested is used to characterize the composition of the powertrain system of the vehicle to be tested.
[0040] Step S102: Based on the powertrain configuration information, identify a target virtual powertrain model that matches the powertrain system of the vehicle to be tested from the general virtual powertrain model.
[0041] In the technical solution provided in step S102 of the present invention above, the general virtual powertrain model at least includes power component models for simulating the powertrain systems of multiple vehicle models, model parameters of the power component models, and the topological connection relationships between the power component models in the powertrain systems of multiple vehicle models.
[0042] In this embodiment, a general virtual powertrain model is pre-constructed. The model library of the general powertrain model includes multiple power component models, such as power component models corresponding to power components such as motors, batteries, internal combustion engines, gearboxes, and drive axles. These power component models can simulate the dynamic characteristics of the corresponding power components, and the general virtual powertrain model includes a parameterized interface that allows users to input or adjust the model parameters of the power component models according to the powertrain configurations of different vehicle models. In addition, the general virtual powertrain model also includes a set of topological connection structures that can simulate the physical connection relationships and logical control relationships between the various power components in the powertrain systems of different vehicle models. Furthermore, to meet the test requirements of quickly switching different powertrain configurations, an efficient model switching mechanism is embedded in the general virtual powertrain model for quickly switching from one powertrain configuration to another without having to reconstruct the entire virtual powertrain model.
[0043] Optionally, after obtaining the powertrain configuration information of the vehicle to be tested, a target virtual powertrain model that matches the powertrain system of the vehicle to be tested can be identified from the pre-constructed general virtual powertrain model according to the powertrain configuration information of the vehicle to be tested.
[0044] For example, through the powertrain configuration information of the vehicle under test, the types of various power components in the powertrain system of the vehicle under test are obtained. Then, based on the types of various power components in the powertrain system of the vehicle under test, a power component model matching the types of various power components of the vehicle under test is identified from the general virtual powertrain model. After that, according to the configuration parameters of various power components included in the powertrain configuration information of the vehicle under test, the model parameters of the identified power component model are adjusted. Then, according to the topological connection relationship between various power components in the powertrain system of the vehicle under test, the determined various power component models are combined in the general virtual powertrain model to obtain the target virtual powertrain model corresponding to the powertrain system of the vehicle under test.
[0045] Optionally, assume that the controller under test is the vehicle controller of a vehicle equipped with a dual motor and a multi-speed transmission. Based on the powertrain configuration information of this vehicle, a power component model matching the power components in the powertrain configuration information of this vehicle can be selected from the model library of the general virtual powertrain model. Then, according to the topological connection relationship between the power components in the powertrain system of this vehicle, the determined power component models are topologically connected to obtain a virtual powertrain model of a dual motor multi-speed transmission. In addition, according to the configuration parameters of the power components in the powertrain system of this vehicle, the model parameters of the power component models in the virtual powertrain model can be adjusted, and the adjusted virtual powertrain model is used as the target virtual powertrain model corresponding to the powertrain system of this vehicle.
[0046] In this step, a general virtual powertrain model is pre-constructed. The general virtual powertrain model is designed as a flexible and extensible model architecture, aiming to simulate and cover the powertrain systems of various vehicle models. Based on this, after determining the powertrain configuration information of the vehicle under test, a target virtual powertrain model matching the powertrain system of the vehicle under test can be identified from the general virtual powertrain configuration model, without the need to separately construct a virtual powertrain model according to the powertrain configuration information of the vehicle under test, significantly reducing the hardware purchase cost and software development cost of the test system, and greatly improving the test efficiency of the control performance of the vehicle controller.
[0047] Step S103: Based on the target virtual powertrain model, call the hardware-in-the-loop test system to test the controller and obtain the test result.
[0048] In the technical solution provided in step S103 of the present invention above, a Hardware-in-the-Loop (HIL) test system is generally used to test the control performance of a vehicle controller during the development process of a vehicle. During the operation of the vehicle, the vehicle controller needs to closely cooperate with various power components in the powertrain system to complete the efficient operation of the entire powertrain system. Based on this, the HIL test system can test the communication and collaborative working performance between the vehicle controller and various power components in the vehicle's powertrain system. In the HIL test system, the actual operating environment and operating conditions of the vehicle to be tested can be simulated to comprehensively test the control performance of the controller of the vehicle to be tested, so as to ensure that the performance of the controller of the vehicle to be tested meets the design requirements under various driving conditions. Among them, the performance test of the controller of the vehicle to be tested by the HIL test system includes but is not limited to: motor control, torque arbitration, battery management, and driving intention recognition, etc.
[0049] In this embodiment, after obtaining the target virtual powertrain model matching the powertrain system of the vehicle to be tested, the Hardware-in-the-Loop test system can be called to test the control performance of the controller of the vehicle to be tested, and then the test result can be obtained, where the test result is used to represent the control performance of the controller for the powertrain system of the vehicle to be tested.
[0050] For example, since the target virtual powertrain model includes the power component models, parameter configurations corresponding to multiple power components in the powertrain system of the vehicle to be tested, and the topological connection relationships between multiple power component models, that is, the target virtual powertrain model simulates a virtual environment almost the same as the powertrain system of the vehicle to be tested. Based on this, the controller to be tested is connected to the target virtual powertrain model of the HIL test system, so that the controller of the vehicle to be tested can interact with the target virtual powertrain model. For example, the controller of the vehicle to be tested can send a control instruction to the target virtual powertrain model to control the power component model in the target virtual powertrain model, where the control instruction can be generated according to the performance of the controller to be tested.
[0051] Optionally, the HIL test system can record various interaction data between the controller of the vehicle to be tested and the target virtual powertrain model, including the input signal, output signal, response time of the controller of the vehicle to be tested, and the feedback signal of the target virtual powertrain model, etc. By analyzing the recorded data, the control performance of the controller of the vehicle to be tested for the power components in the powertrain system under different working conditions can be evaluated, where the control performance includes but is not limited to control accuracy, stability, response speed, etc.
[0052] In the above steps S101 to S103 of the present invention, the general virtual powertrain model integrates the powertrain component models, configuration parameters, and their topological connection relationships of multiple vehicle models' powertrain systems. That is, the general virtual powertrain model has high scalability and flexibility. In this way, when it is necessary to test the control performance of the controller of the vehicle under test, the model matching the powertrain system of the vehicle under test can be automatically identified from the general virtual powertrain model based on the powertrain configuration information of the vehicle under test, without the need to separately establish and maintain virtual powertrain models for each vehicle model, significantly reducing the hardware purchase cost, software development cost, and related maintenance cost of the test system, achieving the technical effect of improving the test efficiency of the control performance of the vehicle controller, and thus solving the technical problem of low test efficiency of the control performance of the vehicle controller.
[0053] The above method of this embodiment will be further introduced below.
[0054] As an optional embodiment, the powertrain configuration information at least includes the types of multiple powertrain components in the powertrain system of the vehicle under test, the configuration parameters of multiple powertrain components, and the topological connection relationships between multiple powertrain components. Step S102, based on the powertrain configuration information, identifying a target virtual powertrain model that matches the powertrain system of the vehicle under test from the general virtual powertrain model, includes: identifying multiple target powertrain component models that match the multiple powertrain components from the general virtual powertrain model based on the types of multiple powertrain components in the powertrain system of the vehicle under test; adjusting the model parameters of the multiple target powertrain component models based on the configuration parameters of the multiple powertrain components in the powertrain system of the vehicle under test to obtain the adjusted multiple target powertrain component models; and combining the multiple target powertrain component models in the general virtual powertrain model based on the topological connection relationships between the multiple powertrain components to obtain a target virtual powertrain model that matches the powertrain system of the vehicle under test.
[0055] In this embodiment, the powertrain configuration information of the vehicle under test at least includes the types of multiple powertrain components in the powertrain system of the vehicle under test, the configuration parameters of multiple powertrain components, and the topological connection relationships between multiple powertrain components. Among them, the types of multiple powertrain components are used to indicate the types of powertrain components included in the powertrain system of the vehicle under test, such as motors, batteries, internal combustion engines, gearboxes, drive axles, etc. The configuration parameters of multiple powertrain components are used to describe the characteristics and performance of the powertrain components. For example, the configuration parameters of a motor may include rated power, maximum torque, efficiency curve, etc., which are only exemplary examples here. The topological connection relationships between multiple powertrain components are used to describe the physical arrangement and logical control relationships of multiple powertrain components in the vehicle under test.
[0056] Optionally, after obtaining the powertrain configuration information of the vehicle to be tested, corresponding powertrain component models can be selected from the model library of the general virtual powertrain model as the target powertrain component models according to the types of powertrain components of the vehicle to be tested. For example, if the vehicle to be tested is a dual-motor hybrid vehicle, two motor models, one internal combustion engine model, one transmission model, and two drive axle models can be identified from the model library of the general virtual powertrain model.
[0057] Optionally, after selecting the target powertrain component models corresponding to the powertrain components of the vehicle to be tested from the model library of the general virtual powertrain model, the model parameters of the selected powertrain component models can be adjusted according to the powertrain component configuration parameters of the vehicle to be tested to ensure that the powertrain component models can accurately reflect the characteristics of the corresponding powertrain components. For example, for the motor model, parameters such as the rated power and maximum torque of the motor can be input; for the transmission model, parameters such as the number of gears and gear ratios can be set. This is only an exemplary example here.
[0058] Optionally, after adjusting the model parameters of the selected powertrain component models, the adjusted target powertrain component models can be combined together according to the topological connection relationship between multiple powertrain components in the vehicle to be tested to form a complete target virtual powertrain model that matches the powertrain system of the vehicle to be tested. For example, the model of a dual-motor hybrid vehicle will include the parallel connection of the internal combustion engine and the motor, the series connection of the motor and the drive axle, and the structure where the transmission is between the motor and the drive axle. This is only an exemplary example here.
[0059] For example, assume that the vehicle to be tested is a pure electric vehicle equipped with a single motor and a fixed reduction ratio drive axle. Based on this, a single motor model and a fixed reduction ratio drive axle model can be first selected from the model library of the general virtual powertrain model as the target powertrain component models. Then, according to the configuration parameters of the powertrain components in the vehicle (such as the power of the motor is 150 kW and the reduction ratio of the drive axle is 10:1), the model parameters of the target powertrain component models are adjusted to ensure that the target powertrain component models can accurately reflect the actual powertrain characteristics of the vehicle to be tested. Finally, following the topological connection relationship of the vehicle powertrain, the motor model is connected to the drive axle model to form a complete virtual powertrain system.
[0060] In the above steps, the identification, parameter adjustment, and topological combination of the powertrain component models based on the model library of the general virtual powertrain model can greatly reduce the workload of model maintenance. Only one model library needs to be maintained to meet the test requirements of multiple vehicle models, reducing the long-term maintenance cost, avoiding the repeated development and maintenance of multiple independent HIL test models, and optimizing the resource utilization efficiency.
[0061] As an alternative embodiment, the method for testing the controller of a vehicle further includes: adjusting the operating states of multiple target power component models in the general virtual powertrain model to the working state, and adjusting the operating states of the power component models in the general virtual powertrain model other than the multiple target power component models to the non-working state.
[0062] In this embodiment, after the target virtual powertrain model is configured, it is necessary to adjust the operating state of the target power component model in the target virtual powertrain model to the working state so that the target power component model participates in the HIL test of the controller of the vehicle under test. Among them, the power component model in the working state can provide the same functions and behaviors as the power train components of the actual vehicle, thereby ensuring the authenticity of the test environment and the validity of the test results.
[0063] Optionally, for the power component models in the general virtual powertrain model that are not included in the target virtual powertrain model or the power component models that do not need to be considered in the current test scenario, they should be set to the non-working state. The non-working state means that these power component models will not receive or respond to any instructions during the test, nor will they generate any outputs. For example, the power component model can be "shielded" or "turned off" to avoid interfering with the test results.
[0064] For example, if the vehicle under test is a dual-motor P2 hybrid vehicle, then in the target virtual powertrain model, the two motors, the transmission, and the drive axle model will be set to the working state, while the internal combustion engine and the motor models at non-P2 positions will be set to the non-working state. This setting ensures that the HIL test focuses on the control logic and performance of the dual-motor P2 hybrid vehicle, avoiding data noise and waste of computing resources that may be brought by the participation of irrelevant models.
[0065] In this step, by setting the target power component model related to the power train system of the vehicle under test to the working state and setting the irrelevant models to the non-working state, an efficient and accurate HIL test environment can be constructed, significantly improving the accuracy of the test and the resource utilization efficiency.
[0066] As an alternative embodiment, in step S103, based on the target virtual powertrain model, the hardware-in-the-loop test system is called to test the controller, and the test results are obtained, including: controlling the connection between the target virtual powertrain model and the controller to form a closed-loop test system; calling the hardware-in-the-loop test system to send a test signal to the controller; based on the test signal, controlling the controller to control the target virtual powertrain model to obtain the test results, where the test results are used to at least represent the matching degree between the control instructions of the controller of the vehicle under test and the response results of the target virtual powertrain model.
[0067] In this embodiment, the controller of the vehicle to be tested is tested by the hardware-in-the-loop test system based on the constructed target virtual powertrain model. When testing the controller, it is necessary to connect the target virtual powertrain model to the controller to form a closed-loop test system, so as to ensure that the output (control instruction) of the controller can directly act on the target virtual powertrain model, and at the same time, the output of the target virtual powertrain model (such as power state, torque feedback, etc.) can be read by the controller in real time and affect its subsequent control decisions.
[0068] Optionally, after forming the closed-loop test system, the HIL test system can be called to test the performance of the controller. For example, the HIL test system will include a series of test cases and operating conditions to simulate the behavior of the powertrain under different driving and environmental conditions. By calling the HIL test system, these test signals can be sent to the controller. Such as, simulated driving object operation signals (acceleration, deceleration, gear shifting, etc.), vehicle state signals (vehicle speed, battery state, motor temperature, etc.) and environmental condition signals (such as temperature, air pressure). The sending of these signals is completed through the interface between the test system and the controller, ensuring the accuracy and timeliness of the signals.
[0069] Optionally, when the controller receives the test signals, it can calculate the corresponding control instructions according to its internal control logic and algorithms, such as motor torque instructions, battery charge and discharge strategies, gear shifting requests, etc. These control instructions are then sent to the target virtual powertrain model, and the target virtual powertrain model will adjust its behavior according to the received control instructions to simulate the real powertrain response. Such as, motor torque output, battery power change, gearbox gear shifting action, etc. This process simulates the working condition of the controller in an actual vehicle, and its purpose is to evaluate whether the control strategy of the controller can effectively and stably manage the powertrain system.
[0070] Optionally, the test results include the control instructions of the controller, the response data of the target virtual powertrain model, and the matching degree between the two. By recording and analyzing these data, the performance of the controller can be evaluated, such as control accuracy, response speed, stability, etc. Based on the test results, it is possible to intuitively understand the performance of the controller under simulated working conditions, whether it can accurately control the powertrain system, and whether there are performance bottlenecks or design problems under specific driving conditions.
[0071] For example, assume that the controller to be tested is the vehicle controller of a new energy vehicle, and the vehicle is equipped with dual motors and a multi-speed transmission. In the HIL test, the target virtual powertrain model will include two motor models, a transmission model, and component models such as the corresponding battery and drive axle. When the test system sends a simulated acceleration signal to the controller, the controller calculates the torque command for the motor and the shift request for the transmission based on this signal. The controller sends these commands to the target virtual powertrain model, and the target virtual powertrain model then simulates the torque output of the motor and the shift action of the transmission. By recording the test signal, the control commands of the controller, and the response data of the model, it is possible to evaluate the control effect of the controller on the motor and the transmission under acceleration conditions, as well as the response characteristics of the entire powertrain system. If the control commands of the controller can make the model accurately simulate the expected powertrain behavior, then it can be determined that the matching degree between the controller and the target virtual powertrain model is relatively high, and the control performance of the controller for the vehicle's powertrain system meets the standards.
[0072] In this step, by using the HIL test system and the constructed target virtual powertrain model to test the controller of the vehicle to be tested, not only can the control performance of the controller be comprehensively evaluated, but also feedback information can be provided for system design to help optimize the controller algorithm and improve the overall efficiency and reliability of the vehicle powertrain system.
[0073] As an optional embodiment, the test method for the vehicle controller further includes: determining the control performance of the controller for the powertrain system of the vehicle to be tested based on the test results.
[0074] In this embodiment, after obtaining the test results of the controller of the vehicle to be tested, the control performance of the controller for the powertrain system of the vehicle to be tested can be determined according to the test results.
[0075] For example, the test results include all the control commands of the controller during the test and the response results shown by the target virtual powertrain model after receiving these commands. By analyzing these data, the matching degree between the control commands and the model response can be calculated. This calculation usually involves multiple indicators such as control accuracy, response time, and stability, and a quantitative value of the matching degree is synthesized from these multiple indicators through a mathematical model or algorithm.
[0076] Optionally, after obtaining the matching degree, the matching degree can be compared with a matching threshold to determine whether the control performance of the controller for the powertrain system of the vehicle to be tested meets the requirements.
[0077] Next, the process of comparing the matching degree with the matching threshold to determine whether the control performance of the controller for the powertrain system of the vehicle to be tested meets the requirements will be further introduced.
[0078] As an alternative embodiment, based on the test results, the control performance of the controller for the powertrain system of the vehicle under test is determined, including: in response to the test results indicating that the matching degree between the control command of the controller of the vehicle under test and the response result of the target virtual powertrain model is greater than or equal to the matching threshold, it is determined that the control performance of the controller of the vehicle under test meets the standard; in response to the test results indicating that the matching degree between the control command of the controller of the vehicle under test and the response result of the target virtual powertrain model is less than the matching threshold, it is determined that the control performance of the controller of the vehicle under test does not meet the standard.
[0079] In this embodiment, as introduced above, the matching degree refers to the similarity or consistency between the control command of the controller and the response state shown by the target virtual powertrain model. This index can quantify whether the control effect of the controller meets the expectation, that is, whether the controller can effectively control the target virtual powertrain model to operate according to the design requirements. The matching threshold is a preset standard used to judge whether the control performance of the controller meets the standard. Among them, the matching threshold can be comprehensively set based on various factors such as the control objectives of the powertrain system, vehicle performance indicators, and industry standards.
[0080] Optionally, the matching degree is compared with a preset matching threshold. If the matching degree is greater than or equal to the matching threshold, it indicates that the control command of the controller can effectively guide the target virtual powertrain model to achieve the expected dynamic response, and the control performance of the controller is regarded as meeting the standard, indicating that the algorithm design of the controller is reasonable and can precisely control the vehicle's power system, maintaining stability and efficiency under various working conditions. On the contrary, if the matching degree is less than the matching threshold, it means that the controller fails to fully control the powertrain model under certain test conditions, resulting in a significant deviation between the output of the model and the expectation, and the control performance of the controller is judged as not meeting the standard, indicating that the control performance of the controller does not reach the expected standard. This result may be caused by reasons such as algorithm design defects, improper parameter settings, and too long controller response time. In this case, it is necessary to deeply analyze and adjust the control logic or algorithm of the controller to improve its control performance.
[0081] It should be noted that in the embodiment of the present invention, a general virtual powertrain model is constructed in advance according to the power components included in the powertrain systems of multiple vehicle models and the topological connection relationships between the power components, providing model resources for the powertrain tests of different vehicle models, avoiding the repetitive work of building a model from scratch for each test, and greatly saving time and cost.
[0082] Next, the process of constructing the general virtual powertrain model will be further introduced.
[0083] As an alternative embodiment, the test method for the vehicle's controller further includes: respectively obtaining the types of multiple power components and the configuration parameters of multiple power components in the powertrain systems of multiple vehicle models; constructing a power component model library based on the types of multiple power components in the powertrain systems of multiple vehicle models, where the power component model library includes power component models corresponding to multiple power components respectively; configuring the model parameters of the power component models in the power component model library based on the configuration parameters of multiple power components in the powertrain systems of multiple vehicle models; constructing the topological connection relationships between the power component models in the power component model library based on the topological connection relationships between multiple power components in the powertrain systems of multiple vehicle models, to obtain a general virtual powertrain model.
[0084] In this embodiment, the configuration information of the powertrain systems of different vehicle models is collected in advance, which includes multiple types of power components (such as motors, batteries, engines, transmissions, etc.) contained in each powertrain system, the detailed configuration parameters of these power components (such as rated power, torque, battery capacity, gear ratio, etc.), and the topological connection relationships between power components in different vehicle models.
[0085] Optionally, after obtaining the configuration information of the powertrain systems of different vehicle models, a power component model library can be constructed, which includes power component models corresponding to each type of power component. For example, the model library will include motor models, battery models, transmission models of different models, etc. Each power component model will be designed based on the principles and characteristics of the actual power component to ensure that the virtual model can accurately reflect the behavior of the power component in reality.
[0086] Optionally, after the model library is constructed, the corresponding power component model parameters in the model library can be configured according to the configuration parameters of the power components in each vehicle model. This process ensures that the characteristics of the model are consistent with the actual power components.
[0087] Optionally, after configuring the parameters, the topological connection relationships between the power component models in the model library can be constructed based on the topological connection relationships between power components in the powertrain systems of multiple vehicle models, so as to obtain a general virtual powertrain model. For example, in some vehicle models, the motor is directly connected to the drive axle; while in other vehicle models, the motor may be connected to the drive axle through a transmission. By connecting the power component models according to the topological structure of the actual vehicle, a general model that can adapt to different powertrain configurations can be constructed. This model not only includes all possible power component models, but also accurately reflects the connection relationships between power components in different powertrain configurations, providing a flexible platform for the subsequent rapid construction of virtual powertrain models based on vehicle models.
[0088] In this step, by pre-building a general virtual powertrain model, ready-made model resources are provided for the powertrain tests of different vehicle models, avoiding the repetitive work of building a model from scratch for each test, and greatly saving time and costs. By configuring the model parameters, it can easily adapt to the specific configurations of different vehicle models without fundamentally modifying the model, enhancing the adaptability of the model and the flexibility of the tests. Moreover, the general virtual powertrain model can adapt to the topological connection relationships of multiple vehicle models, thus providing a more realistic and diverse powertrain environment for the tests, which helps to more comprehensively evaluate the performance of the controller.
[0089] The technical solutions of the embodiments of the present invention will be illustrated below in conjunction with preferred embodiments.
[0090] Currently, as the central control unit of a vehicle, the vehicle controller is the core of the entire vehicle control system and also the regulation center of each subsystem. The hardware control resources of the vehicle controller are generally quite common and not of particularly complex types. Therefore, generally, a vehicle controller hardware can be adapted to various vehicle models with different powertrain configurations. During vehicle development, HIL tests are usually conducted on the vehicle controller to ensure that the vehicle controller can operate normally under various driving conditions and system configurations.
[0091] In the related art, since HIL tests require a virtual environment to simulate the actual operation of a vehicle, whenever it is necessary to test a vehicle model with a specific powertrain configuration, a virtual powertrain model matching the powertrain system of the vehicle model is usually established. This model needs to accurately reflect the powertrain configuration of the vehicle model, including the characteristics of all power components and transmission systems, as well as the interaction relationships between each power component.
[0092] For example, if developing a brand-new pure electric vehicle model, its powertrain configuration may include a high-power motor and an advanced battery management system. To test the performance of the vehicle controller on this model, a virtual powertrain model that matches the powertrain system of this model needs to be created. This model not only needs to include the mathematical models of the motor and the battery, but also needs to simulate the control logic, energy flow between the motor and the battery, and the communication protocol with the vehicle controller. Similarly, if the object of testing is a hybrid vehicle model, whose configuration may include an engine, an electric motor, a battery, and a complex hybrid powertrain, then the corresponding virtual powertrain model must include these additional components and the control logic between the components. This way of establishing a virtual powertrain model separately for each powertrain configuration can ensure the accuracy and pertinence of the test, but at the same time brings huge workload and resource consumption. Especially when the diversification of vehicle models and the personalized requirements for power configurations are increasing day by day, this resource consumption will increase exponentially, resulting in a sharp rise in maintenance costs.
[0093] To solve the above technical problems, the embodiments of the present invention provide a method for testing a controller of a vehicle, which encapsulates the mathematical models and control logics of all possible powertrain components (such as motors, battery management systems, engines, gearboxes, etc.) into a unified model library to form a general virtual powertrain model. Then, based on different vehicle model requirements, the parameters of each powertrain component model in the general virtual powertrain model are dynamically adjusted to match a specific powertrain configuration, so as to obtain a virtual powertrain model that matches the specific powertrain configuration. Then, the controller in the vehicle to be tested is tested based on the virtual powertrain model. That is to say, in the embodiments of the present invention, by maintaining a general virtual powertrain model, the powertrain configuration can be quickly switched according to a specific vehicle model, and virtual powertrain models can be provided for multiple vehicle models, which can not only meet the tests of different vehicle models with diversification and personalized power configuration requirements, but also significantly reduce resource consumption and maintenance costs, thereby solving the technical problem in the related art that the test cost of the vehicle controller is relatively high due to establishing a virtual powertrain model for each vehicle model.
[0094] Next, the general virtual powertrain model in the embodiments of the present invention will be introduced.
[0095] Figure 2 is a schematic diagram of a general virtual powertrain model according to an embodiment of the present invention. As Figure 2 shown, it shows an integrated powertrain model, which can be adapted to the powertrain configurations of different vehicle models by means of parameter modification or component shielding. As Figure 2As shown, the general virtual powertrain model includes: engine 201, clutch 202, motor 203, transmission system 204, motor 205, transmission system 206, drive axle 207, motor 208, transmission system 209, motor 210, transmission system 211, and drive axle 212.
[0096] Optionally, Figure 2 These power component models exhibit several typical powertrain configurations, including but not limited to: single-motor reducer models, single-motor multi-speed transmission models, dual-motor multi-speed transmission models, dual-axle drive multi-speed transmission models, dual-axle drive dual-motor multi-speed transmission models, single-motor P2 hybrid models, dual-motor P2 hybrid models, rear single-motor multi-speed P4 hybrid models, and rear dual-motor multi-speed P4 hybrid models.
[0097] Optionally, Figure 3 is a schematic diagram of the powertrain configuration of a single-motor reducer model according to an embodiment of the present invention. As Figure 3 shown, the powertrain configuration of the single-motor reducer model includes motor 301, transmission system 302, and drive axle 303. Among them, the powertrain configuration of the single-motor reducer model is also adapted to single-motor multi-speed transmission models.
[0098] Optionally, Figure 4 is a schematic diagram of the powertrain configuration of a dual-motor multi-speed transmission model according to an embodiment of the present invention. As Figure 4 shown, the powertrain configuration of the single-motor multi-speed transmission model includes: motor 401, motor 402, transmission system 403, and drive axle 404.
[0099] Optionally, Figure 5 is a schematic diagram of the powertrain configuration of a dual-axle drive multi-speed transmission model according to an embodiment of the present invention. As Figure 5 shown, the powertrain configuration of the dual-axle drive multi-speed transmission model includes motor 501, transmission system 502, drive axle 503, motor 504, transmission system 505, and drive axle 506.
[0100] Optionally, Figure 6 is a schematic diagram of the powertrain configuration of a dual-axle drive dual-motor multi-speed transmission model according to an embodiment of the present invention. As Figure 6 shown, the powertrain configuration of the dual-axle drive dual-motor multi-speed transmission model includes motor 601, motor 602, transmission system 603, drive axle 604, motor 605, motor 606, transmission system 607, and drive axle 608.
[0101] Optionally, Figure 7It is a schematic diagram of the powertrain configuration of a single-motor P2 hybrid vehicle according to an embodiment of the present invention. As Figure 7 shown, the powertrain configuration of this single-motor P2 hybrid vehicle includes an engine 701, a clutch 702, a motor 703, a transmission system 704, and a drive axle 705.
[0102] Optionally, Figure 8 It is a schematic diagram of the powertrain configuration of a dual-motor P2 hybrid vehicle according to an embodiment of the present invention. As Figure 8 shown, the powertrain configuration of this dual-motor P2 hybrid vehicle includes an engine 801, a clutch 802, a motor 803, a motor 804, a transmission system 805, and a drive axle 806.
[0103] Optionally, Figure 9 It is a schematic diagram of the powertrain configuration of a rear single-motor multi-speed P4 hybrid vehicle according to an embodiment of the present invention. As Figure 9 shown, the powertrain configuration of this rear single-motor multi-speed P4 hybrid vehicle includes an engine 901, a clutch 902, a transmission system 903, a drive axle 904, a motor 905, a transmission system 906, and a drive axle 907.
[0104] Optionally, Figure 10 It is a schematic diagram of the powertrain configuration of a rear dual-motor multi-speed P4 hybrid vehicle according to an embodiment of the present invention. As Figure 10 shown, the powertrain configuration of this rear dual-motor multi-speed P4 hybrid vehicle includes an engine 1001, a clutch 1002, a transmission system 1003, a drive axle 1004, a motor 1005, a motor 1006, a transmission system 1007, and a drive axle 1008.
[0105] Optionally, Figures 3 to 10 lists the powertrain configurations of various different vehicle models. In addition, there can be other vehicle models, which are not limited here. And Figure 2 the general virtual powertrain model shown is established according to the powertrain configurations of various different vehicle models. This general virtual powertrain model covers various possible configurations from single-motor, multi-motor, single-stage reducer, multi-speed gearbox to P2, P4 hybrid vehicles, etc. In this way, when it is necessary to test a certain specific vehicle model, only need to activate the power component models related to the powertrain system of this vehicle model in the general virtual powertrain model and shield other power component models, then the general virtual powertrain model can be quickly converted into a virtual powertrain model matching the specific powertrain configuration, greatly reducing the time and resource consumption for model construction. That is to say, by establishing a general virtual powertrain model as Figure 2The general virtual powertrain model shown can significantly reduce the workload of later maintenance. When a certain parameter of the power component (such as motor efficiency, battery capacity) needs to be updated, only the corresponding parameter modification needs to be made in the general virtual powertrain model, rather than separately adjusting the model for each vehicle model. This greatly simplifies the maintenance process, reduces costs, and improves the efficiency of development and testing.
[0106] For example, taking Figure 3 the single-motor reducer vehicle model as an example, when constructing the virtual powertrain model corresponding to the powertrain configuration of this single-motor reducer vehicle model, only the motor 203, transmission system 204, and drive axle 207 in the general virtual powertrain model in Figure 2 need to be activated, and the rest of the power component models need to be masked.
[0107] Optionally, after obtaining the virtual powertrain model that matches the powertrain configuration of a specific vehicle, the virtual powertrain model can be connected to the vehicle controller to form a closed-loop test system. During the test, the vehicle controller receives simulated signals from the HIL test system (such as driver commands, vehicle speed, battery SOC, etc.), and performs simulated control on the virtual powertrain model according to its internal control logic. By monitoring the output signals of the vehicle controller and the responses of the virtual powertrain model, the control performance of the vehicle controller on the power components in the vehicle's powertrain system can be evaluated, including its response speed, control accuracy, and the effectiveness of the energy management strategy under different working conditions.
[0108] Optionally, based on the test results, it can be analyzed whether the control logic of the controller is correct, whether the control performance meets the expectations, and whether there are potential problems under a specific powertrain configuration. Through this process, the vehicle controller can be iteratively optimized to ensure its stable and efficient operation in all powertrain configurations.
[0109] According to an embodiment of the present invention, a test device for a vehicle controller is also provided. It should be noted that this test device for a vehicle controller can be used to execute the test method for a vehicle controller in the embodiment.
[0110] Figure 11 is a schematic diagram of a test device for a vehicle controller according to an embodiment of the present invention. As Figure 11 shown, the test device 1100 for a vehicle controller may include: an acquisition unit 1101, an identification unit 1102, and a test unit 1103.
[0111] The acquisition unit 1101 is configured to obtain the powertrain configuration information of the vehicle to be tested in response to a test request for the controller in the vehicle to be tested.
[0112] An identification unit 1102, configured to identify a target virtual powertrain model that matches the powertrain system of a vehicle to be tested from a general virtual powertrain model based on powertrain configuration information, where the general virtual powertrain model at least includes powertrain component models for simulating powertrain systems of multiple vehicle models, model parameters of the powertrain component models, and topological connection relationships between the powertrain component models in the powertrain systems of multiple vehicle models.
[0113] A testing unit 1103, configured to test a controller by invoking a hardware-in-the-loop testing system based on the target virtual powertrain model to obtain a test result, where the test result is used to represent the control performance of the controller for the powertrain system of the vehicle to be tested.
[0114] Optionally, the identification unit 1102 is further configured to: identify multiple target powertrain component models that match multiple powertrain components from the general virtual powertrain model based on the types of multiple powertrain components in the powertrain system of the vehicle to be tested; adjust the model parameters of the multiple target powertrain component models based on the configuration parameters of the multiple powertrain components in the powertrain system of the vehicle to be tested to obtain adjusted multiple target powertrain component models; and combine the multiple target powertrain component models in the general virtual powertrain model based on the topological connection relationships between the multiple powertrain components to obtain a target virtual powertrain model that matches the powertrain system of the vehicle to be tested.
[0115] Optionally, the testing device 1100 for the controller of the vehicle is further configured to: adjust the operating states of multiple target powertrain component models in the general virtual powertrain model to an operating state, and adjust the operating states of powertrain component models other than the multiple target powertrain component models in the general virtual powertrain model to a non-operating state.
[0116] Optionally, the testing unit 1103 is further configured to: control the connection between the target virtual powertrain model and the controller to form a closed-loop testing system; invoke the hardware-in-the-loop testing system to send a test signal to the controller; and control the controller to control the target virtual powertrain model based on the test signal to obtain a test result, where the test result is used to at least represent the matching degree between the control instruction of the controller of the vehicle to be tested and the response result of the target virtual powertrain model.
[0117] Optionally, the testing device 1100 for the controller of the vehicle is further configured to: determine the control performance of the controller for the powertrain system of the vehicle to be tested based on the test result.
[0118] Optionally, the test device 1100 for the controller of the vehicle is further configured to: determine that the control performance of the controller of the vehicle to be tested meets the standard in response to the test result indicating that the matching degree between the control instruction of the controller of the vehicle to be tested and the response result of the target virtual powertrain model is greater than or equal to the matching threshold; and determine that the control performance of the controller of the vehicle to be tested does not meet the standard in response to the test result indicating that the matching degree between the control instruction of the controller of the vehicle to be tested and the response result of the target virtual powertrain model is less than the matching threshold.
[0119] Optionally, the test device 1100 for the controller of the vehicle is further configured to: respectively obtain the types of multiple power components in the powertrain systems of multiple vehicle models and the configuration parameters of the multiple power components; build a power component model library based on the types of the multiple power components in the powertrain systems of the multiple vehicle models, where the power component model library includes power component models corresponding to the multiple power components respectively; configure the model parameters of the power component models in the power component model library respectively based on the configuration parameters of the multiple power components in the powertrain systems of the multiple vehicle models; and build the topological connection relationships between the power component models in the power component model library based on the topological connection relationships between the multiple power components in the powertrain systems of the multiple vehicle models to obtain a general virtual powertrain model.
[0120] In this embodiment, the general virtual powertrain model integrates the power component models, configuration parameters and their topological connection relationships of the powertrain systems of multiple vehicle models. That is, the general virtual powertrain model has high scalability and flexibility. In this way, when it is necessary to test the control performance of the controller of the vehicle to be tested, the model matching the powertrain system of the vehicle to be tested can be automatically identified from the general virtual powertrain model through the powertrain configuration information of the vehicle to be tested, without the need to separately establish and maintain virtual powertrain models for each vehicle model, significantly reducing the hardware purchase cost, software development cost and related maintenance cost of the test system, achieving the technical effect of improving the test efficiency of the control performance of the vehicle controller, and thus solving the technical problem of low test efficiency of the control performance of the vehicle controller.
[0121] The embodiment of the present application further provides an electronic device, including: a memory storing an executable program; and a processor for running the program, where when the program runs, it executes the test method for the controller of the vehicle in each embodiment of the present invention.
[0122] The embodiment of the present application further provides a computer-readable storage medium, where the computer-readable storage medium includes a stored executable program, and when the executable program runs, it controls the device where the computer-readable storage medium is located to execute the test method for the controller of the vehicle in each embodiment of the present invention.
[0123] An embodiment of the present application also provides a computer program product, including a computer program which, when executed by a processor, implements the test method for the vehicle controller in each embodiment of the present invention.
[0124] An embodiment of the present application also provides a computer program product, including a non-volatile computer-readable storage medium for storing a computer program which, when executed by a processor, implements the test method for the vehicle controller in each embodiment of the present invention.
[0125] An embodiment of the present application also provides a computer program which, when executed by a processor, implements the test method for the vehicle controller in each of the above embodiments of the present invention.
[0126] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages and disadvantages of the embodiments.
[0127] In the above embodiments of the present invention, the descriptions of the respective embodiments have their own focuses. For parts not detailed in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.
[0128] In several embodiments provided by the present application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only illustrative. For example, the division of the units can be a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection between each other can be through some interfaces. The indirect coupling or communication connection of the units or modules can be in an electrical or other form.
[0129] The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place or distributed to multiple units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0130] In addition, in each embodiment of the present invention, the functional units can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated units can be implemented in the form of hardware or in the form of software functional units.
[0131] When the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The foregoing storage medium includes: various media that can store program codes, such as USB flash drives, read-only memories (ROMs for short), random access memories (RAMs for short), mobile hard disks, magnetic disks, or optical discs.
[0132] The foregoing are only the preferred embodiments of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present invention.
Claims
1. A test method for a controller of a vehicle, characterized in that, Including: In response to a test request from a controller in a vehicle under test, obtaining the powertrain configuration information of the vehicle under test; Based on the powertrain configuration information, identifying a target virtual powertrain model that matches the powertrain system of the vehicle under test from a general virtual powertrain model, where the general virtual powertrain model at least includes power component models for simulating powertrain systems of multiple vehicle models, model parameters of the power component models, and topological connection relationships between the power component models in the powertrain systems of the multiple vehicle models; Based on the target virtual powertrain model, invoking a hardware-in-the-loop test system to test the controller and obtaining a test result, where the test result is used to represent the control performance of the controller for the powertrain system of the vehicle under test.
2. The method according to claim 1, wherein The powertrain configuration information at least includes types of multiple power components in the powertrain system of the vehicle under test, configuration parameters of the multiple power components, and topological connection relationships between the multiple power components. Based on the powertrain configuration information, identifying a target virtual powertrain model that matches the powertrain system of the vehicle under test from a general virtual powertrain model includes: Based on the types of multiple power components in the powertrain system of the vehicle under test, identifying multiple target power component models that match the multiple power components from the general virtual powertrain model; Based on the configuration parameters of the multiple power components in the powertrain system of the vehicle under test, adjusting the model parameters of the multiple target power component models to obtain the adjusted multiple target power component models; Based on the topological connection relationships between the multiple power components, combining the multiple target power component models in the general virtual powertrain model to obtain a target virtual powertrain model that matches the powertrain system of the vehicle under test.
3. The method according to claim 2, wherein The method further includes: Adjusting the operating states of the multiple target power component models in the general virtual powertrain model to the working state, and adjusting the operating states of the power component models other than the multiple target power component models in the general virtual powertrain model to the non-working state.
4. The method according to claim 1, wherein Based on the target virtual powertrain model, invoking a hardware-in-the-loop test system to test the controller and obtaining a test result, including: Controlling the target virtual powertrain model to be connected to the controller to form a closed-loop test system; Invoking the hardware-in-the-loop test system to send a test signal to the controller; Based on the test signal, controlling the controller to control the target virtual powertrain model to obtain a test result, where the test result is used to at least represent the matching degree between the control instruction of the controller of the vehicle under test and the response result of the target virtual powertrain model.
5. The method according to claim 4, wherein The method further includes: Based on the test result, determining the control performance of the controller for the powertrain system of the vehicle under test.
6. The method according to claim 5, wherein Based on the test results, determine the control performance of the controller for the powertrain system of the vehicle under test, including: In response to the test results indicating that the matching degree between the control instructions of the controller of the vehicle under test and the response results of the target virtual powertrain model is greater than or equal to the matching threshold, determine that the control performance of the controller of the vehicle under test meets the standard; In response to the test results indicating that the matching degree between the control instructions of the controller of the vehicle under test and the response results of the target virtual powertrain model is less than the matching threshold, determine that the control performance of the controller of the vehicle under test does not meet the standard.
7. The method according to claim 1, characterized in that, The method further includes: Obtain the types of multiple power components in the powertrain systems of the multiple vehicle models and the configuration parameters of the multiple power components respectively; Based on the types of multiple power components in the powertrain systems of the multiple vehicle models, construct a power component model library, where the power component model library includes power component models corresponding to the multiple power components respectively; Based on the configuration parameters of the multiple power components in the powertrain systems of the multiple vehicle models, configure the model parameters of the power component models in the power component model library respectively; Based on the topological connection relationships between the multiple power components in the powertrain systems of the multiple vehicle models, construct the topological connection relationships between the power component models in the power component model library to obtain the general virtual powertrain model.
8. A test device for a controller of a vehicle, characterized in that, Including: An acquisition unit, configured to obtain the powertrain configuration information of the vehicle under test in response to a test request of a controller in the vehicle under test; An identification unit, configured to identify, based on the powertrain configuration information, a target virtual powertrain model that matches the powertrain system of the vehicle under test from the general virtual powertrain model, where the general virtual powertrain model at least includes power component models for simulating the powertrain systems of multiple vehicle models, the model parameters of the power component models, and the topological connection relationships between the power component models in the powertrain systems of the multiple vehicle models; A test unit, configured to, based on the target virtual powertrain model, call a hardware-in-the-loop test system to test the controller to obtain test results, where the test results are used to represent the control performance of the controller for the powertrain system of the vehicle under test.
9. An electronic device, characterized in that, Including: A memory, storing an executable program; A processor, configured to run the program, where when the program runs, it executes the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored executable program, where when the executable program runs, it controls the device where the storage medium is located to execute the method according to any one of claims 1 to 7.