Battery management system test method and system

By combining software-defined battery model algorithms with hardware-in-the-loop devices, the problem that existing battery management system testing methods cannot fully cover complex operating conditions is solved, realizing low-cost and efficient battery management system testing, and improving test coverage and reliability.

CN122283571APending Publication Date: 2026-06-26CONTEMPORARY NEBULA TECH ENERGY CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CONTEMPORARY NEBULA TECH ENERGY CO LTD
Filing Date
2026-04-10
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

Existing battery management system testing methods cannot fully cover various complex operating conditions, and existing hardware-in-the-loop test benches are expensive or complex to operate, making it difficult to accurately trigger boundary conditions, resulting in insufficient test coverage and reliability.

Method used

A software-defined battery model algorithm is used to simulate battery characteristics. By acquiring test parameters and battery model parameters, real-time simulation data is calculated using a second-order RC battery model. The hardware-in-the-loop device outputs physical signals to test the BMS device under test, and response data is collected to complete the test.

Benefits of technology

It enables low-cost and efficient simulation of various complex working conditions, improves test coverage and reliability, reduces implementation complexity and cost, and ensures test accuracy and consistency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122283571A_ABST
    Figure CN122283571A_ABST
Patent Text Reader

Abstract

This invention relates to the field of battery management system (BMS) testing, and more particularly to a BMS testing method and system. The method includes: acquiring test parameters and battery model parameters; initializing a preset battery model algorithm based on the test parameters to provide different battery operating conditions; calculating real-time battery simulation data using the initialized battery model algorithm based on the battery model parameters; acquiring control commands from a hardware-in-the-loop (HIL) device; controlling the HIL to output corresponding physical signals to the BMS device under test (BMS) based on the real-time battery simulation data and the control commands, to test the BMS device under test; and collecting response data from the BMS device under test to complete the test. This method solves the problem of test conditions that cannot be triggered in physical testing; and it also enables the construction of corresponding test platforms for different batteries, effectively improving testing efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of battery management system testing technology, and particularly to battery management system testing methods and systems. Background Technology

[0002] In battery energy storage systems, the battery management system (BMS) is one of its core components and needs to meet the requirements of various complex operating conditions. During the development, testing, and maintenance phases of the BMS, it is typically necessary to simulate multiple real-world operating conditions for verification. Therefore, a hardware-in-the-loop (HIL) test bench is introduced to complete the relevant tests. Using a HIL test bench can reproduce actual operating conditions, covering the entire process of battery charge and discharge characteristics, thereby effectively improving the effectiveness, repeatability, and safety of the tests.

[0003] However, existing technical solutions have the following shortcomings. First, ordinary test benches cannot achieve comprehensive coverage testing of all operating conditions. While MATLAB-Simulink-based hardware-in-the-loop test benches are powerful, they are expensive and have high requirements for technology implementation, limiting their widespread application. Second, during testing, complex operating condition strategies are often difficult to trigger accurately. If testing is conducted by modifying calibration parameters, there is a risk of unreliable results. On the other hand, if testing is conducted using physical test benches, it is difficult to effectively trigger the system under extreme operating conditions at boundary points. These technical contradictions together result in significant deficiencies in the coverage, reliability, and boundary condition verification of existing testing methods. The root cause of the problem lies in the lack of a testing method that is cost-effective, easy to implement, and capable of accurately simulating various complex scenarios, including boundary conditions. Summary of the Invention

[0004] The technical problem to be solved by the present invention is to provide a battery management system testing method that can be tested under actual operating conditions.

[0005] To solve the above-mentioned technical problems, the present invention adopts the following technical solution: A battery management system testing method, the method comprising: Obtain test parameters and battery model parameters; initialize the preset battery model algorithm based on the test parameters to provide different operating conditions for the battery; Real-time battery simulation data is calculated using the initialized battery model algorithm based on the battery model parameters. Obtain control commands from hardware-in-the-loop devices; Based on real-time battery simulation data, the hardware-in-the-loop control device outputs corresponding physical signals to the BMS device under test based on control commands, so as to test the BMS device under test. Collect response data from the BMS device under test to complete the test.

