Vehicle controller test method and related equipment

By virtualizing the vehicle controller and matching the vehicle model in the SIL test environment, automated testing is achieved, which solves the existing problems of high resource consumption of vehicle controller testing and difficulty in verifying complex functions, reduces costs and Improved testing efficiency.

CN118760135APending Publication Date: 2024-10-11TRW AUTOMOTIVE COMPONENTS SHANGHAI
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410970056.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-18
Publication Date
2024-10-11

AI Technical Summary

Technical Problem

Existing vehicle controller testing methods have shortcomings in complex function verification and hardware testing. In particular, vehicle testing consumes large resources. SIL testing cannot verify the underlying software and hardware. HIL testing requires high-cost test benches.

Method used

By virtualizing the controller under test in the simulation environment of SIL testing, the virtualized interface is generated to match the virtual simulated vehicle model, and automated testing is realized without the need for a signal converter. The functions and functions of the controller are directly tested at the system application software level. performance.

Benefits of technology

It realizes automated testing in a non-real-time environment, reduces test resource requirements, reduces hardware costs, and can effectively verify the functions and performance of the vehicle controller.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118760135A_ABST
    Figure CN118760135A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of automobile testing, and provides an automobile controller testing method and related equipment. The vehicle controller test method comprises the following steps: virtualizing a to-be-tested controller, and generating a virtualization interface of the to-be-tested controller; matching the virtualization interface with a whole vehicle model interface in a simulation environment to generate an interface model in the simulation environment; according to the interface model and the working condition, constructing simulation data in the simulation environment; and automatically executing a test according to the simulation data and the test configuration data to obtain a test result of the controller to be tested. According to the test scheme of the vehicle controller, the virtualized to-be-tested controller and the virtually simulated whole vehicle model can be associated and matched based on the simulation environment of the SIL test, automatic test is carried out, and the function and the performance of the vehicle controller can be tested in a system application software level without a signal converter.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of automobile testing, in particular to a vehicle controller testing method and related equipment. Background Art

[0002] Due to the rapid development of automotive technologies such as new energy vehicles, the functional design of automotive controllers is becoming more and more complex. During the software development and iteration process, requirements change frequently, resulting in an increasing workload for testing automotive controllers.

[0003] Currently, there are three ways to test automotive controllers: software-in-the-loop (SIL) testing, hardware-in-the-loop (HIL) testing, and whole vehicle testing.

[0004] Vehicle testing refers to testing vehicle controllers in a practical environment, which requires the highest testing resources.

[0005] SIL testing is usually done in a non-real-time environment without the vehicle model to simulate the vehicle controller. Its advantage is that it requires less hardware and only requires the installation of the vehicle controller application software; its disadvantage is that it is separated from the vehicle model and cannot verify complex functions. It can only test the vehicle controller application software and cannot test the underlying software and hardware.

[0006] HIL testing uses real vehicle controllers for testing. Simple HIL testing simulates the interaction between the simulation bus and hard-wired signals and the vehicle controller, while complex HIL testing connects the vehicle controller to the simulated vehicle through a test bench (i.e., a signal converter). Compared with SIL testing, the test type is expanded to the system level, but simple HIL testing still cannot test complex functions, and complex HIL testing requires the development of a test bench for the vehicle controller to be tested, which has high hardware requirements and high test bench costs.

[0007] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present invention, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention

[0008] In view of this, the present invention provides a vehicle controller testing method and related equipment, which can perform automated testing based on the simulation environment of SIL testing by associating and matching the virtualized controller to be tested and the virtual simulated vehicle model, and can test the functions and performance of the vehicle controller at the system application software level without the need for a signal converter.

[0009] According to one aspect of the present invention, there is provided a vehicle controller testing method, comprising: virtualizing a controller to be tested to generate a virtualized interface of the controller to be tested; matching the virtualized interface with a vehicle model interface in a simulation environment to generate an interface model in the simulation environment; constructing simulation data in the simulation environment according to the interface model and working conditions; and automatically executing a test according to the simulation data and test configuration data to obtain a test result of the controller to be tested.

[0010] By virtualizing the controller to be tested, a virtualized interface including the input signal and output signal of the controller to be tested is generated, so that the controller to be tested can be connected to the virtual simulated vehicle model without going through a signal converter. By matching the virtualized interface with the vehicle model interface, the virtualized controller to be tested and the virtual simulated vehicle model are associated, so that the input signal and output signal of the controller to be tested and the input signal and output signal of the vehicle model can be matched without a wireless beam, so as to perform automated testing. Furthermore, based on the interface model and working conditions associated with the virtualized interface and the vehicle model interface, simulation data for testing various functions and performances of the controller to be tested in a simulation environment is constructed to complete the simulation project. Then, based on the simulation data and the test configuration data, the test is automatically performed to obtain the test results of the controller to be tested.

[0011] The vehicle controller testing method of the present invention can perform automated testing based on the SIL test simulation environment by associating and matching the virtualized controller to be tested and the virtual simulated vehicle model, thereby realizing the function and performance testing of the vehicle controller at the system application software level without the need for a signal converter.

