BMS hardware-in-loop test system and method, electronic equipment and storage medium

By integrating the environmental simulation chamber and the HIL test bench, and combining digital twin models and artificial neural networks, the synchronous coupling of electrical signals and the physical environment is achieved, the test scenario is dynamically optimized, the problem of deviation in the evaluation of real working conditions in HIL testing is solved, and the accuracy and coverage of BMS testing are improved.

CN121995145APending Publication Date: 2026-05-08CHONGQING JINKANG NEW ENERGY VEHICLE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHONGQING JINKANG NEW ENERGY VEHICLE CO LTD
Filing Date
2026-02-06
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

Existing HIL testing technology lacks the ability to perform synchronous and coupled testing in real physical environments, resulting in deviations in BMS performance evaluation compared to real complex operating conditions.

Method used

Through the integrated architecture of the environmental simulation chamber and the HIL test bench, synchronous control of electrical signals, temperature and humidity, and vibration is achieved. The test scenario is dynamically optimized using digital twin models and artificial neural network models to generate environmental parameters and battery condition signals that are more in line with actual working conditions.

Benefits of technology

This approach enables BMS performance evaluation results to better reflect real-world complex operating conditions, improves test coverage and robustness, and resolves the evaluation bias problem in existing methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121995145A_ABST
    Figure CN121995145A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a BMS hardware-in-the-loop testing system and method, electronic equipment and a storage medium, and relates to the technical field of battery management system testing. The system comprises a simulation machine, an environment simulation cabin, a test bench and a BMS hardware test board, and the simulation machine is used for generating an environment parameter signal and a battery working condition signal and dynamically adjusting test parameters according to a response instruction returned by the BMS hardware test board; the environment simulation cabin is used for adjusting environment parameters of the environment where the BMS hardware test board is located based on the environment parameter signals; and the test bench is used for simulating a battery signal based on the battery working condition signal. According to the method, the coupling effect of the synchronous simulation electric signal and the physical environment is achieved, the test scene can be dynamically optimized according to the real-time response of the BMS, multiple test scenes are covered, the test result is more suitable for the real and complex working conditions of the BMS, and the problem that the BMS performance evaluation by an existing method has deviation compared with the real and complex working conditions is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of battery management system testing technology, and more specifically, to a BMS hardware-in-the-loop testing system, method, electronic device, and storage medium. Background Technology

[0002] Existing HIL testing technology simulates battery electrical signals using a HIL bench, but lacks the ability to synchronously couple testing with real physical environments (such as temperature, humidity, and vibration). Furthermore, the adjustment of environmental parameters relies on manual intervention, resulting in a deviation between the performance evaluation of the BMS and the performance evaluation under real complex operating conditions. Summary of the Invention

[0003] The purpose of this application is to provide a hardware-in-the-loop (HIL) testing system, method, electronic device, and storage medium for a BMS. Through the integrated architecture of an environmental simulation chamber and a HIL test bench, it achieves the coupling effect of synchronously simulating electrical signals and the physical environment. It can also dynamically optimize the test scenario based on the real-time response of the BMS, covering a variety of test scenarios, so that the test results are more in line with the real complex operating conditions of the BMS. This solves the problem that the performance evaluation of the BMS in the existing methods deviates from the real complex operating conditions.

[0004] In a first aspect, this application provides a BMS hardware-in-the-loop testing system, comprising: a simulator, an environmental simulation chamber, a test bench, and a BMS hardware test board. The simulator is connected to the environmental simulation chamber, the test bench, and the BMS hardware test board. The BMS hardware test board is disposed within the environmental simulation chamber and connected to the test bench. The simulator is used to load a target extreme environment scenario, generate environmental parameter signals and battery condition signals, and dynamically adjust test parameters according to response instructions returned by the BMS hardware test board. The environmental simulation chamber is used to receive the environmental parameter signals and adjust the environmental parameters of the environment in which the BMS hardware test board is located based on the environmental parameter signals. The test bench is used to simulate battery signals based on the battery condition signals. The BMS hardware test board is used to receive the simulated battery signals and return response instructions to the simulator.

[0005] In the technical solution of this application embodiment, the system achieves synchronous control of electrical signals, temperature and humidity, and vibration through the integrated architecture of environmental simulation chamber and HIL test bench, and can realize the coupling effect of synchronous simulation of electrical signals and physical environment; and realizes dynamic closed-loop verification by dynamically optimizing test scenarios according to BMS real-time response, with a wider test coverage, and solves the problem that the performance evaluation of BMS by existing methods is biased compared with real complex working conditions.

[0006] Secondly, this application provides a testing method based on a BMS (Body Management System) hardware-in-the-loop test system, applied to a simulator. The method includes: loading a target extreme environment scenario, generating environmental parameter signals and battery condition signals; sending the environmental parameter signals to an environment simulation chamber, causing the environment simulation chamber to adjust the environmental parameters of the environment in which the BMS hardware test board is located based on the environmental parameter signals; sending the battery condition signals to a test bench, causing the test bench to simulate battery signals based on the battery condition signals and send them to the BMS hardware test board; and dynamically adjusting the environmental parameter signals and battery condition signals according to the response instructions returned by the BMS hardware test board. This method synchronously simulates the real environment and battery condition signals, and dynamically adjusts the test parameters based on the feedback from the BMS hardware test board, achieving synchronous simulation of the coupling effect between electrical signals and the physical environment. Furthermore, it can dynamically optimize the test scenario based on the real-time response of the BMS, covering multiple test scenarios, making the test results more closely resemble the real complex operating conditions of the BMS, and solving the problem of deviations in the performance evaluation of the BMS compared to real complex operating conditions in existing methods.