[0006] To solve the above-mentioned technical problems, another technical solution adopted by the present invention is as follows: A battery management system testing system includes a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, it performs the following steps: Acquire test parameters and battery model parameters; initialize a preset battery model algorithm based on the test parameters to provide different battery operating conditions; calculate real-time battery simulation data using the initialized battery model algorithm based on the battery model parameters; acquire control commands from the hardware-in-the-loop device; based on the real-time battery simulation data, control the hardware-in-the-loop device to output corresponding physical signals to the BMS device under test to test the BMS device under test; collect response data from the BMS device under test to complete the test.

[0007] The beneficial effects of this invention are as follows: This invention achieves flexible test configuration by acquiring test parameters and battery model parameters; initializes a preset battery model algorithm based on the test parameters to provide different operating conditions; calculates real-time battery simulation data based on the battery model parameters using the preset battery model algorithm to ensure data accuracy; acquires control commands from the hardware-in-the-loop device; controls the hardware-in-the-loop device to output corresponding physical signals to the BMS device under test based on the real-time battery simulation data and the control commands to test the BMS device under test; and collects the response data of the BMS device under test to complete the test. Compared to ordinary test benches that cannot provide full coverage testing, this invention can comprehensively simulate various complex operating conditions; compared to the expensive MATLAB-simulink HIL test bench and its high technical requirements for implementation, this invention uses a preset algorithm to reduce testing costs and implementation complexity; compared to the unreliability of testing methods that modify calibration values, this invention provides accurate simulation data based on model calculations, improving test accuracy; compared to physical test benches that cannot trigger boundary conditions, this invention easily triggers boundary and complex operating conditions through the initialization algorithm, improving test coverage and reliability. Attached Figure Description

[0008] Figure 1 A flowchart illustrating the steps of a battery management system testing method provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of the structure of a battery management system testing system provided in an embodiment of the present invention; Figure 3 This invention provides an overall framework diagram of a HIL test bench corresponding to a battery management system test system. Figure 4 A BMS test framework for a battery management system test system is provided in this embodiment of the invention; Figure 5A battery model circuit topology diagram of a battery management system testing method provided in an embodiment of the present invention; Figure 6 A battery model coupling diagram for a battery management system testing method provided in an embodiment of the present invention; Detailed Implementation Definitions:

[0009] To explain in detail the technical content, objectives, and effects of the present invention, the following description is provided in conjunction with the embodiments and accompanying drawings.

[0010] In battery energy storage systems, the Battery Management System (BMS), as a core control component, needs to operate stably under complex and diverse real-world conditions. To ensure its reliability, it is essential to effectively simulate real-world operating scenarios for thorough verification during the development, testing, and operation and maintenance phases. Therefore, Hardware-in-the-Loop (HIL) test benches have been introduced into the testing process. These benches can highly reproduce the dynamic charging and discharging process of batteries, covering various operating conditions from normal to boundary conditions, significantly improving the coverage, repeatability, and safety of testing. They have become an important means of BMS testing and verification.

[0011] Currently, common testing solutions mainly include dedicated HIL test benches built with MATLAB / Simulink and simple physical test benches. However, these solutions have significant shortcomings: First, general-purpose simple test benches have limited functionality and cannot achieve full-condition coverage; while dedicated MATLAB / Simulink HIL test benches are expensive, and the technical barriers to model integration and hardware configuration are high, making them difficult to popularize. Second, during testing, complex operating conditions or fault conditions are often difficult to trigger and reproduce accurately; simulating boundary conditions by manually modifying calibration parameters is not only cumbersome, but also results in poor consistency and reliability of test results, and physical testing makes it even more difficult to safely and repeatedly inject extreme or fault conditions.

[0012] To at least address the aforementioned issues, this invention simulates the characteristics of a real battery using a software-defined battery model algorithm. The real-time data obtained from the simulation is then converted into control commands for a hardware-in-the-loop device, driving general-purpose measurement and control hardware to output physical signals and interact with the BMS under test. This approach eliminates reliance on expensive dedicated HIL testing equipment. By utilizing standardized hardware and flexibly configurable software algorithms, a test environment covering various complex and boundary conditions can be constructed cost-effectively and efficiently, significantly improving the flexibility, accuracy, and safety of BMS testing.

