BMS controller detection method and related equipment
By performing joint probability distribution analysis and filtering on the historical operating data of the BMS controller, critical detection data is generated, which solves the problem of insufficient coverage of rare operating conditions in existing detection methods and achieves efficient and reliable detection results.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-03
- Publication Date
- 2026-03-27
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing BMS controller detection methods are insufficient to cover rare but high-risk combination conditions and cannot provide reliable estimates of critical failure probabilities, resulting in wasted HIL resources and insufficient decision-making basis.
By acquiring the joint probability distribution data of historical running datasets, random sampling and simulation tests are performed to screen critical parameter groups, generate critical test running datasets, and perform weighted aggregation and statistical analysis to generate critical detection data for the BMS controller.
It improves the authenticity and coverage of detection, reduces false positives in unrealistic scenarios, focuses on high-risk areas, provides confidence-based critical event probability estimates, and supports design and certification decisions.
Smart Images

Figure CN121742415A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of battery testing technology, and in particular to a BMS controller testing method and related equipment. Background Technology
[0002] The requirements for BMS controller testing include high reproducibility and statistical representativeness of real-world operating conditions. Test cases should cover common operating conditions as well as low-probability but high-risk edge conditions. Testing must simultaneously verify functional correctness, performance metrics (such as SOC estimation error and protection trigger delay), and failure probability, providing confident quantitative results to support design improvements and certification decisions. Furthermore, the testing process should consider both engineering feasibility and resource efficiency, maximizing coverage and discrimination capabilities of key scenarios within limited simulation resources and timeframes, while ensuring repeatability and interpretability of results to meet safety compliance requirements.
[0003] Current BMS controller testing methods primarily rely on test benches and standardized scenario testing, expert-designed representative operating condition sequences, deterministic extreme case testing, and simulation evaluation using Monte Carlo or random sampling to some extent. Commonly used engineering methods include paired combination tests such as PICT to cover second-order interactions, hierarchical HIL / SIL test chains, and statistical sampling and bench accelerated life testing based on experience or univariate distributions. Overall, these methods emphasize engineering-controllable scenario execution and fault reproduction, relying on human experience and rule constraints to complete test case design and execution.
[0004] Existing testing methods rely excessively on manually set scenarios or independent distribution assumptions for sampling and testing. This makes it difficult to cover rare but high-risk combinations of operating conditions, and also fails to provide critical failure probability estimates with reliable uncertainty quantification after bias correction. As a result, HIL resources are largely consumed in repetitive or low-value scenarios, while insufficient coverage of rare critical points that truly determine the safety boundary is provided, making it difficult to provide statistically solid decision-making basis for design and certification. Summary of the Invention
[0005] In view of this, this application provides a BMS controller detection method and related equipment, which can solve the problem of the lack of systematic characterization of the joint distribution of multidimensional parameters and critical regions in the prior art.
[0006] In a first aspect, embodiments of this application provide a BMS controller detection method, the method comprising: Obtain the joint probability distribution data of the historical running dataset, and randomly sample the running parameter group based on the joint probability distribution data to obtain the first test parameter group set; Based on the preset critical parameter set, the first test parameter set is screened and simulated to generate a critical test run dataset; Based on the critical test run dataset, determine the critical probability distribution data, and then randomly sample the run parameter set based on the critical probability distribution data to obtain the second test parameter set. The BMS controller is simulated and tested according to the second set of test parameters to obtain second operating response data. The second operating response data is then weighted, aggregated, and statistically analyzed according to the joint probability distribution data and the critical probability distribution data to generate critical detection data for the BMS controller.
[0007] In some embodiments, obtaining the joint probability distribution data of the historical running dataset includes: Preprocess the preset historical running dataset to obtain the optimized running dataset; Based on the preset range of parameter grouping numbers and the optimized running dataset, an effectiveness analysis is performed on the number of each parameter group to determine the optimal number of parameter groups corresponding to the optimized running dataset. Based on the number of optimal parameter groups and the value range of each running parameter in the optimized running dataset, the optimized running dataset is divided into parameter interval sets to calculate the mean and covariance of each parameter interval. The number proportion of each parameter interval is statistically analyzed in the optimized running dataset based on the parameter interval set to obtain the number proportion of each parameter interval, and the number proportion is determined as the interval weight coefficient of each parameter interval. By using a preset joint probability density function, the probability density of the parameter group is estimated based on the mean, the covariance, and the interval weight coefficient, to obtain the joint probability value corresponding to each operating parameter group. The joint probability value is then associated with and stored with the corresponding operating parameter group to generate joint probability distribution data.
[0008] In some embodiments, the step of randomly sampling the running parameter set based on the joint probability distribution data to obtain the first test parameter set includes: The joint probability value is used as the first sampling probability value of the corresponding operating parameter group; By using a preset random sampling method, multiple sets of operating parameters are extracted from the joint probability distribution data according to the first sampling probability value to form a first test parameter set.
[0009] In some embodiments, the step of performing parameter group filtering and simulation testing on the first test parameter set according to a preset critical parameter set to generate a critical test run dataset includes: Based on the preset critical parameter set, the similarity of each running parameter set in the first test parameter set is evaluated, and the critical similarity value of each running parameter set is generated. Based on the preset similarity threshold and the critical similarity value, the first test parameter set is classified to obtain the first critical test parameter set subset and the first test parameter set subset. The critical risk of the first test parameter set is predicted for the running state, so as to select the second critical test parameter set subset from the first test parameter set subset; Based on the first critical test parameter set subset and the second critical test parameter set subset, a first simulation test is performed on the BMS controller to obtain the first operating response data; The first critical test parameter set subset and each parameter set in the second critical test parameter set subset are associated and stored with the first running response data to generate a critical test running dataset.
[0010] In some embodiments, determining critical probability distribution data based on the critical test run dataset, and then randomly sampling the run parameter set based on the critical probability distribution data to obtain a second test parameter set includes: Parameter distribution features are extracted from the critical test run dataset to obtain the critical run feature set; The critical operating feature set is estimated by a preset distribution fitting algorithm to generate critical probability distribution data. The critical probability value in the critical probability distribution data is used as the second sampling probability value of the running parameter group corresponding to each critical probability value in the critical probability distribution data. Using the random sampling method, multiple sets of operating parameters are extracted from the critical probability distribution data according to the second sampling probability value to form a second test parameter set.
[0011] In some embodiments, the step of performing simulation testing on the BMS controller according to the second set of test parameters to obtain second operational response data, and then performing weighted aggregation and statistical analysis on the second operational response data based on the joint probability distribution data and the critical probability distribution data to generate critical detection data for the BMS controller includes: A second simulation test is performed on the BMS controller according to the second set of test parameters to obtain the second operational response data of the BMS controller under critical scenarios. Based on the joint probability distribution data and the critical probability distribution data, the probability density ratio of each parameter group in the second test parameter set is calculated, and the probability density ratio is used as the critical scene weight coefficient of each parameter group in the second test parameter set. Based on the critical scenario weighting coefficients, the performance indicators in the second running response data are weighted and aggregated to generate a weighted performance indicator set. The weighted performance index set is statistically analyzed using a preset statistical inference method to generate critical detection data for the BMS controller.
[0012] Secondly, this application also provides a BMS controller detection device, the device comprising: The first parameter module is used to obtain the joint probability distribution data of the historical running dataset, so as to randomly sample the running parameter group according to the joint probability distribution data to obtain the first test parameter group set. The critical screening module is used to perform parameter screening and simulation testing on the first test parameter set according to the preset critical parameter set, and generate a critical test run dataset. The second parameter module is used to determine the critical probability distribution data based on the critical test run dataset, and to randomly sample the run parameter group based on the critical probability distribution data to obtain the second test parameter group set. The critical detection module is used to perform simulation tests on the BMS controller according to the second set of test parameters to obtain second operating response data, and to perform weighted aggregation and statistical analysis on the second operating response data according to the joint probability distribution data and the critical probability distribution data to generate critical detection data of the BMS controller.
[0013] Thirdly, this application also provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the BMS controller detection method as described above.
[0014] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the BMS controller detection method as described above.
[0015] In summary, this application includes at least the following beneficial technical effects: 1. By establishing multidimensional joint probabilities from historical data and sampling accordingly, the generated test scenarios are statistically and physically closer to real working conditions, thereby reducing misjudgments caused by unrealistic scenarios.
[0016] 2. By employing internal and external loop reuse, pre-screening of detection parameter groups based on similarity and state prediction, and reconstruction importance sampling oriented towards critical regions, the number of simulations can be significantly reduced, while focusing computational resources on high-risk areas.
[0017] 3. By using statistical stabilization techniques such as weight correction, equivalent sample size monitoring, and smoothing of abnormally large weights, the weight variance of importance sampling can be controlled, providing a confident and interpretable probability estimate of critical events, which facilitates decision support. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the 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.
[0019] Figure 1 This is a schematic flowchart of an embodiment of a BMS controller detection method provided in this application; Figure 2 This is a schematic diagram of an embodiment of an electronic device provided in this application; Figure 3 This is a structural block diagram of a BMS controller detection device provided in this application. Detailed Implementation
[0020] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the application; the terms “comprising” and “having”, and any variations thereof, in the specification, claims, and foregoing description of the drawings are intended to cover non-exclusive inclusion.
[0021] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.
[0022] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0023] In the description of the embodiments of this application, the term "multiple" refers to two or more (including two), unless otherwise expressly and specifically defined.
[0024] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0025] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.
[0026] Firstly, please refer to Figure 1 , Figure 1 This is a schematic flowchart of an embodiment of a BMS controller detection method provided in this application. The BMS controller detection method provided in this embodiment includes the following steps.
[0027] Step S1: Obtain the joint probability distribution data of the historical running dataset, and randomly sample the running parameter group according to the joint probability distribution data to obtain the first test parameter group set.
[0028] This application provides a detailed explanation of the BMS controller testing method through the precise critical detection process of the BMS controller in the production line quality inspection process. In order to truly reflect the test scenario generation mechanism under the actual working conditions of the Battery Management System (BMS) controller, step S1 of this application is used to construct a joint probability distribution data of parameters by deeply mining historical operating data, and then generate an initial test parameter set with statistical representativeness based on the data.
[0029] It should be understood that the historical operating dataset used in this application is a collection of multi-dimensional parameters systematically collected during the actual operation and testing of the battery system. Sources include real-vehicle operation monitoring systems, laboratory charge-discharge cycle test benches, and high-precision battery simulation models. The historical operating dataset fully records various operating conditions experienced by the BMS controller in the real working environment. Its parameter dimensions must cover environmental parameters such as ambient temperature and humidity, electrical parameters such as total charge-discharge current and voltage, voltage at each cell terminal and voltage range, state parameters such as the overall state of charge and health of the system, and fault simulation parameters such as measurement deviations of key sensors and simulated insulation resistance values. These parameters together constitute a complete feature space describing the working scenario of the BMS controller. Since the original historical operating dataset often contains zero-value anomalies caused by communication interruptions, fluctuations introduced by sensor noise, and non-steady-state segments generated by the start-up and shutdown of test equipment, it must undergo a rigorous data preprocessing process. The original data preprocessing operations used in this application include outlier identification and removal based on sliding windows and statistical thresholds, time series alignment for asynchronous sensor sampling, and normalization scaling to ensure that all parameters are of the same order of magnitude. The optimized running dataset, obtained after cleaning, alignment, and standardization, lays a high-quality data foundation for subsequent probabilistic analysis.
[0030] After obtaining the preprocessed optimized running dataset, it is necessary to determine the optimal discretization granularity for probabilistic analysis, i.e., the number of parameter groups. Directly using a fixed grouping strategy in this application may not be suitable for the data distribution characteristics of different parameters; therefore, this embodiment requires performing a grouping number optimization analysis. This analysis systematically traverses each candidate grouping number within a preset range. For each candidate number, the entire optimized running dataset is divided into a training subset and a validation subset. Based on the training subset, probability distribution data under the corresponding number of groups is constructed. Subsequently, the goodness of fit of the model is evaluated on the validation subset. The evaluation metric typically uses the Bayesian information criterion, which considers model complexity. The smaller the Bayesian information criterion value, the better the balance between model complexity and fitting accuracy is achieved. Finally, the grouping number that minimizes the Bayesian information criterion value is selected as the optimal number of parameter groups for this optimized running dataset.
[0031] Once the optimal number of groups is determined, the optimized runtime dataset can be structurally partitioned. Based on the optimal number of groups and the numerical range of each runtime parameter, the value range of each parameter is divided into a specified number of continuous intervals with equal frequency or width. The Cartesian product of all parameter intervals constitutes a set of parameter intervals in a multidimensional parameter space, with each unit representing a specific range of parameter combinations. For each such multidimensional parameter interval unit, the statistical characteristics of all data points within it need to be calculated. The arithmetic mean of all data points within the unit across each parameter dimension is calculated, forming a mean vector representing the center position of the unit. Simultaneously, the covariance between all data points across each parameter dimension within the unit is calculated, forming a covariance matrix. The covariance matrix quantitatively describes the strength and direction of the linear correlation between different runtime parameters within the parameter interval unit; for example, it can capture typical constraint relationships such as "when the state of charge is high, the upper limit of the allowable charging current usually decreases accordingly."
[0032] Next, it is necessary to evaluate the importance weight of each parameter interval in the overall data. Traverse the entire parameter interval set and count the number of data points in the optimization run dataset that actually fall into each parameter interval cell. Divide the number of data points in each interval cell by the total size of the dataset to obtain the proportion of that interval. This proportion directly reflects the frequency of the corresponding parameter combination in historical runs. The calculated proportion is formally determined as the interval weight coefficient for that parameter interval; the higher the weight coefficient, the more common the operating condition represented by that parameter combination is in historical runs.
[0033] Next, after obtaining the mean vector, covariance matrix, and interval weight coefficients for all parameter intervals, this embodiment integrates the above information using a preset joint probability density function to construct complete joint probability distribution data. It should be understood that the core of the joint probability density function used in this application is to establish a weighted mixed probability model, the mathematical expression of which is: Where x represents a multidimensional set of operating parameters, This represents the joint probability density of the parameter group, where k is the index of the parameter interval. The interval weight coefficient for the k-th parameter interval. Let be the mean vector of the k-th interval. Let be the covariance matrix of the k-th interval. Indicated by For the mean, This is the multidimensional Gaussian probability density function of the covariance matrix. The aforementioned joint probability density function achieves a holistic fit to the complex, potentially multi-peaked, historical data distribution by weighted summation of the Gaussian components across all parameter intervals. Finally, a complete joint probability distribution data is generated, which is essentially a structured list explicitly recording each possible set of operating parameters and its corresponding joint probability value calculated using the aforementioned hybrid model. Specifically, in the joint probability distribution data that fully describes the coordinated changes among all key operating parameters of the battery management system, the joint probability value corresponding to the operating parameter set indicates the likelihood of a specific parameter value combination within the operating parameter set appearing together in the historical operating data. For example, in the historical operating data of the BMS controller, the probability of the event "BMS controller operating at an ambient temperature higher than 40°C" is 5%, and the probability of the event "BMS controller in fast charging mode (current greater than 1C)" is 10%. Through the above operation, the joint probability value representing the operating parameter set "temperature = 45°C, charging current > 1C" can be obtained.
[0034] Finally, based on the established joint probability distribution data, this application directly uses the joint probability value corresponding to each operating parameter group in the joint probability distribution data as the first sampling probability value for that parameter group to be selected during the random sampling process, thereby performing the extraction and generation operation of the first test parameter set as shown below. The random sampling method used in this embodiment is specifically the roulette wheel selection algorithm, which, based on the normalized first sampling probability value, extracts a specified number of operating parameter groups with replacement from the joint probability distribution data. The roulette wheel selection algorithm determines the selected parameter group by generating random numbers that fall into a sector area divided according to their probability values. Its characteristic is that the higher the joint probability value of the parameter group, the greater the probability of being selected. The multiple operating parameter groups extracted in this way together constitute the first test parameter set for subsequent preliminary simulation testing. This set faithfully reproduces the distribution pattern of historical operating data in terms of statistical characteristics, providing a realistic and comprehensive initial test scenario for the entire BMS critical detection process.
[0035] Step S2: Based on the preset critical parameter set, perform parameter group screening and simulation testing on the first test parameter set to generate a critical test run dataset.
[0036] While ensuring detection coverage, step S2 of this application significantly reduces the number of full simulation tests through an intelligent screening strategy, thereby improving the detection efficiency of the production line. It should be understood that the first set of test parameters obtained through step S1 contains a large number of operating parameter sets extracted from historical distributions, of which only a small number have critical risk parameter combinations. Therefore, preliminary screening of the first set of test parameters is necessary. The critical parameter set used in this embodiment as the screening benchmark is derived from the domain knowledge base and historical fault case database, and includes parameter configurations under typical fault scenarios, such as specific temperature and SOC combinations that cause voltage sampling errors, and high current and low internal resistance combinations that trigger overcharge protection delays.
[0037] Specifically, in this embodiment, the similarity assessment is performed on each set of operating parameters in the first test parameter set based on the critical parameter set, and the similarity algorithm used is the Mahalanobis distance algorithm. The calculation formula of the Mahalanobis distance algorithm is: Σ represents the parameter vector to be evaluated in the first test parameter set, y represents the benchmark parameter vector in the critical parameter set, and Σ is the covariance matrix of the historical dataset. This distance metric, by introducing the covariance structure between parameters, can accurately reflect the similarity of parameter sets in the statistical feature space. For example, when evaluating the similarity between a test parameter set and the "sensor drift" critical set, Mahalanobis distance considers the correlation characteristics between multiple parameters such as temperature, voltage, and current, and is better able to identify potential compound risks than ordinary Euclidean distance. The minimum Mahalanobis distance between each operating parameter set and each critical benchmark set is calculated as the critical similarity value of that set.
[0038] Next, based on a preset similarity threshold and the critical similarity values corresponding to each set of operating parameters obtained above, the first set of test parameters is classified. Parameter sets with critical similarity values below the threshold are classified as a subset of the first critical test parameter set. These parameter sets are distributed with a high probability near known critical regions in the feature space. The remaining parameter sets constitute a subset of the first test parameter set to be further evaluated. Although this subset does not directly match known critical patterns, it may still contain unidentified potential risks. This two-level classification mechanism ensures rapid identification of known risk patterns while reserving analytical space for discovering new critical scenarios.
[0039] Furthermore, a machine learning-based critical risk prediction method is employed for the in-depth screening of the first subset of test parameters. In this embodiment, a gradient boosting decision tree model is first constructed and trained as a surrogate model. The training data for this model comes from a historical simulation test database. The input features are various operating parameter groups, and the output labels are the corresponding BMS response states (such as SOC estimation error, protection function action flags, etc.). By inputting the first subset of test parameters into the trained surrogate model, the critical risk prediction values for each parameter group can be quickly obtained. Based on a pre-set risk threshold, parameter groups with risk values exceeding the threshold can be selected from the prediction results to form a second subset of critical test parameters. This surrogate model-based prediction method can complete the risk assessment of tens of thousands of parameters within milliseconds, achieving an efficiency improvement of three orders of magnitude compared to hardware-in-the-loop simulations that take several minutes per run.
[0040] Subsequently, the subset of the first critical test parameter group and the subset of the second critical test parameter group are merged and sent to the BMS controller hardware-in-the-loop test platform to perform the first simulation test. The test platform used in this application includes a real-time processor, a battery simulator, and a load simulator. Taking an automotive-grade BMS controller as an example, the actual response of the BMS controller under various combinations of critical parameters is collected by running standard driving cycle conditions or specific fault injection scenarios. The first running response data recorded in the simulation operation includes complete test trajectories such as time-series voltage data, current data, temperature data, state estimation values, and protection command trigger records. Finally, the critical test running dataset is constructed through structured data storage. The embodiments of this application adopt a key-value pair database storage scheme, using the parameter group hash value as the index key to establish an association mapping between the corresponding parameter configuration and the first running response data. The stored data unit contains complete metadata: parameter group number, parameter value set, simulation timestamp, response data file path, critical type identifier, and other fields. This organization method ensures that the complete test records corresponding to any critical parameter group can be quickly retrieved in the subsequent analysis stage, providing a validated data foundation for critical probability distribution analysis.
[0041] The operation in step S2 above, by integrating statistical similarity assessment and machine learning prediction, constructs a complete technical path for efficiently extracting critical cases from massive test scenarios, achieving optimized allocation of test resources while ensuring detection quality.
[0042] Step S3: Determine the critical probability distribution data based on the critical test run dataset, and then randomly sample the run parameter set based on the critical probability distribution data to obtain the second test parameter set.
[0043] To achieve targeted reinforcement testing of high-risk parameter group settings, step S3 of this application performs further deep feature mining on the critical test run dataset. The critical test run dataset obtained through step S2 above is a set of validated critical scenarios obtained in the preliminary screening, containing various combinations of operating parameters that may lead to BMS malfunction and their corresponding responses. First, feature extraction is performed on the critical test run dataset using a combination of multi-dimensional statistical analysis and principal component analysis. Specifically, basic statistics of each operating parameter in the critical dataset are calculated, including mean, standard deviation, skewness, and kurtosis. These indicators reveal the central tendency, dispersion, and distribution characteristics of individual parameters. For example, when analyzing critical scenarios involving voltage sampling anomalies, it may be found that the skewness value of a specific cell voltage is positive and large, indicating that the anomaly mostly occurs on the high voltage side. Principal component analysis is then used to determine the main variation directions in the parameter space, calculate the eigenvalues and eigenvectors of the covariance matrix, and select the top k principal components with a cumulative contribution rate exceeding 85% as the feature subspace. This dimensionality reduction process retains the core features of the critical parameter combinations while reducing the computational complexity for subsequent probabilistic modeling. The final critical operating feature set is a structured data set containing statistical features and principal component projection matrices, providing a feature basis for probability distribution estimation.
[0044] The distribution fitting based on the critical operating feature set employs a Gaussian mixture model as its core algorithm. This model fits complex multimodal distribution features through a linear combination of multiple Gaussian distributions, and its distribution fitting algorithm can be the joint probability density function in step S1 above. Further details on the distribution fitting algorithm are omitted here; please refer to the explanation of the joint probability density function in step S1 above. The Gaussian mixture model training uses the expectation-maximization algorithm for parameter optimization. This algorithm iteratively executes the E-step (calculating the posterior probability of a sample belonging to each component) and the M-step (updating model parameters to maximize the likelihood function) until convergence. Taking the battery overcharge critical scenario as an example, the Gaussian mixture model may automatically identify two main components: one corresponding to the high SOC state under high temperature conditions, and the other corresponding to the fast charging state under low temperature conditions, capturing overcharge risk patterns caused by different factors. The critical probability distribution data generated by the distribution fitting fully describes the clustering characteristics and relative occurrence intensity of various critical scenarios in the parameter space.
[0045] Next, when converting the critical probability distribution data into sampling probabilities, it is necessary to calculate the probability density value of each parameter group under this distribution. For a discretized set of parameter groups, this application directly uses its corresponding probability density as the second sampling probability value; for a continuous parameter space, the density value of each point is calculated through the probability density function and then normalized. This conversion ensures that in regions with higher probability density in the critical distribution, the corresponding parameter group has a greater chance of being selected, thereby ensuring that the generated test cases can centrally cover the most typical critical operating conditions. Subsequently, random sampling is implemented through the improved roulette wheel selection algorithm in step S1 above. This algorithm first normalizes the second sampling probability values of each parameter group so that their sum is 1. Then, a uniformly distributed random number is generated, and the selected parameter group is determined based on the position of this random number within the cumulative probability interval formed by the probability values of each parameter group. This sampling method ensures that the sampling results both follow the overall trend of the critical probability distribution and introduce necessary diversity through randomness. The sampling process is repeated until a parameter set of a predetermined size is obtained. The resulting second test parameter set has significant risk concentration characteristics, with more than 80% of the parameter sets belonging to high-risk critical scenarios that have been verified or predicted.
[0046] The operation in step S3 above, through systematic probability modeling and targeted sampling, effectively focuses test resources on high-risk areas, laying a data foundation for subsequent accurate evaluation. This accelerated testing strategy based on probability distribution improves the efficiency of testing the critical performance of the BMS controller by more than an order of magnitude under the same test resource conditions, while maintaining the statistical representativeness and engineering relevance of the test scenario.
[0047] Step S4: Perform simulation testing on the BMS controller according to the second test parameter set to obtain second operating response data. Then, perform weighted aggregation and statistical analysis on the second operating response data according to the joint probability distribution data and the critical probability distribution data to generate critical detection data of the BMS controller.
[0048] To transform the previously acquired test data into quantitative quality evaluation indicators, the second set of test parameters obtained from the above operations was first subjected to enhanced simulation testing. Specifically, on a hardware-in-the-loop test platform, the second set of test parameters was injected into a real-time simulation system group by group for second simulation testing. The real-time simulation system includes a high-precision battery model, a load simulator, and an environmental parameter controller. Standardized test procedures were executed, including constant current charge-discharge cycles, dynamic stress test conditions, and fault injection sequences, fully recording the response performance of the BMS controller under various enhanced critical scenarios. The collected second operational response data covered key performance indicators such as voltage monitoring accuracy, current sampling accuracy, temperature measurement reliability, state estimation error, and protection function action timeliness. The test duration for each parameter group was a complete operating cycle, ensuring stable performance evaluation results.
[0049] In this application, the weight calculation based on the joint probability distribution data and the critical probability distribution data adopts the importance sampling theory. For each parameter group in the second test parameter group set, the probability density value p(x) in the original joint probability distribution data and the probability density value q(x) in the critical probability distribution data are calculated. The formula for calculating the probability density ratio used in this application is: w(x) = p(x) / q(x), which is the critical scenario weight coefficient corresponding to the parameter group. This calculation process essentially establishes a mathematical correction mechanism to eliminate the statistical bias caused by the excessive concentration of test cases in the critical distribution. For example, a parameter group that causes serious overshoot in SOC estimation may have a high probability density in the critical distribution q(x) (because it belongs to the critical mode of focus), but its actual probability density in the original joint distribution p(x) is very low (indicating that the scenario is relatively rare in real operation). By calculating the weight coefficient w(x), this sampling bias is quantitatively compensated to ensure that subsequent statistical estimation can be restored to the probability level in the real operating environment. All weight coefficients need to be normalized to satisfy the basic properties of probability distribution.
[0050] In the weighted aggregation stage, weighting coefficients are systematically applied to the statistical analysis of various performance indicators. For each performance indicator, such as voltage sampling error, the error measurements corresponding to all test cases in the second run response data are first extracted. Then, using the weighting coefficients of each test case as weights, the weighted average of the indicator is calculated: Weighted Average = ,in This represents the error value of the i-th test case. These are the weight coefficients for the corresponding critical scenarios. The weighted standard deviation is also calculated: Weighted standard deviation = The weighted aggregation method described above ensures that the contribution of each test case is proportional to its probability of occurrence in the real operating environment during the statistical calculation process, thus obtaining a more realistic quality assessment result.
[0051] Finally, this embodiment of the application employs a statistical inference method combining interval estimation and hypothesis testing to generate the final critical detection data. Specifically, for each weighted performance index, a confidence interval with a 95% confidence level is constructed based on its weighted mean and weighted standard deviation. This interval estimation provides the possible range of values for the BMS controller's performance index under real-world operating conditions, and the interval width reflects the accuracy of the evaluation results. Simultaneously, hypothesis testing based on the weighted data is performed, with the null hypothesis that the performance index meets design specifications. The test statistic is calculated and compared with the critical value to draw a statistically significant conclusion. The final generated critical detection data is a structured report containing the weighted statistics for each performance index, confidence intervals, hypothesis test results, and an overall quality level evaluation. For example, in the SOC estimation accuracy assessment, the report might show a weighted average error of 2.1%, a 95% confidence interval of [1.8%, 2.4%], and statistical tests indicating that the error level is significantly higher than the design specifications, thus determining that the BMS controller has a critical risk in its SOC estimation function.
[0052] The operation in step S4 above, through rigorous application of statistical theory and a systematic data processing workflow, transforms the reinforcement data obtained from targeted testing into quantitative quality conclusions with engineering significance. This statistical inference method based on importance sampling fully utilizes the efficiency advantages of targeted testing while ensuring the authenticity and reliability of the evaluation results through mathematical correction, providing a solid technical basis for production line quality decisions. The final output critical detection data not only includes the quality status evaluation of the current batch of products but also provides the statistical distribution characteristics of various performance indicators, pointing out specific directions for production process improvement and design optimization.
[0053] On the other hand, please see Figure 2 , Figure 2 This is a schematic diagram of an embodiment of an electronic device provided in this application.
[0054] like Figure 2 As shown, the electronic device 2 in this embodiment includes: at least one processor 21 ( Figure 2 Only one is shown in the diagram), memory 22, and computer program 23 stored in the memory 22 and executable on the at least one processor 21, wherein the processor 21 executes the computer program 23 to implement the steps in the BMS controller detection method embodiment of this application.
[0055] Figure 2 The illustrated electronic device 2 may include, but is not limited to, a processor 21 and a memory 22. Those skilled in the art will understand that... Figure 2The example shown is merely an illustration of electronic device 2 and does not constitute a limitation on electronic devices. It may have more or fewer components than shown, or combine certain components, or have different components. For example, it may also include input / output devices, network access devices, etc.
[0056] The processor 21 may be a central processing unit (CPU), but it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), or field-programmable gate arrays (FPGAs). Programmable Gate Array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.
[0057] In some embodiments, the memory 22 may be an internal storage unit of the electronic device, such as a hard drive or memory. In other embodiments, the memory 22 may be an external storage device of the electronic device, such as a plug-in hard drive, smart media card (SMC), secure digital card (SD), flash card, etc. Furthermore, the memory 22 may include both internal and external storage units of the electronic device. The memory 22 is used to store the operating system, applications, bootloader, data, and other programs, such as the program code of the computer program. The memory 22 can also be used to temporarily store data that has been output or will be output.
[0058] Furthermore, in one embodiment, as Figure 3 As shown, this application also provides a BMS controller detection device, comprising: The first parameter module 1100 is used to obtain the joint probability distribution data of the historical running dataset, so as to randomly sample the running parameter group according to the joint probability distribution data to obtain the first test parameter group set. The critical screening module 1200 is used to perform parameter screening and simulation testing on the first test parameter set according to the preset critical parameter set, and generate a critical test run dataset. The second parameter module 1300 is used to determine critical probability distribution data based on the critical test run dataset, and to randomly sample the run parameter group based on the critical probability distribution data to obtain the second test parameter group set. The critical detection module 1400 is used to perform simulation testing on the BMS controller according to the second test parameter set to obtain second operating response data, and to perform weighted aggregation and statistical analysis on the second operating response data according to the joint probability distribution data and the critical probability distribution data to generate critical detection data of the BMS controller.
[0059] In some embodiments, the first parameter module 1100 is used for: Preprocess the preset historical running dataset to obtain the optimized running dataset; Based on the preset range of parameter grouping numbers and the optimized running dataset, an effectiveness analysis is performed on the number of each parameter group to determine the optimal number of parameter groups corresponding to the optimized running dataset. Based on the number of optimal parameter groups and the value range of each running parameter in the optimized running dataset, the optimized running dataset is divided into parameter interval sets to calculate the mean and covariance of each parameter interval. The number proportion of each parameter interval is statistically analyzed in the optimized running dataset based on the parameter interval set to obtain the number proportion of each parameter interval, and the number proportion is determined as the interval weight coefficient of each parameter interval. By using a preset joint probability density function, the probability density of the parameter group is estimated based on the mean, the covariance, and the interval weight coefficient, to obtain the joint probability value corresponding to each operating parameter group. The joint probability value is then associated with and stored with the corresponding operating parameter group to generate joint probability distribution data.
[0060] In some embodiments, the first parameter module 1100 is further configured to: The joint probability value is used as the first sampling probability value of the corresponding operating parameter group; By using a preset random sampling method, multiple sets of operating parameters are extracted from the joint probability distribution data according to the first sampling probability value to form a first test parameter set.
[0061] In some embodiments, the critical screening module 1200 is used for: Based on the preset critical parameter set, the similarity of each running parameter set in the first test parameter set is evaluated, and the critical similarity value of each running parameter set is generated. Based on the preset similarity threshold and the critical similarity value, the first test parameter set is classified to obtain the first critical test parameter set subset and the first test parameter set subset. The critical risk of the first test parameter set is predicted for the running state, so as to select the second critical test parameter set subset from the first test parameter set subset; Based on the first critical test parameter set subset and the second critical test parameter set subset, a first simulation test is performed on the BMS controller to obtain the first operating response data; The first critical test parameter set subset and each parameter set in the second critical test parameter set subset are associated and stored with the first running response data to generate a critical test running dataset.
[0062] In some embodiments, the second parameter module 1300 is used for: Parameter distribution features are extracted from the critical test run dataset to obtain the critical run feature set; The critical operating feature set is estimated by a preset distribution fitting algorithm to generate critical probability distribution data. The critical probability value in the critical probability distribution data is used as the second sampling probability value of the running parameter group corresponding to each critical probability value in the critical probability distribution data. Using the random sampling method, multiple sets of operating parameters are extracted from the critical probability distribution data according to the second sampling probability value to form a second test parameter set.
[0063] In some embodiments, the critical detection module 1400 is used for: A second simulation test is performed on the BMS controller according to the second set of test parameters to obtain the second operational response data of the BMS controller under critical scenarios. Based on the joint probability distribution data and the critical probability distribution data, the probability density ratio of each parameter group in the second test parameter set is calculated, and the probability density ratio is used as the critical scene weight coefficient of each parameter group in the second test parameter set. Based on the critical scenario weighting coefficients, the performance indicators in the second running response data are weighted and aggregated to generate a weighted performance indicator set. The weighted performance index set is statistically analyzed using a preset statistical inference method to generate critical detection data for the BMS controller.
[0064] It should be noted that the BMS controller detection device can be understood as a virtual device that can be installed in the electronic device in the aforementioned embodiments. The electronic device calls the BMS controller detection device through its processor, thereby running the specific implementation scheme in the above BMS controller detection method embodiments. The information interaction and execution process between the above devices / units are based on the same concept as the method embodiments of this application, and their specific functions and technical effects can be found in the method embodiments section.
[0065] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0066] This application also provides a storage medium, which is a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the steps in the above-described method embodiments.
[0067] This application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps described in the various method embodiments above.
[0068] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of this application can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include at least: any entity or device capable of carrying computer program code to a photographing device / terminal device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electrical carrier signals or telecommunication signals.
[0069] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0070] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A BMS controller detection method, characterized in that, The method includes: Obtain the joint probability distribution data of the historical running dataset, and randomly sample the running parameter group based on the joint probability distribution data to obtain the first test parameter group set; Based on the preset critical parameter set, the first test parameter set is screened and simulated to generate a critical test run dataset; Based on the critical test run dataset, determine the critical probability distribution data, and then randomly sample the run parameter set based on the critical probability distribution data to obtain the second test parameter set. The BMS controller is simulated and tested according to the second set of test parameters to obtain second operating response data. The second operating response data is then weighted, aggregated, and statistically analyzed according to the joint probability distribution data and the critical probability distribution data to generate critical detection data for the BMS controller.
2. The method according to claim 1, characterized in that, The joint probability distribution data of the historical running dataset includes: Preprocess the preset historical running dataset to obtain the optimized running dataset; Based on the preset range of parameter grouping numbers and the optimized running dataset, an effectiveness analysis is performed on the number of each parameter group to determine the optimal number of parameter groups corresponding to the optimized running dataset. Based on the number of optimal parameter groups and the value range of each running parameter in the optimized running dataset, the optimized running dataset is divided into parameter interval sets to calculate the mean and covariance of each parameter interval. The number proportion of each parameter interval is statistically analyzed in the optimized running dataset based on the parameter interval set to obtain the number proportion of each parameter interval, and the number proportion is determined as the interval weight coefficient of each parameter interval. By using a preset joint probability density function, the probability density of the parameter group is estimated based on the mean, the covariance, and the interval weight coefficient, to obtain the joint probability value corresponding to each operating parameter group. The joint probability value is then associated with and stored with the corresponding operating parameter group to generate joint probability distribution data.
3. The method according to claim 1, wherein the joint probability distribution data includes a set of operating parameters and corresponding joint probability values, characterized in that, The step of randomly sampling the operating parameter set based on the joint probability distribution data to obtain the first test parameter set includes: The joint probability value is used as the first sampling probability value of the corresponding operating parameter group; By using a preset random sampling method, multiple sets of operating parameters are extracted from the joint probability distribution data according to the first sampling probability value to form a first test parameter set.
4. The method according to claim 1, characterized in that, The step of performing parameter group filtering and simulation testing on the first test parameter set according to the preset critical parameter set to generate a critical test run dataset includes: Based on the preset critical parameter set, the similarity of each running parameter set in the first test parameter set is evaluated, and the critical similarity value of each running parameter set is generated. Based on the preset similarity threshold and the critical similarity value, the first test parameter set is classified to obtain the first critical test parameter set subset and the first test parameter set subset. The critical risk of the first test parameter set is predicted for the running state, so as to select the second critical test parameter set subset from the first test parameter set subset; Based on the first critical test parameter set subset and the second critical test parameter set subset, a first simulation test is performed on the BMS controller to obtain the first operating response data; The first critical test parameter set subset and each parameter set in the second critical test parameter set subset are associated and stored with the first running response data to generate a critical test running dataset.
5. The method according to claim 3, characterized in that, The step of determining the critical probability distribution data based on the critical test run dataset, and then randomly sampling the run parameter set based on the critical probability distribution data to obtain the second test parameter set includes: Parameter distribution features are extracted from the critical test run dataset to obtain the critical run feature set; The critical operating feature set is estimated by a preset distribution fitting algorithm to generate critical probability distribution data. The critical probability value in the critical probability distribution data is used as the second sampling probability value of the running parameter group corresponding to each critical probability value in the critical probability distribution data. Using the random sampling method, multiple sets of operating parameters are extracted from the critical probability distribution data according to the second sampling probability value to form a second test parameter set.
6. The method according to claim 1, characterized in that, The step of performing simulation testing on the BMS controller based on the second set of test parameters to obtain second operational response data, and then performing weighted aggregation and statistical analysis on the second operational response data based on the joint probability distribution data and the critical probability distribution data to generate critical detection data for the BMS controller includes: A second simulation test is performed on the BMS controller according to the second set of test parameters to obtain the second operational response data of the BMS controller under critical scenarios. Based on the joint probability distribution data and the critical probability distribution data, the probability density ratio of each parameter group in the second test parameter set is calculated, and the probability density ratio is used as the critical scene weight coefficient of each parameter group in the second test parameter set. Based on the critical scenario weighting coefficients, the performance indicators in the second running response data are weighted and aggregated to generate a weighted performance indicator set. The weighted performance index set is statistically analyzed using a preset statistical inference method to generate critical detection data for the BMS controller.
7. A BMS controller detection device, applied to the BMS controller detection method according to claim 1, characterized in that, The device includes: The first parameter module is used to obtain the joint probability distribution data of the historical running dataset, so as to randomly sample the running parameter group according to the joint probability distribution data to obtain the first test parameter group set. The critical screening module is used to perform parameter screening and simulation testing on the first test parameter set according to the preset critical parameter set, and generate a critical test run dataset. The second parameter module is used to determine the critical probability distribution data based on the critical test run dataset, and to randomly sample the run parameter group based on the critical probability distribution data to obtain the second test parameter group set. The critical detection module is used to perform simulation tests on the BMS controller according to the second set of test parameters to obtain second operating response data, and to perform weighted aggregation and statistical analysis on the second operating response data according to the joint probability distribution data and the critical probability distribution data to generate critical detection data of the BMS controller.
8. An electronic device, characterized in that, The electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the BMS controller detection method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the BMS controller detection method according to any one of claims 1 to 6.