[0007] In some embodiments, the simulator incorporates a digital twin model. Before the step of loading the target extreme environment scenario and generating environmental parameter signals and battery condition signals, the method further includes: constructing the digital twin model based on a physical model and historical fault data. By utilizing physical laws and historical fault data to construct the digital twin model, dynamic coupling of temperature, vibration, and humidity parameters is achieved, resulting in environmental parameter signals that more closely resemble actual operating conditions.

[0008] In some embodiments, the physical model includes a thermodynamic model, a vibration transmission model, and a humidity diffusion model. Constructing the digital twin model based on the physical model and historical fault data includes: simulating the cabin temperature distribution based on the thermodynamic model; simulating the stress distribution of the BMS hardware test board under vibration based on the vibration transmission model; calculating the cabin humidity field based on Fick's diffusion law and the saturated vapor pressure equation using the humidity diffusion model; and establishing a fault rule base using the historical fault data to generate fault injection commands. Utilizing the physical model to achieve dynamic coupling of temperature, vibration, and humidity parameters more closely resembles the real physical environment. The fault rule base can be used to trigger the generation of fault injection commands, covering various complex test scenarios and improving the robustness verification capability of the BMS across all scenarios.

[0009] In some embodiments, loading a target extreme environment scenario and generating environmental parameter signals and battery condition signals includes: dynamically obtaining environmental parameter signals through coupled calculation using a physical model; correcting the prediction deviation of the environmental parameter signals using an artificial neural network model to obtain an environmental time-series curve; generating an ideal battery condition signal based on the environmental time-series curve; and obtaining a battery condition signal with faults and / or drift by performing coupled calculations based on the environmental time-series curve and the ideal battery condition signal. Correcting the deviation of the physical model's prediction values ​​using an artificial neural network model makes the obtained environmental parameter signals more closely resemble the real physical environment; simulation through electrical signal fault injection enhances the robustness verification capability of the BMS across all scenarios; and calculating temperature sampling drift caused by target extreme scenarios such as high temperature and high vibration makes the BMS feedback more realistic and accurate.

[0010] In some embodiments, coupled calculations using physical models are employed to dynamically obtain environmental parameter signals, including: calculating the heat generated by vibration using a vibration transmission model; obtaining a temperature field based on the heat and the thermodynamic model; updating the vibration model and humidity model based on the temperature field; and recalculating the temperature field using the thermodynamic model if new condensation occurs to obtain the current environmental parameter signals. Thermodynamics, humidity, and vibration interact with each other and can be solved simultaneously based on the thermodynamic model, vibration transmission model, and humidity diffusion model, with iterative solutions performed when new condensation occurs, resulting in environmental parameter signals that better reflect the actual physical environment.

[0011] In some embodiments, an artificial neural network model is used to correct the prediction bias of the environmental parameter signal to obtain an environmental time-series curve. This includes: obtaining an error sequence between the environmental parameter signal and the actual sensor measurement values ​​within the most recent preset time period; inputting the error sequence into a trained LSTM model to obtain an error estimate of the current environmental parameter signal; and obtaining an environmental time-series curve based on the error estimate and the environmental parameter signal. Using an artificial neural network model to correct the prediction bias of the physical model makes the obtained environmental time-series curve more realistic and accurate.

[0012] In some embodiments, generating an ideal battery operating condition signal based on the environmental time-series curve includes: obtaining the internal resistance change and voltage fluctuation based on the temperature change in the environmental time-series curve; obtaining the contact impedance based on the vibration change in the environmental time-series curve; and obtaining the insulation resistance based on the humidity change in the environmental time-series curve. The ideal battery operating condition signal is obtained by mapping environmental parameters such as temperature, humidity, and vibration.

[0013] In some embodiments, a battery operating condition signal with drift is obtained by coupling calculation based on the environmental time-series curve and the ideal battery operating condition signal. This includes: calculating a piezoresistive sensitivity coefficient based on stress and temperature data in the environmental time-series curve using the piezoresistive effect; obtaining the resistance change using the piezoresistive sensitivity coefficient; obtaining a drift voltage based on the resistance change and the corresponding sensing current; and superimposing the drift voltage onto the ideal battery operating condition signal to obtain the battery operating condition signal with drift. Stress and temperature changes can cause temperature sampling drift; therefore, obtaining a battery operating condition signal with drift facilitates the accuracy of BMS temperature sampling results.

[0014] In some embodiments, a faulty battery condition signal is obtained by coupled calculation based on the environmental time-series curve and the ideal battery condition signal. This includes: if logical judgment is performed based on the environmental time-series curve and the ideal battery condition signal, and it is determined that a corresponding fault injection instruction in the fault rule base has been triggered, then a faulty battery condition signal is generated. Battery fault simulation is performed using the faulty battery condition signal, improving the robustness verification capability of the BMS across all scenarios.

[0015] In some embodiments, dynamically adjusting the environmental parameter signals and battery condition signals according to the response commands returned by the BMS hardware test board includes: acquiring key feedback signals from the response commands; and dynamically adjusting the environmental parameter signals and / or battery condition signals based on the key feedback signals. Acquiring key feedback signals from the BMS response data allows for dynamic adjustment of test intensity and environmental parameters, enabling adaptive limit testing.

[0016] In some embodiments, dynamically adjusting the environmental parameter signals and / or battery condition signals based on the key feedback signals includes: strengthening the environmental parameter signals if the BMS hardware test board does not trigger low-temperature protection at a set low temperature; triggering a fault injection command if the communication bit error rate is less than a threshold; weakening the environmental parameter signals if the BMS hardware test board triggers protection multiple times at high temperatures; and reproducing the fault based on the environmental parameter signals within a set time period before the anomaly if the BMS hardware test board experiences an abnormal sampling value jump. Dynamic testing adjustments such as intensity upgrades, intensity downgrades, and fault reproduction are performed based on the key feedback signals.

