Battery management system hardware-in-the-loop test method and system
By distinguishing between dynamic and static operating conditions in the hardware-in-the-loop test of the battery management system, and employing a combination of particle swarm optimization and genetic algorithms, the problem of the test system's inability to automatically adjust battery pack model parameters was solved, resulting in more efficient and accurate test results.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- DONGFENG MOTOR GRP
- Filing Date
- 2025-12-31
- Publication Date
- 2026-04-17
AI Technical Summary
Existing hardware-in-the-loop testing systems for battery management systems cannot automatically adjust battery pack model parameters according to different test conditions, which affects the accuracy and reliability of test results.
A differentiated strategy is adopted, using particle swarm optimization to quickly respond to current surges under dynamic conditions and genetic algorithm to eliminate accumulated errors under static conditions. By distinguishing between dynamic and static conditions and introducing dynamic thresholds and optimization algorithms, invalid calculations are reduced, thereby improving testing efficiency and accuracy.
It effectively reduces invalid calculations, improves testing efficiency and accuracy, enhances the robustness and reliability of the testing system, and solves the problems of inaccurate test results and low efficiency caused by untimely adjustment of model parameters in traditional testing methods.
Smart Images

Figure CN121878490A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of battery management system testing technology, and in particular to a hardware-in-the-loop testing method for a battery management system. Background Technology
[0002] Traditional BMS testing methods mainly include actual battery pack testing and software simulation testing. While actual battery pack testing provides a realistic testing environment, it suffers from high costs, long cycles, and low safety, especially when testing under extreme conditions or fault scenarios, potentially causing irreversible damage to the battery pack. Software simulation testing primarily relies on mathematical models. Although it is low-cost and highly safe, the accuracy and completeness of the models are often limited, and it cannot fully simulate the complex characteristics and operating environment of actual battery packs.
[0003] To overcome the shortcomings of traditional testing methods, hardware-in-the-loop (HIL) testing technology has emerged. HIL testing combines the actual battery management system (BMS) with virtual battery pack models and external environment models, using real-time simulation technology to achieve comprehensive testing of the BMS in a laboratory environment. However, existing testing systems cannot automatically adjust the battery pack model parameters according to different test conditions, which affects the accuracy and reliability of the test results. Summary of the Invention
[0004] This application provides a hardware-in-the-loop testing method and system for a battery management system, in order to solve the problem in related technologies that the testing system cannot automatically adjust the battery pack model parameters according to different test conditions, which affects the accuracy and reliability of the test results.
[0005] In a first aspect, embodiments of this application provide a hardware-in-the-loop testing method for a battery management system, which includes the following steps: The average absolute error is obtained by comparing the output voltage of the battery pack model with the actual measured voltage of the BMS device under test. The current test condition type is determined based on the current parameters; If the current test condition is a dynamic condition and the mean absolute error exceeds the first threshold, the first algorithm is used to update the input parameters of the battery pack model. If the current test condition is a static condition and the mean absolute error exceeds the second threshold, the second algorithm is used to update the input parameters of the battery pack model. The first threshold is less than the second threshold.
[0006] In conjunction with the first aspect, in one implementation, if the mean absolute error is less than or equal to the threshold corresponding to the current operating condition, the current battery pack model input parameters are maintained.
[0007] In conjunction with the first aspect, in one implementation method, the dynamic operating condition is determined as follows: the rate of change of the current at the output terminal of the battery pack model is greater than a third preset value.
[0008] In conjunction with the first aspect, in one implementation, the static operating condition includes a constant current operating condition and a constant voltage operating condition. The method for determining the constant current condition is as follows: the current at the output terminal of the battery pack model is greater than the fourth preset value and the rate of change of current is less than the fifth preset value. The method for determining the constant pressure condition is as follows: the charge state is greater than the sixth preset value and the current is less than the seventh preset value.
[0009] In conjunction with the first aspect, in one implementation, the first algorithm is a particle swarm optimization algorithm.
[0010] In conjunction with the first aspect, in one implementation, the second algorithm is a genetic algorithm.
[0011] Secondly, embodiments of this application provide a hardware-in-the-loop testing system for a battery management system, comprising: The adaptive hardware-in-the-loop test platform includes a hardware-in-the-loop controller for real-time simulation, a battery pack model library for storing battery pack models, a model adaptive adjustment module for adjusting model parameters based on feedback, and a test resource management module for managing hardware resources, and communicates with the BMS device under test. The data acquisition and control module is used to acquire the output signals of the BMS device under test and execute control commands; The operating condition module is used to simulate driving conditions and environmental conditions and generate analog signals; The data analysis and evaluation module is used to process data, evaluate performance, and generate reports. The communication module is used to enable data communication between various modules.
[0012] In conjunction with the second aspect, in one implementation, the model adaptive adjustment module includes: The acquisition submodule is used to acquire the average absolute error between the output voltage of the battery pack model and the actual measured voltage of the BMS device under test. The judgment submodule is used to determine the current test condition type and whether the mean absolute error exceeds the threshold of the current corresponding condition. The update submodule is used to update the input parameters of the battery pack model based on the judgment result of the judgment module. When the test condition is dynamic and the mean absolute error exceeds the first threshold, the first algorithm is used; when the test condition is static and the mean absolute error exceeds the second threshold, the second algorithm is used.
[0013] Thirdly, embodiments of this application provide a battery management system hardware-in-the-loop test device, the battery management system hardware-in-the-loop test device including a processor, a memory, and a battery management system hardware-in-the-loop test program stored in the memory and executable by the processor, wherein when the battery management system hardware-in-the-loop test program is executed by the processor, it implements the steps of the battery management system hardware-in-the-loop test method.
[0014] Fourthly, embodiments of this application provide a computer-readable storage medium, characterized in that the computer-readable storage medium stores a battery management system hardware-in-the-loop test program, wherein when the battery management system hardware-in-the-loop test program is executed by a processor, it implements the steps of the battery management system hardware-in-the-loop test method.
[0015] This application provides a hardware-in-the-loop testing method and system for a battery management system. Under dynamic operating conditions, the current change rate is large, and battery pack parameters (such as internal resistance) need to have rapid response capabilities; otherwise, the terminal voltage error will increase sharply. Under static operating conditions, the current is relatively stable, and the parameter changes slowly. In this case, global optimization is needed to eliminate accumulated errors. This solution adopts a differentiated strategy for different operating conditions: under dynamic operating conditions, a smaller error threshold is selected to improve test accuracy, and a first algorithm is used to quickly respond to the impact of sudden current changes on the terminal voltage; under static operating conditions, a larger error threshold is used, and a second algorithm is introduced to eliminate accumulated errors. By distinguishing between dynamic and static operating conditions and introducing a dynamic threshold and optimization algorithm, this method effectively reduces invalid calculations and improves test efficiency and accuracy. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 This is a schematic diagram of the hardware-in-the-loop test system for the battery management system of this application; Figure 2 This is a flowchart illustrating the hardware-in-the-loop testing method for the battery management system of this application. Figure 3 For this application Figure 2 A flowchart illustrating the model adaptive adjustment module in step S103; Figure 4 For this application Figure 1 Detailed architecture diagram of the adaptive adjustment module for the model. Detailed Implementation
[0018] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0019] First, some of the technical terms used in this application will be explained to help those skilled in the art understand this application.
[0020] BMS: Battery Management System, is the core module used to monitor the battery status (voltage, temperature, state of charge, etc.) of an electric vehicle and execute safety control strategies.
[0021] HIL: Hardware-in-the-Loop testing, a testing method that uses real-time simulation technology to connect the hardware under test (such as BMS, VCU) to a virtual simulation environment to verify the interaction logic of multiple systems.
[0022] SOC: State of Charge, reflects the percentage of battery capacity remaining relative to its rated capacity, and is a core parameter for BMS energy management.
[0023] State of Health (SOH) is an indicator that assesses the degree of battery performance degradation (such as changes in capacity and internal resistance) and is used to predict the remaining battery life.
[0024] CAN: Controller Area Network, a serial communication bus commonly used in automobiles to enable data exchange between various electronic control units (such as BMS and VCU).
[0025] PSO: Particle Swarm Optimization.
[0026] GA: Genetic Algorithm.
[0027] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0028] This application provides a hardware-in-the-loop testing system for a battery management system, such as... Figure 1 As shown, it mainly includes an adaptive hardware-in-the-loop test platform 100, a BMS device under test 200, a data acquisition and control module 300, a working condition module 400, a data analysis and evaluation module 500, and a communication module 600.
[0029] The adaptive hardware-in-the-loop test platform 100 is the core of the entire test system. It includes a hardware-in-the-loop controller 110, a battery pack model library 120, a model adaptive adjustment module 130, and a test resource management module 140. The hardware-in-the-loop controller 110 employs a high-performance real-time processor, enabling real-time simulation calculations of the virtual battery pack model and the external environment model, and real-time communication with the BMS device under test 200. The battery pack model library 120 stores various types and specifications of battery pack models, including lithium-ion battery models and lead-acid battery models. Each battery pack model includes parameters such as the battery's electrochemical, thermodynamic, and kinetic characteristics. The model adaptive adjustment module 130 can adjust the parameters of the battery pack model in real time based on feedback data from the BMS device under test 200 during the test, thereby improving the model's accuracy and adaptability. The test resource management module 140 manages the hardware resources in the test system, including sensors, actuators, and data acquisition cards, and can automatically allocate and configure hardware resources according to test requirements.
[0030] The BMS device under test 200 is the object being tested. It communicates with the adaptive hardware-in-the-loop test platform 100 through the communication module 600, receives test commands and data, and feeds back its own status information and control signals.
[0031] The data acquisition and control module 300 includes a data acquisition unit and a control unit. The data acquisition unit is responsible for acquiring the output signals of the BMS device under test 200, such as battery voltage, current, and temperature, and converting these signals into digital signals for input to the adaptive hardware-in-the-loop test platform 100. The control unit controls the actuators in the test system according to the control instructions of the adaptive hardware-in-the-loop test platform 100, such as adjusting the load, heating or cooling the battery pack.
[0032] The operating condition module 400 is used to simulate different driving conditions and environmental conditions, such as urban driving conditions, high-speed driving conditions, low-temperature environments, and high-temperature environments. It includes an operating condition database and an operating condition generation unit. The operating condition database stores data on various typical driving conditions and environmental conditions, and the operating condition generation unit can select the corresponding data from the operating condition database according to the test requirements and generate the corresponding analog signals to be input into the adaptive hardware-in-the-loop test platform 100.
[0033] The data analysis and evaluation module 500 is used to analyze and process the data collected during the test to evaluate the performance and reliability of the BMS device under test 200. It includes a data processing unit, a performance evaluation unit, and a report generation unit. The data processing unit performs preprocessing on the collected data, such as filtering, noise reduction, and normalization. The performance evaluation unit evaluates the performance of the BMS device under test 200 according to preset evaluation indicators. The report generation unit generates a detailed test report.
[0034] The communication module 600 enables data communication between the adaptive hardware-in-the-loop test platform 100, the BMS device under test 200, the data acquisition and control module 300, the operating condition module 400, the fault injection module 500, and the data analysis and evaluation module 500, and supports multiple communication protocols such as CAN, USB, and Ethernet.
[0035] Based on the above testing system, this application provides a hardware-in-the-loop testing method for a battery management system. For example... Figure 2 As shown, the specific steps include: S101: System Initialization. First, the BMS device under test 200 is connected to the adaptive hardware-in-the-loop test platform 100, and a communication connection is established through the communication module 600. Then, the test resource management module 140 automatically detects and configures the hardware resources in the test system, such as sensors, actuators, and data acquisition cards, to ensure that the hardware devices are working properly. At the same time, the model adaptive adjustment module 130 loads the battery pack model from the battery pack model library 120 that matches the BMS device under test 200.
[0036] S102: Test Condition Setting. The user inputs test requirements through the human-machine interface, including test conditions such as driving conditions and environmental conditions. The test condition module 400 selects the corresponding test condition data from the test condition database based on the user's input and generates the corresponding analog signal, which is then input into the adaptive hardware-in-the-loop test platform 100.
[0037] S103: Adaptive Hardware-in-the-Loop Testing. The hardware-in-the-loop controller 110 simulates the working state of a virtual battery pack in real time based on the analog signals generated by the operating condition module 400 and the battery pack model. It then sends the battery pack status signals (such as voltage, current, and temperature) to the BMS device under test 200 via the communication module 600. The BMS device under test 200 executes corresponding control strategies based on the received battery pack status signals and feeds back control signals (such as charging / discharging control signals and equalization control signals) to the adaptive hardware-in-the-loop testing platform 100. The model adaptive adjustment module 130 monitors the feedback signals from the BMS device under test 200 in real time, compares them with the output signals of the virtual battery pack model, and adjusts the parameters of the battery pack model based on the comparison results to make the output of the virtual battery pack model closer to the characteristics of the actual battery pack.
[0038] S104: Data Acquisition and Processing. The data acquisition unit of the data acquisition and control module 300 acquires the output signals of the BMS device under test 200 and the simulation signals of the adaptive hardware-in-the-loop test platform 100 in real time, and converts these signals into digital signals for input into the data analysis and evaluation module 500. The data processing unit preprocesses the acquired data, including filtering, noise reduction, and normalization, to improve the quality and usability of the data.
[0039] S105: Performance Evaluation and Result Output. The performance evaluation unit analyzes and evaluates the preprocessed data based on preset evaluation indicators, such as battery state estimation accuracy, battery balancing effect, and fault diagnosis accuracy, to determine whether the BMS device under test 200 meets the design requirements. The report generation unit generates a detailed test report based on the evaluation results, including test process records, data curves, performance evaluation results, etc., and displays or prints it out through a human-machine interface.
[0040] S106: Test complete. After all preset test conditions have been completed, the system automatically stops the test, disconnects the BMS device under test 200 from the adaptive hardware-in-the-loop test platform 100, and releases test resources.
[0041] like Figure 3 As shown, the core innovation of this application is the model adaptive adjustment module 130, and its specific testing method is as follows: The average absolute error is obtained by comparing the output voltage of the battery pack model with the actual measured voltage of the BMS device under test. The current test condition type is determined based on the current parameters; If the current test condition is a dynamic condition and the mean absolute error exceeds the first threshold, the first algorithm is used to update the input parameters of the battery pack model. If the current test condition is a static condition and the mean absolute error exceeds the second threshold, the second algorithm is used to update the input parameters of the battery pack model. The first threshold is less than the second threshold, and the first and second thresholds are set as needed based on specific parameters such as battery type and test requirements.
[0042] In this embodiment, under dynamic operating conditions, the current change rate is large, and battery pack parameters (such as internal resistance) need to have rapid response capabilities; otherwise, the terminal voltage error will increase sharply. Under static operating conditions, the current is relatively stable, and the parameters change slowly. In this case, global optimization is required to eliminate accumulated errors. This solution adopts a differentiated strategy for different operating conditions: under dynamic operating conditions, a smaller error threshold is selected to improve test accuracy, and a first algorithm is used to quickly respond to the impact of sudden current changes on the terminal voltage; under static operating conditions, a larger error threshold is used, and a second algorithm is introduced to eliminate accumulated errors. By distinguishing between dynamic and static operating conditions and introducing a dynamic threshold and optimization algorithm, this method effectively reduces invalid calculations and improves test efficiency and accuracy. It solves the problems of inaccurate test results and low test efficiency caused by fixed or untimely adjustment of model parameters in traditional testing methods.
[0043] Furthermore, in one embodiment, if the mean absolute error is less than or equal to the threshold corresponding to the current operating condition, the input parameters of the current battery pack model are maintained.
[0044] Specifically, there are two situations: The first scenario is when the current test condition is dynamic and the mean absolute error is less than or equal to the first threshold.
[0045] The second scenario is when the current test condition is a static condition and the mean absolute error is less than or equal to the second threshold.
[0046] The above method can actively maintain the stability of model parameters when the deviation between the model output and the actual measurement is within an acceptable range. This avoids unnecessary parameter iterations under dynamic conditions when the current changes rapidly but the model can still track it well, reducing computational overhead and improving the real-time response of the system; prevents unnecessary global optimization triggered by small measurement noise or environmental fluctuations under static conditions, maintaining the stability and consistency of the testing process; and enhances the robustness of the testing system, suppressing the risk of model oscillation or divergence that may be caused by frequent parameter adjustments.
[0047] Therefore, this embodiment effectively solves the problems of unstable testing process, waste of resources, and insufficient long-term testing reliability caused by the overly sensitive model parameter adjustment mechanism or lack of operating condition differentiation in traditional hardware-in-the-loop testing, and further improves testing efficiency and the credibility of results.
[0048] Furthermore, in one embodiment, the method for determining the dynamic operating condition is: the rate of change of the current at the output terminal of the battery pack model is greater than a third preset value.
[0049] The third preset value can be adjusted according to the specific dynamic characteristics of different battery types or application scenarios. In some scenarios, the third preset value can be set to 2.0A / ms. When the current change rate exceeds 2.0A / ms, the impact of core parameters such as the battery's internal resistance R0 on the terminal voltage output will become drastically prominent. At this time, a rapid response is required to avoid the expansion of errors. A clear current change rate threshold enables the system to automatically and quickly complete the switching of operating conditions and algorithm selection without manual intervention. This reduces the subjective error of human judgment and improves the automation of the testing process.
[0050] Furthermore, in one embodiment, the static operating condition includes a constant current operating condition and a constant voltage operating condition; The method for determining the constant current operating condition is as follows: the output current of the battery pack model is greater than a fourth preset value and the rate of change of the current is less than a fifth preset value. The fourth and fifth preset values can be adjusted according to the specific dynamic characteristics of different battery types or different application scenarios. Specifically, it can be set that the current is greater than 80% of the rated current value and the rate of change of the current is less than 0.5A / ms, which is sufficient to determine that the constant current operating condition has been entered.
[0051] The method for determining the constant voltage operating condition is as follows: the state of charge (SOC) is greater than a sixth preset value and the current is less than a seventh preset value. The sixth and seventh preset values can be adjusted according to the specific dynamic characteristics of different battery types or application scenarios. Specifically, the constant voltage operating condition can be determined when the SOC is greater than 80% and the current is less than 20% of the rated current.
[0052] By setting multi-variable, phased static condition judgment logic, the system can accurately distinguish between two typical steady-state stages during battery charging and discharging: the constant current stage and the constant voltage stage. In the constant current stage, the current is relatively stable but remains high. Model errors mainly originate from the drift of parameters such as internal resistance. Setting clear combinations of current and rate of change conditions ensures that the system is only identified as a static condition when the current is truly stable, avoiding misjudgments during small current fluctuations or transitions, thus guaranteeing the accuracy of parameter optimization timing. In the constant voltage stage, the battery is close to full charge, and the current naturally decays. At this point, model errors are more related to polarization voltage and terminal voltage balance characteristics. By combining the dual conditions of high SOC and low current for judgment, this specific end-of-charge state can be reliably captured. This refined condition recognition mechanism allows the system to match the most suitable optimization algorithm (such as a genetic algorithm) and error tolerance (second threshold) for different types of static conditions, achieving optimization of model parameters. It not only improves the effectiveness and efficiency of parameter adjustment under static conditions and reduces invalid calculations or incorrect optimizations caused by misjudgment of operating conditions, but also makes the simulation of the actual working state of the battery by the entire test system closer to the real physical process, thereby significantly improving the accuracy, reliability and consistency of physical meaning of hardware-in-the-loop testing in the steady state stage.
[0053] Furthermore, in one embodiment, the first algorithm is a particle swarm optimization algorithm.
[0054] Furthermore, in one embodiment, the second algorithm is a genetic algorithm.
[0055] Based on the physical characteristics and optimization requirements of dynamic and static operating conditions, two algorithms with different search strategies were matched to achieve a balance between testing accuracy and efficiency. Under dynamic conditions, current changes drastically (e.g., dI / dt > 2.0 A / ms), and battery model parameters such as internal resistance need to respond quickly to external stimuli; otherwise, terminal voltage errors will accumulate and amplify rapidly. In this case, the Particle Swarm Optimization (PSO) algorithm is adopted. Particles update their velocity and position by following their individual and group historical optima. Its iterative mechanism is simple, direct, and converges rapidly, making it particularly suitable for fast positioning and fine-grained local searches of the parameter space. Within the short time window of dynamic conditions, PSO can typically achieve effective parameter convergence within a few iterations (e.g., 8 iterations), thus enabling rapid tracking of battery dynamic characteristics, ensuring that the model output follows actual measurements, and suppressing the sharp increase in error.
[0056] Under static operating conditions, the current and operating conditions are relatively stable, and parameters change slowly. However, the model may accumulate systematic errors due to long-term operation or initial deviations. In this case, a genetic algorithm (GA) is used. The GA algorithm explores and searches globally through operations such as selection, crossover, and mutation. This mechanism enables it to correct the overall deviation of the model under steady-state conditions, thereby significantly improving the accuracy and robustness of long-term testing.
[0057] It should be noted that although PSO and GA algorithms are well-known technologies in the field of battery management, the core innovation of this application is not an improvement on the algorithms themselves, but rather the construction of an adaptation logic that matches the algorithm characteristics with the operating conditions. The first and second algorithms are essentially representative carriers of the two optimization strategies, rather than being limited to specific algorithmic forms of PSO and GA. Therefore, this design has strong scalability. The first algorithm can be flexibly extended to any optimization algorithm with fast response and efficient local convergence characteristics, such as adaptive differential evolution, cuckoo search, and improved gradient descent, as long as it can meet the requirement of fast tracking of parameter mutations under dynamic operating conditions. Similarly, the second algorithm can be replaced with other optimization algorithms that focus on global exploration and have strong robustness, such as simulated annealing, a global improved version of particle swarm optimization, and immune genetic hybrid algorithms. The core only needs to adapt to the requirements of eliminating accumulated errors and searching for globally optimal parameters under static operating conditions. This algorithm adaptation framework based on working conditions breaks the limitations of specific algorithms and allows for flexible replacement of adaptation algorithms according to test scenarios, hardware resources, or accuracy requirements, further improving the versatility and adaptability of the test system.
[0058] like Figure 4 As shown, the model adaptive adjustment module 130 includes: The acquisition submodule is used to acquire the average absolute error between the output voltage of the battery pack model and the actual measured voltage of the BMS device under test. The judgment submodule is used to determine the current test condition type and whether the mean absolute error exceeds the threshold of the current corresponding condition. The update submodule is used to update the input parameters of the battery pack model based on the judgment result of the judgment module. When the test condition is dynamic and the mean absolute error exceeds the first threshold, the first algorithm is used; when the test condition is static and the mean absolute error exceeds the second threshold, the second algorithm is used.
[0059] In summary, this invention presents for the first time a battery high-intensity leakage (HIL) testing system and method that performs segmented optimization under constant current, constant voltage, and dynamic operating conditions. This method employs a combined strategy of particle swarm optimization and genetic algorithm to replace the traditional unified optimization algorithm, effectively reducing computational load. Through this hybrid optimization strategy, the system reduces terminal voltage error and SOC estimation error.
[0060] Under constant current and constant voltage conditions, the genetic algorithm completes global optimization in only about 10 iterations, significantly accelerating convergence compared to the lengthy testing cycles required by traditional methods. Under dynamic conditions, the particle swarm optimization algorithm exhibits rapid response and convergence capabilities, with a single optimization cycle shorter than the traditional recursive least squares method, resulting in a significantly improved response time. Furthermore, a weight allocation and priority optimization mechanism based on R0 (ohmic resistance) is specifically designed for dynamic conditions to ensure rapid convergence of terminal voltage errors during sudden current changes. The system also introduces an error threshold triggering mechanism, initiating optimization calculations only when the error exceeds a set threshold, thereby avoiding a large number of invalid calculations and improving overall testing efficiency.
[0061] This application provides a hardware-in-the-loop test device for a battery management system. The hardware-in-the-loop test device for a battery management system can be a personal computer (PC), a laptop computer, a server, or other device with data processing capabilities.
[0062] In this embodiment of the application, the hardware-in-the-loop test equipment for the battery management system may include a processor, a memory, a communication interface, and a communication bus.
[0063] The communication bus can be of any type and is used to interconnect the processor, memory, and communication interface.
[0064] The communication interface includes input / output (I / O) interfaces, physical interfaces, and logical interfaces used for interconnecting devices within the battery management system hardware-in-the-loop test equipment, as well as interfaces used for interconnecting the battery management system hardware-in-the-loop test equipment with other devices (such as other computing devices or user equipment). Physical interfaces can be Ethernet interfaces, fiber optic interfaces, ATM interfaces, etc.; user equipment can be displays, keyboards, etc.
[0065] Memory can be various types of storage media, such as random access memory (RAM), read-only memory (ROM), non-volatile RAM (NVRAM), flash memory, optical storage, hard disk, programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), etc.
[0066] The processor can be a general-purpose processor, which can call the battery management system hardware-in-the-loop test program stored in memory and execute the battery management system hardware-in-the-loop test method provided in the embodiments of this application. For example, the general-purpose processor can be a central processing unit (CPU). The method executed when the battery management system hardware-in-the-loop test program is called can be referred to in the various embodiments of the battery management system hardware-in-the-loop test method of this application, and will not be repeated here.
[0067] Fourthly, embodiments of this application also provide a computer-readable storage medium.
[0068] The present application provides a computer-readable storage medium storing a battery management system hardware-in-the-loop test program, wherein when the battery management system hardware-in-the-loop test program is executed by a processor, it implements the steps of the battery management system hardware-in-the-loop test method as described above.
[0069] The method implemented when the battery management system hardware-in-the-loop test program is executed can be referred to in the various embodiments of the battery management system hardware-in-the-loop test method of this application, and will not be repeated here.
[0070] It should be noted that the sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0071] The terms "comprising" and "having," and any variations thereof, in the specification, claims, and accompanying drawings of this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to such process, method, product, or apparatus. The terms "first," "second," and "third," etc., are used to distinguish different objects, etc., and do not indicate a sequence, nor do they limit "first," "second," and "third" to different types.
[0072] In the description of the embodiments of this application, terms such as "exemplary," "for example," or "for instance" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "exemplary," "for example," or "for instance" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of terms such as "exemplary," "for example," or "for instance" is intended to present the relevant concepts in a concrete manner.
[0073] In the description of the embodiments of this application, unless otherwise stated, " / " means "or". For example, A / B can mean A or B. The "and / or" in the text is merely a description of the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of this application, "multiple" means two or more.
[0074] In some processes described in the embodiments of this application, multiple operations or steps appear in a specific order. However, it should be understood that these operations or steps may not be executed in the order they appear in the embodiments of this application, or may be executed in parallel. The sequence number of the operation is only used to distinguish different operations, and the sequence number itself does not represent any execution order. In addition, these processes may include more or fewer operations, and these operations or steps may be executed sequentially or in parallel, and these operations or steps may be combined. Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes several instructions to cause a terminal device to execute the methods described in the various embodiments of this application.
[0075] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
Claims
1. A battery management system hardware-in-the-loop test method, characterized in that, It includes the following steps: The average absolute error is obtained by comparing the output voltage of the battery pack model with the actual measured voltage of the BMS device under test. The current test condition type is determined based on the current parameters; If the current test condition is a dynamic condition and the mean absolute error exceeds the first threshold, the first algorithm is used to update the input parameters of the battery pack model. If the current test condition is a static condition and the mean absolute error exceeds the second threshold, the second algorithm is used to update the input parameters of the battery pack model. The first threshold is less than the second threshold.
2. The hardware-in-the-loop testing method for a battery management system as described in claim 1, characterized in that: If the mean absolute error is less than or equal to the threshold corresponding to the current operating condition, maintain the current battery pack model input parameters.
3. The hardware-in-the-loop testing method for a battery management system as described in claim 1, characterized in that: The method for determining the dynamic operating condition is as follows: the rate of change of the current at the output terminal of the battery pack model is greater than a third preset value.
4. The hardware-in-the-loop testing method for a battery management system as described in claim 1, characterized in that: The static operating conditions include constant current operating conditions and constant voltage operating conditions; The method for determining the constant current condition is as follows: the current at the output terminal of the battery pack model is greater than the fourth preset value and the rate of change of current is less than the fifth preset value. The method for determining the constant pressure condition is as follows: the charge state is greater than the sixth preset value and the current is less than the seventh preset value.
5. The hardware-in-the-loop testing method for a battery management system as described in claim 1, characterized in that: The first algorithm is the particle swarm optimization algorithm.
6. The hardware-in-the-loop testing method for a battery management system as described in claim 1, characterized in that: The second algorithm is a genetic algorithm.
7. A battery management system hardware-in-the-loop test system, comprising: include: The adaptive hardware-in-the-loop test platform (100) includes a hardware-in-the-loop controller (110) for real-time simulation, a battery pack model library (120) for storing battery pack models, a model adaptive adjustment module (130) for adjusting model parameters according to feedback, and a test resource management module (140) for managing hardware resources, and is communicatively connected to the BMS device under test (200). The data acquisition and control module (300) is used to acquire the output signals of the BMS device under test (200) and execute control commands; The operating condition module (400) is used to simulate driving conditions and environmental conditions and generate analog signals; The data analysis and evaluation module (500) is used to process data, evaluate performance, and generate reports; The communication module (600) is used to realize data communication between the modules.
8. The battery management system hardware-in-the-loop test system of claim 7, wherein, The model adaptive tuning module (130) includes: The acquisition submodule is used to acquire the average absolute error between the output voltage of the battery pack model and the actual measured voltage of the BMS device under test. The judgment submodule is used to determine the current test condition type and whether the mean absolute error exceeds the threshold of the current corresponding condition. The update submodule is used to update the input parameters of the battery pack model based on the judgment result of the judgment module. When the test condition is dynamic and the mean absolute error exceeds the first threshold, the first algorithm is used; when the test condition is static and the mean absolute error exceeds the second threshold, the second algorithm is used.
9. A battery management system hardware-in-the-loop test apparatus, characterized by, The battery management system hardware-in-the-loop test device includes a processor, a memory, and a battery management system hardware-in-the-loop test program stored in the memory and executable by the processor, wherein when the battery management system hardware-in-the-loop test program is executed by the processor, it implements the steps of the battery management system hardware-in-the-loop test method as described in any one of claims 1 to 6.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a battery management system hardware-in-the-loop test program, wherein when the battery management system hardware-in-the-loop test program is executed by a processor, it implements the steps of the battery management system hardware-in-the-loop test method as described in any one of claims 1 to 6.