[0013] The following describes a battery management system testing method according to the present invention. Please refer to the appendix. Figure 1 ,include: Step 101: Obtain test parameters and battery model parameters; where test parameters refer to device model parameters, including CSC parameters, battery initial parameters, and battery voltage and temperature range. Step 102: Initialize the preset battery model algorithm according to the test parameters to provide different operating conditions of the battery; wherein, the battery model algorithm refers to the second-order RC circuit model algorithm, which is used to simulate the entire process of battery charging and discharging characteristics. Operating condition refers to the charging and discharging state of the battery during actual operation.

[0014] Step 103: Based on the battery model parameters, calculate the real-time battery simulation data using the initialized battery model algorithm; wherein, the real-time battery simulation data refers to the single cell voltage, cell temperature, single cell SOC, single cell SOH, and cycle number calculated by the second-order RC battery model software algorithm.

[0015] Step 104: Obtain control commands from the hardware-in-the-loop (HIL) device. The hardware-in-the-loop (HIL) device refers to the HIL test bench, which includes a 24V power supply board, individual cell board, individual cell temperature board, terminal temperature board, pack voltage board, link voltage board, DIDO board, industrial computer, and other auxiliary equipment. Control commands are instructions used to control the HIL test bench to output corresponding test quantities. The control commands utilize simulation data based on the specific requirements of the entire test system (e.g., control commands originate from data input through the human-machine interface). Step 105: Based on real-time battery simulation data, the hardware-in-the-loop control system outputs corresponding physical signals to the BMS device under test (BMS) according to control commands, in order to test the BMS device under test. The physical signals refer to the voltage, resistance, and current messages and control signals output by the HIL bench device. Voltages include the simulated cell voltage output by the individual cell board, the sampling voltage output by the terminal temperature board, the total battery voltage output by the Pack voltage board, and the bus voltage output by the Link voltage board. Resistances include the simulated NTC temperature sensor output by the individual cell temperature board. The BMS device under test refers to the BMS device under test, including the SBMU board and the CSC board. The SBMU board is the master control board; the CSC board is the slave control board, used to collect cell voltage, cell temperature, and terminal temperature.

[0016] Step 106: Collect response data from the BMS device under test to complete the test; As described above, this embodiment achieves flexible test configuration by acquiring test parameters and battery model parameters; initializes a preset battery model algorithm based on the test parameters to provide different operating conditions; calculates real-time battery simulation data based on the battery model parameters using the preset battery model algorithm to ensure data accuracy; acquires control commands from the hardware-in-the-loop device; controls the hardware-in-the-loop device to output corresponding physical signals to the BMS device under test based on the real-time battery simulation data and the control commands to test the BMS device under test; and collects the response data of the BMS device under test to complete the test. Compared to ordinary test benches that cannot provide full coverage testing, this invention can comprehensively simulate various complex operating conditions; compared to the expensive MATLAB-simulink HIL test bench and its high technical requirements for implementation, this invention uses a preset algorithm to reduce testing costs and implementation complexity; compared to the unreliability of testing methods that modify calibration values, this invention provides accurate simulation data based on model calculations, improving test accuracy; compared to physical test benches that cannot trigger boundary conditions, this invention easily triggers boundary and complex operating conditions through the initialization algorithm, improving test coverage and reliability.

[0017] In one embodiment of this application, step 103 involves calculating real-time battery simulation data based on battery model parameters using an initialized battery model algorithm, including: Step 201: Based on the battery model parameters, real-time battery simulation data is calculated using a second-order RC battery model. The second-order RC battery model refers to a second-order RC circuit model used to simulate battery characteristics. Real-time battery simulation data refers to the individual cell voltage, cell temperature, individual cell SOC, individual cell SOH, and cycle count calculated using the second-order RC battery model software algorithm.

[0018] As described above, using a second-order RC battery model for real-time simulation data calculation can effectively reduce algorithm complexity while ensuring computational accuracy. This model simulates the electrochemical polarization and concentration polarization characteristics of the battery through two parallel RC circuits, accurately describing the battery's dynamic response behavior. The second-order RC model has significant advantages in terms of computational resource consumption and simulation real-time performance, meeting the simulation speed requirements of the HIL test system and providing stable and reliable real-time simulation data support for subsequent BMS algorithm verification.