[0017] Fourthly, this application provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor runs the computer program to enable the electronic device to perform the above-described vehicle-mounted intelligent agent control method.

[0018] Fifthly, this application provides a readable storage medium storing computer program instructions, which are read and executed by a processor to perform the above-described vehicle-mounted intelligent agent control method. Attached Figure Description

[0019] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 This application provides a schematic diagram of the structure of a BMS hardware-in-the-loop test system. Figure 2 A flowchart of a test method based on the above-described BMS hardware-in-the-loop test system provided in this application embodiment; Figure 3 A flowchart illustrating the generation of environmental parameter signals and battery operating condition signals provided in the embodiments of this application; Figure 4 This is a flowchart illustrating the specific generation process of environmental parameter signals provided in the embodiments of this application. Figure 5 A flowchart for deviation correction provided in the embodiments of this application; Figure 6 A flowchart for obtaining battery operating condition signals with drift amount provided in the embodiments of this application; Figure 7 A flowchart illustrating the dynamic adjustment of test parameters provided in the embodiments of this application; Figure 8 A flowchart of a test method based on a BMS hardware-in-the-loop test system is provided for an embodiment of this application.

[0021] icon: 100 - Simulator; 200 - Test bench; 300 - Environmental simulation chamber. Detailed Implementation

[0022] The technical solutions in the embodiments of this application will now be described with reference to the accompanying drawings.

[0023] It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, in the description of this application, terms such as "first," "second," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0024] Traditional BMS (Battery Management System) testing methods involve separate simulations of laboratory conditions, such as temperature. While existing HIL (Hardware-in-the-Loop) testing technology simulates battery electrical signals using a HIL bench, it lacks the ability to synchronously couple testing with real physical environments (such as temperature, humidity, and vibration). Furthermore, the separation between environmental simulation and HIL testing prevents real-time data exchange, leading to discrepancies between BMS performance evaluations and those conducted under real-world, complex operating conditions.

[0025] To address the aforementioned technical issues, this application provides a BMS hardware-in-the-loop testing system. This system uses a digital twin model to load a target extreme scenario, generating environmental parameter signals and corresponding battery condition signals. The environmental chamber synchronously adjusts temperature, humidity, and vibration based on the environmental parameter signals, while the HIL test bench 200 simulates battery output based on the battery condition signals. BMS response data is transmitted back to the model in real time, dynamically adjusting test parameters. Through the integrated architecture of the environmental simulation chamber 300 and the HIL test bench, this system achieves synchronous simulation of the coupling between electrical signals and the physical environment. Furthermore, it can dynamically optimize the test scenario based on the real-time response of the BMS, covering multiple test scenarios. This makes the test results more closely resemble the real complex operating conditions of the BMS, solving the problem of deviations in existing methods' BMS performance evaluation compared to real complex operating conditions.

[0026] Please refer to Figure 1 , Figure 1 This is a schematic diagram of a BMS hardware-in-the-loop testing system provided in an embodiment of this application. The system includes a simulator 100, an environment simulation chamber 300, a test bench 200, and a BMS hardware test board. The simulator 100 is connected to the environment simulation chamber 300, the test bench 200, and the BMS hardware test board. The BMS hardware test board is disposed inside the environment simulation chamber 300 and connected to the test bench 200. Simulator 100 is used to load target extreme environment scenarios, generate environmental parameter signals and battery condition signals, and dynamically adjust test parameters according to the response instructions returned by the BMS hardware test board. The environment simulation chamber 300 is used to receive environmental parameter signals and adjust the environmental parameters of the environment in which the BMS hardware test board is located based on the environmental parameter signals. Test bench 200 is used to simulate battery signals based on battery condition signals; The BMS hardware test board is used to receive simulated battery signals and send response commands back to the simulator 100.

[0027] The BMS hardware test board, also known as the BMS master-slave board, is located within the environmental simulation chamber 300. The chamber employs a double-layer thermal insulation design, enabling rapid temperature changes (temperature change rate ≥10℃ / min). Internally, it integrates a temperature control module (-50℃ to +100℃), a high-frequency vibration module (5-2000Hz), and a humidity control module (5%-95%RH). These modules are used to adjust the temperature, humidity, and vibration within the environmental simulation chamber 300 based on environmental parameter signals. The boards are modularly installed for quick replacement. The chamber walls are pre-installed with high-density waterproof and shock-resistant connectors, including power, CAN (Controller Area Network) / LIN (Local Interconnect Network) communication interfaces, and sensor signal interfaces. These connectors support rapid connection of the BMS master-slave board wiring harnesses and are mounted on shock-absorbing bases on the side walls of the chamber, minimizing contact failures caused by vibration transmission. The power, communication, and analog signal interfaces within the environmental simulation chamber 300 are isolated in separate areas to prevent electromagnetic interference.

[0028] The environmental simulation chamber 300 is also equipped with sensors, such as temperature and humidity sensors and accelerometers, which can transmit sensor data back to the simulator 100 to realize PID closed-loop control of environmental parameters.

[0029] The test bench 200 can specifically use the HIL test bench. The BMS hardware master and slave boards are connected to the HIL test bench through connectors. The HIL test bench receives simulated battery signals (voltage / current / temperature) and feeds back the BMS control commands to the simulator 100 to form a closed-loop verification.

[0030] BMS response data is fed back to the model to achieve a closed loop of testing-optimization iteration.