[0012] In some embodiments, the virtualization of the controller to be tested includes: initializing sampling time and simulation time; at each sampling time within the simulation time, calculating output data of the controller to be tested based on input data, and feeding back the output data to the whole vehicle model; wherein the input data includes input data of the whole vehicle model; at the end of the simulation time, obtaining all input data and all output data of the controller to be tested as the virtualization interface of the controller to be tested.

[0013] At each sampling time, the controller to be tested simulates the operating output of the controller to be tested in a practical environment based on the input data from the whole vehicle model (such as bus signals, sensor signals, controller internal feedback simulation signals, fault injection signals, etc.) and operating condition signals (such as driver operation signals, road condition signals, etc.), calculates the corresponding output data (such as controller internal control signals, test feedback signals, bus signals, etc.) and feeds back the data to the whole vehicle model; multiple iterations are performed to complete the virtualization of the controller to be tested.

[0014] In some embodiments, the step of virtualizing the controller under test is performed using a system function, including: using a sub-function mdlInitializeSizes for initialization; using a sub-function mdlGetTimeOfNextVarHit to calculate the sampling time; using a sub-function mdlOutputs to calculate the output data; using a sub-function mdlTerminate to end the simulation time; and using a sub-function mdlUpdate to update each sub-function of the system function.

[0015] Through the system function S-Function, the software code of the controller to be tested is compiled into the Simulink simulation environment to achieve dynamic linking with the vehicle model interface. Through S-Function, the input / output dimensions of the virtualized interface can be defined, which has better flexibility.

[0016] In some embodiments, matching the virtualization interface with the whole vehicle model interface in the simulation environment includes: reading the virtualization interface and the whole vehicle model interface to corresponding data tables respectively; automatically matching the virtualization interface and the whole vehicle model interface according to a preset input-output relationship between the controller to be tested and the whole vehicle model in the simulation environment.

[0017] The number of input and output ports of the controller to be tested and the input and output ports of the vehicle model are large, and the workload of manual matching one by one is too large. The present invention pre-sets the input and output relationship between the controller to be tested and the vehicle model, and then uses the interface matching tool to automatically match the virtualized interface and the vehicle model interface.

[0018] In some embodiments, the automatic matching of the virtualization interface and the whole vehicle model interface includes: determining the matching type of the input interface in the virtualization interface and the whole vehicle model interface; when the matching type of an input interface is a constant type, filling in the constant in the input interface; when the matching type of an input interface is an interface type, associating the input interface to the corresponding virtualization interface or the whole vehicle model interface.

[0019] In this way, the virtualized interface and the vehicle model interface are automatically matched to generate an interface model in a simulation environment.

[0020] In some embodiments, constructing the simulation data under the simulation environment includes: making the whole vehicle model interface output one or more of the following signals to the virtualization interface: bus signal, sensor signal, controller internal feedback simulation signal, fault injection signal; making the virtualization interface output one or more of the following signals to the whole vehicle model interface: controller internal control signal, test feedback signal, bus signal; outputting one or more of the following operating condition signals to the whole vehicle model interface: driver operation signal, road condition signal.

[0021] By outputting corresponding signals from the whole vehicle model interface to the virtualization interface, and outputting corresponding signals from the virtualization interface to the whole vehicle model interface, and outputting working condition signals to the whole vehicle model interface, the interactive operation process between the controller to be tested and the whole vehicle model in a practical environment is simulated, and simulation data is constructed to test the functions and performance of the controller to be tested at the system application software level.

[0022] In some embodiments, the test configuration data includes configuration data of test conditions and test ranges input in an automatic test interface; automatically executing tests based on the simulation data and the test configuration data includes: in response to the test configuration data input in the automatic test interface, loading corresponding test conditions and test ranges from the simulation data; and automatically executing tests based on the loaded test conditions and test ranges.

[0023] The automatic test interface can simplify the tester's operations. Users only need to enter the test configuration data in the automatic test interface, and the test tool can automatically perform the test based on the loaded test conditions and test scope.

[0024] In some embodiments, the test scope includes fault injection entries; the test result includes an activation flag corresponding to the fault injection entry and response data corresponding to the test condition and the fault injection entry.

[0025] The activation flag corresponding to the fault injection item refers to the information fed back by the controller under test after receiving the fault injection item. The activation flag helps to quickly locate the output position of the corresponding fault injection item in the output information of the controller under test. The response data corresponding to the test condition and the fault injection item refers to the test feedback data of the controller under test. The test feedback data can be used to analyze whether the controller under test is operating normally.

[0026] In some embodiments, after obtaining the test results of the controller to be tested, it also includes: loading a data analysis tool in response to a visual analysis instruction for the test results; generating a visual analysis result in response to a selection of the data to be analyzed in the test results and a selection of a visualization type in the data analysis tool.

[0027] The test results are visualized and analyzed through data analysis tools, which can intuitively and clearly display the test results of various functions and performances of the controller under test.

[0028] In some embodiments, the controller to be tested is a brake controller.

[0029] According to another aspect of the present invention, there is provided a vehicle controller testing device for implementing the vehicle controller testing method described in any of the above-mentioned embodiments, comprising: a virtualization module, configured to virtualize the controller to be tested, and generate a virtualization interface of the controller to be tested; an interface matching module, configured to match the virtualization interface with the vehicle model interface in a simulation environment, and generate an interface model in the simulation environment; a simulation engineering module, configured to construct simulation data in the simulation environment according to the interface model and working conditions; and an automatic testing module, configured to automatically perform testing according to the simulation data and test configuration data, and obtain test results of the controller to be tested.