[0019] In one embodiment of this application, step 101, obtaining test parameters and battery model parameters, includes: Step 301: Obtain the open-circuit voltage versus state of charge (OCC) curve, the health state versus cycle count curve, the second-order RC battery model parameters, and the battery temperature model parameters as battery model parameters. The OCC-SOC curve is used to calculate the cell's SOC. The SOH-cycle count curve is used to look up the cell's SOH in a table. The second-order RC battery model parameters include a temperature table, an SOC table, and the resistances R0 and R1, and capacitances C0 and C1 of the second-order RC model, used to find the corresponding RC model resistance and capacitance values ​​for different temperatures and SOC values. The battery temperature model parameters include the single-cell mass, specific heat capacity, heat exchange coefficient, single-cell surface area, and ambient temperature, used to calculate the cell temperature using the battery temperature model algorithm.

[0020] Step 302: Obtain the battery voltage and temperature range as test parameters. This range includes the maximum and minimum single-cell voltage, maximum and minimum temperature, which are used to determine the single-cell voltage and temperature limits obtained after model calculation. Test parameters include CSC parameters, initial battery parameters, and the battery voltage and temperature range. CSC parameters include the number of CSCs, the number of cells, the number of cell temperatures, and the number of terminal temperatures, used to determine the specific number of CSC single-cell data points generated by the model. Initial battery parameters include battery capacity, initial cycle count, initial SOH, and initial SOC, used to create the initial state of the battery. The battery voltage and temperature range includes the maximum and minimum single-cell voltage, maximum and minimum temperature, used to limit the single-cell voltage and temperature obtained after model calculation.

[0021] As described above, this embodiment constructs a comprehensive parameter system covering battery electrical characteristics, thermal characteristics, and health status by acquiring complete battery model parameters and test parameters. This provides a data foundation for the subsequent operation of battery model algorithms based on this parameter system and can support the HIL test system to fully verify the BMS under various operating conditions.

[0022] In one embodiment of this application, step 201, based on the battery model parameters, calculates real-time battery simulation data using a second-order resistive-capacitive battery model, including: Step 401: Input the open-circuit voltage versus state of charge curve, the health state versus cycle number curve, the second-order RC battery model parameters, and the battery temperature model parameters into the second-order RC battery model. Step 402: Calculate the individual cell voltage, cell temperature, individual cell state of charge (SOC), individual cell state of health (SOH), cycle count, pack voltage, and link voltage using a second-order RC battery model. These are used as real-time battery simulation data. Specifically, the individual cell voltage refers to the cell terminal voltage calculated using the RC model algorithm. The cell temperature refers to the cell temperature calculated using the battery temperature model algorithm. The individual cell SOC refers to the cell's state of charge (SOC). The individual cell SOH refers to the cell's state of health (SOH). The cycle count refers to the number of charge-discharge cycles calculated using the CAN Hall sensor simulation current messages on the HIL test bench, combined with the cycle count algorithm. The pack voltage refers to the total battery voltage. The link voltage refers to the bus voltage.

[0023] As described above, this embodiment, by constructing a complete battery model parameter input system and using a second-order RC battery model for comprehensive calculation, can improve the integrity and consistency of simulation data while ensuring calculation accuracy. This provides full-level simulation data support for the HIL test of the BMS, effectively enhancing the comprehensiveness of the test verification.

[0024] In one embodiment of this application, step 105, controlling the hardware-in-the-loop device to output a corresponding physical signal to the BMS device under test based on control commands, includes: Step 501: Send the individual cell voltage from the real-time battery simulation data to the individual cell board to control the individual cell board of the hardware-in-the-loop device to output the corresponding voltage to the BMS device under test; wherein, the individual cell board has 24 independent voltage outputs, which are used to simulate the cell voltage output to the CSC board for cell voltage sampling.

[0025] Step 502: The cell temperature from the real-time battery simulation data is sent to the individual cell temperature board to control the hardware-in-the-loop device's individual cell temperature board to output the corresponding resistance value to the BMS device under test. The individual cell temperature board has 8 resistive outputs, used to simulate the NTC temperature sensor output to the CSC board for cell temperature sampling. The resistance value refers to the resistance value of the simulated NTC temperature sensor.

[0026] As described above, this embodiment converts simulation data into physical signals and outputs them directly to the BMS device under test through the hardware-in-the-loop (HIL) device board. It has the advantages of high system integration, accurate signal output, and simple test wiring. It can realize fast and accurate signal injection of BMS sensor interface, effectively improving the efficiency and reliability of HIL testing.