[0031] Simulator 100 uses a physical model to couple and generate time-series curves for temperature / vibration / humidity (resolution ≤10ms), and simultaneously performs electrical signal mapping to generate battery condition signals: for example, temperature changes are mapped to internal resistance changes to obtain voltage fluctuations; and the battery condition signals can be injected with a "temperature sensor failure" based on satisfied trigger conditions, such as vibration >1000Hz, to obtain battery condition signals with injected fault commands. Simulator 100 synchronously sends the generated environmental parameter signals and battery condition signals to the actuators (temperature control / vibration / humidity modules) of the environmental simulation chamber 300 and the HIL test bench (battery simulator, load simulator), respectively. For timing synchronization, EtherCAT (Ethernet Control Automation Technology) clocks synchronize the execution commands of the environmental simulation chamber 300 and the HIL test bench with an error ≤1ms.

[0032] The system is also scalable, allowing multiple environmental simulation chambers to be connected in parallel (master-slave mode) to synchronously simulate multi-node collaborative scenarios of a distributed BMS (such as the master control board in a high-temperature chamber and the slave board in a low-temperature chamber). It also supports the access of third-party devices (such as salt spray chambers).

[0033] Based on the Python / Simulink test case library, it supports one-click loading of scenarios (such as desert high temperature + sandstorm vibration), automatically executes the entire process of environmental parameter adjustment, fault injection, and data recording; and automatically increases environmental stress (such as increasing vibration frequency or humidity) based on BMS real-time performance data (such as ADC sampling accuracy decline), to achieve adaptive testing under extreme conditions.

[0034] The system adopts an integrated design, and through the integrated architecture of the environmental simulation chamber 300 and the HIL test bench, it realizes synchronous control and data closed loop of electrical signals, temperature and humidity, and vibration, covering a variety of test scenarios, so that the test results are more consistent with the real complex working conditions of BMS.

[0035] Please refer to Figure 2 , Figure 2 The flowchart of a test method based on the above-mentioned BMS hardware-in-the-loop test system provided in this application should be understood to be related to... Figure 1 The system corresponds to this, and the steps involved in the method can be executed based on this system. The specific functions of this system can be found in the description above. The method includes the following steps: S110: Load the target extreme environment scenario and generate environmental parameter signals and battery condition signals; S120: Send environmental parameter signals to the environmental simulation chamber 300 so that the environmental simulation chamber 300 adjusts the environmental parameters of the environment in which the BMS hardware test board is located based on the environmental parameter signals. S130: Send the battery condition signal to the test bench 200 so that the test bench 200 can simulate the battery signal based on the battery condition signal and send it to the BMS hardware test board. S140: Dynamically adjusts environmental parameter signals and battery status signals based on the response commands returned by the BMS hardware test board.

[0036] For example, in extreme environmental scenarios such as "desert high temperature + sandstorm", preset parameters such as environmental baseline parameters: temperature=60℃, vibration=200Hz, humidity=10%RH, and battery baseline parameters: SOC=90% and SOH=95% are called to load the scenario.

[0037] This method synchronously simulates real-world environmental and battery operating condition signals, and dynamically adjusts test parameters based on feedback from the BMS hardware test board. It achieves synchronous simulation of the coupling effect between electrical signals and the physical environment, and can dynamically optimize test scenarios based on the real-time response of the BMS, covering multiple test scenarios. This makes the test results more consistent with the real complex operating conditions of the BMS, and solves the problem that existing methods have deviations in BMS performance evaluation compared to real complex operating conditions.

[0038] In some embodiments, the simulator 100 incorporates a digital twin model, and the environmental parameter signal and battery condition signal are coupled and generated based on the digital twin model. Before the step of generating the environmental parameter signal and battery condition signal by loading the target extreme environment scenario, the method further includes: A digital twin model is built based on a physics model and historical fault data.

[0039] The digital twin model can cover a variety of complex scenarios (such as more than 90% of risk conditions): using historical fault data (from the real vehicle fault database), such as polar / desert scenarios, it can cover 70% of known risks. In addition, it can generate a variety of scenarios using a physics model: using a multiphysics model to generate extreme combinations (such as temperature -40℃ + humidity 95%RH + vibration 2000Hz).

[0040] Digital twin models are used to generate complex scenarios in real time, covering potential risk conditions and meeting the needs of BMS testing.

[0041] In some embodiments, the physical model includes a thermodynamic model, a vibration transmission model, and a humidity diffusion model. A digital twin model is constructed based on the physical model and historical fault data, including: Simulation of cabin temperature distribution based on thermodynamic model: ; in, Indicates air density, Indicates specific heat capacity. Indicates the cabin temperature. Indicates thermal conductivity. This represents the vibrational heat generation term output by the vibrational transmission model, and... ,in, The efficiency coefficient representing the conversion of mechanical energy into heat energy. Indicates frequency; The spectrum representing vibration acceleration; This represents the latent heat of humidity term output by the humidity diffusion model, which is the latent heat released when water vapor condenses. When a liquid evaporates, it absorbs latent heat. Its magnitude is determined by the water vapor phase change rate and the latent heat constant; The vibration transmission model is based on the finite element method (FEM) to simulate the stress distribution of the BMS hardware test board under vibration environment: ; in, M This indicates the quality of the BMS hardware test board. C Indicates damping, K Represents the stiffness matrix. Indicates excitation force. t Indicates time, x Indicates stress; The humidity diffusion model, based on Fick's diffusion law and the saturated water vapor pressure equation, calculates the humidity field inside the cabin. The water vapor diffusion coefficient in the humidity diffusion model is... D It is affected by temperature; the higher the temperature, the faster the diffusion. A fault rule base is established using historical fault data to generate fault injection instructions.

[0042] The thermodynamic model is based on Fourier's heat conduction equation and fluid dynamics (CFD) to establish a temperature distribution model inside the cabin. The physical model is implemented based on the thermodynamic model, vibration transmission model, and humidity diffusion model. These models influence each other and can be solved simultaneously: within a time step, the above equations are processed simultaneously. For example, the heat generated by vibration is calculated first. Substitute this into the thermodynamic equations to solve for the temperature field; then update the vibration model with the new temperature field. C and K and humidity model D Finally, it is determined whether new condensation has occurred (condensation changes the thermal state of the system, which is fed back to the thermodynamic model for recalculation. Latent heat is released when water vapor condenses). (The thermodynamic model uses this new heat to recalculate the current temperature). This process is repeated to simulate the coupling effect, thus obtaining more realistic environmental simulation results.

