Vehicle body hardware-in-the-loop testing method, platform system and storage medium
By introducing automatic switching devices in the vehicle body hardware to the ring test platform system, the problem of low testing efficiency caused by strong independence of the HIL test system is solved, and rapid switching and testing of different test items is achieved, testing efficiency is improved and cost savings are saved. .
Patent Information
- Application Number
- CN202211376626.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-04
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2042-11-04
AI Technical Summary
The HIL test system has strong independence and is less efficient when switching tests on multiple test items.
By introducing an automatic switching device in the vehicle body hardware in the ring test platform system, the connection or disconnection between the controller to be tested and the load device is controlled, the target controller and load device are determined according to the test project, and the preset mapping relationship is achieved Automatic communication between the target controller and the load device.
It realizes rapid switching and testing of different test projects, improves the testing efficiency when switching tests of multiple test projects, avoids the need to build a HIL test system for each test project, and saves costs.
Smart Images

Figure CN115903732B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of whole vehicle function testing, and in particular to a vehicle body hardware-in-the-loop testing method, a platform system and a storage medium. Background Art
[0002] HIL (Hardware-in-the-Loop) testing is an important verification method for system integration testing in the V-process development of vehicle control strategies. At present, since different projects have different on-board controllers and load devices, when testing different projects, they all need to be tested with the corresponding HIL test system. Each HIL test system is highly independent, and the test efficiency is low when switching between multiple test projects.
[0003] The above contents are only used to assist in understanding the technical solution of the present invention, and do not constitute an admission that the above contents are related technologies. Summary of the invention
[0004] The main purpose of the present invention is to provide a vehicle body hardware-in-the-loop testing method, a platform system and a storage medium, aiming to solve the problem that the HIL test system has strong independence and low test efficiency when switching tests on multiple test items.
[0005] To achieve the above object, the present invention provides a vehicle body hardware-in-the-loop testing method, which is applied to a vehicle body hardware-in-the-loop testing platform system. The testing system includes a test bench, a test cabinet and a host computer. The test bench includes an automatic switching device, a controller to be tested and a load device. The automatic switching device is used to control the connection or disconnection between the controller to be tested and the load device. The host computer is connected to the test cabinet and is used to control the controller to be tested to execute a test instruction. The vehicle body hardware-in-the-loop testing method includes:
[0006] Determine a target controller and a target load device corresponding to the target controller according to the test items;
[0007] Determine a first terminal pair to be connected according to the target controller, the target load device and a preset mapping relationship;
[0008] Determining a second terminal pair to be disconnected according to the first terminal pair and the current connection state of the automatic switching device;
[0009] Controlling the first terminal pair to be connected, and / or controlling the second terminal pair to be disconnected, so as to achieve the connection between the target controller and the target load device;
[0010] Sending a test instruction corresponding to the test item to the target controller.
[0011] Optionally, before the step of determining a target controller and a target load corresponding to the target controller according to the test item, the method further includes:
[0012] When a selection instruction is received on the test item selection interface, the test item to be tested is determined according to the test item selected by the selection instruction; or,
[0013] According to the test time sequence of the preset test items, after detecting that a first test item among the preset test items is completed, the test item to be tested is determined according to a second test item adjacent to the first test item.
[0014] Optionally, before the step of determining the first terminal pair to be connected according to the target controller, the target load device and the preset mapping relationship, the method further includes:
[0015] Determine a controller to be tested and a load device corresponding to the test item, wherein the controller to be tested includes the target controller, and the load device includes the target load device;
[0016] Determine the terminal pair identifier of the automatic switching device that realizes the connection between the controller to be tested and the load device;
[0017] A mapping relationship of the test items is generated according to the controller to be tested, the load device and the terminal pair identifier.
[0018] Optionally, the step of sending a test instruction corresponding to the test item to the target controller includes:
[0019] Determine the same test sequences and the different test sequences between the test programs corresponding to different test items;
[0020] Generate a global test program for the test items according to the same test sequence;
[0021] Generate a variant test program corresponding to the test item according to the similarities and differences test sequence;
[0022] Generate a test program corresponding to the test item according to the global test program and the variant test program;
[0023] Based on the test program, a test instruction corresponding to the test item is sent to the target controller.
[0024] Optionally, based on the test program, the step of sending a test instruction corresponding to the test item to the target controller includes:
[0025] Obtain the global test program and the variant test program corresponding to the test program;
[0026] According to the global test program and the variant test program, a test instruction corresponding to the test item is sent to the target controller.
[0027] Optionally, after the step of sending the test instruction corresponding to the test item to the target controller, the method further includes:
[0028] Generate a test report corresponding to the test item, and / or output the test report.
[0029] In addition, to achieve the above-mentioned purpose, the present invention also provides a vehicle body hardware in-the-loop test platform system, the vehicle body hardware in-the-loop test platform system comprises: a test bench, the test bench is integrated with an automatic switching device, a controller to be tested and a load device, the automatic switching device is used to realize the connection or disconnection between the controller to be tested and the load device, a test cabinet, the test cabinet is connected to the test bench through a connecting harness, and a host computer, the host computer is connected to the test cabinet to realize the test control function of the controller to be tested; the vehicle body hardware in-the-loop test platform system also includes:
[0030] A first determination module, used to determine a target controller and a target load device corresponding to the target controller according to a test item;
[0031] A second determining module, configured to determine a first terminal pair to be connected according to the target controller, the target load device and a preset mapping relationship;
[0032] A third determining module, configured to determine a second terminal pair to be disconnected according to the first terminal pair and the current connection state of the automatic switching device;
[0033] A connection and disconnection module, used for controlling the first terminal pair to be connected, and / or controlling the second terminal pair to be disconnected, so as to achieve the connection between the target controller and the target load device;
[0034] The sending instruction module is used to send the test instruction corresponding to the test item to the target controller.
[0035] Optionally, the automatic switching device adopts a matrix terminal block.
[0036] In addition, to achieve the above-mentioned objectives, the present invention also provides a body hardware in-the-loop test platform system, which includes: a memory, a processor, and a body hardware in-the-loop test program stored in the memory and executable on the processor, and when the body hardware in-the-loop test program is executed by the processor, the various steps of the body hardware in-the-loop test method described above are implemented.
[0037] In addition, to achieve the above-mentioned purpose, the present invention also provides a storage medium, on which a body hardware in-the-loop test program is stored. When the body hardware in-the-loop test program is executed by the processor, the various steps of the body hardware in-the-loop test method as described above are implemented.
[0038] The vehicle body hardware-in-the-loop test method, platform system and storage medium proposed in the present invention are based on the vehicle body hardware-in-the-loop test platform system, and control the connection or disconnection between the controller to be tested and the load device through an automatic switching device set up in the test bench, so that only the target controller and the target load device corresponding to the target test item are connected through the automatic switching device. In terms of hardware, the connection between the controller to be tested and the load device corresponding to different test items is achieved based on the automatic switching device, so as to test the controllers to be tested for different test items without building HIL test benches corresponding to different test items. In terms of software control, the target controller and the target load device corresponding to the target controller are determined according to the test item, and the first terminal to be connected of the automatic switching device is determined according to the target controller, the target load device and the preset mapping relationship. The first terminal pair is controlled to be connected, and / or, according to the current connection status of the first terminal pair and the automatic switching device, the disconnected second terminal pair is determined, and the second terminal pair is controlled to be disconnected, so as to realize the connection between the target controller and the target load device corresponding to the test item in the automatic switching device, and send the test instruction corresponding to the test item to the target controller to realize the test of the target controller, so as to realize the test of the controller to be tested of different test items from the hardware aspect and the software control aspect based on the same test platform architecture, realize the switching test of multiple test items based on the same test platform architecture, improve the test efficiency when performing the switching test on multiple test items, and do not need to build HIL test systems respectively corresponding to different test items, thereby improving the test efficiency of testing different test items and saving the cost of building different HIL test systems. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 It is a structural schematic diagram of a vehicle body hardware-in-the-loop test platform system involved in each embodiment of the vehicle body hardware-in-the-loop test method of the present invention;
[0040] Figure 2 A simple schematic diagram of the test bench;
[0041] Figure 3 It is a structural diagram of a matrix terminal block;
[0042] Figure 4 A simple schematic diagram of a software control system of the vehicle body hardware-in-the-loop test platform system of the present invention;
[0043] Figure 5It is a flow chart of a first embodiment of the vehicle body hardware-in-the-loop testing method of the present invention;
[0044] Figure 6 A schematic diagram of a flow chart of a second embodiment of a vehicle body hardware-in-the-loop testing method of the present invention;
[0045] Figure 7 It is a schematic diagram of the module composition of the vehicle body hardware-in-the-loop test platform system of the present invention.
[0046] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0047] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0048] The present invention provides a vehicle body hardware-in-the-loop test method, which is applied to a vehicle body hardware-in-the-loop test platform system. The test system includes a test bench, a test cabinet and a host computer. The test bench includes an automatic switching device, a controller to be tested and a load device. The automatic switching device is used to control the connection or disconnection between the controller to be tested and the load device. The host computer is connected to the test cabinet and is used to control the controller to be tested to execute a test instruction. The vehicle body hardware-in-the-loop test method includes:
[0049] Determine a target controller and a target load device corresponding to the target controller according to the test items;
[0050] Determine a first terminal pair to be connected according to the target controller, the target load device and a preset mapping relationship;
[0051] Determining a second terminal pair to be disconnected according to the first terminal pair and the current connection state of the automatic switching device;
[0052] Controlling the first terminal pair to be connected, and / or controlling the second terminal pair to be disconnected, so as to achieve the connection between the target controller and the target load device;
[0053] Sending a test instruction corresponding to the test item to the target controller.
[0054] The vehicle body hardware-in-the-loop testing method of the present invention is based on a vehicle body hardware-in-the-loop testing platform system, and controls the connection or disconnection between the controller to be tested and the load device through an automatic switching device arranged on a test bench, so that only the target controller and the target load device corresponding to the target test item are connected through the automatic switching device. In terms of hardware, the connection between the controller to be tested and the load device corresponding to different test items is realized based on the automatic switching device, so as to test the controllers to be tested of different test items without building HIL test benches respectively corresponding to different test items. In terms of software control, the target controller and the target load device corresponding to the target controller are determined according to the test item, and the first terminal pair to be connected of the automatic switching device is determined according to the target controller, the target load device and a preset mapping relationship, and the first terminal is controlled The sub-pairs are connected, and / or, according to the current connection status of the first terminal pair and the automatic switching device, the disconnected second terminal pair is determined, and the second terminal pair is controlled to be disconnected, so as to realize the connection between the target controller and the target load device corresponding to the test item in the automatic switching device, send the test instruction corresponding to the test item to the target controller, and realize the test of the target controller, so as to realize the test of the controller to be tested of different test items from the hardware aspect and the software control aspect based on the same test platform architecture, realize the switching test of multiple test items based on the same test platform architecture, improve the test efficiency when performing the switching test on multiple test items, do not need to build HIL test systems respectively corresponding to different test items, improve the test efficiency of testing different test items, and save the cost of building different HIL test systems.
[0055] Among them, the HIL test system built for the corresponding test project includes the HIL test bench, the software control environment corresponding to the test project, and the test scripts and sequences.
[0056] In the subsequent description, the suffixes such as "module", "component" or "unit" used to represent elements are only used to facilitate the description of the present invention, and have no specific meanings. Therefore, "module", "component" or "unit" can be used in a mixed manner.
[0057] Please refer to Figure 1 , Figure 1 It is a structural schematic diagram of the vehicle body hardware-in-the-loop test platform system involved in each embodiment of the vehicle body hardware-in-the-loop test method of the present invention.
[0058] like Figure 1 As shown, the vehicle body hardware in the loop test platform system may include: a memory 101 and a processor 102. Those skilled in the art will understand that Figure 1The structural block diagram of the terminal shown does not constitute a limitation on the terminal. The terminal may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. Among them, the memory 101 stores an operating system and a body hardware in the loop test program. The processor 102 is the control center of the body hardware in the loop test platform system. The processor 102 executes the body hardware in the loop test program stored in the memory 101 to implement the steps of each embodiment of the body hardware in the loop test method of the present invention.
[0059] Optionally, the vehicle body hardware-in-the-loop test platform system may further include a display unit 103, and the display unit 103 includes a display panel. The display panel may be configured in the form of a liquid crystal display (Liquid Crystal Display, LCD), an organic light-emitting diode (Organic Light-Emitting Diode, OLED), etc., for outputting an interface for user browsing. For example, if the host computer in the vehicle body hardware-in-the-loop test platform system includes the display unit 103, the test report corresponding to the test item is output through the display unit 103 of the host computer.
[0060] Optionally, the vehicle body hardware-in-the-loop test platform system also includes a communication unit 104, which establishes data communication with the terminal device through a network protocol (the data communication transmission can be Ethernet communication transmission or optical fiber communication transmission) to realize data transmission between the terminal device, such as sending the test report corresponding to the generated test item to the terminal device, so that the inspection personnel holding the terminal device can obtain the test results of the test item through the test report in time. Among them, the terminal device can include mobile terminals such as mobile phones, tablet computers, laptops, PDAs, portable media players (PMPs), wearable devices, and smart bracelets.
[0061] It should be noted that the executor of the present invention is a vehicle body hardware-in-the-loop test platform system, which includes a test bench, a test cabinet and a host computer. The test bench includes an automatic switching device, a controller to be tested and a load device. The automatic switching device is used to control the connection or disconnection between the controller to be tested and the load device. The host computer is connected to the test cabinet and is used to control the controller to be tested to execute test instructions.
[0062] Optionally, the test cabinet includes a power control box, a PDU (Power Distribution Unit) socket strip, a node test box, a test board, a programmable power supply and an industrial computer. Among them, the power control box is used to control the power on and off of the test cabinet, including functions such as the main switch, the emergency stop switch, and the start button. It can control the power off of the entire vehicle body hardware-in-the-loop test platform system and has overcurrent, overvoltage and leakage protection functions; the PDU socket strip is used to provide a power interface for the load device and the controller to be tested, and has overcurrent, leakage protection and emergency stop functions; the node test box is used to provide a power CAN / LIN communication interface IO (Input / Ouput) interface, the interface type is EDAC HDC banana head, and provides USB (UniversalSerial Bus, Universal Serial Bus) communication interface, connected to USB devices such as mouse transceivers, can be placed on the device to be tested, such as the controller to be tested; test board, used to provide power circuit simulation and monitoring, bus simulation, bus physical signal acquisition and analysis, IO signal simulation and measurement, fault injection and sensor / actuator circuit switching and other functions; programmable power supply, used to provide power for the controller to be tested, program-controlled through TCP / IP; industrial computer, used to install human-computer interaction software, script development software and necessary office software, send test instructions to the target controller to be tested, run the test project corresponding to the test project, and record the test results, among which human-computer interaction software such as CANoe software and script development software such as vTESTstudio software.
[0063] Optionally, the test board may be a VT board / system, a NI board / system or a dSpace board / system.
[0064] Optionally, the test bench includes an automatic switching device, a controller to be tested, and a load device, and the automatic switching device is used to control the connection or disconnection between the controller to be tested and the load device.
[0065] Optionally, the controller to be tested includes a body controller of a complete vehicle, and the load devices include lights, wipers, washers, door locks, electric windows, sunroofs, electric rearview mirrors, and other devices. For example, see Figure 2 , Figure 2 A simple schematic diagram of the test bench.
[0066] Exemplarily, when the test item is switched, the target controller and the target load device corresponding to the target controller are determined according to the test item, the first terminal pair to be connected is determined according to the target controller, the target load device and the preset mapping relationship, and the second terminal pair to be disconnected is determined according to the current connection status of the first terminal pair and the automatic switching device, and the first terminal pair is controlled to be connected, and / or the second terminal pair is controlled to be disconnected, so as to achieve connectivity between the target controller and the target load device.
[0067] Optionally, the automatic switching device uses a matrix terminal block. For example, see Figure 3 , Figure 3 This is a structural diagram of a matrix terminal block.
[0068] Optionally, the I / O interfaces of the control board of the test cabinet are all integrated into the test bench, and the platform parts and difference parts of different test items are all connected to the test bench. The difference parts are connected or disconnected by the automatic switching device to achieve hardware platform differentiation and maximization. Among them, the platform parts refer to the same parts in different test items. The difference parts refer to the different parts in different test items. The parts can be the controller to be tested or the load device.
[0069] It should be noted that in terms of the software control system of the vehicle body hardware-in-the-loop test platform system, the overall software framework includes human-computer interaction software components and test sequence creation software. Please refer to Figure 4 , Figure 4 It is a simple schematic diagram of the software control system of the vehicle body hardware-in-the-loop test platform system of the present invention. The software control system includes: platform test scripts, signal and variable mapping, test operation environment, hardware environment simulation, node simulation, human-computer interaction interface and automation sequence.
[0070] Among them, the platform test script is designed and developed. By determining the same test sequences and different test sequences between the test programs corresponding to different test items, the same test sequence is used as the universal test sequence of the test script. The universal test sequence is used to realize data sharing between the same test sequences between different test items, thereby improving the reusability of the test script. The different test sequences are used as variant test sequences of the test script to distinguish different test sequences between different test items. The variant test sequences are used to realize differentiated testing between different test items, thereby realizing switching testing of different test items in terms of software control based on the same test platform architecture, thereby improving test efficiency.
[0071] Signal and variable mapping design, according to the determined test items, the target controller corresponding to the test items and the target load device, a mapping relationship is formed based on the test items, the controller to be tested corresponding to the test items, the load device corresponding to the test items and the terminal pair that controls the controller to be tested and the load device to achieve connectivity. For differentiated controllers and loads, a universal hardware interface is established through automatic control devices to achieve fast switching of hardware for different projects, and a routing mapping relationship and a numerical conversion relationship between system variables and script functions are created between the test running environment and the platform test script, such as determining the same test sequences and different and similar test sequences between the test programs corresponding to different test items, generating a global test program for the test project according to the same test sequence; generating a variant test program corresponding to the test project according to the different and similar test sequences; generating a test program corresponding to the test project according to the global test program and the variant test program; based on the test program, sending the test instructions corresponding to the test project to the target controller to be compatible with the script changes caused by the communication matrix and database differences of different test projects.
[0072] In addition, conventional technical means can be used for test operation environment, hardware environment simulation, node simulation, human-computer interaction interface and automation sequence. For example, in human-computer interaction design, all test item configuration selection and manual debugging interface of the vehicle body controller can be associated with the interaction interface, and the target test item can be selected from all test items based on the human-computer interaction interface. For example, in the configuration of the underlying environment of the test operation environment, first, the channel hardware configuration can be configured according to the signal type. CANoe provides a graphical hardware configuration function to realize the attribute configuration and board control of each VT board. Second, network environment configuration, create a network communication and network management environment, configure the messages and data that need to be detected and recorded in the network, such as message time intervals, predefined information, etc., and define actions and interactive information for specific events. Third, the controlled object simulation can be created through Matlab / Simulink. The behavior model of the wiper can be compiled into DLL and loaded into CANoe. Fourth, import the ODX and CDD diagnostic databases, and load the security unlocking DLL file. Fifth, node simulation: establish a simulated controller node to send interactive messages, etc.
[0073] Based on the structural block diagram of the vehicle body hardware-in-the-loop test platform system, various embodiments of the vehicle body hardware-in-the-loop test method of the present invention are proposed.
[0074] In the first embodiment, the present invention provides a vehicle body hardware in the loop testing method, please refer to Figure 5 , Figure 5The flowchart of the first embodiment of the vehicle body hardware in the loop test method of the present invention is shown in FIG. In this embodiment, the vehicle body hardware in the loop test method is applied to the vehicle body hardware in the loop test platform system, and the vehicle body hardware in the loop test method includes the following steps:
[0075] Step S10, determining a target controller and a target load device corresponding to the target controller according to the test items;
[0076] Different test items correspond to different controllers to be tested and different load devices. It should be noted that in order to test different functional items of the body controller of a complete vehicle, the controllers to be tested integrated on the test bench include all the body controllers to be tested of the complete vehicle. For example, the body controller, as an important electronic control unit on the vehicle, is mainly used to control the load devices or electrical appliances of the vehicle body, such as vehicle lamps, wipers, washing machines, door locks, electric windows, sunroofs, electric rearview mirrors, and remote controls.
[0077] Among them, the control of different load devices or different electrical appliances by the body controller can be regarded as a test item. Optionally, different load devices can be different in the load devices themselves, such as when the load device is a vehicle lamp, it indicates that the load device is different from when the load device is an electric window, or the number of load devices can be different, such as when the load device is 5 lamps of the vehicle, it indicates that the load device is different from when the load device is 3 lamps of the vehicle.
[0078] Optionally, the number of target controllers determined by the test item may be one or more. Similarly, the number of target load devices corresponding to the target controller determined by the test item may be one or more.
[0079] As an optional implementation manner, before step S10, the method further includes:
[0080] When a selection instruction is received on the test item selection interface, the test item to be tested is determined according to the test item selected by the selection instruction; or,
[0081] According to the test time sequence of the preset test items, after detecting that a first test item among the preset test items is completed, the test item to be tested is determined according to a second test item adjacent to the first test item.
[0082] In one embodiment, when a selection instruction is received in the test item selection interface, the test item to be tested is determined according to the test item selected by the selection instruction, so that the user can selectively select the required test item from all test items to test the target controller, thereby meeting the need to test a single test item of the entire vehicle.
[0083] Optionally, the test item selection interface includes all test items for the body controller of the entire vehicle.
[0084] Optionally, correspondingly, the number of test items selected according to the selection instruction can be one or at least two, and the number of test items to be tested can be one or at least two. When the number of test items to be tested is at least two, the controllers to be tested corresponding to the test items to be tested can be tested in sequence according to the time sequence of selecting the at least two test items to be tested.
[0085] In one embodiment, based on the test time sequence of preset test items, after the first test item in the preset test items is completed, it is possible to automatically switch to a second test item adjacent to the first test item, and use the second test item as the test item to be tested, so as to realize automatic switching tests between different test items in the preset test items and improve test efficiency.
[0086] Optionally, the preset test items and the test order of the test items can be set according to user requirements. The preset test items can be all test items of the body controller of the entire vehicle, or at least two of all test items of the body controller of the entire vehicle, without limitation.
[0087] Optionally, according to the test time sequence of the preset test items, the first test item is adjacent to the second test item, and the test time point of the first test item is earlier than the test time point of the second test item.
[0088] Step S20, determining a first terminal pair to be connected according to the target controller, the target load device and a preset mapping relationship;
[0089] Step S30, determining a second terminal pair to be disconnected according to the first terminal pair and the current connection state of the automatic switching device;
[0090] Step S40, controlling the first terminal pair to be connected, and / or controlling the second terminal pair to be disconnected, so as to achieve connection between the target controller and the target load device;
[0091] Step S50: sending a test instruction corresponding to the test item to the target controller.
[0092] In the actual application process, corresponding to different test items, the corresponding controllers to be tested are different, and the load devices are different. When different test items are tested based on the same test platform architecture, when the test items to be tested are tested, in order to achieve connectivity between the target controller and the load device corresponding to the test items to be tested, a mapping relationship can be formed based on the test items, the controllers to be tested corresponding to the test items, the load devices corresponding to the test items, and the terminal pairs that control the connectivity between the controllers to be tested and the load devices. Specifically, before step S20, it also includes:
[0093] Determine a controller to be tested and a load device corresponding to the test item, wherein the controller to be tested includes the target controller, and the load device includes the target load device;
[0094] Determine the terminal pair identifier of the automatic switching device that realizes the connection between the controller to be tested and the load device;
[0095] A mapping relationship of the test items is generated according to the controller to be tested, the load device and the terminal pair identifier.
[0096] It is understandable that the automatic switching device uses a matrix terminal block. The terminals of the automatic switching device can be uniquely identified by terminal identification.
[0097] A mapping relationship is formed based on the test item, the controller to be tested corresponding to the test item, the load device corresponding to the test item, and the terminal pair for controlling the connectivity between the controller to be tested and the load device. After clarifying the target controller corresponding to the test item and the target load device corresponding to the test item, the target terminal pair for realizing connectivity between the target controller and the load device corresponding to the test item to be tested can be obtained, wherein the target terminal pair can be uniquely determined by the terminal pair identifier of the automatic switching device for realizing connectivity between the controller to be tested and the load device.
[0098] In actual application, in order to ensure that the automatic switching device only realizes the connection between the target controller and the load device corresponding to the test item to be tested, the first terminal pair to be connected is determined according to the target controller, the target load device and the preset mapping relationship, and the second terminal pair to be disconnected is determined according to the current connection status of the first terminal pair and the automatic switching device, and the first terminal pair is controlled to be connected, and / or, according to the current connection status of the first terminal pair and the automatic switching device, the disconnected second terminal pair is determined, and the second terminal pair is controlled to be disconnected, that is, the terminal pairs other than the first terminal pair of the automatic switching device are disconnected, so as to realize the connection between the target controller and the target load device corresponding to the test item.
[0099] Send the test instructions corresponding to the test items to the target controller to test the target controller, so as to implement the testing of the controller to be tested for different test items from the hardware and software control aspects based on the same test platform architecture. There is no need to build HIL test systems for different test items respectively, which improves the test efficiency of testing different test items.
[0100] Optionally, after step S50, the method further includes:
[0101] Generate a test report corresponding to the test item, and / or output the test report, so as to obtain the control accuracy of the body controller of the whole vehicle by generating the test report and / or outputting the test report.
[0102] It can be understood that by sending test instructions corresponding to the test items to the target controller, the status feedback of the target controller under test, such as current consumption, fault status, etc., is monitored through messages or hard lines, and the configured messages and data are tracked and recorded synchronously to generate a test report corresponding to the test items.
[0103] It should be noted that, in this embodiment, the body hardware-in-the-loop test platform system hardware platform integrates a test cabinet, an automatic switching device first-level test and a test bench, forming a stable, universal, scalable, multiplexed and fully functional system platform, which can complete the input and output of electronic control unit signals, signal generation and collection of multiple test items, body controller input and output signal simulation, fault injection, diagnostic function test, body domain controller signal interaction test and automation test.
[0104] In the technical solution disclosed in the present embodiment, based on the vehicle body hardware-in-the-loop test platform system, the connection or disconnection between the controller to be tested and the load device is controlled by an automatic switching device arranged on the test bench, so that only the target controller and the target load device corresponding to the target test item are connected through the automatic switching device. In terms of hardware, the connection between the controller to be tested and the load device corresponding to different test items is realized based on the automatic switching device, so as to test the controllers to be tested of different test items without building HIL test benches respectively corresponding to different test items. In terms of software control, the target controller and the target load device corresponding to the target controller are determined according to the test item, and the first terminal pair to be connected of the automatic switching device is determined according to the target controller, the target load device and the preset mapping relationship, and the first terminal is controlled. The sub-pairs are connected, and / or, according to the current connection status of the first terminal pair and the automatic switching device, the disconnected second terminal pair is determined, and the second terminal pair is controlled to be disconnected, so as to realize the connection between the target controller and the target load device corresponding to the test item in the automatic switching device, send the test instruction corresponding to the test item to the target controller, and realize the test of the target controller, so as to realize the test of the controller to be tested of different test items from the hardware aspect and the software control aspect based on the same test platform architecture, realize the switching test of multiple test items based on the same test platform architecture, improve the test efficiency when performing the switching test on multiple test items, do not need to build HIL test systems respectively corresponding to different test items, improve the test efficiency of testing different test items, and save the cost of building different HIL test systems.
[0105] In the second embodiment proposed based on the first embodiment, please refer to Figure 6 , Figure 6 FIG. 1 is a flow chart of a second embodiment of the vehicle body hardware-in-the-loop testing method of the present invention. In this embodiment, step S50 includes:
[0106] Step S51, determining the same test sequences and the different test sequences between the test programs corresponding to different test items;
[0107] Step S52, generating a global test program for the test item according to the same test sequence;
[0108] Step S53, generating a variant test program corresponding to the test item according to the similarity and difference test sequence;
[0109] Step S54, generating a test program corresponding to the test item according to the global test program and the variant test program;
[0110] Step S55: Based on the test program, a test instruction corresponding to the test item is sent to the target controller.
[0111] It should be noted that the development of platform test scripts is to develop test script functions and basic test sequences according to test specifications, use the Test Setup module of CANoe-TFS to build a macro-framework for test sequence management and organization, and manage and organize vehicle platform (Platform), test scope (System or Node), test content and test object (DUT) through file directory management and hierarchical structures, and manage the details of the test project and test implementation based on Tester.
[0112] In this embodiment, it can be understood that the same test sequence refers to the same test sequence in the test program corresponding to different test items, and the different test sequences refer to the different test sequences in the test program corresponding to different test items.
[0113] Optionally, the same test sequences and different test sequences between test programs corresponding to different test items can be determined by comparing the test programs between different test items to obtain the same test sequences and different test sequences between the test programs. Test code detection software can also be used to clarify the same test sequences and different test sequences between test programs corresponding to different test items. There is no limitation to this.
[0114] In this embodiment, the same test sequence is used as a common test sequence of the test script, and data sharing between the same test sequences of different test items is achieved through the common test sequence, thereby improving the reusability of the test script. The different test sequences are used as variant test sequences of the test script to distinguish different test sequences between different test items, and differentiated testing between different test items is achieved through the variant test sequence, thereby realizing switching testing of different test items in terms of software control based on the same test platform architecture, thereby improving test efficiency.
[0115] Optionally, step S55 includes:
[0116] Obtain the global test program and the variant test program corresponding to the test program;
[0117] According to the global test program and the variant test program, a test instruction corresponding to the test item is sent to the target controller.
[0118] According to the global test program and the variant test program, the test program of the corresponding test item is generated, and the test instructions corresponding to the test item are sent to the target controller to improve the utilization rate of the test scripts corresponding to the same test program. At the same time, based on the variant test program in the test program corresponding to the test item, the difference test between different test items is realized, thereby achieving the testing of different test items of the vehicle body function and improving the test efficiency.
[0119] In the technical solution disclosed in the present embodiment, by determining the same test sequences and different and similar test sequences between the test programs corresponding to different test items, a global test program for the test items is generated according to the same test sequences to clarify the same test sequences between different test items, a variant test program for the corresponding test items is generated according to the different and similar test sequences to clarify the different test sequences between different test items, a test program for the corresponding test item is generated according to the global test program and the variant test program, a test program for the corresponding test item is generated according to the global test program and the variant test program, and a test instruction corresponding to the test item is sent to the target controller to improve the utilization rate of the test scripts corresponding to the same test program, while realizing the difference test between different test items based on the variant test program in the test program corresponding to the test item, thereby achieving the test of different test items of vehicle body functions and improving the test efficiency.
[0120] In addition, please refer to Figure 7 , Figure 7 Schematic diagram of the module composition of the vehicle body hardware in the loop test platform system of the present invention. The vehicle body hardware in the loop test platform system 100 of the present invention includes:
[0121] A first determination module 110 is used to determine a target controller and a target load device corresponding to the target controller according to a test item;
[0122] A second determining module 120, configured to determine a first terminal pair to be connected according to the target controller, the target load device and a preset mapping relationship;
[0123] A third determination module 130, configured to determine a second terminal pair to be disconnected according to the first terminal pair and the current connection state of the automatic switching device;
[0124] The on-off module 140 is used to control the first terminal pair to be connected, and / or control the second terminal pair to be disconnected, so as to achieve the connection between the target controller and the target load device;
[0125] The instruction sending module 150 is used to send the test instruction corresponding to the test item to the target controller.
[0126] The present invention also proposes a vehicle body hardware-in-the-loop test platform system, which includes: a memory, a processor, and a vehicle body hardware-in-the-loop test program stored in the memory and executable on the processor. When the vehicle body hardware-in-the-loop test program is executed by the processor, the steps of the vehicle body hardware-in-the-loop test method in any of the above-mentioned embodiments are implemented.
[0127] The present invention also proposes a storage medium storing a vehicle body hardware-in-the-loop test program. When the vehicle body hardware-in-the-loop test program is executed by a processor, the steps of the vehicle body hardware-in-the-loop test method described in any of the above embodiments are implemented.
[0128] In the embodiments of the vehicle body hardware-in-the-loop test platform system and storage medium provided by the present invention, all technical features of the various embodiments of the above-mentioned vehicle body hardware-in-the-loop test method are included, and the expanded and explained contents of the specification are basically the same as those of the various embodiments of the above-mentioned vehicle body hardware-in-the-loop test method, and will not be repeated here.
[0129] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.
[0130] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0131] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as above, and includes a number of instructions for a mobile terminal (which can be a computer, a server, a controlled terminal, or a network device, etc.) to execute the method of each embodiment of the present invention.
[0132] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A vehicle body hardware-in-the-loop testing method, characterized in that: Applied to a vehicle body hardware in-the-loop test platform system, the test system includes a test bench, a test cabinet and a host computer, the test bench includes an automatic switching device, a controller to be tested and a load device, the automatic switching device is used to control the connection or disconnection between the controller to be tested and the load device, the host computer is connected to the test cabinet, and is used to control the controller to be tested to execute a test instruction, and the vehicle body hardware in-the-loop test method includes: Determine a target controller and a target load device corresponding to the target controller according to the test items; Determine a first terminal pair to be connected according to the target controller, the target load device and a preset mapping relationship; Determining a second terminal pair to be disconnected according to the first terminal pair and the current connection state of the automatic switching device; Controlling the first terminal pair to be connected, and / or controlling the second terminal pair to be disconnected, so as to achieve the connection between the target controller and the target load device; Sending a test instruction corresponding to the test item to the target controller.
2. The method according to claim 1, characterized in that Before the step of determining the target controller according to the test items and the target load corresponding to the target controller, the method further includes: When a selection instruction is received on the test item selection interface, the test item to be tested is determined according to the test item selected by the selection instruction; or, According to the test time sequence of the preset test items, after detecting that a first test item among the preset test items is completed, the test item to be tested is determined according to a second test item adjacent to the first test item.
3. The method according to claim 1, characterized in that Before the step of determining the first terminal pair to be connected according to the target controller, the target load device and the preset mapping relationship, the method further includes: Determine a controller to be tested and a load device corresponding to the test item, wherein the controller to be tested includes the target controller, and the load device includes the target load device; Determine the terminal pair identifier of the automatic switching device that realizes the connection between the controller to be tested and the load device; A mapping relationship of the test items is generated according to the controller to be tested, the load device and the terminal pair identifier.
4. The method according to claim 1, characterized in that The step of sending the test instruction corresponding to the test item to the target controller comprises: Determine the same test sequences and the different test sequences between the test programs corresponding to different test items; Generate a global test program for the test items according to the same test sequence; Generate a variant test program corresponding to the test item according to the similarities and differences test sequence; Generate a test program corresponding to the test item according to the global test program and the variant test program; Based on the test program, a test instruction corresponding to the test item is sent to the target controller.
5. The method according to claim 4, characterized in that The step of sending the test instruction corresponding to the test item to the target controller based on the test program includes: Obtain the global test program and the variant test program corresponding to the test program; According to the global test program and the variant test program, a test instruction corresponding to the test item is sent to the target controller.
6. The method according to claim 1, characterized in that After the step of sending the test instruction corresponding to the test item to the target controller, the method further includes: Generate a test report corresponding to the test item, and / or output the test report.
7. A vehicle body hardware-in-the-loop test platform system, characterized in that: The vehicle body hardware in-the-loop test platform system includes: a test bench, the test bench is integrated with an automatic switching device, a controller to be tested and a load device, the automatic switching device is used to achieve connection or disconnection between the controller to be tested and the load device, a test cabinet, the test cabinet is connected to the test bench through a connecting harness, and a host computer, the host computer is connected to the test cabinet to realize the test control function of the controller to be tested; the vehicle body hardware in-the-loop test platform system also includes: A first determination module, used to determine a target controller and a target load device corresponding to the target controller according to a test item; A second determining module, configured to determine a first terminal pair to be connected according to the target controller, the target load device and a preset mapping relationship; A third determining module, configured to determine a second terminal pair to be disconnected according to the first terminal pair and the current connection state of the automatic switching device; A connection and disconnection module, used for controlling the first terminal pair to be connected, and / or controlling the second terminal pair to be disconnected, so as to achieve the connection between the target controller and the target load device; The sending instruction module is used to send the test instruction corresponding to the test item to the target controller.
8. The vehicle body hardware-in-the-loop test platform system as claimed in claim 7, characterized in that: The automatic switching device adopts a matrix terminal block.
9. A vehicle body hardware-in-the-loop test platform system, characterized in that: The body hardware-in-the-loop test platform system includes: a memory, a processor, and a body hardware-in-the-loop test program stored in the memory and executable on the processor. When the body hardware-in-the-loop test program is executed by the processor, the steps of the body hardware-in-the-loop test method as described in any one of claims 1 to 6 are implemented.
10. A storage medium, characterized in that: The storage medium stores a vehicle body hardware-in-the-loop test program, and when the vehicle body hardware-in-the-loop test program is executed by a processor, the steps of the vehicle body hardware-in-the-loop test method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Car body electric control system testing platform based on hardware-in-the-loop
CN105446312A
Automatic detection device and method based on electric vehicle lithium battery controller
CN111880516A