[0027] In one embodiment of this application, it further includes: Step 601: Send the pack voltage from the real-time battery simulation data to the pack voltage board to control the pack voltage board to output the corresponding high voltage to the BMS device under test; wherein, the pack voltage board is a high voltage board that can output a maximum voltage of 1500V and is used to connect to the CSC board for battery total voltage sampling.

[0028] Step 602: Send the link voltage from the real-time battery simulation data to the link voltage board to control the link voltage board to output the corresponding high voltage to the BMS device under test; wherein, the link voltage board is a high voltage board that can output a maximum voltage of 1500V and is used to connect to the bus voltage sampling of the CSC board.

[0029] Step 603: Interact with the BMS under test via a digital input / output board to acquire the response data of the BMS under test; wherein, the digital input / output board refers to the DIDO board, which is used to test the DO relay output control and DI input signal detection of the device. Digital input / output signals refer to the DO relay output control signal and the DI input signal.

[0030] As described above, this embodiment constructs a complete hardware interface system covering high-voltage analog signals and digital control signals by configuring high-voltage boards and DIDO boards. It has the advantages of high system integration and comprehensive test coverage, and can meet the comprehensive HIL test requirements of BMS under high-voltage systems.

[0031] In one embodiment of this application, step 101, obtaining test parameters and battery model parameters, includes: Step 701: Receive adjustment instructions input in real time; Step 702: Modify the test parameters according to the adjustment instructions; As described above, this embodiment supports real-time modification of test parameters during test execution, which can significantly improve test efficiency and effectively enhance test flexibility.

[0032] In one embodiment of this application, step 101, obtaining test parameters and battery model parameters, includes: Step 801: In response to the battery type switching command, obtain the target battery model parameters and target test parameters corresponding to the target battery type; wherein, the battery type switching command refers to the command used to quickly switch and build the test environment according to different batteries.

[0033] Step 802: Obtain the corresponding second-order resistive-capacitive battery model based on the target battery model parameters; As can be seen from the above description, this embodiment can significantly improve the versatility and model change efficiency of the test system by establishing a parameter library for multiple battery types and supporting one-click switching, and can support the rapid testing and verification of different battery model BMS on the same HIL test bench.

[0034] In one embodiment of this application, step 106, collecting response data from the BMS device under test to complete the test, includes: Step 901: Receive response data from the physical signals executed by the BMS device under test; wherein, the response data refers to the feedback data of the BMS system software on the BMS device under test.

[0035] Step 902: Evaluate the software functionality of the BMS device under test based on the response data; As described above, this embodiment can significantly improve the consistency and reliability of test results by digitally collecting BMS response data and automatically evaluating software functions. It supports the automatic storage and traceability of test data, effectively reduces test errors caused by human factors, and provides data support for the quantitative evaluation of BMS software functions.

[0036] Please refer to Figure 2 The present invention also provides a battery management system testing system 200, including... Test computer 210 is connected to the hardware-in-the-loop device for communication. Hardware-in-the-loop device 220 is used to connect to the BMS device under test and output physical signals; the hardware-in-the-loop device (HIL benchtop device) includes: The system includes: a 24V power supply board to provide low-voltage power to the device under test; a single-cell battery board with 24 independent voltage outputs, simulating cell voltage outputs for sampling on the CSC board; a single-cell temperature board with 8 resistive outputs, simulating NTC temperature sensors for sampling on the CSC board; a terminal temperature board with 4 voltage outputs, simulating the sampling voltage at temperature sampling points for terminal temperature sampling on the CSC board; Pack and Link voltage boards, which are high-voltage boards capable of outputting a maximum voltage of 1500V, used for sampling the total battery voltage and bus voltage on the CSC board, respectively; and a DIDO board for controlling the DO relay output and detecting DI input signals on the test equipment. Other auxiliary equipment, including relays, routers, and other auxiliary equipment used to connect the benchtop equipment; Please refer to Figure 4The device under test, namely the BMS device under test, includes the SBMU board and the CSC board. The CSC board is used to collect cell voltage, cell temperature, terminal temperature, etc. The SBMU board receives the cell data collected from the CSC and collects the total voltage of the battery pack (pack voltage) and the voltage outside the battery pack (link voltage). At the same time, the SBMU board obtains the current message of the simulated CAN Hall sensor from the HIL platform through the CAN bus, and connects to the SBMU board through the DIDO board to simulate the external DI input and DO control output. The industrial control computer (ICC) is the carrier of the entire test system software, used to install and run the entire system software of the HIL test bench, execute test scripts, etc.; it is also the carrier of the HIL platform. The HIL platform includes: NET devices, used to manage network-based measurement and control boards in the HIL test bench; MODBUS devices, used to manage MODBUS-based measurement and control boards (DIDO devices) in the HIL test bench; CAN acquisition and control devices, used to manage CAN-based communication devices (such as BMS boards under test); script strategy tasks, used to manage test strategy scripts; an integrated environment, used for centralized management of the above modules for test projects; and a test computer, the operating computer used by the tester, used to create and manage test projects, provide human-computer interaction during testing, display data, input parameters, and perform execution control, etc.