[0030] According to another aspect of the present invention, there is provided an electronic device, comprising: a processor; a memory, wherein the memory stores executable instructions; wherein when the executable instructions are executed by the processor, the vehicle controller testing method described in any of the above embodiments is implemented.

[0031] According to another aspect of the present invention, a computer-readable storage medium is provided for storing a program, wherein the program, when executed by a processor, implements the vehicle controller testing method described in any of the above embodiments.

[0032] According to another aspect of the present invention, there is provided a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the vehicle controller testing method described in any of the above embodiments is implemented.

[0033] The beneficial effects of the present invention compared with the prior art include at least:

[0034] The vehicle controller testing scheme of the present invention virtualizes the controller to be tested to generate a virtualized interface including the input signal and output signal of the controller to be tested, so as to connect the controller to be tested to the virtual simulated vehicle model without going through a signal converter; by matching the virtualized interface with the vehicle model interface, the virtualized controller to be tested and the virtual simulated vehicle model are associated to achieve matching of the input signal and output signal of the controller to be tested and the input signal and output signal of the vehicle model in a wireless beam condition, so as to perform automated testing; further, based on the interface model and the operating conditions associated with the virtualized interface and the vehicle model interface, simulation data for testing various functions and performances of the controller to be tested in a simulation environment is constructed to complete the simulation project; and then, according to the simulation data and the test configuration data, the test is automatically performed to obtain the test result of the controller to be tested.

[0035] The vehicle controller testing solution of the present invention can perform automated testing based on the simulation environment of the SIL test by associating and matching the virtualized controller to be tested and the virtual simulated vehicle model, thereby realizing the function and performance testing of the vehicle controller at the system application software level without the need for a signal converter.

[0036] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] The accompanying drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present invention, and together with the specification are used to explain the principles of the present invention. Obviously, the accompanying drawings described below are only some embodiments of the present invention, and for those of ordinary skill in the art, other accompanying drawings can be obtained based on these accompanying drawings without creative work.

[0038] Figure 1 A schematic diagram showing the steps of a vehicle controller testing method according to an embodiment of the present invention;

[0039] Figure 2 A schematic diagram showing an implementation scenario of a vehicle controller testing method according to an embodiment of the present invention;

[0040] Figure 3 A schematic diagram showing virtualization of a controller to be tested in an embodiment of the present invention is shown;

[0041] Figure 4 A schematic diagram showing simulation data constructed in a simulation environment in an embodiment of the present invention;

[0042] Figure 5 A schematic diagram showing an automatic test interface in an embodiment of the present invention;

[0043] Figure 6 A schematic diagram of a module of a vehicle controller testing device according to an embodiment of the present invention is shown;

[0044] Figure 7 A schematic structural diagram of an electronic device in an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0045] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the embodiments described herein. Instead, these embodiments are provided to make the present invention more comprehensive and complete and to fully convey the concepts of the example embodiments to those skilled in the art.

[0046] The accompanying drawings are only schematic illustrations of the present invention and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0047] The processes shown in the accompanying drawings are only exemplary and do not necessarily include all the steps. For example, some steps may be decomposed, some steps may be combined or partially combined, and the actual execution order may change according to the actual situation. In addition, in the description of the present invention, when it is said that a device is "connected" to another device, this includes not only the case of direct connection, but also the case of indirect connection through other elements.

[0048] It should be noted that, in the absence of conflict, the embodiments of the present invention and features in different embodiments may be combined with each other.

[0049] Figure 1 Illustrate the main steps of the vehicle controller test method; refer to Figure 1 As shown, the vehicle controller testing method provided by the embodiment of the present invention includes:

[0050] S100: Virtualize the controller to be tested and generate a virtualized interface of the controller to be tested.

[0051] The controller to be tested may be a brake controller for a brake system, such as an integrated brake control system (IBC). Of course, the application of the test scheme of the present invention is not limited to brake controllers, and any vehicle controller, including brake, steering, chassis, etc., can be tested using the test scheme of the present invention.

[0052] By virtualizing the controller to be tested, a virtualized interface including input signals and output signals of the controller to be tested is generated, so that the controller to be tested can be connected to a virtual simulated vehicle model without going through a signal converter.

[0053] Figure 2 Illustrate the implementation scenario of the vehicle controller test method; combined with Figure 2 As shown, the virtualization process can be implemented by a system function S-Function or other virtualization software, whose input is the software code of the controller to be tested, and the output is a virtualization interface including the input signal and output signal of the controller to be tested required for SIL testing.

[0054] S200, matching the virtualized interface with the vehicle model interface in the simulation environment to generate an interface model in the simulation environment.

[0055] By matching the virtualization interface with the vehicle model interface, associating the virtualized controller to be tested and the virtually simulated vehicle model, the input and output signals of the controller to be tested and the input and output signals of the vehicle model can be matched without a wireless beam, so as to perform automated testing.