[0043] The historical fault database is a database that stores records of historical fault events that actually occurred. Each record represents a specific, already-occurring event. The fault rule database is a collection of rules derived from the analysis and refinement of historical data, including multiple "IF-THEN" statements. IF is used to determine whether a logical condition is met, and THEN is used to trigger the corresponding fault injection instruction. Such a rule can cover multiple potential fault scenarios that meet the conditions.

[0044] Please refer to Figure 3 , Figure 3 A flowchart illustrating the generation of environmental parameter signals and battery condition signals. In some embodiments, loading a target extreme environment scenario and generating environmental parameter signals and battery condition signals includes: S210: Utilizes a physical model for coupled calculations to dynamically obtain environmental parameter signals; S220: Use an artificial neural network model to correct the prediction bias of environmental parameter signals and obtain environmental time series curves; S230: Generates ideal battery operating condition signals based on environmental time-series curves; S240: Based on the coupled calculation of environmental time-series curves and ideal battery operating condition signals, a battery operating condition signal with fault and / or drift is obtained.

[0045] The faulty battery status signal sent to the HIL test bench carries a battery fault injection command, so that the BMS receives a faulty battery signal.

[0046] The digital twin model generates two main lines in parallel and coupled according to the target scenario: an environmental time-series curve (for the environmental simulation chamber 300) and an ideal battery condition signal (for the HIL test bench). Based on the coupled calculation of real-time physical states (such as stress, temperature, and humidity), a fault rule base is queried. If triggered, the ideal battery condition signal is modified to generate a faulty battery condition signal. The environmental time-series curve and the final battery condition signal are synchronously sent to the environmental simulation chamber 300 and the HIL test bench for execution, respectively. The responses of the BMS master and slave boards are monitored, forming a closed loop.

[0047] Regarding drift, high temperature and high vibration environments can cause temperature sampling drift on the BMS master and slave boards. Therefore, the digital twin model calculates the drift amount in advance, allowing the HIL test bench to use this drift amount to change the output analog voltage signal, making the temperature sampling results of the BMS master and slave boards closer to the true value.

[0048] It can inject electrical signal faults such as overvoltage / undervoltage, CAN communication frame loss and physical environmental changes such as sudden temperature drop + humidity surge. It can also realize arbitrary combination and dynamic switching of temperature, vibration and humidity to realistically reproduce extreme working conditions. Therefore, it can generate battery working condition signals with fault and drift amount according to the simulation needs, or either fault or drift amount, without any limitation.

[0049] Please refer to Figure 4 , Figure 4 This is a flowchart illustrating the specific generation process of environmental parameter signals. In some embodiments, environmental parameter signals are dynamically obtained through coupled calculations using a physical model, including: S211: Calculate the heat generated by vibration using a vibration transmission model; S212: Temperature field obtained based on thermal and thermodynamic models; S213: Update vibration and humidity models based on temperature field; S214: If new condensation occurs, the temperature field is recalculated using a thermodynamic model to obtain the current environmental parameter signals.

[0050] First, calculate the heat generated by the vibration. The temperature field is solved by substituting it into the thermodynamic equations; the vibration model and humidity model are then updated with the new temperature field; finally, it is determined whether new condensation has occurred. If new condensation has occurred, the thermal state of the system will be changed and fed back to the thermodynamic model for recalculation.

[0051] The thermodynamic model, vibration transmission model, and humidity model here form an interconnected system. Through iterative calculations, the interaction between temperature, humidity, and vibration in the real environment is simulated, resulting in environmental parameter signals that are closer to the real environment.

[0052] Please refer to Figure 5 , Figure 5 This is a flowchart for bias correction. In some embodiments, an artificial neural network model is used to correct the prediction bias of environmental parameter signals to obtain an environmental time-series curve, including: S221: Obtain the error sequence between environmental parameter signals and actual sensor measurements within the most recent preset time period; S222: Input the error sequence into the trained LSTM model to obtain the error estimate of the current environmental parameter signal; S223: Obtain environmental time-series curves based on error estimation and environmental parameter signals.

[0053] In actual operation, the digital twin model calculates the predicted environmental parameter signal P_predicted based on the current state. Simultaneously, the error sequence over a recent period (e.g., the past 10 seconds) is input into the pre-trained LSTM (Long Short-Term Memory) model. The LSTM model outputs an error estimate, Error_estimated, for the current prediction, and the corrected value is output as the final instruction: P_final = P_predicted + Error_estimated The error sequence input to the LSTM model here is the error sequence between the "model's predicted value (environmental parameter signal)" and the "sensor's actual measurement value." For example, the error sequence for the past 10 seconds is calculated from the model's predicted value at each time step and the sensor's actual measurement value at each time step. The LSTM model learns the pattern of this error sequence changing over time. For example, it might discover that whenever the temperature rises rapidly, the model's predicted value is always half a beat slower than the actual value (the error is negative). Therefore, the LSTM model can also predict the current error based on the trend of the last 10 seconds and then correct the model's predicted value.

[0054] During the training phase of the LSTM model, a large amount of historical test data is collected, including: environmental settings input to the physical model. The physical model predicts environmental parameters (such as predicted temperature Tp) and the sensors measure actual environmental parameters (such as actual temperature Ta). The LSTM model is trained to learn the mapping relationship from [current and historical physical model inputs, historical physical model predictions, historical actual values] to [current prediction error (Ta-Tp)], and to learn the systematic bias of the physical model under specific operating conditions (such as rapid temperature changes).