[0037] The test computer 210 includes a memory 211, a processor 212, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the various steps of a battery management system test method as described above.

[0038] The beneficial effects of the terminal of the present invention are the same as those of the method described above, and will not be repeated here.

[0039] The battery management system testing method and terminal described above are applicable to battery management system testing, especially for simulating various real-world operating conditions. The following detailed embodiments illustrate these methods.

[0040] One embodiment of the present invention is as follows: Step A, refer to the appendix Figure 3 A HIL test bench system was constructed, comprising two parts: the HIL test bench equipment and the HIL platform. The HIL test bench equipment includes 24V power supply boards, individual cell boards, individual cell temperature boards, terminal temperature boards, pack voltage boards, Link voltage boards, DIDO boards, relays and routers, an industrial computer, and the device under test (DUT). The HIL platform includes NET devices, MODBUS devices, CAN data acquisition and control devices, a script strategy task management module, and an integrated environment module. The test computer establishes communication connections with both the industrial computer in the HIL test bench equipment and each module of the HIL platform.

[0041] Step B: Construct a second-order RC battery model. This model requires the following parameters: the OCV-SOC curve for calculating the cell's SOC state; the SOH-cycle count curve for obtaining the cell's health state; second-order RC model parameters including resistances R0 and R1 and capacitances C0 and C1 at different temperatures and SOCs for calculating the cell's terminal voltage; and a battery temperature model including single-cell mass, specific heat capacity, heat exchange coefficient, and surface area for calculating the cell temperature. This invention implements the above model algorithm through a program, eliminating the need for expensive specialized industrial software. (Corresponds to step 101 above.) Step C: Create equipment model parameters and establish the association between the BMS test framework and the battery model. Equipment model parameters include: CSC parameters to determine the number of CSCs, cells, and temperature sampling points; battery initial parameters to set the battery capacity, initial cycle count, initial SOH, and initial SOC to create the battery's initial state; and battery voltage and temperature ranges to set the maximum and minimum values ​​of the single-cell voltage and temperature as limiting parameters for model calculations. This corresponds to step 101 above. Step D, refer to the appendix Figure 4 The BMS system under test is connected to the test bench. The BMS system under test includes an SBMU main board and a CSC slave board. The CSC slave board connects to the individual cell board, the individual cell temperature board, and the terminal temperature board to collect cell voltage, cell temperature, and terminal temperature. The SBMU main board connects to the 24V power supply board, the Pack voltage board, the Link voltage board, and the DIDO board to collect the battery total voltage and bus voltage. It also interacts with the HIL platform via the CAN bus to obtain current messages from the analog CAN Hall sensor, and simultaneously receives DI input signals and outputs DO control signals.