[0056] The simulation environment can be implemented based on the Simulink simulation platform or other mature simulation platforms. The present invention can directly use the vehicle model that has been built based on the Simulink simulation platform, which integrates interface resources that can interact and communicate with various vehicle controllers. The number of interfaces of the controller to be tested is large, and how to automatically match the interface of the vehicle model in the case of wireless beam is a major difficulty. Figure 2 As shown, the present invention develops an interface matching tool SiL_InterfaceGenerator for the controller to be tested and the whole vehicle model, which is used to automatically match the input signal / output signal of the controller to be tested with the input signal / output signal of the whole vehicle model in the case of wireless beam, and solves the problem that the controller to be tested has a large number of interfaces and its interfaces change frequently with different test items or different stages of the same test item.

[0057] S300: construct simulation data in a simulation environment according to the interface model and the working conditions.

[0058] Based on the interface model and working conditions that are associated and matched between the virtual interface and the vehicle model interface, simulation data for testing the functions and performance of the controller to be tested is constructed in the simulation environment to complete the simulation project. Figure 2 As shown, the simulation project can be implemented by Simulink project, whose input is interface model and working condition, and output is simulation data.

[0059] S400, automatically executing the test according to the simulation data and the test configuration data to obtain the test result of the controller to be tested.

[0060] According to the simulation data and test configuration data, the test is automatically executed to obtain the test results of the controller under test. In order to facilitate developers and testers to use the tool for testing, combined with Figure 2 As shown, the present invention develops an automatic test interface, through which users can configure test data and perform automated testing; the input of the automatic test interface is the simulation project results and test configuration data, and the output is the test results.

[0061] Furthermore, combined with Figure 2As shown, in order to facilitate the analysis of the test results, the present invention also develops a data analysis tool SiL_PlottingTool, which can realize the visual analysis of the test data.

[0062] Therefore, the vehicle controller testing method of the present invention can perform automated testing based on the simulation environment of the SIL test by associating and matching the virtualized controller to be tested and the virtual simulated vehicle model, thereby realizing the function and performance testing of the vehicle controller at the system application software level without the need for a signal converter.

[0063] The HIL test solution of the integrated vehicle model of the present invention can undertake a large part of the test needs and alleviate the problem of tight test resources such as test benches. For example, the single fault element (SISO) test needs to verify the system control strategy (CM) and partial degradation strategy (PSSD) caused by a single fault under different functions; taking the brake controller as an example, the length of the common SISO fault list is about 1,000 items. According to the average usage time of 2 minutes for a test case, it takes about 2.8 days for the test bench to run continuously to fully test a certain brake controller function (such as the anti-lock braking system ABS), resulting in the bench being occupied for a long time, seriously affecting the project progress. The vehicle controller test solution of the present invention supports SISO automatic testing and data analysis in a non-real-time environment, and can test the functions and performance of the vehicle controller at the system application software level without the need for a test bench.

[0064] In some embodiments, the controller to be tested is virtualized, including: initializing sampling time and simulation time; at each sampling time in the simulation time, calculating output data of the controller to be tested based on input data and feeding back to the whole vehicle model; wherein the input data includes input data of the whole vehicle model; at the end of the simulation time, all input data and all output data of the controller to be tested are obtained as the virtualization interface of the controller to be tested.

[0065] At each sampling time, the controller to be tested simulates the operating output of the controller to be tested in a practical environment based on the input data from the whole vehicle model (such as bus signals, sensor signals, controller internal feedback simulation signals, fault injection signals, etc.) and operating condition signals (such as driver operation signals, road condition signals, etc.), calculates the corresponding output data (such as controller internal control signals, test feedback signals, bus signals, etc.) and feeds back the data to the whole vehicle model; multiple iterations are performed to complete the virtualization of the controller to be tested.

[0066] For example, if the simulation time is 12 seconds and the sampling time is 0.05 seconds, then the iteration cycle is 12 / 0.05=240 times to obtain a virtualized interface including all input data and all output data of the controller to be tested.

[0067] In some embodiments, the steps of virtualizing the controller under test using a system function include: initializing using the sub-function mdlInitializeSizes; calculating the sampling time using the sub-function mdlGetTimeOfNextVarHit; calculating the output data using the sub-function mdlOutputs; terminating the simulation using the sub-function mdlTerminate; and updating the sub-functions of the system function using the sub-function mdlUpdate.

[0068] Through the system function S-Function, the software code of the controller to be tested is compiled into the Simulink simulation environment to achieve dynamic linking with the vehicle model interface. Through S-Function, the input / output dimensions of the virtualized interface can be defined, which has better flexibility.

[0069] Figure 3 It shows virtualization of the controller under test; combined with Figure 3 As shown, the process of using the system function S-Function to virtualize the controller under test may include: S100a, using the sub-function mdlInitializeSizes to initialize, including defining basic properties such as sampling time and the sizes array of input and output data; S100b, using the sub-function mdlGetTimeOfNextVarHit to calculate the sampling time to achieve loop iteration; S100c, using the sub-function mdlOutputs to calculate the output data, such as the internal control signal of the brake controller (used to control the valve body control current of the whole vehicle model, the expected torque of the power assist motor, etc.) and the test feedback signal (used to observe the software running status of the brake controller, such as the slip rate calculation value of the ABS function, the activation flag, the expected wheel end pressure value, etc.); each calculation result can be stored in an array; S100d, using the sub-function mdlTerminate to end the simulation to complete the virtualization of the controller under test.