[0055] LSTM models are used to correct prediction biases in physical models. In the process of using physical models to predict environmental parameters in real time, LSTM models are used to correct the predicted values, so that the obtained environmental time series curves are more in line with the actual physical environment.

[0056] In some embodiments, generating an ideal battery operating condition signal based on an environmental time-series curve includes: Based on the temperature changes in the environmental time series curve, the internal resistance change and voltage fluctuation are obtained; Contact impedance is obtained based on vibration changes in environmental time-series curves. Insulation resistance is obtained based on humidity changes in the environmental time-series curve.

[0057] The specific electrical signal mapping rules are as follows: Temperature changes will cause changes in internal resistance: This leads to voltage fluctuations: Ultimately, this will also affect the sampled values ​​of individual unit voltage, total voltage, and current; among them, This represents the change in internal resistance. Indicates at reference temperature T Nominal internal resistance of the battery at 0°C; The activation energy coefficient is obtained by fitting battery internal resistance test data at different temperatures, and describes the sensitivity of the battery's internal electrochemical reactions to temperature. T This indicates the current absolute temperature; OCV ( SOC This indicates the battery's open-circuit voltage.I This indicates the current flowing through the battery; Vibration changes can cause changes in contact resistance: This can lead to poor contact at the voltage sampling point, introducing high-frequency noise or DC bias, ultimately affecting voltage sampling noise and the bit error rate of CAN communication; among which, Indicates the instantaneous contact resistance under vibration. This indicates the nominal value of the contact resistance under static conditions. Indicates the vibration-resistance coupling coefficient. The spectrum representing vibration acceleration; Changes in humidity will cause changes in insulation resistance: This leads to leakage current, ultimately affecting system current measurements, insulation resistance to ground, and potentially causing ADC reference voltage drift. Indicates the current insulation resistance. Indicates the reference relative humidity H The nominal value of insulation resistance at 0°C This represents the humidity sensitivity coefficient, which is obtained by fitting test data. H This indicates the current relative humidity.

[0058] By utilizing the timing matching algorithm in the digital twin model, the digital twin model can generate battery operating condition signals that are linked to physical environmental parameters in real time. Using the aforementioned electrical signal mapping rules, ideal battery operating condition signals are generated, conforming to the requirements of temperature, humidity, and vibration changes in environmental parameters, making the simulation process closer to actual operating conditions.

[0059] Please refer to Figure 6 , Figure 6 A flowchart for obtaining battery operating condition signals with drift is provided. In some embodiments, the battery operating condition signal with drift is obtained by coupled calculation based on environmental time-series curves and ideal battery operating condition signals, including: S241: The piezoresistive sensitivity coefficient is calculated based on the stress and temperature data in the environmental time series curve through the piezoresistive effect. S242: Obtain the resistance change using the piezoresistive sensitivity coefficient; S243: Drift voltage is obtained based on the change in resistance and the corresponding sensing current; S244: Superimpose the drift voltage onto the ideal battery condition signal to obtain a battery condition signal with drift.

[0060] For example, taking "high temperature and high vibration environments will cause temperature sampling drift" as an example, the target scenario is "desert high temperature 60℃ + random vibration (100-500Hz)". The thermodynamic model calculates the temperature distribution of the BMS master and slave boards, and the vibration model calculates the mechanical stress at the temperature sensor solder joints and other locations on the BMS master and slave boards. By using the calculated stress and temperature data, the piezoresistive sensitivity coefficient is calculated through the piezoresistive effect, and then the instantaneous resistance change is obtained. ,Depend on and the sensing current of this branch The drift voltage is calculated, and the HIL test bench adds this drift amount to the generated voltage signal at corresponding moments when simulating battery signals. Specifically, the HIL test bench simulates the result caused by "resistance change" by modifying the voltage signal input to the BMS. When the resistance changes, the current flowing through the negative temperature coefficient thermistor (NTC) changes, and the voltage drop across the NTC also changes accordingly. The HIL test bench uses this drift amount to modify its output analog voltage signal.

[0061] Temperature sampling itself is achieved by measuring voltage. Temperature sampling on a BMS typically uses a negative temperature coefficient thermistor, whose resistance value changes with temperature. The BMS measures the voltage across the NTC and then calculates the corresponding temperature value based on this voltage value by looking up a table or formula.

[0062] The above-mentioned sensing current It is a virtual parameter used within the digital twin model to calculate the equivalent voltage drift. It is calculated based on the nominal resistance and supply voltage of the simulated components on the BMS master and slave boards.

[0063] Therefore, by superimposing a drift voltage onto the ideal battery operating condition signal, the HIL test bench will superimpose this drift amount onto the generated voltage signal at the corresponding moment when simulating the battery signal, thereby solving the problem of temperature sampling drift caused by the BMS master and slave boards under high temperature and high vibration environments.

[0064] In some embodiments, a coupled calculation is performed based on environmental time-series curves and ideal battery operating condition signals to obtain a faulty battery operating condition signal, including: If logical judgment is made based on the environmental timing curve and the ideal battery condition signal, and it is determined that the corresponding fault injection instruction in the fault rule base has been triggered, then a battery condition signal with fault is generated.

[0065] If the triggering conditions are met, a fault injection command is generated. For example, if the vibration is greater than 1000Hz, a "temperature sensor failure" command is injected.

[0066] It can realize the joint injection of multiple faults: such as the simulation of combined faults of abnormal electrical signals and sudden changes in physical environment (such as high temperature + communication interference), which improves the robustness verification capability of BMS in all scenarios.

