Hardware-in-the-loop test system and hardware-in-the-loop test method
By using a two-way power supply and a battery simulator in the hardware in-ring testing system, the problem of difficult to simultaneously test the first and second functional units in the prior art is solved, and a higher test accuracy is achieved.
Patent Information
- Application Number
- PCT/CN2024/094995
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-12-11
- Filing Date
- 2024-05-23
- Publication Date
- 2025-06-19
AI Technical Summary
The prior art is difficult to test the first and second functional units integrated together simultaneously, resulting in inaccurate test results.
The hardware in-loop testing system is adopted, including a two-way power supply and a battery simulator, and the test parameters are sent to the controller to be tested through the 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 test accuracy of highly integrated area controllers, avoiding accuracy issues during independent testing.
Smart Images

Figure CN2024094995_19062025_PF_FP_ABST
Abstract
Description
Hardware-in-the-loop test system and hardware-in-the-loop test method
[0001]
Cross-reference
[0002] This application claims priority to the Chinese patent application filed with the China Patent Office on December 11, 2023, with application number 2023116977576 and application name “Hardware-in-the-loop test system and hardware-in-the-loop test method”, the entire contents of which are incorporated by reference into this application.
Technical field
[0003] 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 Technology]
[0004] The controller under test integrates a first functional unit and a second functional unit. The second functional unit is primarily used to replace traditional manual power distribution management to a certain extent by leveraging computer technology, communication technology, AI technology, and other technologies. The first functional unit is capable of monitoring and managing the batteries connected to the controller under test. Currently, such controllers 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 and share the same MCU and related resources, they cannot be tested separately, making it impossible to test all functional modules simultaneously.
[0005] [Summary of the invention]
[0006] This application at least provides a hardware-in-the-loop testing system and a hardware-in-the-loop testing method.
[0007] The present application provides a hardware-in-the-loop testing system, which is used to test the 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 testing 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 status information detected by the battery simulator and determine the test result of the controller to be tested based on the response data and status information.
[0008] 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 realizing the 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.
[0009] 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 connected to each electronic load to establish or disconnect the connection between each electronic load and the controller to be tested.
[0010] In the above scheme, by setting up an electronic load module in the hardware-in-the-loop test system, the load in the entire 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, thereby testing the response of the controller to be tested under different numbers of loads.
[0011] 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 the driving instruction sent by the processor.
[0012] In the above solution, by providing a driving circuit, the driving circuit can be used to adjust the opening and closing states of the switching devices in the switch assembly, thereby adjusting the number of switching devices connected to the circuit.
[0013] In some embodiments, the processor is in communication with each electronic load, and each electronic load is configured 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.
[0014] 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 mode of each electronic load, thereby making the test result of the controller to be tested more accurate.
[0015] In some embodiments, 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.
[0016] 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, the two 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 large current conditions.
[0017] 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 to be tested. The response data also includes response data generated by the controller to be tested based on the supplementary test parameters.
[0018] In the above solution, by setting a unidirectional power supply in the hardware-in-the-loop test system, the vehicle DCDC can be simulated through the unidirectional power supply, and the response of the controller to be tested under the action of the vehicle power supply can be simulated.
[0019] In some embodiments, the controller to be tested is a zone 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.
[0020] In the above solution, when the battery management unit and the intelligent power distribution unit are integrated in the regional controller to be tested, the present application can realize the testing of such regional controller.
[0021] In some embodiments, the test parameters include a test current and / or a test voltage.
[0022] 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 test voltage can be tested.
[0023] The present application provides a hardware-in-the-loop testing method, which is applied to any 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 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; 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 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; based on the received response data and status information, generates a test result of the controller to be tested.
[0024] 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 realizing the 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.
[0025] In some embodiments, 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 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 environment model, a preset unidirectional power supply model, a low-voltage battery model, and a load model. The preset environment 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 the load connected to the controller to be tested.
[0026] In the above solution, by combining multiple preset models to determine the test parameters, the complex environment in which the controller to be tested is located can be simulated, thereby making the test of the controller to be tested more comprehensive.
[0027] 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 capability of the unidirectional power supply in combination with the test environment parameters and the preset unidirectional power supply model; and determining the voltage output capability of the bidirectional power supply in combination with the test environment parameters and the low-voltage battery model; and determining the test voltages output by the unidirectional unit and the bidirectional power supply to the controller to be tested respectively based on the voltage output capabilities of the unidirectional power supply and the bidirectional power supply.
[0028] In the above scheme, the working environment of the controller to be tested can be determined by the preset environmental model. The voltage output capabilities of the vehicle power supply and the low-voltage battery may be different under different environments. By referring to environmental factors, the voltage output capabilities of the unidirectional power supply and the bidirectional power supply can be determined, 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.
[0029] 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 each of 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.
[0030] In the above solution, 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 the unidirectional power supply, or the bidirectional power supply, or both the unidirectional power supply and the bidirectional power supply.
[0031] 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 further 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.
[0032] In the above scheme, the load model can simulate the test current required by the electronic load module. 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.
[0033] 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 end 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 end 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 the 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.
[0034] 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 on each branch, and by obtaining the first detection value detected on 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 on each branch returned by the controller to be tested, the accuracy of the current detection result of the test area control on each branch 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.
[0035] 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.
[0036] 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.
[0037] 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 requirements, 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 acquisition algorithm and current synchronization algorithm of the controller to be tested based on the data.
[0038] In the above scheme, the response data is the current value obtained by the controller under test from detecting the power input terminal and the current value detected for 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 requirements. 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.
[0039] In some embodiments, the test parameters include pulse current, the response data includes current detection results, the current detection results include the current value obtained by detecting the power output end of the controller to be tested and / or 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: 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, executing the 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 acquisition algorithm and current synchronization algorithm of the controller to be tested based on the data.
[0040] 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, which facilitates subsequent optimization.
[0041] 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 realizing the 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.
[0042] 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
[0043] The drawings herein are incorporated into and constitute a part of the specification. These drawings illustrate embodiments consistent with the present application and, together with the specification, are used to illustrate the technical solutions of the present application.
[0044] FIG1 is a schematic diagram showing the cooperation between a hardware-in-the-loop test system and a controller under test provided by some embodiments;
[0045] FIG2 is a diagram showing a connection relationship between an output terminal of a controller under test and an electronic load according to some embodiments;
[0046] FIG3 is a second diagram showing the connection relationship between the output terminal of the controller under test and the electronic load provided in some embodiments;
[0047] FIG4 is a third diagram showing the connection relationship between the output terminal of the controller under test and the electronic load provided in some embodiments;
[0048] FIG5 is a fourth diagram showing the connection relationship between the output terminal of the controller under test and the electronic load provided in some embodiments;
[0049] FIG6 is a fifth diagram showing the connection relationship between the output terminal of the controller under test and the electronic load provided in some embodiments;
[0050] FIG7 is a sixth diagram showing the connection relationship between the output terminal of the controller under test and the electronic load provided in some embodiments;
[0051] FIG8 is a flow chart of a hardware-in-the-loop testing method provided by some embodiments;
[0052] FIG9 is a schematic diagram of a flow chart of determining a test current and a test voltage provided by some embodiments.
[0053] Explanation of reference numbers: 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. [Specific implementation method]
[0054] The following describes the embodiments of the present application in detail with reference to the accompanying drawings.
[0055] 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.
[0056] The term "and / or" in this article is simply a description of the association relationship of associated objects, indicating that three relationships can exist. For example, A and / or B can represent three situations: 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 associated objects 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.
[0057] 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.
[0058] Therefore, this solution provides a method for testing the first functional unit and the power distribution control unit in the controller under test. By using a hardware-in-the-loop test system that includes a bidirectional power supply and a battery simulator, the battery simulator parameters are synchronized with the test status output by the bidirectional power supply, allowing the second functional unit and the first functional unit to be tested using the same test parameters.
[0059] Please refer to FIG1 . The hardware-in-the-loop test system is used to test the controller 200 after cooperating with the controller 200 . The controller 200 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 under test 200. 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 under test 200, 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 under test 200 to receive response data of the second functional unit in the controller under test 200 under the test parameters and the state information detected by the battery simulator 130 and determine the test result of the controller under test 200 based on the response data and the state information.
[0060] The controller under test in this solution can be a zone controller, domain controller, or other type of controller. DCU (Domain Control Unit). 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, car manufacturers have made further integration based on the functional domain architecture, giving rise to the "zonal control architecture". The ZCU is a zone-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, instrument panel 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. The second functional unit is used to manage the power distribution of the loads in the vehicle. The power distribution management of the loads can specifically be to supply power to the loads or stop supplying power to the loads. The first functional unit in the controller under test 200 includes a microcontroller (MCU) and an analog front-end (AFE) sensor module. For example, the AFE measures the battery voltage and transmits it to the MCU. It also detects the battery temperature (typically via an NTC thermistor). The AFE has many functions and will not be detailed here. The second functional unit includes the System Basis Chip (SBC) and the MCU. The SBC is capable of communication, monitoring and diagnosis, safety monitoring, etc.
[0061] The battery simulator 130 is a physical entity, which can also be called a battery simulation board. It 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 a voltage consistency error. Therefore, a bidirectional power supply 110 is set in the hardware-in-the-loop test system 100 of this 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 entire 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 processors) - 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 test instructions carrying test parameter indications 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. As shown in Figure 1, the communication method between the hardware-in-the-loop test system 100 and the controller under test 200 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 under test is qualified based on the response data. In addition, the controller under test 200 can also monitor the battery simulator 130, such as monitoring the voltage or output current, to determine the status of the battery simulator 130, and then the processor 120 determines whether the controller under test 200 is qualified based on the status of the battery simulator 130 received from the controller under test 200. The controller under test 200 can detect information such as the voltage of the battery pack (Pack Voltage), the voltage of each battery cell in the battery pack (Cell Voltage), and the temperature of the battery pack or each battery cell (Cell Temp) in the battery simulator 130, 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 under test 200 is qualified. The actual information of the battery simulator 130 can be calculated by the processor 120 based on the test parameters sent to the battery simulator 130, or can also be obtained by testing the battery simulator 130 using a detection module provided in the hardware-in-the-loop test system 100.
[0062] 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 to be tested 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 the simultaneous testing of the first functional unit and the second functional unit in the controller to be tested 200. Compared with testing the two independently, the present application can improve the test accuracy of such a highly integrated regional controller.
[0063] In some embodiments, the controller to be tested is a zone 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.
[0064] 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 sensing 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 AFE has many functions and 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.
[0065] In the above solution, when the battery management unit and the intelligent power distribution unit are integrated in the regional controller to be tested, the present application can realize the testing of such regional controller.
[0066] In some embodiments, the test parameters include a test current and / or a test voltage.
[0067] The magnitude of the test current can be pre-set or dynamically determined. Similarly, the magnitude of the test voltage can also be pre-set or dynamically determined during the test process.
[0068] 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 test voltage can be tested.
[0069] 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 connected to each electronic load 141 to establish or disconnect the connection between each electronic load 141 and the controller to be tested 200.
[0070] The electronic load 141 can be used to simulate other vehicle controllers (VCU, BMS, TCU, EPS, body controller), and other low-voltage loads, etc. Part of the low-voltage loads is 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 rest of the vehicle controllers. The multiple can be two or more. Optionally, the current recovery capability of each electronic load 141 can be matched with the maximum continuous current / maximum peak current capability of the input terminal of the controller to be tested 200, and the maximum continuous current / maximum peak current capability of a single output channel of the controller to be tested 200 for design. For example, the design of the electronic load 141 must meet the following requirements: |continuous current output by the bidirectional power supply 110| > the maximum continuous current of the power input terminal of the controller 200 connected to the bidirectional power supply 110; |peak current output by the bidirectional power supply 110| > the maximum peak current of the input terminal of the controller 200 connected to the bidirectional power supply 110; the maximum continuous current of a single electronic load 141 > the maximum continuous current of a single output channel of the controller 200; and the maximum peak current of a single electronic load 141 > the maximum peak current of a single output channel of the controller 200. Alternatively, considering the high cost and large size of high-current power supplies and electronic loads 141, at least one of the following conditions can be used to determine the design of each electronic load 141: multiple electronic loads 141 connected in parallel; 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; 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; and the continuous output current of the bidirectional power supply 110 > the maximum continuous current of a single output channel of the controller 200. 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. As shown in Figures 2 to 7, the maximum output current of each current output channel of the controller under test 200 may be different. For example, the maximum continuous current and maximum peak current allowed by each output channel may be different.
[0071] 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 to be tested 200 can be controlled, thereby testing the response of the controller to be tested 200 under different numbers of loads.
[0072] 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.
[0073] The drive circuit 160 includes, but is not limited to, a direct ground drive circuit 160, a floating ground drive circuit, an isolated drive circuit, or a non-isolated drive circuit. The drive circuit 160 is configured to receive control signals and subsequently drive the switching devices to close and open. The switching devices include, but are not limited to, electrical switches or relays. This embodiment uses relays as the switching devices, employing electromagnetic relays. The topology formed by the connection of the relays is shown in Figure 1 . As shown in Figure 1 , the drive circuit 160 can be powered via a power supply interface, and data transmission and communication between the processor 120 and the drive circuit 160 can be achieved via a DO interface. For example, assuming the switching devices include switch A, switch B, switch C, switch D, switch E, and switch F, by controlling the opening and closing of each switch in the switch assembly 142 and controlling different relay opening and closing combinations, environmental simulations can be achieved for either independent overcurrent in a single channel or simultaneous overcurrent in multiple channels. Assume that the controller under test 200 has eight output channels: Output 1, 2, 3, ..., 8; and the electronic load 141 has four independent channels: Load 1, 2, 3, 4. Part of the connection relationship between the control of the area to be tested and the electronic load 141 is shown in Figures 2 to 7. The controller to be tested on the left side of Figures 2 to 7 is the controller to be tested 200 of this solution, and the electronic load 141 is on the right side. Figure 2 shows that one output end of the controller to be tested 200 is connected to an electronic load 141, Figure 3 shows that one output end is connected to two electronic loads 141, Figure 4 shows that one output end is connected to three electronic loads 141, Figure 5 shows that two output ends are respectively connected to one electronic load 141, Figure 6 shows that two output ends are connected to three electronic loads 141, and Figure 7 shows that three output ends are connected to four loads. Figures 2 to 7 only output part of the connection relationship. In addition to this part of the connection relationship, there may be other connection relationships. Specifically, they can be determined according to the connection relationship between the switching devices in Figure 1 and the opening and closing states of the switching devices, which will not be repeated here.
[0074] 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.
[0075] In some embodiments, the processor 120 is in communication with each electronic load 141 , and each electronic load 141 is configured to adjust a mode of the electronic load 141 in response to an adjustment instruction sent by the processor 120 , wherein the mode includes at least one of a constant current mode, a constant voltage mode, and a constant power mode.
[0076] For example, the processor 120 controls the electronic load 141 via R232 serial communication. For example, the electronic load 141 can be adjusted from a constant current mode to a constant voltage mode, from a constant voltage mode to a constant current mode, or from a constant power mode to a constant current mode. The modes of different electronic loads 141 can be the same or different.
[0077] In the above solution, after the processor 120 establishes a connection with the electronic load 141 , the mode of each electronic load 141 can be adjusted to simulate the complex load conditions in actual scenarios, thereby making the test result of the controller 200 to be tested more accurate.
[0078] 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 the test current output instruction sent by the processor 120.
[0079] IO board 170 can be a power-type IO board. In this application, if the bidirectional power supply 110 cannot output a current exceeding the instantaneous high current at the power input terminal of the controller under test 200, the processor 120 can send a test current output instruction to the IO board 170. Through the Shunt analog output method, the high current at the power input terminal of the controller under test 200 is simulated, thereby testing the response of the controller under test 200 in an overcurrent condition. As shown in Figure 1, the Shunt analog output is connected to three resistors in the controller under test 200, and a differential voltage is output through one or more of the resistors, which can simulate a high current flowing through the resistor, thereby simulating the situation of a high current at the power input terminal.
[0080] 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 under test 200, the two ends of the resistor can simulate a large current input under the action of the differential voltage, thereby simulating the response of the controller under test 200 under large current conditions.
[0081] 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.
[0082] The unidirectional power supply 150 can simulate the unidirectional DC / DC power output of the entire vehicle. Optionally, if 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 under test 200; 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 under test 200; 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 under test 200; 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 under test 200; e. the maximum continuous current of a single electronic load 141 > the maximum continuous current of a single output channel of the controller under test 200; f. the maximum peak current of a single electronic load 141 > the maximum peak current of a single output channel of the controller under test 200. Alternatively, considering the high cost and large size of high-current power supplies and electronic loads 141, the following alternative conditions can be used: a. multiple electronic loads 141 connected in parallel; b. the sum of the maximum continuous currents of all electronic loads 141 > the maximum continuous current of a single output channel of the controller under test 200; c. the sum of the maximum peak currents of all electronic loads 141 > the maximum peak current of a single output channel of the controller under test 200; d. the continuous current output by the unidirectional power supply 150 > the maximum continuous current of a single output channel of the controller under test 200; e. the peak current output by the unidirectional power supply 150 > the maximum peak current of a single output channel of the controller under test 200; f. the continuous output current output by the bidirectional power supply 110 > the maximum continuous current of a single output channel of the controller under test 200; g. the peak output current output by the unidirectional power supply 150 > the maximum peak current of a single output channel of the controller under test 200. The power input terminal of the controller under test 200 connected to the unidirectional power supply 150 can be considered the input terminal of the second MOSFET 220.
[0083] In the above solution, 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 entire vehicle and simulate the response of the controller to be tested 200 under the action of the entire vehicle power supply.
[0084] As shown in Figure 8, the present application provides a hardware-in-the-loop testing method, which 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 the 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.
[0085] 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 based on the functional domain architecture, giving rise to the "Zonal control architecture". ZCU is a zone-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 first functional unit in the controller under test consists of a microcontroller (MCU) control module and an analog front-end (AFE) sensing module. For example, the AFE measures the battery voltage and transmits it to the MCU. It also detects the battery temperature (typically via an NTC thermistor). The AFE has many functions and will not be detailed here. The second functional unit includes the System Basis Chip (SBC) and the MCU. The SBC performs communication, monitoring and diagnosis, and safety monitoring.
[0086] A battery simulator is a physical entity, also known as a battery simulation board, that typically only outputs voltage and milliampere-level current. To verify low-voltage power distribution products, an additional power supply is required to ensure current output. The voltage of this power supply must be consistent with that of the battery simulator to prevent the internal software of the low-voltage power distribution product from identifying voltage consistency errors. Therefore, the hardware-in-the-loop test system of this application incorporates a bidirectional power supply that can both output and recover energy, thereby simulating the bidirectional energy flow of the vehicle's low-voltage battery. The processor can be a real-time processor, microcontroller, or other processor. For example, the processor can be an R series: Real-time Processors – a high-performance processor series for real-time applications, such as hard disk controllers, automotive transmission systems, and baseband control for wireless communications. The processor is separately connected to the battery simulator and the bidirectional power supply to transmit test instructions carrying test parameter indications to the bidirectional power supply and the battery simulator. After the bidirectional power supply transmits the test parameters to the controller under test, the controller under test can then allocate power based on the received test parameters or perform power detection on the power input or branches of the controller under test 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 tested area is qualified based on the response data. In addition, the controller under test can also monitor the battery simulator, such as voltage or output current, to determine the status of the battery simulator. The processor then determines whether the controller under test is qualified based on the battery simulator status received from the controller under test.
[0087] 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 realizing the 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.
[0088] In some embodiments, 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 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 environment model, a preset unidirectional power supply model, a low-voltage battery model, and a load model. The preset environment 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 the load connected to the controller to be tested.
[0089] The preset environmental model simulates the vehicle's operating environment, excluding the controller under test. It primarily includes environmental conditions, a driver model, a residual controller model, and a vehicle dynamics model. This model provides raw input stimuli for the entire hardware-in-the-loop test system and subsequent low-voltage battery model, load model, and relay control. These raw input stimuli can include factors such as the driver's throttle position, brake pedal, key position, gear position, vehicle speed, and ambient temperature. The preset unidirectional power supply model primarily simulates the DC-DC controller and its underlying circuitry, calculating the DC-DC's real-time status (DC power, current, and voltage capabilities). The low-voltage battery model primarily includes a low-voltage battery controller simulation and a low-voltage battery simulation. The low-voltage battery controller simulation simulates the control logic of the low-voltage battery. By receiving control commands and status information from the preset unidirectional power supply, it emulates the battery's charge and discharge control. The low-voltage battery simulation, primarily based on an electrochemical model, simulates the actual status of the low-voltage battery pack, module, and cell, including SOC, SOH, SOE, pack voltage, cell voltage, and cell temperature.
[0090] 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 in a manner that: refers to the state of the unidirectional power supply, one or both of the states of the low-voltage battery, the current demand of the electronic load, and combines the real-time state of the controller to be tested to simulate the working mode of the entire vehicle, calculates and arbitrates 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 jointly output by 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 in a manner that refers to the output of the preset unidirectional power supply model and / or the output of the low-voltage battery model, and combines the different working modes of the controller to be tested to determine the output voltage of the bidirectional power supply and / or the unidirectional power supply. 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.
[0091] In the above solution, by combining multiple preset models to determine the test parameters, the complex environment in which the controller to be tested is located can be simulated, thereby making the test of the controller to be tested more comprehensive.
[0092] In some embodiments, the test parameters include a test voltage. The processor determines the test parameters of the controller under test and / or the supplementary test parameters of the unidirectional power supply for the controller under test 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 capability of the unidirectional power supply in combination with the test environment parameters and the preset unidirectional power supply model; determining the voltage output capability of the bidirectional power supply in combination with the test environment parameters and the low-voltage battery model; and determining the test voltages output by the unidirectional unit and the bidirectional power supply to the controller under test, respectively, based on the voltage output capabilities of the unidirectional power supply and the bidirectional power supply.
[0093] 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 vary under 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 vary under 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 based on 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. For example, 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 based on 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 respectively. In other embodiments, the test voltage to be output by the hardware-in-the-loop test system to the controller to be tested can be determined based on the current capability of the power input channel of the controller to be tested and the capability of the electronic load. That is, as shown in Figure 9, 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 with reference 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.).
[0094] Optionally, when the bidirectional power supply needs to output a test voltage, the voltage synchronization of the bidirectional power supply and the battery simulator is required. 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 by 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, each driver module in Figure 9 is a bridge connecting software and hardware. Generally speaking, a driver is required between hardware and software so that the hardware can perform corresponding operations according to the control instructions of the software. The drive module may include a CANFD drive, a battery simulator drive, a Shunt drive, and an RS232 drive. The CANFD drive is a bridge connecting the processor and the CANFD interface, which ultimately enables the unidirectional power supply and the bidirectional power supply to output the voltage to the controller to be tested through the CANFD interface after receiving the corresponding voltage output instruction. The Shunt drive is a bridge connecting the processor and the Shunt interface, which ultimately enables the differential voltage to be sent to the controller to be tested according to the interface. The RS232 drive is a bridge connecting the processor and the RS232 interface, which enables the corresponding instructions to be sent to the electronic load through the interface. The battery simulator drive 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. Each driver can then also return corresponding execution status feedback to the low-voltage battery model, the unidirectional power supply model, the load model, and the relay control.
[0095] In the above scheme, the working environment of the controller to be tested can be determined by the preset environmental model. The voltage output capabilities of the vehicle power supply and the low-voltage battery may be different under different environments. By referring to environmental factors, the voltage output capabilities of the unidirectional power supply and the bidirectional power supply can be determined, 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.
[0096] 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 a preset environment model, a preset unidirectional power supply model, a low-voltage battery model, and a load model in the following manner: 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; and determining the test current output by each of 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.
[0097] For example, as shown in FIG9 , the processor can simulate the working mode of the whole vehicle according to the current output capability of the unidirectional power supply, the low-voltage battery state and the load current demand, and 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 capability of the unidirectional power supply and the bidirectional power supply. Among them, when the current output capability of the bidirectional power supply and the unidirectional power supply is limited (cannot output an instantaneous large current exceeding the power input terminal of the controller to be tested), the power input terminal current instruction can be sent to the current type IO board, and the large current of the power input terminal of the controller to be tested is simulated by the Shunt analog output method to test the overcurrent function and response of the power input terminal of the controller to be tested.
[0098] In the above solution, 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 the unidirectional power supply, or the bidirectional power supply, or both the unidirectional power supply and the bidirectional power supply.
[0099] 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 further 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.
[0100] 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 instruction to the bidirectional unit or unidirectional power supply, thereby generating a real current flowing through the controller under test. 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 based on 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.
[0101] In the above scheme, the load model can simulate the test current required by the electronic load module. 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.
[0102] 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 end 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 end 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 the 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.
[0103] In some application scenarios, each branch includes multiple Efuses and multiple HSDs. An Efuse can be considered an intelligent fuse that switches the secondary power distribution circuit on and off by driving an external MOSFET (field-effect transistor) and an internal MOSFET. An HSD can be considered a high-side driver that drives the load by closing a power line switch directly in front of the load. That is, each Efuse corresponds to a power output terminal. FIG1 shows five branches in the controller under test, each branch corresponding to one power output terminal, and a second functional unit connected to field-effect transistors at two of the power output terminals to control the switching of each branch. A bidirectional power supply can be controlled to input a current of a first preset value to the power input terminal of the controller under test, or a unidirectional power supply can be controlled to input a current of a first preset value to the power input terminal of the controller under test. This application takes the example of a bidirectional power supply inputting a current of a first preset value to the power input terminal of the controller under test. The output terminal of the bidirectional power supply is connected to the first MOSFET tube 210 in the controller under test, and the power input terminal of the controller under test can be the input terminal of the first MOSFET tube 210. The current of the second preset value input to each branch of the controller to be tested may be the current of the second preset value input to all five branches in FIG1 , wherein the second preset value currents input to different branches may be the same or different. Wherein, the data of the controller to be tested and the hardware-in-the-loop test system may be collected and recorded when the first difference is greater than the first preset difference, or the data of the controller to be tested and the hardware-in-the-loop test system may be collected and recorded when the second difference is greater than the second preset difference, and the first preset difference and the second preset difference may be the same or different. Alternatively, the data of the controller to be tested and the hardware-in-the-loop test system may be collected and recorded when the first difference is greater than the first preset difference and the second difference is greater than the second preset difference. 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.
[0104] 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 on each branch, and by obtaining the first detection value detected on 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 on each branch returned by the controller to be tested, the accuracy of the current detection result of the test area control on each branch 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.
[0105] 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.
[0106] That is, when both the first difference and the second difference are small, a current response test can be performed on the controller to be tested.
[0107] 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.
[0108] 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 requirements, 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 acquisition algorithm and current synchronization algorithm of the controller to be tested based on the data.
[0109] 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 the currents of all branches 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 failure to meet the consistency requirements.
[0110] In the above scheme, the response data is the current value obtained by the controller under test from detecting the power input terminal and the current value detected for 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 requirements. 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.
[0111] In some embodiments, the test parameters include pulse current, the response data includes current detection results, the current detection results include the current value obtained by detecting the power output end of the controller to be tested and / or 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: 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, executing the 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 acquisition algorithm and current synchronization algorithm of the controller to be tested based on the data.
[0112] During 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, providing 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. If the comparison result shows 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 and diagnosis algorithm.
[0113] 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, which facilitates subsequent optimization.
[0114] In some embodiments, the hardware-in-the-loop test system provided by this solution can test regional controllers that have 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 functional 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.
[0115] The test parameters in this solution may include a 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 entire vehicle, and then calculate and arbitrate to obtain a reasonable power input and load branch current. When the current output capacity of the unidirectional power supply and the bidirectional power supply is limited (unable to output a large instantaneous current exceeding the power input of the controller to be tested), a power input current instruction can be sent to the current-type IO board. Through the Shunt analog output method, the power input of the controller to be tested is simulated to receive a large current, and the overcurrent function and response of the power input of the controller to be tested are tested.
[0116] The test parameters in this solution may include a test voltage, which is obtained through voltage arbitration. 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, 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, software synchronization is used (voltage instructions are sent to the bidirectional power supply and battery simulator at the same time) to ensure that 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 are synchronized, 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.
[0117] In some embodiments, the process of performing current acquisition and response performance testing on the controller under test by the hardware-in-the-loop test system may include:
[0118] a.HIL is powered on and the test system starts running.
[0119] b. The HIL test system (Hardware in the Loop test system) calculates the current command of the power input end and the current command size of each load branch.
[0120] 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.
[0121] d. The controller under test synchronously 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; at the same time, the calculated current will be synchronously sent to the bus (CAN, etc.).
[0122] e. Current Accuracy Verification 1: The test system compares the power input current I1 output by the HIL test system with the power input current I2 sent by the controller under test via the bus. This allows the accuracy of power input current acquisition in different current ranges to be tested.
[0123] If the accuracy check does not meet the requirements, go to the current calibration step i.
[0124] f. Current Accuracy Verification 2: The test system compares the real-time current I3 of the HIL test system's electronic load with the load branch current I4 sent by the controller under test via the bus. This allows the accuracy of load branch current acquisition in different current ranges to be tested.
[0125] If the accuracy check does not meet the requirements, go to the current calibration step i.
[0126] g. When both steps e and f are met, the current response test begins. The HIL test system generates an excitation signal and applies currents of varying magnitudes and types to the power input and load branches.
[0127] h. Based on step g above, after applying the current excitation signal, observe the response of the controller under test.
[0128] For example, in current consistency verification, the consistency verification conclusion is met only when the current at the power input and all load branch currents meet the consistency requirements (node current is 0). Otherwise, the controller under test should identify a consistency failure. In addition, the HIL test system can artificially create consistency differences, causing a large deviation between the power input current and the load branch current, thereby verifying the current consistency algorithm of the controller under test.
[0129] For example, pulse current response verification can be used to compare the excitation current of the HIL test system with the feedback current of the controller under test. This allows for testing the time lag performance of the controller's current acquisition, providing support for further algorithm optimization (such as functional safety FTTI design). By applying currents with varying pulse gradients, pulse peaks, and pulse widths, the controller's response and control can be observed, verifying its current monitoring capabilities.
[0130] i. If step e or step f meets the current accuracy requirements, or if step h responds abnormally, data from the HIL test system and the controller under test should be collected and recorded for analysis, and the current acquisition algorithm should be recalibrated to optimize the current response algorithm.
[0131] j. The updated algorithm obtained in step i is re-written to the controller under test and integrated into the HIL test system. Another current acquisition and response test is performed until the current acquisition accuracy and response performance meet the requirements and the HIL is powered off.
[0132] 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 realizing the 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.
[0133] 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. For the sake of brevity, it will not be repeated here.
[0134] The above description of the various embodiments tends to emphasize the differences between the various embodiments. The same or similar aspects can be referenced with each other and will not be repeated herein for the sake of brevity.
[0135] In the several embodiments provided in this application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device implementation methods described above are 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. For example, 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 connected to the bidirectional power supply and configured to control the bidirectional power supply to output a test parameter to the controller to be tested; A battery simulator, 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 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 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 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.
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 4, 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 6, 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 7, 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; Receiving response data and status information sent by the controller under test, wherein the response data is response data of the second functional unit in the controller under test under the test parameters, and the status information is status information obtained by the first functional unit in the controller under test from detecting the battery simulator; 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 unit 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 or 11, 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; Combine the test environment parameters and the preset unidirectional power supply model to determine the current of the unidirectional power supply output capacity; 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; 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 or 15, 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 or 15, 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
Hardware in-loop simulation test system and device for bidirectional charger controller
CN109471373A
Battery simulation test system
CN113253130A
Hardware-in-loop test system and hardware-in-loop test method
CN117806274A
Hardware-in-the-loop test platform for fuel cell system controller
CN211349096U
Hardware-in-the-loop rack for electric control system of electric vehicle
CN215894841U
Cited By
Fault location positioning method and system based on HALT and HIL
CN117706337A
Test system and method suitable for multi-configuration door lock
CN120948026A
HIL test method, device and system
CN121232020A
Lithium battery SOH model training method and system and storage medium
CN121958956A
Controller IO channel test and calibration device and method based on dynamic port switching
CN122044156A