[0070] Among them, the specific principle of the system function S-Function and the functional implementation of its sub-functions are existing technologies, and the present invention will not introduce them in detail.

[0071] In some embodiments, the virtualization interface is matched with the whole vehicle model interface in the simulation environment, including: reading the virtualization interface and the whole vehicle model interface to corresponding data tables respectively; automatically matching the virtualization interface and the whole vehicle model interface according to the preset input-output relationship between the controller to be tested and the whole vehicle model in the simulation environment.

[0072] The number of input and output ports of the controller to be tested and the input and output ports of the vehicle model are large, and the workload of manual matching one by one is too large. The present invention pre-sets the input and output relationship between the controller to be tested and the vehicle model, and then uses the interface matching tool to automatically match the virtualized interface and the vehicle model interface.

[0073] In some embodiments, the virtualization interface and the whole vehicle model interface are automatically matched, including: determining the matching type of the input interface in the virtualization interface and the whole vehicle model interface; when the matching type of an input interface is a constant type, filling in the constant in the input interface; when the matching type of an input interface is an interface type, associating the input interface to the corresponding virtualization interface or the whole vehicle model interface.

[0074] In this way, the virtualized interface and the vehicle model interface are automatically matched to generate an interface model in a simulation environment.

[0075] Specifically, the interface matching tool developed by the present invention can be written based on Matlab Code or other suitable languages, and is used to convert the virtualized interface of the controller to be tested into an interface in the Simulink simulation environment, and associate and match it with the vehicle model interface in the Simulink simulation environment. Among them, the virtualized interface of the controller to be tested is saved in a .c file, the input data can be saved as a "s_esc_ecu_inputs.c" file, and the output data can be saved as a "s_esc_ecu_outputs.c" file; the interface matching tool SiL_InterfaceGenerator includes a script "SiL_InterfaceGenerator.m" and a table template "SiL_InterfaceGenerator.xlsm". The process of using the interface matching tool SiL_InterfaceGenerator to match the virtualized interface and the vehicle model interface is as follows:

[0076] After running the script "SiL_InterfaceGenerator.m" and selecting the spreadsheet template "SiL_InterfaceGenerator.xlsm", a prompt dialog box will pop up on the interface, which displays the function of reading in the virtualization interface "update interface matrix with vECU.c files", the function of reading in the vehicle model interface "update modelbus interfaces" and the function of generating the interface model "generate SiL interface".

[0077] In the prompt dialog box, select the read-in virtualization interface function "update interface matrix withvECU.c files", and select the input data "s_esc_ecu_inputs.c" file and the output data "s_esc_ecu_outputs.c" file respectively. The virtualization interface can be read into the corresponding data table, and the input and output list of the controller to be tested can be obtained in the table template.

[0078] In the prompt dialog box, select the function "update model bus interfaces" to read the whole vehicle model interface, and select the file that stores the whole vehicle model interface in the Simulink simulation environment. The whole vehicle model interface can be read into the corresponding data table, and the interface list of the whole vehicle model can be obtained in the table template.

[0079] Finally, according to the matching type of each input interface in the virtualization interface and the vehicle model interface, the matching association between the virtualization interface and the vehicle model interface is performed. If the matching type of an input interface is specified as Default Value, fill in the constant value (the constant value can be carried in the specified type to be automatically filled in); if the matching type of an input interface is specified as BusInterface, fill in the specified virtualization interface or vehicle model interface. The confirmation of the matching type is based on the pre-set input-output relationship between the controller to be tested and the vehicle model. After the input-output relationship is set, it can be used in different test items of the controller to be tested. After the matching association is completed, click Save, and select the interface model generation function "generate SiL interface" in the pop-up dialog box to obtain the interface model based on the Simulink simulation environment.

[0080] Figure 4 It shows the simulation data in the simulation environment. Figure 4 As shown, in some embodiments, constructing simulation data in a simulation environment includes: making the whole vehicle model interface output one or more of the following signals to the virtualization interface: bus signals, sensor signals, controller internal feedback simulation signals, fault injection signals; making the virtualization interface output one or more of the following signals to the whole vehicle model interface: controller internal control signals, test feedback signals, bus signals; outputting one or more of the following operating condition signals to the whole vehicle model interface: driver operation signals, road condition signals.

[0081] By outputting corresponding signals from the whole vehicle model interface to the virtualization interface, and outputting corresponding signals from the virtualization interface to the whole vehicle model interface, and outputting working condition signals to the whole vehicle model interface, the interactive operation process between the controller to be tested and the whole vehicle model in a practical environment is simulated, and simulation data is constructed to test the functions and performance of the controller to be tested at the system application software level.