[0067] Please refer to Figure 7 , Figure 7 This is a flowchart illustrating the dynamic adjustment of test parameters. In some embodiments, the environmental parameter signals and battery status signals are dynamically adjusted based on the response commands returned by the BMS hardware test board, including: S141: Obtain key feedback signals from the response command; S142: Dynamically adjust environmental parameter signals and / or battery condition signals based on key feedback signals.

[0068] Key feedback signals include: protection actions, such as overvoltage / undervoltage protection triggering and relay disconnection timing; communication status, such as CAN / LIN communication bit error rate and frame loss rate; sampling accuracy, such as the deviation between voltage / temperature sampled values ​​and HIL reference values; and control strategies, such as equalization current magnitude and SOC estimation jumps.

[0069] The key feedback signals reflect the response of the BMS hardware test board. Therefore, the test intensity and environmental parameters can be optimized in real time based on the BMS response data to achieve adaptive limit testing.

[0070] In some embodiments, dynamically adjusting environmental parameter signals and / or battery condition signals based on key feedback signals includes: If the BMS hardware test board does not trigger low temperature protection at the set low temperature, then strengthen the environmental parameter signal; If the communication error rate is less than the threshold, a fault injection command is triggered. If the BMS hardware test board triggers protection multiple times at high temperatures, the environmental parameter signal will be weakened. If the BMS hardware test board experiences an abnormal change in sampled values, the fault will be reproduced based on the environmental parameter signals within a set time period before the abnormality.

[0071] Dynamic adjustments include intensity upgrades, intensity downgrades, and fault reproduction. For intensity upgrades, specifically: if the BMS does not trigger low-temperature protection at -30℃, the temperature rate is automatically increased, for example, from 10℃ / min to 15℃ / min, and vibration is superimposed, such as from 50Hz to 200Hz random spectrum. If the communication error rate is less than the threshold, a fault is injected: triggering a "humidity condensation causing CAN short circuit" event, and simultaneously injecting a battery voltage spike (±20% sudden change). For intensity downgrades, specifically: if the BMS repeatedly triggers protection falsely at high temperatures, stress needs to be reduced: lowering the upper temperature limit, for example, from 80℃ to 70℃, shutting down the vibration module, and focusing on electrical signal testing. For fault reproduction, if the BMS experiences an anomaly (such as a jump in sampled values), automatic playback is performed: extracting environmental parameters (temperature + vibration + humidity combination) from 10 seconds before the anomaly, and executing this parameter combination 3 times in a loop to assist in locating the root cause.

[0072] The optimized parameters drive a new round of testing until the BMS reaches the failure boundary.

[0073] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions in this application will be clearly and completely described below. In some embodiments, please refer to... Figure 8 , Figure 8 This application provides a flowchart of a test method based on a BMS (Hardware-in-the-Loop) test system, the method comprising: S301: Fix the BMS master and slave boards inside the environmental simulation chamber 300, and connect the wiring harness to the HIL bench through the pre-installed connectors; S302: The digital twin model loads the target extreme scenario (such as -40℃ + random vibration + sudden change in humidity) to generate environmental parameters and corresponding battery operating condition signals (such as single cell overvoltage, sudden change in temperature). S303: Environmental simulation chamber 300 synchronously regulates temperature, humidity and vibration, HIL bench simulates battery output; S304: The BMS master and slave boards transmit response data back to the digital twin model in real time, dynamically adjusting test parameters; S305: Records data on the protection actions, communication stability, sampling accuracy, environmental robustness, and fault recovery capability of the BMS master and slave boards in a coupled environment, and generates a robustness assessment report.

[0074] The data sources for the indicators include hardware-level acquisition and software-level analysis. Hardware-level acquisition includes the 300 sensors in the environmental simulation chamber: temperature / humidity / vibration accelerometers (direct physical quantities); the HIL bench: reference values ​​(true voltage / current values) output by the high-precision battery simulator and fault injection records (timestamp, type, intensity); BMS response signals: communication messages captured by the CAN bus analyzer (raw data) and BMS relay drive pin levels (acquired by the IO card). Software-level analysis includes BMS output data: voltage / temperature sampled values ​​(returned via CAN / LIN) and SOC / SOH estimation results, equalization status codes; HIL benchmark comparison: voltage sampling error = |BMS reported value - HIL output true value|; temperature drift = |BMS temperature sampling - environmental chamber thermocouple measurement value|.

[0075] The specific calculation methods for the indicator data are shown in the table below:

[0076] Among these, relay operation delay is tested by injecting a short-circuit fault into the HIL bench and recording the moment of fault injection. The BMS hardware test board detected a fault and controlled the relay to disconnect. The HIL test bench captured the moment the relay disconnected via the I / O card. Relay operation It is calculated in real time to determine whether the delay meets the standard requirements.

[0077] This represents the absolute value of the voltage sampling error. ,in, This indicates the measured voltage value of a specific cell reported by the BMS hardware test board via the CAN bus. This represents the true value of the cell voltage as measured by a high-precision instrument, which is actually output by the battery simulator on the HIL test bench.

[0078] This application provides an electronic device including a memory and a processor. The memory stores a computer program, and the processor runs the computer program to cause the electronic device to perform the methods in any of the aforementioned optional implementations.

[0079] This application provides a readable storage medium storing computer program instructions, which, when read and executed by a processor, perform the methods in any of the aforementioned optional implementations.

[0080] The storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Red-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0081] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can also be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0082] In addition, the functional modules in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.

[0083] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0084] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application. It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.

[0085] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0086] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

Claims

1. A hardware-in-the-loop testing system for a BMS (Browser Management System), characterized in that, The system includes a simulator, an environment simulation chamber, a test bench, and a BMS hardware test board. The simulator is connected to the environment simulation chamber, the test bench, and the BMS hardware test board. The BMS hardware test board is located inside the environment simulation chamber and connected to the test bench. The simulator is used to load the target extreme environment scenario, generate environmental parameter signals and battery condition signals, and dynamically adjust the test parameters according to the response instructions returned by the BMS hardware test board. An environmental simulation chamber is used to receive the environmental parameter signals and adjust the environmental parameters of the environment in which the BMS hardware test board is located based on the environmental parameter signals. A test bench for simulating battery signals based on the battery operating condition signals; The BMS hardware test board is used to receive the simulated battery signal and send the response command back to the simulator.