[0042] Step E: The test computer sends a command to run the second-order model algorithm through the script strategy task of the HIL platform, and calculates real-time data such as voltage, temperature, SOC, SOH, and cycle count for all individual cells using device model parameters and battery model parameters. This corresponds to steps 102 and 103 above. Step F: The test computer utilizes the integrated environment of the HIL platform to control the physical quantity output of each board on the HIL test bench in real time via scripts: the individual cell board outputs 24 independent cell voltages calculated in real time to the cell voltage sampling port of the CSC board; the individual cell temperature board outputs 8 NTC thermistor values ​​calculated in real time to the cell temperature sampling port of the CSC board; the terminal temperature board outputs 4 temperature sampling voltages calculated in real time to the terminal temperature sampling port of the CSC board; the Pack voltage board and Link voltage board output the total battery voltage and bus voltage calculated in real time to the voltage sampling port of the SBMU board, respectively; the DIDO board simulates external DI input signals and receives DO relay output control signals. This corresponds to steps 104 and 105 above. Step G: After the SBMU motherboard and CSC of the BMS system under test acquire the simulated physical quantities, the BMS system software is run. The HIL platform monitors the response behavior and data of the BMS system in real time through the CAN acquisition and control equipment, thereby completing the test and verification of the BMS system's functions. (Corresponds to step 106 above.) Step H: By changing the parameters of different equipment models and second-order models according to the test requirements, test environments for different battery characteristics can be quickly set up, enabling the testing of BMS systems for batteries of different specifications. This effectively improves test efficiency and solves the problem of boundary condition testing that cannot be triggered in physical testing.

[0043] The battery model involved in the embodiments of the present invention can be Figure 5 As shown in Table 1, the core components are as follows: Table 1

[0044] The terminal voltage equation is as follows: voltage=OCV(SOC)-V1-V2-current R0 in: OCV(SOC) is the open-circuit voltage, which can be obtained by looking up the table using the SOC-OCV curve; V1 is the polarization voltage of the first RC circuit; V2 is the polarization voltage of the second RC circuit; current R0 is the ohmic voltage drop.

[0045] The formula for updating the voltage in the RC circuit is as follows: V1(t+dt)=V1(t) exp(-dt / (R1 C1))+current R1 (1-exp(-dt / (R1 C1))) V2(t+dt)=V2(t) exp(-dt / (R2 C2))+current R2 (1-exp(-dt / (R2 C2))) The SOC update equation is as follows: SOC(t+dt)=SOC(t)-(current dt) / (3600 capacity SOH) The temperature model is as follows: Joule heat: joule_heat = current² (R0+R1+R2) Heat exchange: heat_transfer=h A (T_battery-T_environment) Temperature change: dT = (joule_heat - heat_transfer) dt / (m cp) Reference Figure 6 The model update process is as follows: 1. Obtain the current (mA→A) 2. Calculate the time step dt 3. Update the cycle count. 4. Update SOH (by looking up the table using soh_func) 5. Update SOC (effective capacity considering the impact of SOH) 6. Update temperature (Joule heating - heat exchange) 7. Update RC parameters (by looking up the table using temp and soc) 8. Update V1 and V2 (RC circuit voltages) 9. Calculate the terminal voltages (OCV-V1-V2-I) R0) 10. Output to CSC simulation data 11. Mapping to HIL devices (SCPI protocol) The model uses a multidimensional lookup table to store parameters that vary with temperature and SOC, as shown in Table 2: Table 2

[0046] OCV-SOC curves are as follows: SOC_POINTS=[0.00,0.10,0.20,0.30,0.40,0.50,0.60,0.70,0.80,0.90,1.00] OCV_POINTS=[2.75,3.20,3.24,3.28,3.29,3.29,3.30,3.33,3.38,3.40,3.46] Uses cubic spline interpolation (kind='cubic'), supports extrapolation.

[0047] The SOH-cycle number curve is shown below (curve data for reference only): CYCLE_POINTS=[0,1000,2000,3000,4000,5000,6000] SOH_POINTS=[1.0,0.95,0.9,0.85,0.8,0.75,0.7] Linear interpolation (kind='linear') is used, and extrapolation is supported. (Curve data is for reference only.) The NTC temperature-resistance meter supports various NTC thermistors with different B-values, such as: NTC10K_B3976_Rt_TABLE-B=3976 NTC10K_B3435_Rt_TABLE-B=3435 Temperature range: -40℃~125℃, using cubic spline interpolation.

[0048] The model state variables are shown in Table 3. Table 3

[0049] In summary, this invention achieves flexible test configuration by acquiring test parameters and battery model parameters; initializes a preset battery model algorithm based on the test parameters to provide different operating conditions; calculates real-time battery simulation data based on the battery model parameters using the preset battery model algorithm to ensure data accuracy; generates control commands for the hardware-in-the-loop device based on the real-time battery simulation data; controls the hardware-in-the-loop device to output corresponding physical signals to the BMS device under test based on the control commands to test the BMS device under test; and collects the response data of the BMS device under test to complete the test. Compared to ordinary test benches that cannot provide full coverage testing, this invention can comprehensively simulate various complex operating conditions; compared to the expensive MATLAB-simulink HIL test bench and its high import technology requirements, this invention uses a preset algorithm to reduce testing costs and implementation complexity; compared to the unreliability of testing methods that modify calibration values, this invention provides accurate simulation data based on model calculations, improving test accuracy; compared to physical test benches that cannot trigger boundary conditions, this invention easily triggers boundary and complex operating conditions through the initialization algorithm, improving test coverage and reliability.