[0082] Take the controller to be tested as a brake controller as an example. Among the signals provided by the vehicle model interface to the virtualized interface of the controller to be tested, bus signals such as soft switch signals, functional handshake signals, etc., sensor signals such as wheel speed signals, liquid level sensor signals, etc., controller internal feedback simulation signals such as booster motor torque feedback signals, booster cylinder piston speed signals, etc., fault injection signals are test-related fault signals. Among them, the fault injection signal may include multiple fault injection items, and each fault injection item may include a fault signal and an expected strategy. For example, for the ABS function fault injection operation, the data content of one fault injection item may include: a fault signal of the missing left front wheel speed signal, and an expected strategy for the ABS function module of the brake controller to fail to work properly or to respond to degradation; in subsequent tests, for the fault injection item, if the brake controller gives a response signal that the ABS function module fails to work properly or to respond to degradation, it indicates that the ABS function module of the brake controller is normal, and if the ABS function module still works normally or the degradation does not meet the standard, it indicates that the ABS function module is abnormal. The controller to be tested provides signals to the vehicle model to achieve closed-loop control of the vehicle model, including internal control signals of the controller such as valve body control current signal, power motor torque expectation signal, bus signals such as handshake signal, indicator light signal, etc., test feedback signals such as error flag signal, function activation indication signal, etc. In addition, the vehicle model also interacts with the test conditions to activate the brake controller function under different conditions; specifically, according to different functional test requirements, the condition signals can be input to the vehicle model interface, including driver operation signals such as accelerator pedal position signal, brake pedal position signal, steering angle signal, and road condition signals such as adhesion coefficient signal, slope signal, and inclination signal.

[0083] In some embodiments, the test configuration data includes configuration data of test conditions and test ranges input in an automatic test interface; automatically executing tests according to simulation data and the test configuration data, including: in response to the test configuration data input in the automatic test interface, loading corresponding test conditions and test ranges from the simulation data; and automatically executing tests according to the loaded test conditions and test ranges.

[0084] The automatic test interface can simplify the tester's operations. Users only need to enter the test configuration data in the automatic test interface, and the test tool can automatically perform the test based on the loaded test conditions and test scope.

[0085] In some embodiments, the test scope includes fault injection items; the test result includes an activation flag corresponding to the fault injection item and response data corresponding to the test condition and the fault injection item.

[0086] The activation flag corresponding to the fault injection item refers to the information fed back by the controller under test after receiving the fault injection item. The activation flag helps to quickly locate the output position of the corresponding fault injection item in the output information of the controller under test. The response data corresponding to the test condition and the fault injection item refers to the test feedback data of the controller under test. The test feedback data can be used to analyze whether the controller under test is operating normally.

[0087] The test tool developed by the present invention can be written based on Matlab Code and packaged as Matlab App. Figure 5 Shows the automatic test interface; combined Figure 5 As shown, during specific testing, with the aid of the testing tool provided with the automatic testing interface 500 developed by the present invention, the automated testing can be implemented through the following process.

[0088] First, click the "Start_SIL_DMT_AutoTest.bat" data package in the project file directory where the test tool is located to call the automatic test interface 500 for test configuration. The automatic test interface 500 is configured with functional areas such as the "Select Maneuver" option for working condition selection, the "Select DMT Test Configuration File" option for activation configuration selection, the "Select DMT Test_Scope File" option for test range selection, and the "Select DMT Test Type" option for test type selection.

[0089] Next, click the browse button under the "Select Maneuver" option, select the operating condition to be executed, and load the operating condition. The round indicator light after the operating condition selection option is on, indicating that the loading is complete. According to the simulation configuration, the test tool can provide a variety of operating conditions for selection, and each operating condition is configured with parameters such as road friction coefficient and ambient temperature; the operating condition selected in this embodiment is "SFunctionTest_ABS", but it is not limited to this.

[0090] After selecting the working condition, if you click "RUN Maneuver Only", the working condition simulation will only be performed according to the selected working condition, and no faults will be injected into the working condition simulation. The generated data will be saved as original data (.mat) and converted data (.csv) in the specified file path.

[0091] If SISO DMT automatic testing is required, continue to select the activation configuration, test scope, and test type for relevant configuration. Click the browse button under the "Select DMT Test Configuration File" option to select the activation configuration, and select "DMT_TestConfig.xlsx" to record the correspondence between the function activation flag of the test output and the function activation conditions determined inside the test script in a tabular form. Click the browse button under the "Select DMT Test_Scope File" option to select the test scope, and select "DMT_TestScope.xlsx", which records the fault injection entries of SISO and the expected control or degradation strategies under different working conditions. The test type selection "Select DMT Test Type" option provides a choice of PSSD test (activating the test condition when a fault occurs) and CM test (activating the test condition after a fault occurs). In this embodiment, CM test is selected, but it is not limited to this.

[0092] Finally, click "RUN DMT Test" and the test tool will automatically pop up a selection window for specifying the test target (multiple test targets are recorded in "DMT_TestScope.xlsx") and the test scope (select specific fault injection items from "DMT_TestScope.xlsx"). After completing the specification and clicking OK, the automatic test will begin.

[0093] During the automatic test, the test progress can be displayed in the form of a progress bar.

[0094] After the test is completed, the test results are saved to the specified file path. The data files storing the test results can include raw data (.mat) and converted data (.csv). In addition, in the SISO DMT test results, a new 00_SiLFailedList document is added to record the list of results that did not trigger a fault or did not trigger the correct degradation method; and a new 01_DMT_TestScope document is added to help the test team record the data post-processing results.

[0095] In some embodiments, after obtaining the test results of the controller to be tested, it also includes: loading a data analysis tool in response to a visual analysis instruction for the test results; generating a visual analysis result in response to a selection of data to be analyzed in the test results and a selection of a visualization type in the data analysis tool.

[0096] The test results are visualized and analyzed through data analysis tools, which can intuitively and clearly display the test results of various functions and performances of the controller under test.

