Hardware-in-the-loop test system and hardware-in-the-loop test method
By using a bidirectional power supply and a battery simulator in the hardware in the ring test system, the problem of difficulty in testing the integrated first and second functional units in the prior art is solved, and higher test accuracy is achieved.
Patent Information
- Application Number
- CN202311697757.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-11
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2043-12-11
AI Technical Summary
The prior art is difficult to test the first and second functional units integrated together simultaneously, resulting in inaccurate test results.
Using a hardware-in-loop testing system, including a two-way power supply and a battery simulator, the test parameters are sent to the controller to be tested through a two-way power supply, and the battery simulator simulates the battery state to realize simultaneous testing of the first functional unit and the second functional unit. .
Improves the accuracy of testing of highly integrated area controllers, avoiding the problem of not being able to test all functional modules simultaneously during independent testing.
Smart Images

Figure CN117806274B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of testing technology, and in particular to a hardware-in-the-loop testing system and a hardware-in-the-loop testing method. Background Art
[0002] The controller under test integrates the first functional unit and the second functional unit. The second functional unit is mainly used to replace the traditional manual power distribution management controller to a certain extent with the help of computer technology, communication technology, AI technology, etc. The first functional unit can monitor and manage the battery connected to the controller under test. At present, such a controller under test can only be tested independently, that is, the second functional unit is tested independently, and the first functional unit is tested independently. However, because the first functional unit and the intelligent power distribution unit are physically and functionally integrated, they share the same MCU and related resources, and each is tested separately, and all functional modules cannot be tested at the same time. Summary of the invention
[0003] The present application at least provides a hardware-in-the-loop testing system and a hardware-in-the-loop testing method.
[0004] The present application provides a hardware-in-the-loop test system, which is used to test a controller to be tested after cooperating with the controller to be tested. The controller to be tested includes a first functional unit and a second functional unit. The hardware-in-the-loop test system includes: a bidirectional power supply, a processor and a battery simulator. The processor is connected to the bidirectional power supply and is used to control the bidirectional power supply to output test parameters to the controller to be tested; the battery simulator is connected to the processor to receive the test parameters sent by the processor and adjust the state of the battery simulator based on the test parameters. The battery simulator is also used to connect to the first functional unit in the controller to be tested, and the first functional unit is used to detect the state of the battery simulator; wherein the processor is also used to communicate with the controller to be tested to receive response data of the second functional unit in the controller to be tested under the test parameters and state information detected by the battery simulator and determine the test result of the controller to be tested based on the response data and the state information.
[0005] In the above scheme, by setting up a bidirectional power supply and a battery simulator in a hardware-in-the-loop test system, the bidirectional power supply can send test parameters to the controller to be tested to test the response of the second functional unit, and the battery simulator also simulates the state of the battery according to the test parameters, and can test whether the first functional unit detects the state of the battery simulator accurately, thereby achieving simultaneous testing of the first functional unit and the second functional unit in the controller to be tested. Compared with testing the two independently, the present application can improve the test accuracy of such a highly integrated regional controller.
[0006] In some embodiments, the hardware-in-the-loop test system includes an electronic load module, which includes multiple electronic loads and a switch component. One end of the switch component is connected to the output end of the controller to be tested, and the other end of the switch component is respectively connected to each electronic load to establish or disconnect the connection between each electronic load and the controller to be tested.
[0007] In the above scheme, by setting up an electronic load module in the hardware-in-the-loop test system, the load in the whole vehicle can be simulated, and by setting up a switch component, the number of electronic loads connected to the controller to be tested can be controlled, so that the response of the controller to be tested under different numbers of loads can be tested.
[0008] In some embodiments, the switch assembly includes multiple switching devices, and the hardware-in-the-loop test system includes a driving circuit, one end of the driving circuit is connected to the processor and the other end is connected to each switching device, and the driving circuit is used to adjust the opening and closing state of each switching device after receiving a driving instruction sent by the processor.
[0009] In the above solution, by providing a driving circuit, the driving circuit can be used to adjust the opening and closing states of each switch device in the switch assembly, thereby adjusting the number of switch devices connected to the circuit.
[0010] In some embodiments, the processor is in communication with each electronic load, and each electronic load is used to adjust the mode of the electronic load in response to an adjustment instruction sent by the processor, and the mode includes at least one of a constant current mode, a constant voltage mode, and a constant power mode.
[0011] In the above solution, after the processor establishes a connection with the electronic load, the complex load conditions in the actual scene can be simulated by adjusting the modes of each electronic load, thereby making the test result of the controller to be tested more accurate.
[0012] In some embodiments, the hardware-in-the-loop test system includes an IO board, one end of which is connected to a processor, and the other end is used to connect to a resistor at a power input end of a controller to be tested, and is used to send a differential voltage to the resistor in response to a test current output instruction sent by the processor.
[0013] In the above scheme, by setting the IO board, after the IO board sends a differential voltage to the resistor at the power input end of the controller to be tested, both ends of the resistor can simulate a large current input under the action of the differential voltage, thereby simulating the response of the controller to be tested under a large current.
[0014] In some embodiments, the hardware-in-the-loop test system includes a unidirectional power supply, which is used to simulate the DCDC unidirectional power supply output of the entire vehicle. The unidirectional power supply is connected to a processor for receiving test parameters sent by the processor and outputting supplementary test parameters to the controller under test. The response data also includes response data generated by the controller under test based on the supplementary test parameters.
[0015] In the above scheme, by setting a unidirectional power supply in the hardware-in-the-loop test system, the DCDC of the whole vehicle can be simulated through the unidirectional power supply, and the response of the controller to be tested under the action of the whole vehicle power supply can be simulated.
[0016] In some embodiments, the controller to be tested is a regional controller to be tested, the first functional unit is a battery management unit, and the second functional unit is an intelligent power distribution control unit.
[0017] In the above solution, when a battery management unit and an intelligent power distribution unit are integrated in the regional controller to be tested, the present application can implement testing of such regional controller.
[0018] In some embodiments, the test parameters include a test current and / or a test voltage.
[0019] In the above solution, by inputting a test current and / or a test voltage into the controller to be tested, the response of the controller to be tested under the test current and / or the test voltage can be tested.
[0020] The present application provides a hardware-in-the-loop testing method, which is applied to any one of the above-mentioned hardware-in-the-loop testing systems. The hardware-in-the-loop testing method includes: a processor sends a test instruction carrying a test parameter indication to a bidirectional power supply and a battery simulator, so that the bidirectional power supply sends the test parameter to the controller to be tested based on the test instruction and the battery simulator adjusts the state of the battery simulator based on the test parameter indication in the test instruction; receives response data and status information sent by the controller to be tested, the response data is the response data of the second functional unit in the controller to be tested under the test parameter, and the status information is the status information obtained by the first functional unit in the controller to be tested from detecting the battery simulator; and generates a test result of the controller to be tested based on the received response data and status information.
[0021] In the above scheme, by setting up a bidirectional power supply and a battery simulator in a hardware-in-the-loop test system, the bidirectional power supply can send test parameters to the controller to be tested to test the response of the second functional unit, and the battery simulator also simulates the state of the battery according to the test parameters, and can test whether the first functional unit detects the state of the battery simulator accurately, thereby achieving simultaneous testing of the first functional unit and the second functional unit in the controller to be tested. Compared with testing the two independently, the present application can improve the test accuracy of such a highly integrated regional controller.
[0022] In some embodiments, the hardware-in-the-loop testing system includes a unidirectional power supply. Before the processor sends a test instruction carrying a test parameter indication to the bidirectional power supply and the battery simulator, the hardware-in-the-loop testing method also includes: the processor determines the test parameters of the controller to be tested and / or the supplementary test parameters of the unidirectional power supply for the controller to be tested based on at least one of a preset environmental model, a preset unidirectional power supply model, a low-voltage battery model, and a load model. The preset environmental model is used to simulate the operating environment of the entire vehicle other than the controller to be tested. The preset unidirectional power supply model is used to simulate one or more of the output power capability, output current capability, and output voltage capability of the unidirectional power supply. The low-voltage battery model is used to simulate a low-voltage battery. The load model is used to simulate a load connected to the controller to be tested.
[0023] In the above scheme, by combining multiple preset models to determine the test parameters, the complex environment of the controller to be tested can be simulated, thereby making the test of the controller to be tested more comprehensive.
[0024] In some embodiments, the test parameters include a test voltage, and the processor determines the test parameters of the controller to be tested and / or the supplementary test parameters of the unidirectional power supply for the controller to be tested based on at least one of a preset environmental model, a preset unidirectional power supply model, a low-voltage battery model, and a load model, including: determining the test environment parameters based on the preset environmental model; determining the voltage output capacity of the unidirectional power supply in combination with the test environment parameters and the preset unidirectional power supply model; and determining the voltage output capacity of the bidirectional power supply in combination with the test environment parameters and the low-voltage battery model; based on the voltage output capacities of the unidirectional power supply and the bidirectional power supply, determining the test voltages output by the unidirectional unit and the bidirectional power supply to the controller to be tested, respectively.
[0025] In the above scheme, the working environment of the controller to be tested can be determined by presetting the environmental model. The voltage output capabilities of the vehicle power supply and the low-voltage battery may be different under different environments. The voltage output capabilities of the unidirectional power supply and the bidirectional power supply can be determined by referring to environmental factors, and the test voltages output by the unidirectional unit and the bidirectional power supply to the controller to be tested respectively can be determined, so that the output test voltage is more reasonable.
[0026] In some embodiments, the test parameters include a test current, and the hardware-in-the-loop test system includes an electronic load module. The processor determines the test parameters of the controller to be tested and / or the supplementary test parameters of the unidirectional power supply for the controller to be tested based on at least one of a preset environment model, a preset unidirectional power supply model, a low-voltage battery model, and a load model, including: determining the test environment parameters based on the preset environment model; determining the current output capacity of the unidirectional power supply in combination with the test environment parameters and the preset unidirectional power supply model; determining the current output capacity of the bidirectional power supply in combination with the test environment parameters and the low-voltage battery model; determining the test current required by the electronic load module based on the load model; determining the test current output by the unidirectional power supply and the bidirectional power supply in combination with the test current required by the electronic load module, the current output capacity of the unidirectional power supply, and the current output capacity of the bidirectional power supply.
[0027] In the above scheme, by combining environmental parameters and the current required by the load simulated by the load model, it is determined whether the current can be output by only a unidirectional power supply, or a bidirectional power supply, or both a unidirectional power supply and a bidirectional power supply.
[0028] In some embodiments, the hardware-in-the-loop testing system includes a driving circuit. After determining the test current required by the electronic load module based on the load model, the hardware-in-the-loop testing method also includes: determining the connection relationship between each electronic load in the electronic load module and the controller to be tested based on the test current required by the electronic load module; and sending configuration instructions to the driving circuit so that the driving circuit adjusts the connection relationship between each electronic load and the controller to be tested.
[0029] In the above scheme, the load model can simulate the test current required by the electronic load module, and by configuring the connection relationship between each electronic load and the controller to be tested, it is convenient to simulate the response of the controller to be tested under the current demand of a specific electronic load.
[0030] In some embodiments, the controller to be tested includes multiple branches, each branch is used to connect at least part of the electronic load, and the hardware-in-the-loop testing method also includes: inputting a current of a first preset value into the power input terminal of the controller to be tested and inputting a current of a second preset value into each branch of the controller to be tested; receiving a first detection value obtained by current collection at the power input terminal of the controller to be tested and multiple second detection values obtained by current collection from each branch; in response to the first difference and / or the second difference being greater than a preset difference, collecting and recording data of the controller to be tested and the hardware-in-the-loop testing system, so as to subsequently optimize the current collection algorithm of the controller to be tested based on the data.
[0031] In the above scheme, by inputting a first preset value into the power input terminal of the controller to be tested and outputting a second preset value in each branch, and by obtaining the first detection value detected at the power input terminal returned by the controller to be tested, the accuracy of the current detection result of the power input terminal of the controller to be tested can be determined. Similarly, by inputting a second preset value into each branch of the controller to be tested and receiving the second detection value detected at each branch returned by the controller to be tested, the accuracy of the current detection result of each branch of the area control to be tested can be determined, and it can be determined whether the current acquisition algorithm of the controller to be tested needs to be optimized based on the two current detection results.
[0032] In some embodiments, the hardware-in-the-loop testing method further includes: in response to the first difference and the second difference being less than or equal to a preset difference, the execution processor sends a test instruction carrying a test parameter indication to the bidirectional power supply and the battery simulator.
[0033] In the above solution, by performing other tests on the controller to be tested when both current detection results are accurate, subsequent test results are made more reliable.
[0034] In some embodiments, the response data includes the current value obtained by detecting the power input terminal of the controller to be tested and the current value obtained by detecting each branch. Based on the received response data and status information, the test results of the controller to be tested are generated, including: in response to the current value obtained by detecting the power input terminal of the controller to be tested and the sum of the current values obtained by detecting each branch not meeting the consistency requirement, executing collection and recording of data of the controller to be tested and the hardware-in-the-loop test system, so as to subsequently optimize the current collection algorithm and current synchronization algorithm of the controller to be tested based on the data.
[0035] In the above scheme, the response data is the current value obtained by the controller under test at the power input terminal and the current value detected at each branch. If the current value at the power input terminal is the same as the sum of the current values of each branch, then it is determined that the controller under test meets the consistency requirement. Otherwise, the current acquisition algorithm and current synchronization algorithm of the controller under test can be optimized based on the data of the hardware-in-the-loop test system and the data returned by the controller under test.
[0036] In some embodiments, the test parameters include a pulse current, the response data include a current detection result, the current detection result includes a current value detected at the power output end of the controller to be tested and / or a current value detected at each branch, and the test result of the controller to be tested is generated based on the received response data and status information, including: comparing the input value of the pulse current and the current detection result returned by the controller to be tested to obtain a comparison result; based on the comparison result that there is a time lag in the current detection result, collecting and recording data of the controller to be tested and the hardware-in-the-loop test system, so as to subsequently optimize the current collection algorithm and the current synchronization algorithm of the controller to be tested based on the data.
[0037] In the above scheme, by inputting pulse current into the controller under test, it is possible to determine whether there is a time lag in current acquisition and current synchronization of the controller under test based on the current detection result returned by the controller under test, so as to facilitate subsequent optimization.
[0038] In the above scheme, by setting up a bidirectional power supply and a battery simulator in a hardware-in-the-loop test system, the bidirectional power supply can send test parameters to the controller to be tested to test the response of the second functional unit, and the battery simulator also simulates the state of the battery according to the test parameters, and can test whether the first functional unit detects the state of the battery simulator accurately, thereby achieving simultaneous testing of the first functional unit and the second functional unit in the controller to be tested. Compared with testing the two independently, the present application can improve the test accuracy of such a highly integrated regional controller.
[0039] 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 present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present application and are used together with the specification to illustrate the technical solution of the present application.
[0041] Figure 1 Some embodiments provide a hardware-in-the-loop test system and a controller under test;
[0042] Figure 2 The connection relationship between the output terminal of the controller to be tested and the electronic load provided in some embodiments is Figure 1 ;
[0043] Figure 3 The connection relationship between the output terminal of the controller to be tested and the electronic load provided in some embodiments is Figure 2 ;
[0044] Figure 4 The connection relationship between the output terminal of the controller to be tested and the electronic load provided in some embodiments is Figure 3 ;
[0045] Figure 5 The connection relationship between the output terminal of the controller to be tested and the electronic load provided in some embodiments is Figure 4 ;
[0046] Figure 6 The connection relationship between the output terminal of the controller to be tested and the electronic load provided in some embodiments is Figure 5 ;
[0047] Figure 7 The connection relationship between the output terminal of the controller to be tested and the electronic load provided in some embodiments is Figure 6 ;
[0048] Figure 8 is a flowchart of a hardware-in-the-loop testing method provided by some embodiments;
[0049] Fig. 9 is a schematic diagram of a flow chart for determining a test current and a test voltage provided by some embodiments.
[0050] Description of labels:
[0051] 100-hardware-in-the-loop test system, 200-controller under test, 110-bidirectional power supply, 120-processor, 130-battery simulator, 140-electronic load module, 141-electronic load, 142-switch component, 150-unidirectional power supply, 160-drive circuit, 170-IO board, 210-first MOSFET tube, 220-second MOSFET tube. DETAILED DESCRIPTION
[0052] The scheme of the embodiment of the present application is described in detail below in conjunction with the drawings of the specification.
[0053] In the following description, for the purpose of explanation rather than limitation, specific details such as specific subsystem structures, interfaces, and technologies are provided to facilitate a thorough understanding of the present application.
[0054] The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the objects associated before and after are in an "or" relationship. In addition, "many" in this article means two or more than two. In addition, the term "at least one" in this article means any combination of at least two of any one or more of a plurality of, for example, including at least one of A, B, and C, can mean including any one or more elements selected from the set consisting of A, B, and C.
[0055] Considering that the controller under test integrates the first functional unit and the second functional unit, the first functional unit and the intelligent power distribution unit are physically and functionally integrated, and share the same MCU and related resources. Currently, for such a controller under test, only independent split testing can be performed, that is, the second functional unit is tested independently, and the first functional unit is tested independently. However, because each is tested separately, all functional modules cannot be tested at the same time, so the test results are often not very accurate.
[0056] Therefore, the present solution provides a solution capable of testing the first functional unit and the power distribution control unit in the controller to be tested. By using a hardware-in-the-loop test system including a bidirectional power supply and a battery simulator, the parameters of the battery simulator are synchronized with the test state of the bidirectional power supply output, so that the second functional unit and the first functional unit can be tested with the same test parameters.
[0057] See also Figure 1 The hardware-in-the-loop test system is used to test the controller 200 after cooperating with the controller 200 to be tested. The controller 200 to be tested includes a first functional unit (not shown) and a second functional unit (not shown). Among them, the hardware-in-the-loop test system 100 includes: a bidirectional power supply 110, a processor 120 and a battery simulator 130. The processor 120 is connected to the bidirectional power supply 110 and is used to control the bidirectional power supply 110 to output test parameters to the controller 200 under test. The test parameters include test current and / or test voltage; the battery simulator 130 is connected to the processor 120 to receive the test parameters sent by the processor 120 and adjust the state of the battery simulator 130 based on the test parameters. The battery simulator 130 is also used to connect to the first functional unit in the controller 200 under test, and the first functional unit is used to detect the state of the battery simulator 130; wherein the processor 120 is also used to communicate with the controller 200 under test to receive response data of the second functional unit in the controller 200 under the test parameters and the state information detected by the battery simulator 130 and determine the test result of the controller 200 under test based on the response data and the state information.
[0058] The controller to be tested in this solution can be a zone controller, domain control or other types of controllers. DCU (Domain Control Unit). ZCU (Zone Control Unit): In order to reduce the number and length of wiring harnesses in the car and optimize the electronic and electrical architecture, the car manufacturer has made further integration based on the functional domain architecture, giving birth to the "zonal control architecture". ZCU is a regional level control unit in the vehicle's electronic and electrical architecture, responsible for managing and controlling specific areas or functional areas of the vehicle. For example, it is usually associated with a specific area or subsystem (such as seat control, air conditioning control, dashboard control, etc.), and processes the input and output of the area. In this solution, the second functional unit and the first functional unit are integrated on the ZCU, and the second functional unit and the first functional unit share an MCU. Among them, the second functional unit is used to manage the power distribution of the load in the vehicle. Among them, the power distribution management of the load can specifically be to supply power to the load or stop supplying power to the load. The functional modules of the first functional unit in the controller under test 200 include a microcontroller (MCU) and a sensor module of an analog front end (AFE). For example, the AFE measures the voltage of the battery and sets it to the MCU, and can also detect the temperature of the battery (usually through an NTC thermistor). The AFE has many functions and will not be described here. The second functional unit includes an SBC (System Basis Chip) and an MCU. The SBC can perform communication, monitoring diagnosis, safety monitoring, etc.
[0059] The battery simulator 130 is an entity, which can also be called a battery simulation board, and can usually only output voltage + milliampere level current. In order to verify the low-voltage power distribution product, an additional power supply is required to ensure the current output. At the same time, the voltage of this power supply needs to be consistent with the battery simulator 130, so as not to cause the internal software of the low-voltage power distribution product to identify the voltage consistency error. Therefore, a bidirectional power supply 110 is set in the hardware-in-the-loop test system 100 of the present application. The bidirectional power supply 110 can both output energy and recover energy, thereby simulating the bidirectional energy flow of the low-voltage battery of the whole vehicle. The processor 120 can be a real-time processor, a microcontroller processor, etc. For example, the processor 120 can be an R series: Real-time Processors (real-time processor)-a high-performance processor series for real-time applications, such as hard disk controllers, automotive transmission systems and baseband control of wireless communications. The processor 120 is respectively connected to the battery simulator 130 and the bidirectional power supply 110 in communication, so as to send the test instructions carrying the test parameter indication to the bidirectional power supply 110 and the battery simulator 130. After the bidirectional power supply 110 sends the test parameters to the controller under test 200, the controller under test 200 can distribute power to the received test parameters or perform power detection on the power input terminal or each branch in the controller under test 200 to obtain response data. Figure 1 As shown, the communication method between the hardware-in-the-loop test system 100 and the controller 200 to be tested includes CANFD communication, LIN communication, HardWire communication, etc. After receiving the response data, the processor 120 in the hardware-in-the-loop test system 100 can determine whether the control of the area to be tested is qualified according to the response data. In addition, the controller 200 to be tested can also monitor the battery simulator 130, such as monitoring the voltage or output current, to determine the state of the battery simulator 130, and then the processor 120 determines whether the controller 200 to be tested is qualified according to the state of the battery simulator 130 received from the controller 200 to be tested. The controller 200 to be tested can detect the voltage (Pack Voltage) of the battery pack in the battery simulator 130, the voltage (Cell Voltage) of each battery cell in the battery pack, and the temperature (Cell Temp) of the battery pack or each battery cell, and transmit the detected information to the processor 120. The processor 120 can compare the received information with the actual information of the battery simulator 130, and determine whether the controller 200 to be tested is qualified. The actual information of the battery simulator 130 may be calculated by the processor 120 according to the test parameters sent to the battery simulator 130 , or may be obtained by detecting the battery simulator 130 according to the detection module provided in the hardware-in-the-loop test system 100 .
[0060] In the above scheme, by setting a bidirectional power supply 110 and a battery simulator 130 in the hardware-in-the-loop test system 100, the bidirectional power supply 110 can send test parameters to the controller 200 to test the response of the second functional unit, and the battery simulator 130 also simulates the state of the battery according to the test parameters, and can test whether the first functional unit detects the state of the battery simulator 130 accurately, thereby realizing simultaneous testing of the first functional unit and the second functional unit in the controller 200 to be tested. Compared with testing the two independently, the present application can improve the test accuracy of such a highly integrated regional controller.
[0061] In some embodiments, the controller to be tested is a regional controller to be tested, the first functional unit is a battery management unit, and the second functional unit is an intelligent power distribution control unit.
[0062] ZCU (Zone Control Unit), the ZCU integrates an intelligent power distribution control unit (BMU or BMS) and a battery management unit, and the intelligent power distribution control unit and the battery management unit share an MCU. Among them, the intelligent power distribution control unit (PDC) is used to manage the power distribution of the load in the vehicle. Among them, the power distribution management of the load can specifically be to supply power to the load or stop supplying power to the load. The functional modules of the battery management unit in the controller 200 to be tested include a microcontroller (MCU) and a sensor module of an analog front end (AFE). For example, the AFE measures the voltage of the battery and sets it to the MCU, and can also detect the temperature of the battery (usually through an NTC thermistor). The AFE has many functions, which will not be repeated here. The intelligent power distribution control unit includes an SBC (System Basis Chip) and an MCU. The SBC is capable of communication, monitoring diagnosis, safety monitoring, etc.
[0063] In the above solution, when a battery management unit and an intelligent power distribution unit are integrated in the regional controller to be tested, the present application can implement testing of such regional controller.
[0064] In some embodiments, the test parameters include a test current and / or a test voltage.
[0065] The magnitude of the test current may be preset, or the test current may be determined dynamically. Similarly, the magnitude of the test voltage may be preset or determined dynamically during the test process.
[0066] In the above solution, by inputting a test current and / or a test voltage into the controller to be tested, the response of the controller to be tested under the test current and / or the test voltage can be tested.
[0067] In some embodiments, the hardware-in-the-loop test system 100 includes an electronic load module 140, which includes multiple electronic loads 141 and a switch component 142. One end of the switch component 142 is connected to the output end of the controller to be tested 200, and the other end of the switch component 142 is respectively connected to each electronic load 141 to establish or disconnect the connection between each electronic load 141 and the controller to be tested 200.
[0068] The electronic load 141 can be used to simulate other vehicle controllers (VCU, BMS, TCU, EPS, body controller), and other low-voltage loads. Some of the low-voltage loads are directly driven by the second functional unit (for example, direct-drive pumps, valves, etc.), and the control of another part of the loads depends on the remaining controllers of the vehicle. The multiple loads can be two or more. Optionally, the current recovery capability of each electronic load 141 can be matched and designed in combination with the maximum continuous current / maximum peak current capability of the input terminal of the controller 200 to be tested, and the maximum continuous current / maximum peak current capability of a single output channel of the controller 200 to be tested. For example, the design of the electronic load 141 needs to meet the following conditions: |continuous current output by the bidirectional power supply 110|>maximum continuous current of the power input terminal connected to the bidirectional power supply 110 in the controller 200 to be tested, |peak current output by the bidirectional power supply 110|>maximum peak current of the input terminal connected to the bidirectional power supply 110 in the controller 200 to be tested, maximum continuous current of a single electronic load 141>maximum continuous current of a single output channel of the controller 200 to be tested, maximum peak current of a single electronic load 141>maximum peak current of a single output channel of the controller 200 to be tested. Alternatively, considering the high cost and large size of the high-current power supply and the electronic load 141, at least one of the following conditions can be used to determine each electronic load 141: multiple electronic loads 141 are selected in parallel, the sum of the maximum continuous current of all electronic loads 141>maximum continuous current of a single output channel of the controller 200 to be tested, the sum of the maximum peak current of all electronic loads 141>maximum peak current of a single output channel of the controller 200 to be tested, continuous output current output by the bidirectional power supply 110>maximum continuous current of a single output channel of the controller 200 to be tested. The power input terminal of the controller under test 200 connected to the bidirectional power supply 110 can be considered as the input terminal of the first MOSFET tube 210. Figures 2 to 7 As shown, the maximum output currents of the current output channels of the controller under test 200 may be different. For example, the maximum continuous current and the maximum peak current allowed by each output channel may be different.
[0069] In the above scheme, by setting an electronic load module 140 in the hardware-in-the-loop test system 100, the load in the entire vehicle can be simulated, and by setting a switch component 142, the number of electronic loads 141 connected to the controller 200 to be tested can be controlled, thereby being able to test the response of the controller 200 to be tested under different numbers of loads.
[0070] In some embodiments, the switch assembly 142 includes multiple switching devices, and the hardware-in-the-loop test system 100 includes a driving circuit 160, one end of the driving circuit 160 is connected to the processor 120 and the other end is connected to each switching device, and the driving circuit 160 is used to adjust the opening and closing state of each switching device after receiving the driving instruction sent by the processor 120.
[0071] The driving circuit 160 includes but is not limited to a direct grounding driving circuit 160, a floating grounding driving circuit or an isolated driving circuit, a non-isolated driving circuit, etc. The driving circuit 160 is used to receive a control signal and then drive the switch device to close and open. The switch device includes but is not limited to an electrical switch or a relay. In this embodiment, the switch device is a relay as an example. The relay uses an electromagnetic relay. The topological structure formed by connecting each relay can be referred to Figure 1 .like Figure 1 As shown, the drive circuit 160 can be powered through the powersupply interface, and the processor 120 and the drive circuit 160 can perform data transmission and communication through the do interface. For example, assuming that the switch devices include switch device A, switch device B, switch device C, switch device D, switch device E, and switch device F, by controlling the opening and closing of each switch device in the switch assembly 142 and by controlling different relay opening and closing combinations, an environmental simulation of independent overcurrent in a single channel or simultaneous overcurrent in multiple channels can be achieved. Assume that the controller 200 to be tested has 8 output channels: OutPut1, 2, 3…, 8; the electronic load 141 has 4 independent channels: Load1, 2, 3, 4. The partial connection relationship between the control of the area to be tested and the electronic load 141 is shown in FIG. Figures 2 to 7 As shown, Figures 2 to 7 The controller under test on the left side is the controller under test 200 of this solution, and the electronic load 141 is on the right side. Figure 2 It is shown that an output terminal of the controller 200 to be tested is connected to an electronic load 141. Figure 3 It shows that two electronic loads 141 are connected to one output terminal. Figure 4 It shows that three electronic loads 141 are connected to one output terminal. Figure 5 The two output terminals are shown to be connected to an electronic load 141 respectively. Figure 6 The two output terminals are connected to three electronic loads 141. Figure 7 The three output terminals are connected to four loads. Figures 2 to 7Only part of the connection relationship is output. In addition to this part of the connection relationship, there may be other connection relationships. Figure 1 The connection relationship between the switching devices and the opening and closing states of the switching devices are determined and will not be described in detail here.
[0072] In the above solution, by providing the driving circuit 160, the driving circuit 160 can be used to adjust the opening and closing states of the switching devices in the switch assembly 142, thereby adjusting the number of switching devices connected to the circuit.
[0073] In some embodiments, the processor 120 is communicatively connected to each electronic load 141 , and each electronic load 141 is used to adjust the mode of the electronic load 141 in response to an adjustment instruction sent by the processor 120 , and the mode includes at least one of a constant current mode, a constant voltage mode, and a constant power mode.
[0074] For example, the processor 120 controls the electronic load 141 through R232 serial communication. For example, the electronic load 141 is adjusted from a constant current mode to a constant voltage mode, or from a constant voltage mode to a constant current mode, or from a constant power mode to a constant current mode, etc. The modes of different electronic loads 141 may be the same or different.
[0075] In the above solution, after the processor 120 establishes a connection with the electronic load 141 , the complex load conditions in the actual scene can be simulated by adjusting the modes of the electronic loads 141 , thereby making the test result of the controller 200 to be tested more accurate.
[0076] In some embodiments, the hardware-in-the-loop test system 100 includes an IO board 170, one end of the IO board 170 is connected to the processor 120, and the other end is used to connect to the resistor at the power input end of the controller under test 200, and is used to send a differential voltage to the resistor in response to a test current output instruction sent by the processor 120.
[0077] The IO board 170 may be a power type IO board. In the present application, if the bidirectional power supply 110 cannot output a large instantaneous current exceeding the power input terminal of the controller 200 under test, the processor 120 may send a test current output instruction to the IO board 170, and simulate the large current of the power input terminal of the controller 200 under test by means of a Shunt analog output, thereby achieving the response of the controller 200 under overcurrent conditions. Figure 1 As shown, the Shunt analog output is connected to three resistors in the controller 200 to be tested, and a differential voltage is output through one or more of the resistors, which can simulate a large current flowing through the resistor, thereby simulating a large current at the power input end.
[0078] In the above scheme, by setting the IO board 170, after the IO board 170 sends a differential voltage to the resistor at the power input end of the controller 200 under test, both ends of the resistor can simulate a large current input under the action of the differential voltage, thereby simulating the response of the controller 200 under large current conditions.
[0079] In some embodiments, the hardware-in-the-loop test system 100 includes a unidirectional power supply 150, which is used to simulate the DCDC unidirectional power supply output of the entire vehicle. The unidirectional power supply 150 is connected to the processor 120 to receive the test parameters sent by the processor 120 and output supplementary test parameters to the controller under test 200. The response data also includes response data generated by the controller under test 200 based on the supplementary test parameters.
[0080] The unidirectional power supply 150 can simulate the DCDC unidirectional power supply output of the whole vehicle. Optionally, on the basis that the hardware-in-the-loop test system 100 includes the unidirectional power supply 150, the selection of the electronic load 141 can meet the following conditions: a. The continuous current output by the unidirectional power supply> the maximum continuous current of the power input terminal connected to the unidirectional power supply 150 in the controller 200 to be tested, b. The peak current output by the unidirectional power supply> the maximum peak current of the power input terminal connected to the unidirectional power supply 150 in the controller 200 to be tested, c. |The continuous current output by the bidirectional power supply 110|> the maximum continuous current of the power input terminal connected to the bidirectional power supply 110 in the controller 200 to be tested, d. |The peak current output by the bidirectional power supply 110|> the maximum peak current of the power input terminal connected to the bidirectional power supply 110 in the controller 200 to be tested, e. The maximum continuous current of a single electronic load 141> the maximum continuous current of a single output channel of the controller 200 to be tested, f. The maximum peak current of a single electronic load 141> the maximum peak current of a single output channel of the controller 200 to be tested. Or considering the actual situation, the high current power supply and the electronic load 141 are high in cost and large in size, and the following alternative conditions can also be used: a. multiple electronic loads 141 are selected in parallel, b. the sum of the maximum continuous current of all electronic loads 141> the maximum continuous current of a single output channel of the controller 200 to be tested, c. the sum of the maximum peak current of all electronic loads 141> the maximum peak current of a single output channel of the controller 200 to be tested, d. the continuous current output by the unidirectional power supply 150> the maximum continuous current of a single output channel of the controller 200 to be tested, e. the peak current output by the unidirectional power supply 150> the maximum peak current of a single output channel of the controller 200 to be tested, f. the continuous output current output by the bidirectional power supply 110> the maximum continuous current of a single output channel of the controller 200 to be tested, g. the peak output current output by the unidirectional power supply 150> the maximum peak current of a single output channel of the controller 200 to be tested. The power input terminal of the controller 200 to be tested connected to the unidirectional power supply 150 can be considered as the input terminal of the second MOSFET tube 220.
[0081] In the above scheme, by setting a unidirectional power supply 150 in the hardware-in-the-loop test system 100, the unidirectional power supply 150 can simulate the DCDC of the whole vehicle and simulate the response of the controller 200 to be tested under the action of the whole vehicle power supply.
[0082] like Figure 8 As shown, the present application provides a hardware-in-the-loop testing method, and the hardware-in-the-loop testing method is applied to any of the above-mentioned hardware-in-the-loop testing systems. The hardware-in-the-loop testing method includes: Step S11: The processor sends a test instruction carrying a test parameter indication to the bidirectional power supply and the battery simulator, so that the bidirectional power supply sends the test parameters to the controller to be tested based on the test instruction and the battery simulator adjusts the state of the battery simulator based on the test parameter indication in the test instruction. Step S12: Receive response data and status information sent by the controller to be tested. The response data is the response data of the second functional unit in the controller to be tested under the test parameters, and the status information is the status information obtained by the first functional unit in the controller to be tested from detecting the battery simulator. Step S13: Based on the received response data and status information, generate the test results of the controller to be tested.
[0083] As mentioned above, the controller to be tested may be a zone controller or a domain controller, etc. In this embodiment, the controller to be tested is taken as a zone controller as an example. ZCU (Zone Control Unit): In order to reduce the number and length of wiring harnesses in the vehicle and optimize the electronic and electrical architecture, the car manufacturer has made further integration on the basis of the functional domain architecture, giving birth to the "zonal control architecture". ZCU is a regional-level control unit in the vehicle's electronic and electrical architecture, responsible for managing and controlling specific areas or functional areas of the vehicle. For example, it is usually associated with a specific area or subsystem (such as seat control, air conditioning control, dashboard control, etc.), and processes the input and output of the area. In this solution, the second functional unit and the first functional unit are integrated on the ZCU, and the second functional unit and the first functional unit share an MCU. Among them, the second functional unit (PDC) is used to manage the power distribution of loads in the vehicle. Among them, the power distribution management of the load can specifically be to supply power to the load or stop supplying power to the load. The functional modules of the first functional unit in the controller to be tested include the control module of the microcontroller (MCU) and the sensor module of the analog front end (AFE). For example, the AFE measures the voltage of the battery and sets it to the MCU, and can also detect the temperature of the battery (usually through an NTC thermistor). The functions of the AFE are many and will not be repeated here. The second functional unit includes the SBC (System Basis Chip) and the MCU. The SBC can perform communication, monitoring diagnosis, safety monitoring, etc.
[0084] The battery simulator is an entity, also known as a battery simulation board, which can usually only output voltage + milliampere level current. In order to verify the low-voltage power distribution product, an additional power supply is required to ensure the current output. At the same time, the voltage of this power supply needs to be consistent with the battery simulator, so as not to cause the internal software of the low-voltage power distribution product to identify the voltage consistency error. Therefore, the hardware-in-the-loop test system of this application is provided with a bidirectional power supply, which can both output energy and recover energy, thereby simulating the bidirectional energy flow of the low-voltage battery of the whole vehicle. The processor can be a real-time processor, a microcontroller processor, etc. For example, the processor can be an R series: Real-time Processors (real-time processor)-a high-performance processor series for real-time applications, such as hard disk controllers, automotive transmission systems and baseband control of wireless communications. The processor is respectively connected to the battery simulator and the bidirectional power supply so as to send the test instructions carrying the test parameter indication to the bidirectional power supply and the battery simulator. After the bidirectional power supply sends the test parameters to the controller to be tested, the controller to be tested can distribute the power supply to the received test parameters or perform power supply detection on the power input terminal or each branch in the controller to be tested to obtain response data. After receiving the response data, the processor in the hardware-in-the-loop test system can determine whether the control of the area under test is qualified according to the response data. In addition, the controller under test can also monitor the battery simulator, such as monitoring the voltage or output current, to determine the state of the battery simulator, and then the processor determines whether the controller under test is qualified according to the battery simulator state received from the controller under test.
[0085] In the above scheme, by setting up a bidirectional power supply and a battery simulator in a hardware-in-the-loop test system, the bidirectional power supply can send test parameters to the controller to be tested to test the response of the second functional unit, and the battery simulator also simulates the state of the battery according to the test parameters, and can test whether the first functional unit detects the state of the battery simulator accurately, thereby achieving simultaneous testing of the first functional unit and the second functional unit in the controller to be tested. Compared with testing the two independently, the present application can improve the test accuracy of such a highly integrated regional controller.
[0086] In some embodiments, the hardware-in-the-loop testing system includes a unidirectional power supply. Before the processor sends a test instruction carrying a test parameter indication to the bidirectional power supply and the battery simulator, the hardware-in-the-loop testing method also includes: the processor determines the test parameters of the controller to be tested and / or the supplementary test parameters of the unidirectional power supply for the controller to be tested based on at least one of a preset environmental model, a preset unidirectional power supply model, a low-voltage battery model, and a load model. The preset environmental model is used to simulate the operating environment of the entire vehicle other than the controller to be tested. The preset unidirectional power supply model is used to simulate one or more of the output power capability, output current capability, and output voltage capability of the unidirectional power supply. The low-voltage battery model is used to simulate a low-voltage battery. The load model is used to simulate a load connected to the controller to be tested.
[0087] The preset environment model is used to simulate the operating environment of the vehicle except for the controller to be tested, mainly including environmental conditions, driver model, residual controller model, vehicle dynamics model, etc., to provide original input excitation for the entire hardware-in-the-loop test system and subsequent low-voltage battery model, load model and relay control. The original input excitation can be the driver's throttle opening, brake, key position, gear, vehicle speed and ambient temperature. The preset unidirectional power supply model mainly includes the simulation of the DCDC controller and the DCDC main circuit, and its function includes calculating the real-time status of DCDC (DCDC power capability, current capability and voltage capability). The low-voltage battery model mainly includes low-voltage battery controller simulation and low-voltage battery simulation. The low-voltage battery controller simulation is used to simulate the control logic of the low-voltage battery, and simulates the charge and discharge control of the low-voltage battery by receiving the control instructions and status information of the preset unidirectional power supply; the low-voltage battery simulation is mainly based on the electrochemical model to simulate the actual status of the low-voltage battery pack, module and single cell, including SOC, SOH, SOE, whole pack voltage, single cell voltage, single cell temperature, etc.
[0088] Among them, the processor determines the test parameters of the controller to be tested and / or the supplementary test parameters of the unidirectional power supply to the controller to be tested based on at least one of the preset environmental model, the preset unidirectional power supply model, the low-voltage battery model, and the load model. The method can be: refer to the state of the unidirectional power supply, one or both of the states of the low-voltage battery, and the current demand of the electronic load, and combine the real-time state of the controller to be tested, simulate the working mode of the whole vehicle, calculate and arbitrate the current input to the power input branch and each load branch, and the current can be output by the bidirectional power supply, or the unidirectional power supply, or the bidirectional power supply and the unidirectional power supply. Alternatively, the above-mentioned processor determines the test parameters of the controller to be tested and / or the supplementary test parameters of the unidirectional power supply to the controller to be tested based on at least one of the preset environmental model, the preset unidirectional power supply model, the low-voltage battery model, and the load model. The method can be to refer to the output of the preset unidirectional power supply model and / or the output of the low-voltage battery model, and determine the output voltage of the bidirectional power supply and / or the unidirectional power supply in combination with different working modes of the controller to be tested. The different working modes of the controller under test include DCDC single working mode, Vbat single working mode, Vbat constant current charging mode, Vbat constant voltage charging mode, etc.
[0089] In the above scheme, by combining multiple preset models to determine the test parameters, the complex environment of the controller to be tested can be simulated, thereby making the test of the controller to be tested more comprehensive.
[0090] In some embodiments, the test parameters include a test voltage. The processor determines the test parameters of the controller to be tested and / or the supplementary test parameters of the unidirectional power supply to the controller to be tested based on at least one of a preset environmental model, a preset unidirectional power supply model, a low-voltage battery model, and a load model, including: determining the test environment parameters based on the preset environmental model. In combination with the test environment parameters and the preset unidirectional power supply model, determine the voltage output capacity of the unidirectional power supply; and in combination with the test environment parameters and the low-voltage battery model, determine the voltage output capacity of the bidirectional power supply; based on the voltage output capacity of the unidirectional power supply and the bidirectional power supply, determine the test voltages output by the unidirectional unit and the bidirectional power supply to the controller to be tested, respectively.
[0091] The test environment parameters include, but are not limited to, the driver's throttle opening, brake, key position, gear, vehicle speed, and ambient temperature. The voltage output capacity of the unidirectional power supply may be different at different ambient temperatures. By referring to information such as the ambient temperature, the voltage output capacity of the unidirectional power supply can be determined, for example, the maximum voltage that the unidirectional power supply can output can be determined. Similarly, the voltage output capacity of the bidirectional power supply may also be different at different ambient temperatures. By referring to the test environment parameters, the maximum voltage that the bidirectional power supply can output can be determined. The processor can perform voltage arbitration to determine the output voltage of the unidirectional power supply and the output voltage of the bidirectional power supply according to the voltage output capacity of the unidirectional power supply and the bidirectional power supply. For example, the output voltage of the bidirectional power supply can also be the output voltage of each battery cell or the output voltage of the entire battery pack. Exemplarily, the test voltage that the hardware-in-the-loop test system needs to output to the controller under test can be a preset value, and then the test voltage to be output can be allocated according to the voltage output capacity of the unidirectional power supply and the bidirectional power supply to determine the test voltage that the unidirectional power supply and the bidirectional power supply need to output. In other embodiments, the test voltage to be output by the hardware-in-the-loop test system to the controller under test can be determined according to the current capacity of the power input channel of the controller under test and the capacity of the electronic load, that is, Fig. 9 As shown, the processor can calculate and constrain the output voltage instructions of the unidirectional power supply and the bidirectional power supply based on the DCDC status information, DCDC voltage request, DCDC current capability, DCDC power capability, and the low-voltage battery open-circuit voltage Voc, combined with the channel current capability, bidirectional power supply capability and electronic load capability of the controller to be tested, and refer to different working modes of the controller to be tested (DCDC single working mode, Vbat single working mode, Vbat constant current charging mode, Vbat constant voltage charging mode, etc.).
[0092] Optionally, when the bidirectional power supply needs to output a test voltage, the voltage of the bidirectional power supply and the battery simulator needs to be synchronized. Specifically, the processor sends the output voltage instruction to the bidirectional power supply and the battery simulator at the same time, ensuring the synchronization of the Pack voltage instruction, Cell voltage instruction and voltage output instruction sent to the battery simulator, thereby ensuring the consistency between the Pack voltage and Cell voltage collected by the battery simulator and the input voltage of the bidirectional power supply of the controller under test, thereby synchronizing the signal input and power input of the controller under test, thereby verifying the real-time response of the controller under test. Among them, Fig. 9Each driver module is a bridge connecting software and hardware. Generally speaking, a driver program is required between hardware and software so that the hardware can perform corresponding operations according to the control instructions of the software. The driver module may include CANFD driver, battery simulator driver, Shunt driver, and RS232 driver. The CANFD driver is a bridge connecting the processor and the CANFD interface, so that after the unidirectional power supply and the bidirectional power supply receive the corresponding voltage output instructions, the voltage is output to the controller to be tested through the CANFD interface. The Shunt driver is a bridge connecting the processor and the Shunt interface, so that the differential voltage is sent to the controller to be tested according to the interface. The RS232 driver is a bridge connecting the processor and the RS232 interface, so that the corresponding instructions are sent to the electronic load through the interface. The battery simulator driver can be considered as a bridge between the processor and the battery simulator, so that the battery simulator adjusts its own state according to the received test parameters. Other IO drivers can be bridges between the processor and the drive circuit, so that the drive circuit controls the opening and closing state of each relay according to the received control instructions. Then each driver can also return corresponding execution status feedback to the low-voltage battery model, the unidirectional power supply model, the load model, and the relay control.
[0093] In the above scheme, the working environment of the controller to be tested can be determined by presetting the environmental model. The voltage output capabilities of the vehicle power supply and the low-voltage battery may be different under different environments. The voltage output capabilities of the unidirectional power supply and the bidirectional power supply can be determined by referring to environmental factors, and the test voltages output by the unidirectional unit and the bidirectional power supply to the controller to be tested respectively can be determined, so that the output test voltage is more reasonable.
[0094] In some embodiments, the test parameters include a test current, and the hardware-in-the-loop test system includes an electronic load module. The processor determines the test parameters of the controller to be tested and / or the supplementary test parameters of the unidirectional power supply to the controller to be tested based on at least one of the preset environment model, the preset unidirectional power supply model, the low-voltage battery model, and the load model. The method can be: determine the test environment parameters based on the preset environment model; determine the current output capacity of the unidirectional power supply in combination with the test environment parameters and the preset unidirectional power supply model; determine the current output capacity of the bidirectional power supply in combination with the test environment parameters and the low-voltage battery model; determine the test current required by the electronic load module based on the load model; determine the test current output by the unidirectional power supply and the bidirectional power supply in combination with the test current required by the electronic load module, the current output capacity of the unidirectional power supply, and the current output capacity of the bidirectional power supply.
[0095] For example, Fig. 9As shown, the processor can simulate the working mode of the whole vehicle according to the current output capacity of the unidirectional power supply, the low-voltage battery state and the load current demand, and needs to be combined with the actual state of the controller to be tested, and then calculate and arbitrate to obtain reasonable power input and load branch currents. That is, the test current required by the electronic load module is used as the total test current that the hardware-in-the-loop test system needs to output, and then the test current that the unidirectional power supply and the bidirectional power supply need to output is determined according to the current output capacity of the unidirectional power supply and the bidirectional power supply. Among them, when the current output capacity of the bidirectional power supply and the unidirectional power supply is limited (it is impossible to output an instantaneous large current exceeding the power input end of the controller to be tested), the power input end current command can be sent to the current type IO board, and the large current of the power input end of the controller to be tested can be simulated through the Shunt analog output method, and the overcurrent function and response of the power input end of the controller to be tested can be tested.
[0096] In the above scheme, by combining environmental parameters and the current required by the load simulated by the load model, it is determined whether the current can be output by only a unidirectional power supply, or a bidirectional power supply, or both a unidirectional power supply and a bidirectional power supply.
[0097] In some embodiments, the hardware-in-the-loop testing system includes a driving circuit. After determining the test current required by the electronic load module based on the load model, the hardware-in-the-loop testing method also includes: determining the connection relationship between each electronic load in the electronic load module and the controller to be tested based on the test current required by the electronic load module; and sending configuration instructions to the driving circuit so that the driving circuit adjusts the connection relationship between each electronic load and the controller to be tested.
[0098] The load of a regional controller presents a variety of electrical characteristics. This application matches and simulates different load responses and current output characteristics by building resistive load, capacitive load and inductive load models. In addition, according to the load current size, it is necessary to reasonably select one or more electronic loads for configuration, and finally send the load branch current command to the bidirectional unit or unidirectional power supply, so as to generate a real current flowing through the controller to be tested. Among them, the load current consumption calculated by the load model needs to be mapped to one or more electronic load channels. After obtaining the electronic load channels that need to be enabled according to the calculation, the control circuit can obtain the real current output by closing the corresponding relay. For example, the configuration instruction is sent to the drive circuit through the DO interface.
[0099] In the above scheme, the load model can simulate the test current required by the electronic load module, and by configuring the connection relationship between each electronic load and the controller to be tested, it is convenient to simulate the response of the controller to be tested under the current demand of a specific electronic load.
[0100] In some embodiments, the controller to be tested includes multiple branches, each branch is used to connect at least part of the electronic load, and the hardware-in-the-loop testing method also includes: inputting a current of a first preset value into the power input terminal of the controller to be tested and inputting a current of a second preset value into each branch of the controller to be tested; receiving a first detection value obtained by current collection at the power input terminal of the controller to be tested and multiple second detection values obtained by current collection from each branch; in response to the first difference and / or the second difference being greater than a preset difference, collecting and recording data of the controller to be tested and the hardware-in-the-loop testing system, so as to subsequently optimize the current collection algorithm of the controller to be tested based on the data.
[0101] In some application scenarios, each branch includes multiple Efuse and multiple HSD. Among them, Efuse can be considered as an intelligent fuse, which realizes the on and off of the secondary power distribution circuit by driving the external MOSFET (field effect transistor) and the internal MOSFET. HSD can be considered as a high-side driver, which drives the load by closing the power line switch directly in front of the load. That is, each Efuse corresponds to a power output terminal, Figure 1 It shows five branches in the controller to be tested and one power output terminal corresponding to each branch, and shows that the second functional unit is connected to the field effect transistors of two of the power output terminals to control the on and off of each branch. Among them, the bidirectional power supply can be controlled to input a current of a first preset value to the power input terminal of the controller to be tested, and the unidirectional power supply can also be controlled to input a current of a first preset value to the power input terminal of the controller to be tested. The present application takes the bidirectional power supply inputting a current of a first preset value to the power input terminal of the controller to be tested as an example. The output terminal of the bidirectional power supply is connected to the first MOSFET tube 210 in the controller to be tested, and the power input terminal of the controller to be tested can be the input terminal of the first MOSFET tube 210. The current of the second preset value inputted to each branch of the controller to be tested can be input to Figure 1 The 5 branches all input the current of the second preset value, wherein the second preset value currents input by different branches may be the same or different. Wherein, when the first difference is greater than the first preset difference, the data of the controller to be tested and the hardware-in-the-loop test system may be collected and recorded, or when the second difference is greater than the second preset difference, the data of the controller to be tested and the hardware-in-the-loop test system may be collected and recorded, and the first preset difference and the second preset difference may be the same or different. Alternatively, when the first difference is greater than the first preset difference and the second difference is greater than the second preset difference, the data of the controller to be tested and the hardware-in-the-loop test system may be collected and recorded. If the difference is large, it means that the current acquisition algorithm of the controller to be tested is inaccurate and needs to be optimized.
[0102] In the above scheme, by inputting a first preset value into the power input terminal of the controller to be tested and outputting a second preset value in each branch, and by obtaining the first detection value detected at the power input terminal returned by the controller to be tested, the accuracy of the current detection result of the power input terminal of the controller to be tested can be determined. Similarly, by inputting a second preset value into each branch of the controller to be tested and receiving the second detection value detected at each branch returned by the controller to be tested, the accuracy of the current detection result of each branch of the area control to be tested can be determined, and it can be determined whether the current acquisition algorithm of the controller to be tested needs to be optimized based on the two current detection results.
[0103] In some embodiments, the hardware-in-the-loop testing method further includes: in response to the first difference and the second difference being less than or equal to a preset difference, the execution processor sends a test instruction carrying a test parameter indication to the bidirectional power supply and the battery simulator.
[0104] That is, when both the first difference and the second difference are small, a current response test and the like can be performed on the controller to be tested.
[0105] In the above solution, by performing other tests on the controller to be tested when both current detection results are accurate, subsequent test results are made more reliable.
[0106] In some embodiments, the response data includes the current value obtained by detecting the power input terminal of the controller to be tested and the current value obtained by detecting each branch. Based on the received response data and status information, the test results of the controller to be tested are generated, including: in response to the current value obtained by detecting the power input terminal of the controller to be tested and the sum of the current values obtained by detecting each branch not meeting the consistency requirement, executing collection and recording of data of the controller to be tested and the hardware-in-the-loop test system, so as to subsequently optimize the current collection algorithm and current synchronization algorithm of the controller to be tested based on the data.
[0107] The hardware-in-the-loop test system generates an excitation signal and applies currents of different sizes and types to the power input terminal and each branch. In the current consistency check, only when the current at the power input terminal and the sum of all branch currents meet the consistency requirements (the node current is 0), the consistency check conclusion is met, otherwise the controller under test should identify the consistency fault. In addition, the hardware-in-the-loop test system can be used to artificially create consistency differences, so that there is a large deviation between the current at the power input terminal and the current of each branch, so as to verify that the controller under test can identify the consistency fault, thereby verifying the current consistency algorithm of the controller under test. The current consistency algorithm can include a current acquisition algorithm and a current synchronization algorithm, that is, it is necessary to collect each current and synchronize the current of each branch. If there is an acquisition error or a synchronization error, it will lead to non-compliance with the consistency requirements.
[0108] In the above scheme, the response data is the current value obtained by the controller under test at the power input terminal and the current value detected at each branch. If the current value at the power input terminal is the same as the sum of the current values of each branch, then it is determined that the controller under test meets the consistency requirement. Otherwise, the current acquisition algorithm and current synchronization algorithm of the controller under test can be optimized based on the data of the hardware-in-the-loop test system and the data returned by the controller under test.
[0109] In some embodiments, the test parameters include a pulse current, the response data include a current detection result, the current detection result includes a current value detected at the power output end of the controller to be tested and / or a current value detected at each branch, and the test result of the controller to be tested is generated based on the received response data and status information, including: comparing the input value of the pulse current and the current detection result returned by the controller to be tested to obtain a comparison result; based on the comparison result that there is a time lag in the current detection result, collecting and recording data of the controller to be tested and the hardware-in-the-loop test system, so as to subsequently optimize the current collection algorithm and the current synchronization algorithm of the controller to be tested based on the data.
[0110] In the pulse current response verification, by comparing the excitation current of the hardware-in-the-loop test system with the feedback current of the controller under test, the time lag performance of the current acquisition of the controller under test can be tested to provide support for further algorithm optimization (such as functional safety FTTI design). By applying currents with different pulse gradients, pulse peaks, and pulse widths, the response and control of the controller under test are observed to verify the current monitoring function of the controller under test. Based on the comparison result that there is a time lag in the current detection result, the data of the hardware-in-the-loop test system and the controller under test should be collected and recorded for analysis, the current acquisition algorithm should be recalibrated, and the current response algorithm should be optimized. The current response algorithm includes the current synchronization algorithm and the current monitoring diagnosis algorithm.
[0111] In the above scheme, by inputting pulse current into the controller under test, it is possible to determine whether there is a time lag in current acquisition and current synchronization of the controller under test based on the current detection result returned by the controller under test, so as to facilitate subsequent optimization.
[0112] In some embodiments, the hardware-in-the-loop test system provided by the present solution can test a regional controller that has both control signal processing and power output capabilities. The battery simulator + signal-level HIL test environment is integrated to form a power-level HIL test system. It can simultaneously meet the signal-level test, power-level test and battery management system function test of the regional controller, while saving costs and meeting the test requirements of multiple power levels of a regional controller. Among them, the output voltage of the battery simulator and the output voltage of the bidirectional power supply of the test system are synchronously controlled to achieve consistency in the input signal and power flow of the system under test. In addition, through the flexible combination of an array matrix of multiple relays and a limited number of electronic loads, electronic load simulations of different magnitudes can be achieved.
[0113] The test parameters in this scheme may include test current, which is obtained through current arbitration. For example, the DCDC information, low-voltage battery status and load current demand are obtained, combined with the actual status of the controller to be tested, to simulate the working mode of the whole vehicle, and then calculate and arbitrate to obtain reasonable power input and load branch currents. When the current output capacity of the unidirectional power supply and the bidirectional power supply is limited (cannot output an instantaneous large current exceeding the power input of the controller to be tested), the power input current instruction can be sent to the current type IO board, and the overcurrent function and response of the power input of the controller to be tested can be tested by simulating the power input of the controller to be tested receiving a large current through the Shunt analog output.
[0114] In this scheme, the test parameters may include a test voltage, which is obtained through voltage arbitration. Based on the DCDC state information, DCDC voltage request, DCDC current capability, DCDC power capability, and low-voltage battery open-circuit voltage Voc, combined with the channel current capability, dual power supply capability, and electronic load capability of the controller to be tested, the different working modes of the controller to be tested (DCDC single working mode, Vbat single working mode, Vbat constant current charging mode, Vbat constant voltage charging mode, etc.) are considered to calculate and constrain the output voltage instructions of the unidirectional power supply and the bidirectional power supply. In this process, the software synchronization method (voltage instructions are sent to the bidirectional power supply and the battery simulator at the same time) is used to ensure the synchronization of the Pack voltage instruction, Cell voltage instruction sent by the HIL test system to the battery simulator, and the voltage output instruction sent by the HIL test system to the bidirectional power supply, thereby ensuring the consistency of the Pack voltage instruction, Cell voltage, and the voltage input of the bidirectional power supply received by the controller to be tested. In this way, the signal input and power input of the controller to be tested are realized synchronously, and the real-time response of the controller to be tested is verified.
[0115] In some embodiments, the process of the hardware-in-the-loop test system performing current acquisition and response performance testing on the controller to be tested may include:
[0116] a.HIL is powered on and the test system starts running.
[0117] b. The HIL test system (hardware-in-the-loop test system) calculates the current command at the power input end and the current command size of each load branch.
[0118] c. The HIL test system sends the power input current calculated in step b to the power input port of the controller under test through the I / O driver module; and sends the load branch current calculated in step b to the electronic load through the serial port driver module.
[0119] d. The controller under test collects and calculates the power input current (calculated by converting the power input Shunt voltage) and the load branch current (calculated by converting the load branch Shunt voltage) in real time and synchronously; at the same time, the calculated current will be sent synchronously to the bus (CAN, etc.).
[0120] e. Current accuracy check 1: The test system compares the power input terminal current I1 output by the HIL test system control and the power input terminal current I2 sent by the controller under test through the bus, so as to test the current acquisition accuracy of the power input terminal in different current ranges;
[0121] When the accuracy check does not meet the requirements, enter the current calibration step i.
[0122] f. Current accuracy check 2: The test system compares the real-time current I3 of the electronic load of the HIL test system with the load branch current I4 sent by the controller under test through the bus, so as to test the current acquisition accuracy of the load branch in different current ranges;
[0123] When the accuracy check does not meet the requirements, enter the current calibration step i.
[0124] g. When both step e and step f are satisfied, the current response test starts. The HIL test system generates an excitation signal and applies currents of different sizes and types to the power input terminal and the load branch.
[0125] h. Based on the above step g, after applying the current excitation signal, observe the response of the controller under test.
[0126] For example, for current consistency verification, only when the current at the power input end and the current at all load branches meet the consistency requirements (node current is 0), the consistency verification conclusion is met, otherwise the controller under test should identify a consistency fault. In addition, the HIL test system can be used to artificially create consistency differences, so that there is a large deviation between the current at the power input end and the load branch current, thereby verifying the current consistency algorithm of the controller under test;
[0127] For example, pulse current response verification. By comparing the excitation current of the HIL test system with the feedback current of the controller under test, the time lag performance of the current acquisition of the controller under test can be tested to provide support for further algorithm optimization (such as functional safety FTTI design). By applying currents with different pulse gradients, pulse peaks, and pulse widths, the response and control of the controller under test can be observed to verify the current monitoring function of the controller under test.
[0128] i. When step e or step f meets the current accuracy requirement, or step h responds abnormally, the data of the HIL test system and the controller under test should be collected and recorded for analysis, the current acquisition algorithm should be recalibrated, and the current response algorithm should be optimized.
[0129] j. The updated algorithm obtained in step i is rewritten to the controller under test and integrated into the HIL test system to conduct another current acquisition and response test until the current acquisition accuracy and response performance are met and the HIL is powered off.
[0130] In the above scheme, by setting up a bidirectional power supply and a battery simulator in a hardware-in-the-loop test system, the bidirectional power supply can send test parameters to the controller to be tested to test the response of the second functional unit, and the battery simulator also simulates the state of the battery according to the test parameters, and can test whether the first functional unit detects the state of the battery simulator accurately, thereby achieving simultaneous testing of the first functional unit and the second functional unit in the controller to be tested. Compared with testing the two independently, the present application can improve the test accuracy of such a highly integrated regional controller.
[0131] In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the method described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.
[0132] The above description of various embodiments tends to emphasize the differences between the various embodiments. The same or similar aspects can be referenced to each other, and for the sake of brevity, they will not be repeated herein.
[0133] In the several embodiments provided in the present application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device implementation described above is only schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation, such as units or components can be combined or integrated into another subsystem, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.
Claims
1. A hardware-in-the-loop test system, characterized in that: The hardware-in-the-loop test system is used to test the controller under test after cooperating with the controller under test, wherein the controller under test includes a first functional unit and a second functional unit, and the hardware-in-the-loop test system includes: Bidirectional power supply; A processor, the processor being communicatively connected to the bidirectional power supply, the processor being used to send a test instruction carrying a test parameter indication to the bidirectional power supply and control the bidirectional power supply to output the test parameter to the controller to be tested based on the test instruction; A battery simulator, the battery simulator is communicatively connected to the processor to receive a test instruction sent by the processor carrying the test parameter indication and adjusting the state of the battery simulator based on the test parameter indication, the battery simulator is also used to connect to a first functional unit in the controller to be tested, and the first functional unit is used to detect the state of the battery simulator; The processor is further used to communicate with the controller to be tested to receive response data of the second functional unit in the controller to be tested under the test parameters and status information detected by the battery simulator and determine the test result of the controller to be tested based on the response data and the status information, wherein the status information detected by the battery simulator includes the voltage of the battery pack in the battery simulator, the voltage of each battery cell in the battery pack, the temperature of the battery pack and / or the temperature of each battery cell.
2. The hardware-in-the-loop test system according to claim 1, characterized in that: The hardware-in-the-loop test system includes an electronic load module, which includes multiple electronic loads and a switch component. One end of the switch component is connected to the output end of the controller to be tested, and the other end of the switch component is respectively connected to each of the electronic loads to establish or disconnect the connection between each of the electronic loads and the controller to be tested.
3. The hardware-in-the-loop test system according to claim 2, characterized in that: The switch assembly includes multiple switch devices, and the hardware-in-the-loop test system includes a drive circuit, one end of the drive circuit is connected to the processor and the other end is connected to each of the switch devices, and the drive circuit is used to adjust the opening and closing state of each of the switch devices after receiving the drive instruction sent by the processor.
4. The hardware-in-the-loop test system according to claim 2 or 3, characterized in that: The processor is in communication connection with each of the electronic loads, and each of the electronic loads is used to adjust a mode of the electronic load in response to an adjustment instruction sent by the processor, wherein the mode includes at least one of a constant current mode, a constant voltage mode, and a constant power mode.
5. The hardware-in-the-loop test system according to any one of claims 1 to 3, characterized in that: The hardware-in-the-loop test system includes an IO board, one end of which is connected to the processor, and the other end is used to connect to the resistor at the power input end of the controller to be tested, and is used to send a differential voltage to the resistor in response to a test current output instruction sent by the processor.
6. The hardware-in-the-loop test system according to claim 1, characterized in that: The hardware-in-the-loop test system includes a unidirectional power supply, which is used to simulate the DCDC unidirectional power supply output of the whole vehicle. The unidirectional power supply is connected to the processor to receive the test parameters sent by the processor and output supplementary test parameters to the controller under test. The response data also includes response data generated by the controller under test based on the supplementary test parameters.
7. The hardware-in-the-loop test system according to any one of claims 1 to 3, characterized in that: The controller to be tested is a regional controller to be tested, the first functional unit is a battery management unit, and the second functional unit is an intelligent power distribution control unit.
8. The hardware-in-the-loop test system according to any one of claims 1 to 3, characterized in that: The test parameters include a test current and / or a test voltage.
9. A hardware-in-the-loop testing method, characterized in that: The hardware-in-the-loop testing method is applied to the hardware-in-the-loop testing system according to any one of claims 1 to 8, characterized in that the hardware-in-the-loop testing method comprises: The processor sends a test instruction carrying a test parameter indication to the bidirectional power supply and the battery simulator, so that the bidirectional power supply sends the test parameter to the controller to be tested based on the test instruction and the battery simulator adjusts the state of the battery simulator based on the test parameter indication in the test instruction; Receive response data and status information sent by the controller to be tested, wherein the response data is response data of the second functional unit in the controller to be tested under the test parameters, and the status information is status information obtained by the first functional unit in the controller to be tested from detecting the battery simulator, wherein the status information detected from the battery simulator includes the voltage of the battery pack in the battery simulator, the voltage of each battery cell in the battery pack, the temperature of the battery pack and / or the temperature of each battery cell; A test result of the controller to be tested is generated based on the received response data and the status information.
10. The hardware-in-the-loop testing method according to claim 9, characterized in that: The hardware-in-the-loop test system includes a unidirectional power supply. Before the processor sends a test instruction carrying a test parameter indication to the bidirectional power supply and the battery simulator, the hardware-in-the-loop test method further includes: The processor determines the test parameters of the controller to be tested and / or the supplementary test parameters of the unidirectional power supply for the controller to be tested based on at least one of a preset environmental model, a preset unidirectional power supply model, a low-voltage battery model, and a load model. The preset environmental model is used to simulate the operating environment of the entire vehicle except for the controller to be tested. The preset unidirectional power supply model is used to simulate one or more of the output power capability, output current capability, and output voltage capability of the unidirectional power supply. The low-voltage battery model is used to simulate the low-voltage battery. The load model is used to simulate the load connected to the controller to be tested.
11. The hardware-in-the-loop testing method according to claim 10, characterized in that: The test parameters include a test voltage, and the processor determines the test parameters of the controller to be tested and / or the supplementary test parameters of the unidirectional power supply to the controller to be tested based on at least one of a preset environment model, a preset unidirectional power supply model, a low-voltage battery model, and a load model, including: Determine test environment parameters based on the preset environment model; Determine the voltage output capacity of the unidirectional power supply in combination with the test environment parameters and the preset unidirectional power supply model; and determine the voltage output capacity of the bidirectional power supply in combination with the test environment parameters and the low-voltage battery model; Based on the voltage output capabilities of the unidirectional power supply and the bidirectional power supply, the test voltages respectively output by the unidirectional power supply and the bidirectional power supply to the controller to be tested are determined.
12. The hardware-in-the-loop testing method according to claim 10, characterized in that: The test parameters include a test current, the hardware-in-the-loop test system includes an electronic load module, and the processor determines the test parameters of the controller to be tested and / or the supplementary test parameters of the unidirectional power supply to the controller to be tested based on at least one of a preset environment model, a preset unidirectional power supply model, a low-voltage battery model, and a load model, including: Determine test environment parameters based on the preset environment model; Determine the current output capacity of the unidirectional power supply in combination with the test environment parameters and the preset unidirectional power supply model; determine the current output capacity of the bidirectional power supply in combination with the test environment parameters and the low-voltage battery model; Determining the test current required by the electronic load module based on the load model; The test currents output by the unidirectional power supply and the bidirectional power supply are determined in combination with the test current required by the electronic load module, the current output capability of the unidirectional power supply, and the current output capability of the bidirectional power supply.
13. The hardware-in-the-loop testing method according to claim 12, characterized in that: The hardware-in-the-loop test system includes a driving circuit. After determining the test current required by the electronic load module based on the load model, the hardware-in-the-loop test method further includes: Determining the connection relationship between each of the electronic loads in the electronic load module and the controller to be tested based on the test current required by the electronic load module; A configuration instruction is sent to the driving circuit so that the driving circuit adjusts the connection relationship between each of the electronic loads and the controller to be tested.
14. The hardware-in-the-loop testing method according to any one of claims 9 to 13, characterized in that: The controller to be tested includes a plurality of branches, each of which is used to connect at least part of the electronic load. The hardware-in-the-loop testing method further includes: Inputting a current of a first preset value into the power input terminal of the controller under test and inputting a current of a second preset value into each branch of the controller under test; Receiving a first detection value obtained by the controller under test collecting current from the power input terminal and a plurality of second detection values obtained by collecting current from each of the branches; In response to the first difference and / or the second difference being greater than a preset difference, data of the controller under test and the hardware-in-the-loop test system are collected and recorded so as to subsequently optimize a current collection algorithm of the controller under test based on the data.
15. The hardware-in-the-loop testing method according to claim 14, characterized in that: The hardware-in-the-loop testing method further includes: In response to the first difference and the second difference being less than or equal to a preset difference, the processor sends a test instruction carrying a test parameter indication to the bidirectional power supply and the battery simulator.
16. The hardware-in-the-loop testing method according to claim 14, characterized in that: The response data includes a current value detected at the power input terminal of the controller to be tested and a current value detected at each branch. The test result of the controller to be tested is generated based on the received response data and the status information, including: In response to the current value detected at the power input terminal of the controller under test and the sum of the current values detected in each branch not meeting the consistency requirement, the data of the controller under test and the hardware-in-the-loop test system are collected and recorded so as to subsequently optimize the current acquisition algorithm and the current synchronization algorithm of the controller under test based on the data.
17. The hardware-in-the-loop testing method according to claim 14, characterized in that: The test parameter includes a pulse current, the response data includes a current detection result, the current detection result includes a current value detected at a power supply output terminal of the controller to be tested and / or a current value detected at each branch, and the test result of the controller to be tested is generated based on the received response data and the state information, including: Comparing the input value of the pulse current with the current detection result returned by the controller to be tested to obtain a comparison result; Based on the comparison result that there is a time lag in the current detection result, the data of the controller under test and the hardware-in-the-loop test system are collected and recorded, so as to subsequently optimize the current collection algorithm and current synchronization algorithm of the controller under test based on the data.
Citation Information
Patent Citations
Battery simulation test system
CN113253130A
Pure electric vehicle three-electric controller test system
CN209513933U
Hardware-in-the-loop test platform for fuel cell system controller
CN211349096U