[0050] The above description is merely an embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent modifications made based on the content of the present invention specification and drawings, or direct or indirect applications in related technical fields, are similarly included within the patent protection scope of the present invention.

Claims

1. A battery management system testing method, characterized by, The method includes: Obtain test parameters and battery model parameters; The preset battery model algorithm is initialized based on the test parameters to provide different operating conditions for the battery; Based on the battery model parameters, real-time battery simulation data is calculated using the initialized battery model algorithm. Obtain control commands from hardware-in-the-loop devices; Based on the real-time battery simulation data, the hardware-in-the-loop device is controlled to output corresponding physical signals to the BMS device under test based on the control instructions, so as to test the BMS device under test. The response data of the BMS device under test is collected to complete the test.

2. The battery management system test method of claim 1, wherein, The process of calculating real-time battery simulation data based on the battery model parameters using the initialized battery model algorithm includes: Based on the battery model parameters, real-time battery simulation data is calculated using a second-order RC battery model.

3. The battery management system test method of claim 2, wherein, The acquisition of test parameters and battery model parameters includes: The curves showing the relationship between open-circuit voltage and state of charge, the curves showing the relationship between health state and number of cycles, the parameters of the second-order RC battery model, and the parameters of the battery temperature model are obtained and used as the battery model parameters. Obtain the battery voltage-temperature range as the test parameter.

4. The battery management system test method of claim 3, wherein, The process of calculating real-time battery simulation data based on the battery model parameters using a second-order resistive-capacitive battery model includes: Input the open-circuit voltage versus state of charge curve, the health state versus cycle number curve, the second-order RC battery model parameters, and the battery temperature model parameters into the second-order RC battery model. The second-order RC battery model is used to calculate the individual cell voltage, cell temperature, individual cell state of charge, individual cell health state and cycle number, pack voltage and link voltage as real-time battery simulation data.

5. The battery management system test method of claim 1, wherein, The step of controlling the hardware-in-the-loop device to output corresponding physical signals to the BMS device under test based on the control command includes: The individual cell voltage in the real-time battery simulation data is sent to the individual cell board to control the individual cell board of the hardware-in-the-loop device to output the corresponding voltage to the BMS device under test; The cell temperature from the real-time battery simulation data is sent to the individual cell temperature board to control the individual cell temperature board of the hardware-in-the-loop device to output the corresponding resistance value to the BMS device under test.

6. The battery management system test method of claim 5, wherein, Also includes: The pack voltage in the real-time battery simulation data is sent to the pack voltage board to control the pack voltage board to output the corresponding high voltage to the BMS device under test; The link voltage in the real-time battery simulation data is sent to the link voltage board to control the link voltage board to output the corresponding high voltage to the BMS device under test; The device interacts with the BMS under test via a digital input / output board to collect response data from the BMS under test.

7. The battery management system test method of claim 1, wherein, The acquisition of test parameters and battery model parameters includes: Receive adjustment instructions in real time; Modify the test parameters according to the adjustment instructions.

8. The battery management system test method of claim 1, wherein, Obtain test parameters and battery model parameters, including: In response to a battery type switching command, obtain the target battery model parameters and target test parameters corresponding to the target battery type; The corresponding second-order resistive-capacitive battery model is obtained based on the parameters of the target battery model.

9. The battery management system testing method according to claim 1, characterized in that, The process of collecting response data from the BMS device under test to complete the test includes: Receive response data from the BMS device under test when it executes the physical signal; The software functionality of the BMS device under test is evaluated based on the response data.

10. A battery management system testing system, comprising: Hardware-in-the-loop device, used to connect to the BMS device under test and output physical signals; The test computer is communicatively connected to the hardware-in-the-loop device. The test computer includes a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the computer program to implement each step of the battery management system test method according to any one of claims 1 to 9.