2. A test method based on the BMS hardware-in-the-loop test system of claim 1, characterized in that, Applied to a simulator, the method includes: Load the target extreme environment scenario and generate environmental parameter signals and battery status signals; The environmental parameter signal is sent to the environmental simulation chamber, so that the environmental simulation chamber adjusts the environmental parameters of the environment in which the BMS hardware test board is located based on the environmental parameter signal. The battery condition signal is sent to the test bench, so that the test bench can simulate the battery signal based on the battery condition signal and send it to the BMS hardware test board. The environmental parameter signals and battery status signals are dynamically adjusted according to the response instructions returned by the BMS hardware test board.

3. The test method according to claim 2, characterized in that, The simulator has a built-in digital twin model. Before the step of generating environmental parameter signals and battery condition signals by loading the target extreme environment scenario, the method further includes: The digital twin model is constructed based on a physics model and historical fault data.

4. The test method according to claim 3, characterized in that, The physical model includes a thermodynamic model, a vibration transmission model, and a humidity diffusion model. The construction of the digital twin model based on the physical model and historical fault data includes: The temperature distribution inside the cabin was simulated based on the aforementioned thermodynamic model; Stress distribution of BMS hardware test board under vibration environment is simulated based on vibration transmission model; The humidity diffusion model is based on Fick's diffusion law and the saturated water vapor pressure equation to calculate the humidity field inside the cabin; A fault rule base is established using the historical fault data to generate fault injection instructions.

5. The test method according to claim 2, characterized in that, The loading of the target extreme environment scenario generates environmental parameter signals and battery status signals, including: Environmental parameter signals are dynamically obtained by using coupled calculations based on a physical model. An artificial neural network model is used to correct the prediction bias of the environmental parameter signals to obtain the environmental time series curve; Generate an ideal battery operating condition signal based on the aforementioned environmental time-series curve; Based on the environmental time-series curve and the ideal battery operating condition signal, a coupled calculation is performed to obtain a battery operating condition signal with fault and / or drift.

6. The test method according to claim 5, characterized in that, The method of using a physical model for coupled calculations to dynamically obtain environmental parameter signals includes: Calculate the heat generated by vibration using a vibration transmission model; The temperature field is obtained based on the aforementioned heat and thermodynamic model; The vibration model and humidity model are updated based on the temperature field. If new condensation occurs, the temperature field is recalculated using the aforementioned thermodynamic model to obtain the current environmental parameter signals.

7. The test method according to claim 5, characterized in that, The step of using an artificial neural network model to correct the prediction bias of the environmental parameter signals and obtain the environmental time-series curve includes: Obtain the error sequence between the environmental parameter signals and the actual sensor measurements within the most recent preset time period; The error sequence is input into the trained LSTM model to obtain the error estimate of the current environmental parameter signal; An environmental time-series curve is obtained based on the error estimate and the environmental parameter signal.

8. The test method according to claim 5, characterized in that, The generation of the ideal battery operating condition signal based on the environmental time-series curve includes: Based on the temperature changes in the environmental time-series curve, the internal resistance change and voltage fluctuation are obtained. The contact impedance is obtained based on the vibration changes in the environmental time-series curve. The insulation resistance is obtained based on the humidity changes in the environmental time-series curve.

9. The test method according to claim 5, characterized in that, The process of coupling calculations based on the environmental time-series curve and the ideal battery operating condition signal to obtain a battery operating condition signal with drift includes: Based on the stress and temperature data in the environmental time series curve, the piezoresistive sensitivity coefficient is calculated through the piezoresistive effect. The resistance change is obtained using the piezoresistive sensitivity coefficient. The drift voltage is obtained based on the change in resistance and the corresponding sensing current. The drift voltage is superimposed on the ideal battery condition signal to obtain a battery condition signal with drift.

10. The test method according to claim 5, characterized in that, The process of coupling calculations based on the environmental time-series curve and the ideal battery operating condition signal to obtain the faulty battery operating condition signal includes: If a logical judgment is made based on the environmental timing curve and the ideal battery condition signal, and it is determined that the corresponding fault injection instruction in the fault rule base has been triggered, then a faulty battery condition signal is generated.

11. The test method according to claim 2, characterized in that, The step of dynamically adjusting the environmental parameter signals and battery status signals according to the response commands returned by the BMS hardware test board includes: Obtain the key feedback signals from the response command; The environmental parameter signals and / or battery condition signals are dynamically adjusted based on the key feedback signals.

12. The test method according to claim 11, characterized in that, The dynamic adjustment of the environmental parameter signal and / or battery status signal based on the key feedback signal includes: If the BMS hardware test board does not trigger low-temperature protection at the set low temperature, then the environmental parameter signal is strengthened. If the communication error rate is less than the threshold, a fault injection command is triggered. If the BMS hardware test board triggers protection multiple times at high temperatures, the environmental parameter signal will be weakened. If the BMS hardware test board experiences an abnormal change in sampled values, the fault will be reproduced based on the environmental parameter signals within a set time period prior to the abnormality.

13. An electronic device, characterized in that, The electronic device includes a memory and a processor, the memory being used to store a computer program, and the processor running the computer program to cause the electronic device to perform the test method according to any one of claims 2 to 12.

14. A readable storage medium, characterized in that, The readable storage medium stores computer program instructions, which, when read and executed by a processor, perform the test method according to any one of claims 2 to 12.