[0097] The data analysis tool can be written based on Matlab Code and packaged as a Matlab App to load test results and perform visual analysis. After opening the interface of the data analysis tool, you can select the test result data to be analyzed and load it. The test result data is transmitted through a .csv file; then select the data to be analyzed and the visualization type, and perform visual drawing to obtain signal graphics represented in a visual way such as a waveform.

[0098] The embodiment of the present invention further provides a vehicle controller testing device, which can be used to implement the vehicle controller testing method described in any of the above embodiments. The features and principles of the vehicle controller testing method described in any of the above embodiments can be applied to the following vehicle controller testing device embodiments.

[0099] Figure 6 The main modules of the vehicle controller test device are shown; combined with Figure 6 As shown, the vehicle controller testing device 600 provided by the embodiment of the present invention includes:

[0100] A virtualization module 610 is configured to virtualize the controller to be tested and generate a virtualization interface of the controller to be tested;

[0101] The interface matching module 620 is configured to match the virtualized interface with the vehicle model interface in the simulation environment to generate an interface model in the simulation environment;

[0102] A simulation engineering module 630, configured to construct simulation data in a simulation environment according to an interface model and working conditions;

[0103] The automatic testing module 640 is configured to automatically perform testing according to the simulation data and the test configuration data to obtain the test result of the controller to be tested.

[0104] The vehicle controller testing device 600 of the present invention virtualizes the controller to be tested through the virtualization module 610, and generates a virtualized interface including the input signal and output signal of the controller to be tested, so as to realize the connection of the controller to be tested to the virtual simulated vehicle model without going through a signal converter; matches the virtualization interface with the vehicle model interface through the interface matching module 620, associates the virtualized controller to be tested and the virtual simulated vehicle model, and realizes the matching of the input signal and output signal of the controller to be tested and the input signal and output signal of the vehicle model in the wireless beam case, so as to perform automated testing; further, through the simulation engineering module 630, based on the interface model and working conditions associated with the virtualization interface and the vehicle model interface, constructs simulation data for testing various functions and performances of the controller to be tested in a simulation environment, and completes the simulation engineering; and then, through the automatic testing module 640, automatically executes the test according to the simulation data and the test configuration data to obtain the test result of the controller to be tested.

[0105] The vehicle controller testing device 600 of the present invention can perform automated testing based on the simulation environment of the SIL test by associating and matching the virtualized controller to be tested and the virtual simulated vehicle model, thereby testing the functions and performance of the vehicle controller at the system application software level without the need for a signal converter.

[0106] An embodiment of the present invention further provides an electronic device, including a processor and a memory, wherein executable instructions are stored in the memory, and when the executable instructions are executed by the processor, the vehicle controller testing method described in any of the above embodiments is implemented.

[0107] The electronic device of the present invention can perform automated testing based on the simulation environment of the SIL test by associating and matching the virtualized controller to be tested and the virtual simulated vehicle model, thereby realizing the function and performance testing of the vehicle controller at the system application software level without the need for a signal converter.

[0108] Figure 7 The structure of the electronic device is shown schematically. It should be understood that Figure 7 The modules are only schematically shown, and these modules may be virtual software modules or actual hardware modules. The combination and splitting of these modules and the addition of other modules are all within the protection scope of the present invention.

[0109] Reference Figure 7 As shown, the electronic device 700 is in the form of a general computing device. The components of the electronic device 700 include but are not limited to: at least one processor 710, at least one memory 720, a bus 730 connecting different platform components (including the memory 720 and the processor 710), etc.

[0110] Memory 720 may include readable media in the form of volatile storage units, and may also include programs / utilities having one or more program modules, such program modules including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include the implementation of a network environment.

[0111] Bus 730 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.

[0112] The electronic device 700 can also communicate with one or more external devices, and the external device can be one or more of the devices such as keyboard, pointing device, bluetooth device, etc. These external devices enable the user to communicate interactively with the electronic device 700. The electronic device 700 can also communicate with one or more other computing devices, and the computer device shown includes a router and a modem. This communication can be carried out through an input / output (I / O) interface. In addition, the electronic device 700 can also communicate with one or more networks (such as local area network (LAN), wide area network (WAN) and / or public network, such as the Internet) through a network adapter. The network adapter can communicate with other modules of the electronic device 700 through a bus 730.

[0113] An embodiment of the present invention also provides a computer-readable storage medium for storing a program. When the program is executed by a processor, the vehicle controller testing method described in any of the above embodiments is implemented. Based on the simulation environment of the SIL test, the virtualized controller to be tested and the virtual simulated vehicle model are associated and matched to perform automated testing. The function and performance of the vehicle controller can be tested at the system application software level without the need for a signal converter.

[0114] The storage medium may be a portable compact disk read-only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the storage medium of the present invention is not limited thereto, and may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, apparatus, or device.

[0115] The storage medium may be any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The readable signal medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in combination with an instruction execution system, an apparatus, or a device. The program code contained on the readable signal medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the above.

[0116] The program code may execute entirely on the user's computing device, partially on the user's computing device, as a stand-alone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user's computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device, such as through the Internet using an Internet service provider.

[0117] An embodiment of the present invention also provides a computer program product, including a computer program. When the computer program is executed by a processor, it implements the vehicle controller testing method described in any of the above embodiments, and performs automated testing by associating and matching a virtualized controller to be tested and a virtual simulated vehicle model based on a simulation environment of SIL testing. This allows the function and performance of the vehicle controller to be tested at the system application software level without the need for a signal converter.

[0118] The above contents are further detailed descriptions of the present invention in combination with specific preferred embodiments, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, several simple deductions or substitutions can be made without departing from the concept of the present invention, which should be regarded as falling within the protection scope of the present invention.

Claims

1. A vehicle controller testing method, It is characterized in that include: Virtualizing the controller to be tested and generating a virtualized interface of the controller to be tested; Matching the virtualized interface with the vehicle model interface in the simulation environment to generate an interface model in the simulation environment; Constructing simulation data in the simulation environment according to the interface model and the working conditions; The test is automatically performed according to the simulation data and the test configuration data to obtain the test result of the controller to be tested.

2. The vehicle controller testing method according to claim 1, It is characterized in that The virtualizing the controller to be tested includes: Initialize sampling time and simulation time; At each sampling time within the simulation time, the output data of the controller to be tested is calculated according to the input data, and the output data is fed back to the vehicle model; Wherein, the input data includes input data of the whole vehicle model; At the end of the simulation time, all input data and all output data of the controller under test are obtained as a virtualized interface of the controller under test.

3. The vehicle controller testing method as claimed in claim 2, It is characterized in that The step of using a system function to perform virtualization on the controller to be tested includes: Use the sub-function mdlInitializeSizes for initialization; Use the sub-function mdlGetTimeOfNextVarHit to calculate the sampling time; Use the sub-function mdlOutputs to calculate the output data; Use the sub-function mdlTerminate to end the simulation time; Use the sub-function mdlUpdate to update each sub-function of the system function.

4. The vehicle controller testing method according to claim 1, It is characterized in that The matching of the virtualized interface with the vehicle model interface in the simulation environment includes: Read the virtualization interface and the vehicle model interface to corresponding data tables respectively; The virtualization interface and the vehicle model interface are automatically matched according to a preset input-output relationship between the controller to be tested and the vehicle model in the simulation environment.

5. The vehicle controller testing method as claimed in claim 4, It is characterized in that The automatically matching the virtualization interface and the vehicle model interface includes: Determining a matching type between the virtualization interface and an input interface in the vehicle model interface; When the matching type of an input interface is a constant type, fill in the constant in the input interface; When the matching type of an input interface is an interface type, the input interface is associated with a corresponding virtualization interface or a vehicle model interface.

6. The vehicle controller testing method according to claim 1, It is characterized in that The constructing of simulation data in the simulation environment includes: The vehicle model interface outputs one or more of the following signals to the virtualization interface: a bus signal, a sensor signal, a controller internal feedback simulation signal, and a fault injection signal; The virtualization interface outputs one or more of the following signals to the vehicle model interface: a controller internal control signal, a test feedback signal, and a bus signal; One or more of the following operating condition signals are output to the vehicle model interface: driver operation signal, road condition signal.

7. The vehicle controller testing method according to claim 1, It is characterized in that The test configuration data includes configuration data of the test conditions and test ranges inputted in the automatic test interface; The automatically performing the test according to the simulation data and the test configuration data comprises: In response to the test configuration data inputted in the automatic test interface, loading corresponding test conditions and test ranges from the simulation data; Automatically execute tests based on the loaded test cases and test scope.

8. The vehicle controller testing method as claimed in claim 7, It is characterized in that The test scope includes fault injection items; The test result includes an activation flag corresponding to the fault injection entry and response data corresponding to the test condition and the fault injection entry.

9. The vehicle controller testing method according to claim 1, It is characterized in that After obtaining the test result of the controller to be tested, the method further includes: In response to an instruction for visual analysis of the test results, loading a data analysis tool; In response to the selection of the data to be analyzed in the test result and the selection of the visualization type in the data analysis tool, a visualization analysis result is generated.

10. The vehicle controller testing method according to any one of claims 1 to 9, It is characterized in that The controller to be tested is a brake controller.

11. A vehicle controller testing device, used to implement the vehicle controller testing method according to any one of claims 1 to 10, It is characterized in that include: A virtualization module, configured to virtualize the controller to be tested and generate a virtualization interface of the controller to be tested; An interface matching module, configured to match the virtualized interface with the vehicle model interface in the simulation environment to generate an interface model in the simulation environment; A simulation engineering module, configured to construct simulation data in the simulation environment according to the interface model and the working conditions; The automatic testing module is configured to automatically perform testing according to the simulation data and the test configuration data to obtain the test result of the controller to be tested.

12. An electronic device, It is characterized in that include: processor; A memory, wherein executable instructions are stored in the memory; Wherein, when the executable instructions are executed by the processor, the vehicle controller testing method described in any one of claims 1-10 is implemented.

13. A computer-readable storage medium for storing a program, It is characterized in that When the program is executed by a processor, the vehicle controller testing method described in any one of claims 1-10 is implemented.

14. A computer program product comprising a computer program, It is characterized in that When the computer program is executed by a processor, the vehicle controller testing method according to any one of claims 1 to 10 is implemented.

Citation Information

Cited By

  • Controller area network communication interface test method, device, equipment and vehicle

    CN119449650A