Battery anomaly detection method, device and equipment based on sliding mode observer
By constructing an equivalent model and replacing the sign function with a sine curve bitangent function, a battery anomaly detection method based on sliding mode observers is used to achieve early identification and warning of battery soft faults and progressive faults, thereby improving the safety and operational reliability of the battery system.
Patent Information
- Application Number
- CN202511571062.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-30
- Publication Date
- 2026-03-17
AI Technical Summary
Existing battery anomaly detection methods struggle to achieve a good balance between robustness, real-time performance, and sensitivity to soft faults. In particular, they are insufficient in identifying hidden and slow-moving faults such as sudden changes in internal resistance, slow capacity decay, and localized aging, posing safety risks.
A battery anomaly detection method based on sliding mode observer is adopted. By constructing an equivalent model and sliding mode observer, the state of charge, terminal voltage and internal resistance are predicted using real-time operating data. Anomaly detection is performed by combining the interquartile range method. The sign function is replaced with the sine curve bitangent function to improve the stability of numerical calculation and the sensitivity to minor faults.
It enables early identification and warning of soft and progressive battery faults, improves the safety and operational reliability of the battery system, enhances the sensitivity and response speed to abnormal states inside the cell, and has the ability to resist disturbances and high-precision modeling.
Smart Images

Figure CN121679339A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of battery technology, and specifically to a battery anomaly detection method, apparatus, and equipment based on a sliding mode observer. Background Technology
[0002] Anomaly detection and early warning are core functions in the safety management of energy storage systems and have significant practical implications. Real-time monitoring and intelligent analysis of the cell operating status can effectively identify potential faults and prevent accidents, ensuring the long-term stable operation of the system.
[0003] Current mainstream battery anomaly detection methods primarily rely on real-time monitoring of operating parameters such as voltage, current, and temperature, comparing them with pre-set thresholds. When a detected parameter exceeds the threshold range, an alarm is triggered or protective measures are implemented. These methods are simple to implement and have low computational complexity, but due to their high dependence on threshold settings, their robustness and generalization ability are weak. They primarily demonstrate good response capabilities to hard faults such as voltage drops, overcurrent, and overtemperature. However, for soft faults and progressive faults—such as sudden changes in internal resistance, slow capacity decay, localized aging, and micro-short circuits—which are often subtle and evolve slowly, traditional threshold methods struggle to identify them in a timely manner, posing significant safety risks.
[0004] To improve detection accuracy and early warning capabilities, data-driven battery anomaly detection methods based on machine learning already exist, such as Isolation Forest, Density Clustering (DBSCAN), and Autoencoder. These methods can identify anomaly patterns and improve the soft fault detection rate to a certain extent, and have a certain degree of adaptability.
[0005] However, data-driven methods based on machine learning struggle to achieve a good balance between robustness, real-time performance, and sensitivity to soft faults when detecting battery anomalies. Therefore, there is an urgent need for an anomaly detection method that combines physical modeling capabilities with real-time monitoring capabilities to improve the intrinsic safety level of energy storage systems. Summary of the Invention
[0006] In view of this, embodiments of the present invention provide a battery anomaly detection method, apparatus, and device based on a sliding mode observer, thereby solving the problem that it is difficult to achieve a good balance between robustness, real-time performance, and sensitivity to soft faults when using data-driven methods based on machine learning for battery anomaly detection.
[0007] According to a first aspect, embodiments of the present invention provide a battery anomaly detection method based on a sliding mode observer, the method comprising: The system acquires real-time operating data of the battery under test, determines the real-time discharge rate of the battery based on the real-time operating data, and retrieves the matching open-circuit voltage-battery state of charge mapping curve from the open-circuit voltage-battery state of charge mapping curve database based on the real-time discharge rate. The open-circuit voltage-battery state of charge mapping curve database is constructed by conducting charge and discharge experiments at different charge and discharge rates using sample batteries of different models. The real-time operating data includes real-time current and rated capacity. An equivalent model is constructed based on the circuit dynamic characteristics of the battery, and a nonlinear system model for predicting the state of charge is constructed based on the equivalent model. A sliding mode observer is constructed based on a nonlinear system model. Based on the open-circuit voltage-battery state of charge mapping curve, operating data, and the constructed sliding mode observer, the predicted values of each state variable of each cell in the battery under test at each time point during the operating cycle are obtained. In the sliding mode observer, the sign function is replaced with a sine curve bitangent function. The predicted values of the state variables include the predicted state of charge, the predicted terminal voltage, and the predicted internal resistance. The system acquires the measured values of the state variables of each cell at each time point during the operating cycle. Based on the predicted and measured values of the state variables at each time point, abnormal cells are marked, and the abnormal detection result of the battery to be tested is determined based on the number of abnormal cells.
[0008] In conjunction with the first aspect, in the first embodiment of the first aspect, the formula for calculating the predicted value of the state variable is:
[0009]
[0010]
[0011] in, express Predicted state of charge at any given time; Indicates real-time current; Indicates the rated capacity; This represents the open-circuit voltage corresponding to the state of charge. express Predicted terminal voltage at time; express Predicted internal resistance at any given time; express The observation error at time, , express The measured value of the terminal voltage at that moment; Indicates sliding mode gain; This represents the bitangent function of a normal curve.
[0012] In conjunction with the first aspect, in the first embodiment of the first aspect, the step of constructing a sliding mode observer based on a nonlinear system model, and predicting the predicted values of each state variable of each cell in the battery under test at each time point during the operating cycle based on the open-circuit voltage-battery state of charge mapping curve, operating data, and the constructed sliding mode observer, specifically includes: The parameter correlations between each parameter are determined based on the equivalent model, and an initial framework for predicting state variables is constructed based on the first-order nonlinear system model. A sliding mode observer is constructed based on the initial framework, and the sign function in the sliding mode observer is replaced with a bitangent function of the orthogonal curve; The initial values of the predicted state of charge, predicted terminal voltage, and predicted internal resistance in the sliding mode observer are obtained based on the initial framework. Based on the open-circuit voltage-battery state of charge mapping curve, operating data, and initial values, the sliding mode observer is iteratively updated to obtain the predicted values of each state variable of each cell of the battery under test at each time point during the operating cycle.
[0013] In conjunction with the first aspect, in the third embodiment of the first aspect, the step of acquiring the measured values of the state variables of each cell at each time point during the operating cycle, marking abnormal cells based on the predicted and measured values of the state variables at each time point, and determining the abnormality detection result of the battery under test based on the number of abnormal cells specifically includes: Determine the predicted terminal voltage and the measured terminal voltage at each time point during the operating cycle for each cell; Based on the predicted terminal voltage and the measured terminal voltage at each time point, the residual of each cell at each time point is determined. The total residual of each cell during the operating cycle is obtained by accumulating the residuals at all time points within the operating cycle. The total residuals of all cells are sorted, and the first and third quartiles of the sorted total residuals are determined using the interquartile range method. The interquartile range is determined based on the first quartile and the third quartile, and the first and second dividing boundaries are determined based on the first quartile, the third quartile, the interquartile range, and the preset boundary coefficients. Based on the first and second dividing boundaries, the normal range is determined, and cells with total residuals exceeding the normal range are marked as abnormal cells. The abnormal detection result of the battery to be tested is determined based on the number of abnormal cells.
[0014] In conjunction with the first aspect, in the fourth embodiment of the first aspect, the equivalent model adopts a first-order resistor-capacitor equivalent circuit model, which is constructed through the following steps: A first-order resistor-capacitor equivalent circuit is constructed, and a first-order resistor-capacitor equivalent circuit model is established based on the first-order resistor-capacitor equivalent circuit. The first-order resistor-capacitor equivalent circuit model includes a voltage source with an open-circuit voltage, an ohmic internal resistance, a transmission internal resistance, and a polarization capacitor. The voltage source, the ohmic internal resistance, the transmission internal resistance, and the polarization capacitor are connected in parallel to each other and jointly describe the transient response characteristics of the battery.
[0015] In conjunction with the first aspect, in the fifth embodiment of the first aspect, the open-circuit voltage value-battery state of charge mapping curve database is specifically constructed through the following steps: Obtain sample batteries of different models and let all sample batteries stand for a preset time. Determine the experimental charge-discharge rate for each batch of charge-discharge experiments, and determine the experimental charging curve and discharge open-circuit curve for each batch of charge-discharge experiments based on the experimental charge-discharge rate. According to the experimental charging curve of each batch, the sample battery is charged for the corresponding batch of charge and discharge experiments. When the sample battery is charged to the preset state of charge, the sample battery is charged with the preset charging voltage until the sample battery is charged to the preset current state. The charging current of the sample battery during the charging process is determined according to the experimental charging curve and the charging current is a constant current. The preset charging voltage during the charging process is a constant voltage. The sample batteries were discharged according to the experimental discharge curve of each batch. The actual open circuit voltage of the sample battery under the actual battery charge state was determined at each preset charge value until the sample battery discharge was completed. The discharge current of the sample battery during the discharge process was determined according to the experimental discharge curve and the discharge current was constant. Based on the actual open-circuit voltage value and the actual battery state of charge corresponding to the actual open-circuit voltage value, determine the open-circuit voltage value-battery state of charge mapping curve for each batch of sample batteries in charge-discharge experiments. Collect open-circuit voltage value-battery state of charge mapping curves and construct an open-circuit voltage value-battery state of charge mapping curve database.
[0016] In conjunction with the fifth embodiment of the first aspect, in the sixth embodiment of the first aspect, before the step of collecting open-circuit voltage value-battery state of charge mapping curves and constructing an open-circuit voltage value-battery state of charge mapping curve database, the method further includes: Examine each open-circuit voltage value-battery state of charge mapping curve, remove outliers, and interpolate the voltage data to obtain the processed open-circuit voltage value-battery state of charge mapping curve.
[0017] According to a second aspect, embodiments of the present invention also provide a battery anomaly detection device based on a sliding mode observer, the device comprising: The curve matching module is used to acquire the real-time operating data of the battery under test, determine the real-time discharge rate of the battery under test based on the real-time operating data, and retrieve the matching open-circuit voltage value-battery state of charge mapping curve database based on the real-time discharge rate. The open-circuit voltage value-battery state of charge mapping curve database is constructed by conducting charge and discharge experiments at different charge and discharge rates using sample batteries of different models. The real-time operating data includes real-time current and rated capacity. The model building module is used to construct an equivalent model based on the circuit dynamic characteristics of the battery, and to construct a nonlinear system model to solve the prediction of the state of charge based on the equivalent model. The state prediction module is used to construct a sliding mode observer based on the nonlinear system model, and to predict the state variables of each cell in the battery under test at each time point during the operating cycle based on the open circuit voltage-battery state of charge mapping curve, operating data, and the constructed sliding mode observer. The sign function in the sliding mode observer is replaced with a sine curve bitangent function, and the predicted values of the state variables include the predicted state of charge, predicted terminal voltage, and predicted internal resistance. The anomaly detection module is used to acquire the measured values of the state variables of each cell at each time point during the operating cycle. Based on the predicted and measured values of the state variables at each time point, abnormal cells are marked, and the anomaly detection result of the battery to be tested is determined based on the number of abnormal cells.
[0018] According to a third aspect, embodiments of the present invention also provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the battery anomaly detection method based on the sliding mode observer as described above.
[0019] According to a fourth aspect, embodiments of the present invention also provide a computer program product, including a computer program that, when executed by a processor, implements the steps of the battery anomaly detection method based on a sliding mode observer as described in any of the preceding claims.
[0020] The present invention relates to a battery anomaly detection method, apparatus, and device based on a sliding mode observer. This method determines the real-time discharge rate of the battery under test based on its real-time operating data. Then, based on the real-time discharge rate, it retrieves a matching open-circuit voltage-battery state-of-charge (SOC) mapping curve from a database of open-circuit voltage-SOC curves. By introducing a rate-adaptive OCV curve matching mechanism, the method automatically matches the closest OCV-SOC mapping curve based on the real-time discharge rate of the battery under test. This significantly improves the modeling accuracy under multi-rate charge and discharge conditions, avoids estimation errors caused by fixed curves, and enhances adaptability to actual battery operating conditions. Subsequently, an equivalent model is constructed based on the dynamic characteristics of the battery circuit. A nonlinear system model for predicting the state of charge (SOC) is then built based on this equivalent model. Next, a sliding mode observer is constructed based on the nonlinear system model. The predicted values of each state variable at each time point within the operating cycle of each cell in the battery under test are obtained based on the open-circuit voltage-battery SOC mapping curve, operating data, and the constructed sliding mode observer. The sliding mode observer is improved by replacing the sign function with a sine curve double tangent function, resulting in a smoother sliding mode correction term. This improves the stability and convergence of the numerical calculation. Furthermore, the sine curve double tangent function amplifies voltage deviations, making the battery system more sensitive to minor faults and enhancing early warning capabilities. Finally, based on the predicted and measured values of state variables at each time point, abnormal cells are marked. The anomaly detection result of the battery under test is determined according to the number of abnormal cells. This method combines physical modeling and real-time monitoring capabilities, integrating the physical relationship between voltage, current, and state of charge. It can effectively detect soft faults and progressive anomalies during cell operation without relying on a large amount of labeled data. It can improve the sensitivity and response speed to abnormal states inside cells without increasing hardware complexity, enabling early identification and warning of soft faults and progressive degradation, thus enhancing the safety and reliability of the battery system. In addition, using a sliding mode observer to predict various state variables can effectively estimate the battery's state of charge and ohmic internal resistance while achieving anomaly detection. It has strong anti-disturbance capability and modeling accuracy, providing a new technical approach for accurate calculation of battery state of charge and ohmic internal resistance. It also provides more usable information for the energy management and safety control of the battery management system, improving the anomaly detection accuracy and early warning capability of the battery system, and enhancing the inherent safety level of the energy storage system. Attached Figure Description
[0021] The features and advantages of the invention will be more clearly understood by referring to the accompanying drawings, which are schematic and should not be construed as limiting the invention in any way. In the drawings: Figure 1 A schematic flowchart of the battery anomaly detection method based on a sliding mode observer provided by the present invention is shown. Figure 2 A circuit diagram of the first-order resistance-capacitance equivalent circuit model constructed in the battery anomaly detection method based on sliding mode observer provided by the present invention is shown. Figure 3 The diagram shows the open-circuit voltage-state-of-charge mapping curves of the same model sample battery at different charging rates in the battery anomaly detection method based on sliding mode observer provided by the present invention. Figure 4 The diagram shows the open-circuit voltage-state-of-charge mapping curves of the same model sample battery at different discharge rates in the battery anomaly detection method based on sliding mode observer provided by the present invention. Figure 5 The diagram shows a comparison of the voltage sequences of normal and abnormal cells in the battery anomaly detection method based on sliding mode observer provided by the present invention. Figure 6 This diagram illustrates the use of residuals output by a sliding mode observer for anomaly detection in the battery anomaly detection method based on a sliding mode observer provided by the present invention. Figure 7 A schematic diagram of the battery anomaly detection device based on a sliding mode observer provided by the present invention is shown. Figure 8 This is a schematic diagram of the hardware structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0022] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0023] Anomaly detection and early warning are core functions in the safety management of energy storage systems and have significant practical implications. Real-time monitoring and intelligent analysis of the cell operating status can effectively identify potential faults and prevent accidents, ensuring the long-term stable operation of the system.
[0024] Current mainstream battery anomaly detection methods primarily rely on real-time monitoring of operating parameters such as voltage, current, and temperature, comparing them with pre-set thresholds. When a detected parameter exceeds the threshold range, an alarm is triggered or protective measures are implemented. These methods are simple to implement and have low computational complexity, but due to their high dependence on threshold settings, their robustness and generalization ability are weak. They primarily demonstrate good response capabilities to hard faults such as voltage drops, overcurrent, and overtemperature. However, for soft faults and progressive faults that are insidious and evolve slowly, such as sudden changes in internal resistance, slow capacity decay, localized aging, and micro-short circuits, traditional threshold methods struggle to identify them in a timely manner, posing significant safety risks.
[0025] To improve detection accuracy and early warning capabilities, data-driven battery anomaly detection methods based on machine learning already exist, such as Isolation Forest, Density Clustering, and Autoencoders. These methods can identify anomaly patterns and improve the soft fault detection rate to some extent, and have a certain degree of adaptability.
[0026] However, data-driven methods based on machine learning generally suffer from the following problems when detecting battery anomalies: (1) The algorithm is complex to deploy, has high requirements for hardware resources and data quality, and is difficult to deploy in practice; (2) Lack of physical understanding of battery electrochemistry or equivalent models makes it difficult to accurately characterize the progressive degradation features; (3) It has limited ability to respond to early faults such as slight internal resistance changes and slight capacity decay, and there is a risk of misjudgment and missed detection, and the early warning is relatively delayed.
[0027] In summary, existing technologies struggle to achieve a good balance between robustness, real-time performance, and sensitivity to soft faults. There is an urgent need for an anomaly detection method that combines physical modeling capabilities with real-time monitoring capabilities to improve the intrinsic safety level of energy storage systems.
[0028] To address the aforementioned issues, this specification provides a battery anomaly detection method based on a sliding mode observer. This method aims to overcome the limitations of existing battery anomaly detection technologies in identifying subtle and slow-moving anomalies such as soft faults and gradual faults, particularly in cases of slow performance degradation and minute parameter mutations within the battery. This allows for effective early warning of abnormal batteries. The sliding mode observer-based battery anomaly detection method provided in this specification can be applied to electronic devices with suspicious file analysis capabilities. These electronic devices may include laptops, desktop computers, smartphones, smart wearable devices (virtual reality glasses, smartwatches, etc.), tablet computers, etc. Furthermore, the sliding mode observer-based battery anomaly detection method provided in this specification can also be applied to applications running on the aforementioned electronic devices. For example, this sliding mode observer-based battery anomaly detection method can be applied to browsers with suspicious file analysis capabilities or to suspicious file processing software. Figure 1 This is a schematic flowchart of a battery anomaly detection method based on a sliding mode observer according to an embodiment of the present invention, as shown below. Figure 1 As shown, the method may include the following steps: S101. Obtain the real-time operating data of the battery under test, including the real-time current. I and rated capacity According to real-time current I and rated capacity Determine the real-time discharge rate of the battery under test. According to the real-time discharge rate The matching OCV-SOC mapping curve is retrieved from the Open Circuit Voltage-Battery State of Charge (OCV-SOC mapping curve) database. This database was constructed using sample batteries of different models and charge / discharge rates. The database stores several OCV-SOC mapping curves, each with a different OCV-SOC mapping relationship.
[0029] Real-time discharge rate The specific calculation formula is as follows:
[0030] The real-time discharge rate of the battery under test is obtained through calculation. It can match the closest OCV-SOC mapping curve from the OCV-SOC mapping curve database for the battery under test. By introducing a rate-adaptive OCV curve matching mechanism, it automatically matches the closest OCV-SOC mapping curve according to the real-time discharge rate of the battery under test, which significantly improves the modeling accuracy under multi-rate charge and discharge conditions, avoids the estimation error caused by fixed curves, and enhances the adaptability to the actual operating conditions of the battery.
[0031] S102. Construct an equivalent model based on the circuit dynamic characteristics of the battery, and construct a nonlinear system model to solve the prediction of the state of charge based on the equivalent model.
[0032] In this embodiment, the equivalent model used is a first-order resistor-capacitor equivalent circuit model. The first-order RC equivalent circuit model is constructed through the following steps: Based on the circuit's dynamic characteristics, a first-order RC equivalent circuit is first constructed. Then, based on this first-order RC equivalent circuit, an RC network structure and a resistor connected in series constitute a first-order RC equivalent circuit model. The core component of this first-order RC equivalent circuit model includes a voltage source with an open-circuit voltage. One ohmic internal resistance One transmission internal resistance and a polarization capacitor These components are interconnected in parallel to collectively describe the transient response characteristics of the battery.
[0033] Please see Figure 2 In this first-order RC equivalent circuit model, express The terminal voltage at any given time (this parameter reflects the battery's voltage at any given time) (voltage state at time) Indicates the internal resistance of the ohm. Indicates the internal resistance of transmission. This indicates a polarized capacitor.
[0034] For a general nonlinear system, it can be described by the following first-order nonlinear system model:
[0035]
[0036] in, This refers to the status data of the battery cell, in this embodiment. It can be used to predict the state of charge and predict internal resistance; The input data for the battery cell, in this embodiment It can be a dynamic current; This refers to the output data of the battery cell, as described in this embodiment. It can be used to predict terminal voltage; This indicates the observation error. It is a known dynamic model of a battery (cell). It is the output equation, used to obtain the input data of the battery cell based on the cell's state data.
[0037] S103. Construct a sliding mode observer based on the nonlinear system model to predict the state of charge, terminal voltage, and ohmic internal resistance. Then, based on the OCV-SOC mapping curve, operating data, and the constructed sliding mode observer, predict the state variables of each cell of the battery under test at each time point during the operating cycle. Specifically, in the sliding mode observer, the sign function is replaced with a sine curve bitangent function, i.e. Function replacement The function; the predicted values of the state variables include the predicted state of charge, the predicted terminal voltage, and the predicted internal resistance.
[0038] The Sliding Mode Observer (SMO) is a robust state estimation method that effectively suppresses system uncertainties and external disturbances. The basic idea of the SMO is to construct a sliding surface such that the observation error approaches zero along the sliding surface, thereby achieving accurate estimation of the observed state vector. The SMO can be used to estimate the predicted state data of battery cells. ,Right now:
[0039] in, The estimated output data for the sliding mode observer; Indicates sliding mode gain; This represents the sign function, used to provide robust correction control terms. (Predicted state data) This includes the predicted state of charge and predicted internal resistance mentioned above.
[0040] In this embodiment, the sliding mode observer is constructed to accurately estimate the parameters of predicted state of charge, predicted internal resistance, and predicted terminal voltage. By introducing the sliding mode observer, the dynamic tracking accuracy and disturbance rejection capability of the above parameters are improved.
[0041] More specifically, step S103 includes: S1031. Determine the parameter correlation between each parameter based on the equivalent model, i.e., the first-order RC equivalent circuit model, and construct an initial framework for predicting state variables based on the first-order nonlinear system model.
[0042] The construction of a first-order RC equivalent circuit model during the construction of a sliding mode observer can provide the dynamic model of the battery (cell) required by the sliding mode observer, and can also assist the sliding mode observer in understanding the physical characteristics of various battery systems. The physical understanding obtained by the sliding mode observer can be used to capture the gradual degradation of the battery, which is convenient for accurately characterizing the gradual degradation features of the battery.
[0043] For a specific cell in the sample battery, the parameter correlations between various parameters can be obtained based on the first-order RC equivalent circuit model. Then, according to the first-order nonlinear system model, the initial framework for predicting state variables, namely, predicting the state of charge, predicting the terminal voltage, and predicting the internal resistance, can be expressed as follows:
[0044]
[0045]
[0046] in, express Predicted state of charge at any given time; The open-circuit voltage representing the state of charge is typically a complex nonlinear function. After matching the battery under test to the closest OCV-SOC mapping curve, the predicted state of charge is first determined. Then use the predicted state of charge The open-circuit voltage can be determined from the OCV-SOC mapping curve. The specific value; express Predicted terminal voltage at time; express Predicted internal resistance at any given time; express The observation error at a given moment is used to characterize the uncertainty or disturbance in the battery system; specifically... , express The measured value of the terminal voltage at that moment.
[0047] S1032. Construct a sliding mode observer based on the initial framework, and replace the sign function in the sliding mode observer with a bitangent function of the orthogonal curve, that is... Function replacement function.
[0048] Thus, the improved sliding mode observer is further optimized to obtain the calculation formulas for predicting the state of charge, predicted terminal voltage, and predicted internal resistance:
[0049]
[0050]
[0051] The above observation error , observation error Enter to In the function (nonlinear correction term), a smoother sliding mode correction term can be obtained, ensuring fast convergence in the sliding mode observer and avoiding error accumulation. This improves the stability and convergence of numerical calculations. The function can amplify voltage deviations, making the battery system more sensitive to minor faults and improving early warning capabilities. The improved sliding mode observer is also easy to embed into the battery management system, requiring only software upgrades and no additional hardware, lowering the deployment threshold and facilitating hardware-level deployment.
[0052] For batteries, the State of Charge (SOC) is numerically expressed as the ratio of remaining battery capacity to rated battery capacity. Based on this, the formula for predicting the state of charge is discretized to obtain a discrete state expression. The discrete state expression for predicting the state of charge is as follows:
[0053] in, This indicates the change in SOC; Indicates the sampling interval, which can generate a total of Each sampling time, that is, generating There are sampling steps, and the duration of each sampling step is . .
[0054] The final formula used to determine the predicted state of charge at each time point is:
[0055] in, Indicates the first Predicted state of charge in steps; This represents a cutoff function used to limit the predicted state of charge value to between 0 and 100%, preventing the predicted state of charge value from overflowing.
[0056] It should be noted that the discretized data can also be used directly. To determine the predicted state of charge at the corresponding time.
[0057] S1033. Based on the initial framework, obtain the initial values of the predicted state of charge, predicted terminal voltage, and predicted internal resistance in the sliding mode observer. This step is used to identify parameters and initialize the various parameters of the sliding mode observer.
[0058] S1034. Based on the OCV-SOC mapping curve, running data, and initial values, iteratively update the sliding mode observer to obtain the predicted values of each state variable of each cell of the battery under test at each time point during the running cycle.
[0059] The operating data includes real-time current and rated capacity. The matched OCV-SOC mapping curve can describe the mapping relationship between OCV and SOC. In this way, the predicted value obtained based on the sliding mode observer can integrate the physical relationship between voltage, current and state of charge (SOC). It can effectively detect soft faults and gradual anomalies in the operation of the cell without relying on a large amount of labeled data, that is, without relying on sample data and historical data. These include hidden risks such as slow increase in internal resistance, slight capacity degradation and deterioration of cell consistency.
[0060] The voltage surge caused by a transient change in current within the battery is due to the battery's ohmic internal resistance. The specific causes are:
[0061] in, This indicates the voltage value at the instant before the battery begins to discharge; This indicates the voltage value when the battery begins to discharge; This indicates the voltage value at the end of battery discharge; This indicates the voltage value at the instant immediately after the battery discharge ends; This represents the discharge current during the battery discharge process.
[0062] During discharge, sudden changes in battery voltage are caused by ohmic internal resistance. This is caused by polarization, manifesting as a transient voltage drop. The slow voltage decrease is dominated by polarization, and its dynamic characteristics are determined by the transmission resistance in the first-order RC equivalent circuit. and polarization capacitor The parallel circuit is related to the response under step current excitation; after discharge, the battery polarization disappears, and the battery voltage gradually rises, which is related to the transmission resistance in the first-order RC equivalent circuit. and polarization capacitor The parallel circuit is related, and the battery is in a zero-input response state at this time.
[0063] The initial value of the ohmic resistance in the iterative process can be obtained through the above calculation process, i.e. .
[0064] After matching the battery under test to the closest OCV-SOC mapping curve, the predicted state of charge is first determined. Then use the predicted state of charge The open-circuit voltage can be determined from the OCV-SOC mapping curve. The specific value, so according to , , These parameters are iterated over time. This allows us to obtain the predicted values of the terminal voltage at various time points.
[0065] Then, based on the difference between the predicted and measured values of the terminal voltage at each time point, the observation error at each time point is determined. Similarly, based on... , And iterates with time step size The predicted values of the ohmic internal resistance at various time points can be obtained based on the operating data. And iterates with time step size , This allows us to obtain the predicted values of the state of charge at various time points.
[0066] S104. Obtain the measured values of the state variables of each cell at each time point during the operating cycle. Based on the predicted and measured values of the state variables at each time point, mark the abnormal cells. Determine the abnormal detection result of the battery to be tested based on the number of abnormal cells.
[0067] In this embodiment, the Interquartile Range (IQR) method is used for anomaly detection to mark abnormal cells. Specifically, it combines the IQR method with a residual-driven cell anomaly marking mechanism. By accumulating and sorting the residuals between the predicted terminal voltage obtained by the sliding mode observer and the measured terminal voltage, quantitative identification of abnormal cells can be achieved without a training process. This avoids the drawbacks of traditional machine learning algorithms being susceptible to sample distribution shifts, while also being highly reliable, computationally efficient, and easy to deploy.
[0068] The battery anomaly detection method based on sliding mode observer of the present invention determines the real-time discharge rate of the battery under test based on the real-time operating data of the battery under test, and then retrieves the matching open-circuit voltage-battery state of charge mapping curve from the open-circuit voltage-battery state of charge mapping curve database according to the real-time discharge rate. By introducing a matching mechanism of rate-adaptive OCV curve, the closest OCV-SOC mapping curve is automatically matched according to the real-time discharge rate of the battery under test, which significantly improves the modeling accuracy under multi-rate charge and discharge conditions, avoids the estimation error caused by fixed curves, and enhances the adaptability to the actual operating conditions of the battery. Subsequently, an equivalent model is constructed based on the dynamic characteristics of the battery circuit. A nonlinear system model for predicting the state of charge (SOC) is then built based on this equivalent model. Next, a sliding mode observer is constructed based on the nonlinear system model. The predicted values of each state variable at each time point within the operating cycle of each cell in the battery under test are obtained based on the open-circuit voltage-battery SOC mapping curve, operating data, and the constructed sliding mode observer. The sliding mode observer is improved by replacing the sign function with a sine curve double tangent function, resulting in a smoother sliding mode correction term. This improves the stability and convergence of the numerical calculation. Furthermore, the sine curve double tangent function amplifies voltage deviations, making the battery system more sensitive to minor faults and enhancing early warning capabilities. Finally, based on the predicted and measured values of state variables at each time point, abnormal cells are marked. The anomaly detection result of the battery under test is determined according to the number of abnormal cells. This method combines physical modeling and real-time monitoring capabilities, integrating the physical relationship between voltage, current, and state of charge. It can effectively detect soft faults and progressive anomalies during cell operation without relying on a large amount of labeled data. It can improve the sensitivity and response speed to abnormal states inside cells without increasing hardware complexity, enabling early identification and warning of soft faults and progressive degradation, thus enhancing the safety and reliability of the battery system. In addition, using a sliding mode observer to predict various state variables can effectively estimate the battery's state of charge and ohmic internal resistance while achieving anomaly detection. It has strong anti-disturbance capability and modeling accuracy, providing a new technical approach for accurate calculation of battery state of charge and ohmic internal resistance. It also provides more usable information for the energy management and safety control of the battery management system, improving the anomaly detection accuracy and early warning capability of the battery system, and enhancing the inherent safety level of the energy storage system.
[0069] Please see Figure 3 and Figure 4 In this embodiment, the OCV-SOC mapping curve database is constructed through the following steps: S201. Obtain sample batteries of different models and allow all sample batteries to stand for a preset time to ensure that each sample battery reaches a stable state. All sample batteries are allowed to stand in this manner.
[0070] In this embodiment, the preset time can be configured by the user, for example, the preset time can be set to 1 hour.
[0071] S202. Determine the experimental charge-discharge rate for each batch of charge-discharge experiments, and determine the experimental charging curve and discharge open-circuit curve for each batch of charge-discharge experiments based on the experimental charge-discharge rate.
[0072] S203. Based on the experimental charging curve of each batch, charge and discharge the sample batteries according to the corresponding batch's charge and discharge experiment. When the sample battery is charged to the preset state of charge, charge the sample battery with the preset charging voltage until the sample battery is charged to the preset current state. Charge all sample batteries in this way.
[0073] In this embodiment, the preset state of charge is that the battery is close to full charge, such as 90% SOC; the preset current state is that the battery current drops to a certain threshold to ensure that the battery is fully charged.
[0074] By setting preset states of charge and current, it can be ensured that the charge and discharge capacities of different types of sample batteries remain consistent across different experimental charge and discharge rates. Subsequent capacity normalization processing of the data collected from all charge and discharge experiments ensures the uniformity of the SOC coordinate values in the plotted OCV-SOC curve. Setting the preset state of charge to the SOC state also ensures the uniformity of the SOC coordinate values in the plotted OCV-SOC curve.
[0075] To ensure controllability and stability during the initial charging process, the charging current of the sample battery is determined based on the experimental charging curve. This charging current is a constant current, meaning that the sample battery is first charged using a preset constant current, and then switched to being charged using a preset constant voltage.
[0076] S204. Based on the experimental discharge curve of each batch, discharge the sample batteries according to the corresponding batch charge-discharge experiment, and determine the actual open-circuit voltage value of the sample battery under the actual battery charge state at each preset charge value during discharge, until the sample battery discharge is completed. Discharge all sample batteries in this way.
[0077] In this embodiment, the discharge current of the sample battery during the discharge process is determined according to the experimental discharge curve, and the discharge current is a constant current. By discharging with a constant current and recording the corresponding actual open circuit voltage value once for each discharge of the sample battery at a preset state of charge value, such as 2% SOC, the actual open circuit voltage value can be recorded once whenever the SOC of the sample battery reaches an actual SOC value during the discharge process.
[0078] In this embodiment, in order to obtain higher calculation accuracy, the reduction of SOC is accurately calculated by ampere-hour integration during the discharge process of the sample battery.
[0079] Battery measurements such as current, voltage, and time are prone to anomalies or omissions due to sensor malfunctions or communication interruptions. Considering that there may be abnormal or missing values (such as time, current, and voltage) in the various battery data obtained during the charging and discharging process, this embodiment of the application will complete the acquired battery data by using methods such as interpolation, mean filling, and model prediction to ensure the continuity of data time sequence.
[0080] Then calculate the sampling time difference and cumulative charge, and convert them into Coulomb integrals to assist in the estimation of SOC evolution. Specifically:
[0081] in, Indicates duration from 0 to The cumulative amount of charge within a given time period; Indicates the first Step and the first The sampling interval of a step is the time interval between adjacent sampling steps.
[0082] This process, involving data completion, time difference calculation, and coulomb integration discretization, provides continuous and quantified charge data for SOC estimation, forming the foundational preprocessing workflow for accurate battery state monitoring.
[0083] S205. Based on the actual open-circuit voltage value and the corresponding actual battery state of charge, determine the open-circuit voltage-battery state of charge mapping curve for each batch of sample batteries in the charge-discharge experiment. Plot the recorded OCV values and corresponding SOC values to form the OCV-SOC mapping curve for the corresponding batch of charge-discharge experiments, and statistically analyze the OCV-SOC mapping curves of different models of sample batteries at different experimental charge-discharge rates.
[0084] In this embodiment, in order to ensure that the plotted OCV-SOC mapping curve can be applied to subsequent abnormal battery detection, the process of resting, charging, discharging and recording will be repeated multiple times. After each discharge, the battery under test will be allowed to rest for a sufficient time, and then the open circuit voltage value will be measured. That is, steps S201 to S205 will be repeated.
[0085] S206. Check each OCV-SOC mapping curve, remove outliers, and interpolate the voltage data to obtain the processed OCV-SOC mapping curve.
[0086] Since the voltage points of the original voltage data may not be uniformly distributed across 0-100% SOC, and SOC has monotonicity and interpolability within the 0-100% range, the original voltage data can be interpolated at a uniform SOC point (e.g., one point for every 1% SOC) to generate a smooth mapping curve of open-circuit voltage versus SOC. Interpolation methods can include linear interpolation, cubic spline interpolation, etc.
[0087] S207. Collect the processed OCV-SOC mapping curves and construct an OCV-SOC mapping curve database. A standardized OCV-SOC mapping curve database can be built using these OCV-SOC mapping curves.
[0088] Please see Figure 5 and Figure 6 In this embodiment, step S104 includes: S10411. Determine the predicted terminal voltage and the measured terminal voltage of each cell at each time point during the operating cycle, that is, determine the parameters corresponding to each time point of the cell during the operating cycle. and parameters .
[0089] S10412. Based on the predicted terminal voltage and the measured terminal voltage at each time point, determine the residual at each time point for each cell. Specifically:
[0090] in, Indicates the battery's first Energy-saving cells The residual at time. The calculation of observation error is an instantaneous dynamic indicator. In order to focus on the magnitude of variation, the residual is in the form of the absolute value of the observation error.
[0091] S10413. Accumulate the residuals of each cell at all time points during the operating cycle to obtain the total residual of each cell during the operating cycle. Specifically:
[0092] in, Indicates the first Total residual of the energy-saving cell.
[0093] S10414. Sort the total residuals of all cells and determine the first and third quartiles of the sorted total residuals using the IQR method. Specifically:
[0094]
[0095] in, This represents the first quartile, also known as the lower quartile, and is used to represent the 25th percentile of the data. This represents the third quartile, also known as the upper quartile, and is used to represent the 75th percentile of the data.
[0096] S10415. Determine the interquartile range based on the first quartile and the third quartile, and determine the first and second dividing boundaries based on the first quartile, the third quartile, the interquartile range, and the preset boundary coefficients. Specifically:
[0097]
[0098]
[0099] in, Indicates the interquartile range; This indicates the first boundary of the division, which is also the lower boundary of the division; This indicates the second boundary, also known as the upper boundary of the boundary. This represents the preset boundary coefficients, which users can set themselves, for example, by setting the parameters... The value is set to 1.5.
[0100] S10416. Based on the first and second dividing boundaries, determine the normal range, mark cells with total residuals exceeding the normal range as abnormal cells, and determine the abnormal detection result of the battery to be tested based on the number of abnormal cells.
[0101] Cells with a total residual less than the first dividing boundary or greater than the second dividing boundary will be marked as abnormal cells. When there is at least one abnormal cell in a battery composed of several cells, the battery will also be judged as an abnormal battery. In this way, the abnormal detection result of the battery to be tested can be determined based on the number of abnormal cells.
[0102] In this embodiment, step S104 may further include: S10421. Determine the weights of the predicted values of each state variable. Since the predicted values of the state variables include the predicted state of charge, the predicted terminal voltage, and the predicted internal resistance, the weights of the predicted state of charge, the predicted terminal voltage, and the predicted internal resistance will be determined.
[0103] S10422. Based on the predicted value, measured value, and weight corresponding to the predicted value of the state variables at each time point in the operating cycle, determine the residual of each time point of each cell.
[0104] Unlike step S10412, in this embodiment, the residual calculation process takes into account each state variable. Based on each state variable, a residual component constituting the residual is obtained, such as the state of charge residual. Terminal voltage residual , internal resistance residual The calculation method for each residual component is as described in the steps. The calculation method involves determining the state variables using predicted and measured values, and then using the weights of the state variables to calculate the residuals for each cell at each time point. Specifically:
[0105] in, Indicates the battery's first Energy-saving cells Time residuals; Indicates the first Energy-saving cells The residual state of charge at time t; Indicates the first Energy-saving cells The terminal voltage residual at time t; Indicates the first Energy-saving cells The internal resistance residual at time step; Indicates the weights for predicting the state of charge; Indicates the weight of the predicted terminal voltage; This represents the weight for predicting internal resistance.
[0106] S10423. Accumulate the residuals of each cell at all time points during the operating cycle to obtain the total residual of each cell during the operating cycle. The specifics are as described in step S10413 and will not be repeated here.
[0107] S10424. Sort the total residuals of all cells and determine the first and third quartiles of the sorted total residuals using the interquartile range method. The details are as described in step S10414 and will not be repeated here.
[0108] S10425. Determine the interquartile range based on the first quartile and the third quartile, and determine the first dividing boundary and the second dividing boundary based on the first quartile, the third quartile, the interquartile range, and the preset boundary coefficient. The specifics are as described in step S10415, and will not be repeated here.
[0109] S10426. Based on the first and second dividing boundaries, determine the normal range, mark cells with total residuals exceeding the normal range as abnormal cells, and determine the abnormal detection result of the battery to be tested based on the number of abnormal cells. The specific steps are as described in step S10416, and will not be repeated here.
[0110] Similarly, cells with a total residual less than the first dividing boundary or greater than the second dividing boundary will be marked as abnormal cells. When there is at least one abnormal cell in a battery composed of several cells, the battery will also be judged as an abnormal battery. In this way, the abnormal detection result of the battery to be tested can be determined according to the number of abnormal cells.
[0111] The following describes the battery anomaly detection device based on a sliding mode observer provided in the embodiments of the present invention. The battery anomaly detection device based on a sliding mode observer described below can be referred to in correspondence with the battery anomaly detection method based on a sliding mode observer described above.
[0112] To address the aforementioned issues, this specification provides a battery anomaly detection device based on a sliding mode observer. This device aims to overcome the limitations of existing battery anomaly detection technologies in identifying subtle and slow-moving anomalies such as soft faults and gradual faults, especially in cases of slow degradation of battery internal performance and sudden changes in minute parameters, thereby enabling effective early warning of abnormal batteries. Figure 7 This is a schematic diagram of a battery anomaly detection device based on a sliding mode observer according to an embodiment of the present invention, as shown below. Figure 7 As shown, the device may include: Curve matching module 10 is used to acquire real-time operating data of the battery under test, including real-time current. I and rated capacity According to real-time current I and rated capacity Determine the real-time discharge rate of the battery under test. According to the real-time discharge rate The matching OCV-SOC mapping curve is retrieved from the Open Circuit Voltage-Battery State of Charge (OCV-SOC mapping curve) database. This database was constructed using sample batteries of different models and charge / discharge rates. The database stores several OCV-SOC mapping curves, each with a different OCV-SOC mapping relationship.
[0113] The real-time discharge rate of the battery under test is obtained through calculation. It can match the closest OCV-SOC mapping curve from the OCV-SOC mapping curve database for the battery under test. By introducing a rate-adaptive OCV curve matching mechanism, it automatically matches the closest OCV-SOC mapping curve according to the real-time discharge rate of the battery under test, which significantly improves the modeling accuracy under multi-rate charge and discharge conditions, avoids the estimation error caused by fixed curves, and enhances the adaptability to the actual operating conditions of the battery.
[0114] Model building module 20 is used to build an equivalent model based on the circuit dynamic characteristics of the battery, and to build a nonlinear system model to solve the prediction of the state of charge based on the equivalent model.
[0115] In this embodiment, the equivalent model used is a first-order RC equivalent circuit model, which is constructed through the following steps: Based on the circuit's dynamic characteristics, a first-order RC equivalent circuit is first constructed. Then, based on this first-order RC equivalent circuit, an RC network structure and a resistor connected in series constitute a first-order RC equivalent circuit model. The core component of this first-order RC equivalent circuit model includes a voltage source with an open-circuit voltage. One ohmic internal resistance One transmission internal resistance and a polarization capacitor These components are interconnected in parallel to collectively describe the transient response characteristics of the battery.
[0116] In this first-order RC equivalent circuit model, express The terminal voltage at any given time (this parameter reflects the battery's voltage at any given time) (voltage state at time) Indicates the internal resistance of the ohm. Indicates the internal resistance of transmission. This indicates a polarized capacitor.
[0117] The state prediction module 30 is used to construct a sliding mode observer based on a nonlinear system model to predict the state of charge, terminal voltage, and ohmic internal resistance. It acquires the operating data of the battery under test and, based on the operating data and the constructed sliding mode observer, predicts the predicted values of each state variable of each cell of the battery under test at each time point during the operating cycle. The operating data includes real-time current and rated capacity, and the predicted values of the state variables include predicted state of charge, predicted terminal voltage, and predicted internal resistance.
[0118] The sliding mode observer is a robust state estimation method that effectively suppresses system uncertainties and external disturbances. The basic idea of the sliding mode observer is to construct a sliding surface such that the observation error tends to zero along the sliding surface, thereby achieving accurate estimation of the observed state vector.
[0119] in, The estimated output data for the sliding mode observer; Indicates sliding mode gain; This represents the sign function, used to provide robust correction control terms. (Predicted state data) This includes the predicted state of charge and predicted internal resistance, and the predicted terminal voltage can be obtained from the predicted state of charge and predicted internal resistance.
[0120] In this embodiment, the sliding mode observer is constructed to accurately estimate the observed state vectors, namely the predicted state of charge, the predicted internal resistance, and the predicted terminal voltage.
[0121] By constructing a first-order RC equivalent circuit model for the sliding mode observer, a dynamic model of the battery (cell) required by the sliding mode observer can be provided. This model can also assist the sliding mode observer in gaining a physical understanding of various characteristics of the battery system. The physical understanding obtained by the sliding mode observer can be used to capture the progressive degradation of the battery, making it easier to accurately characterize the progressive degradation features of the battery.
[0122] During discharge, sudden changes in battery voltage are caused by ohmic internal resistance. This is caused by polarization, manifesting as a transient voltage drop. The slow voltage decrease is dominated by polarization, and its dynamic characteristics are determined by the transmission resistance in the first-order RC equivalent circuit. and polarization capacitor The parallel circuit is related to the response under step current excitation; after discharge, the battery polarization disappears, and the battery voltage gradually rises, which is related to the transmission resistance in the first-order RC equivalent circuit. and polarization capacitor The parallel circuit is related, and the battery is in a zero-input response state at this time. The initial value of the ohmic internal resistance in the iterative process can be obtained through the above calculation process, i.e. .
[0123] The anomaly detection module 40 is used to acquire the measured values of the state variables of each cell at each time point during the operating cycle, mark the abnormal cells based on the predicted values and measured values of the state variables at each time point, and determine the anomaly detection result of the battery to be tested based on the number of abnormal cells.
[0124] In this embodiment, the IQR method is used for anomaly detection to mark abnormal cells. Specifically, it combines the IQR method with a residual-driven cell anomaly marking mechanism. By accumulating and sorting the residuals between the predicted terminal voltage obtained by the sliding mode observer and the measured terminal voltage, quantitative identification of abnormal cells can be achieved without a training process. This avoids the drawbacks of traditional machine learning algorithms being susceptible to sample distribution shifts, while also being highly reliable, computationally efficient, and easy to deploy.
[0125] The battery anomaly detection device based on a sliding mode observer of the present invention determines the real-time discharge rate of the battery under test based on the real-time operating data of the battery under test, and then retrieves the matching open-circuit voltage-battery state of charge mapping curve from the open-circuit voltage-battery state of charge mapping curve database according to the real-time discharge rate. By introducing a matching mechanism of rate-adaptive OCV curve, the device automatically matches the closest OCV-SOC mapping curve according to the real-time discharge rate of the battery under test, which significantly improves the modeling accuracy under multi-rate charge and discharge conditions, avoids the estimation error caused by fixed curves, and enhances the adaptability to the actual operating conditions of the battery. Subsequently, an equivalent model is constructed based on the dynamic characteristics of the battery circuit. A nonlinear system model for predicting the state of charge (SOC) is then built based on this equivalent model. Next, a sliding mode observer is constructed based on the nonlinear system model. The predicted values of each state variable at each time point within the operating cycle of each cell in the battery under test are obtained based on the open-circuit voltage-battery SOC mapping curve, operating data, and the constructed sliding mode observer. The sliding mode observer is improved by replacing the sign function with a sine curve double tangent function, resulting in a smoother sliding mode correction term. This improves the stability and convergence of the numerical calculation. Furthermore, the sine curve double tangent function amplifies voltage deviations, making the battery system more sensitive to minor faults and enhancing early warning capabilities. Finally, based on the predicted and measured values of state variables at each time point, abnormal cells are marked. The anomaly detection result of the battery under test is determined according to the number of abnormal cells. This method combines physical modeling and real-time monitoring capabilities, integrating the physical relationship between voltage, current, and state of charge. It can effectively detect soft faults and progressive anomalies during cell operation without relying on a large amount of labeled data. It can improve the sensitivity and response speed to abnormal states inside cells without increasing hardware complexity, enabling early identification and warning of soft faults and progressive degradation, thus enhancing the safety and reliability of the battery system. In addition, using a sliding mode observer to predict various state variables can effectively estimate the battery's state of charge and ohmic internal resistance while achieving anomaly detection. It has strong anti-disturbance capability and modeling accuracy, providing a new technical approach for accurate calculation of battery state of charge and ohmic internal resistance. It also provides more usable information for the energy management and safety control of the battery management system, improving the anomaly detection accuracy and early warning capability of the battery system, and enhancing the inherent safety level of the energy storage system.
[0126] Figure 8 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 8As shown, the electronic device may include: a processor 810, a communication interface 820, a memory 830, and a communication bus 840, wherein the processor 810, the communication interface 820, and the memory 830 communicate with each other through the communication bus 840. The processor 810 can call logical commands in the memory 830 to execute a battery anomaly detection method based on a sliding mode observer, the method including: The system acquires real-time operating data of the battery under test, determines the real-time discharge rate of the battery based on the real-time operating data, and retrieves the matching open-circuit voltage-battery state of charge mapping curve from the open-circuit voltage-battery state of charge mapping curve database based on the real-time discharge rate. The open-circuit voltage-battery state of charge mapping curve database is constructed by conducting charge and discharge experiments at different charge and discharge rates using sample batteries of different models. The real-time operating data includes real-time current and rated capacity. An equivalent model is constructed based on the circuit dynamic characteristics of the battery, and a nonlinear system model for predicting the state of charge is constructed based on the equivalent model. A sliding mode observer is constructed based on a nonlinear system model. Based on the open-circuit voltage-battery state of charge mapping curve, operating data, and the constructed sliding mode observer, the predicted values of each state variable of each cell in the battery under test at each time point during the operating cycle are obtained. The predicted values of the state variables include the predicted state of charge, the predicted terminal voltage, and the predicted internal resistance. The system acquires the measured values of the state variables of each cell at each time point during the operating cycle. Based on the predicted and measured values of the state variables at each time point, abnormal cells are marked, and the abnormal detection result of the battery to be tested is determined based on the number of abnormal cells.
[0127] Furthermore, the logical instructions in the aforementioned memory 830 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0128] On the other hand, the present invention also provides a computer program product, the computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions, wherein when the program instructions are executed by a computer, the computer is able to execute the battery anomaly detection method based on sliding mode observer provided by the above methods, the method comprising: The system acquires real-time operating data of the battery under test, determines the real-time discharge rate of the battery based on the real-time operating data, and retrieves the matching open-circuit voltage-battery state of charge mapping curve from the open-circuit voltage-battery state of charge mapping curve database based on the real-time discharge rate. The open-circuit voltage-battery state of charge mapping curve database is constructed by conducting charge and discharge experiments at different charge and discharge rates using sample batteries of different models. The real-time operating data includes real-time current and rated capacity. An equivalent model is constructed based on the circuit dynamic characteristics of the battery, and a nonlinear system model for predicting the state of charge is constructed based on the equivalent model. A sliding mode observer is constructed based on a nonlinear system model. Based on the open-circuit voltage-battery state of charge mapping curve, operating data, and the constructed sliding mode observer, the predicted values of each state variable of each cell in the battery under test at each time point during the operating cycle are obtained. The predicted values of the state variables include the predicted state of charge, the predicted terminal voltage, and the predicted internal resistance. The system acquires the measured values of the state variables of each cell at each time point during the operating cycle. Based on the predicted and measured values of the state variables at each time point, abnormal cells are marked, and the abnormal detection result of the battery to be tested is determined based on the number of abnormal cells.
[0129] In another aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to perform the aforementioned battery anomaly detection methods based on sliding mode observers, the method comprising: The system acquires real-time operating data of the battery under test, determines the real-time discharge rate of the battery based on the real-time operating data, and retrieves the matching open-circuit voltage-battery state of charge mapping curve from the open-circuit voltage-battery state of charge mapping curve database based on the real-time discharge rate. The open-circuit voltage-battery state of charge mapping curve database is constructed by conducting charge and discharge experiments at different charge and discharge rates using sample batteries of different models. The real-time operating data includes real-time current and rated capacity. An equivalent model is constructed based on the circuit dynamic characteristics of the battery, and a nonlinear system model for predicting the state of charge is constructed based on the equivalent model. A sliding mode observer is constructed based on a nonlinear system model. Based on the open-circuit voltage-battery state of charge mapping curve, operating data, and the constructed sliding mode observer, the predicted values of each state variable of each cell in the battery under test at each time point during the operating cycle are obtained. The predicted values of the state variables include the predicted state of charge, the predicted terminal voltage, and the predicted internal resistance. The system acquires the measured values of the state variables of each cell at each time point during the operating cycle. Based on the predicted and measured values of the state variables at each time point, abnormal cells are marked, and the abnormal detection result of the battery to be tested is determined based on the number of abnormal cells.
[0130] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention 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; and these 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 the present invention.
Claims
1. A battery anomaly detection method based on a sliding mode observer, characterized in that, The method includes: The system acquires real-time operating data of the battery under test, determines the real-time discharge rate of the battery based on the real-time operating data, and retrieves the matching open-circuit voltage-battery state of charge mapping curve from the open-circuit voltage-battery state of charge mapping curve database based on the real-time discharge rate. The open-circuit voltage-battery state of charge mapping curve database is constructed by conducting charge and discharge experiments at different charge and discharge rates using sample batteries of different models. The real-time operating data includes real-time current and rated capacity. An equivalent model is constructed based on the circuit dynamic characteristics of the battery, and a nonlinear system model for predicting the state of charge is constructed based on the equivalent model. A sliding mode observer is constructed based on a nonlinear system model. Based on the open-circuit voltage-battery state of charge mapping curve, operating data, and the constructed sliding mode observer, the predicted values of each state variable of each cell in the battery under test at each time point during the operating cycle are obtained. In the sliding mode observer, the sign function is replaced with a sine curve bitangent function. The predicted values of the state variables include the predicted state of charge, the predicted terminal voltage, and the predicted internal resistance. The system acquires the measured values of the state variables of each cell at each time point during the operating cycle. Based on the predicted and measured values of the state variables at each time point, abnormal cells are marked, and the abnormal detection result of the battery to be tested is determined based on the number of abnormal cells.
2. The battery anomaly detection method based on a sliding mode observer according to claim 1, characterized in that, The formula for calculating the predicted value of the state variable is: in, express Predicted state of charge at any given time; Indicates real-time current; Indicates the rated capacity; This represents the open-circuit voltage corresponding to the state of charge. express Predicted terminal voltage at time; express Predicted internal resistance at any given time; express The observation error at time, , express The measured value of the terminal voltage at that moment; Indicates sliding mode gain; This represents the bitangent function of a normal curve.
3. The battery anomaly detection method based on a sliding mode observer according to claim 1, characterized in that, The process involves constructing a sliding mode observer based on a nonlinear system model, and using the open-circuit voltage-battery state-of-charge mapping curve, operating data, and the constructed sliding mode observer to predict the state variables of each cell in the battery under test at each time point during the operating cycle. Specifically, this includes: The parameter correlations between each parameter are determined based on the equivalent model, and an initial framework for predicting state variables is constructed based on the first-order nonlinear system model. A sliding mode observer is constructed based on the initial framework, and the sign function in the sliding mode observer is replaced with a bitangent function of the orthogonal curve; The initial values of the predicted state of charge, predicted terminal voltage, and predicted internal resistance in the sliding mode observer are obtained based on the initial framework. Based on the open-circuit voltage-battery state of charge mapping curve, operating data, and initial values, the sliding mode observer is iteratively updated to obtain the predicted values of each state variable of each cell of the battery under test at each time point during the operating cycle.
4. The battery anomaly detection method based on a sliding mode observer according to claim 1, characterized in that, The process of acquiring measured values of state variables for each cell at various time points during the operating cycle, marking abnormal cells based on predicted and measured values of state variables at each time point, and determining the anomaly detection result of the battery under test based on the number of abnormal cells specifically includes: Determine the predicted terminal voltage and the measured terminal voltage at each time point during the operating cycle for each cell; Based on the predicted terminal voltage and the measured terminal voltage at each time point, the residual of each cell at each time point is determined. The total residual of each cell during the operating cycle is obtained by accumulating the residuals at all time points within the operating cycle. The total residuals of all cells are sorted, and the first and third quartiles of the sorted total residuals are determined using the interquartile range method. The interquartile range is determined based on the first quartile and the third quartile, and the first and second dividing boundaries are determined based on the first quartile, the third quartile, the interquartile range, and the preset boundary coefficients. Based on the first and second dividing boundaries, the normal range is determined, and cells with total residuals exceeding the normal range are marked as abnormal cells. The abnormal detection result of the battery to be tested is determined based on the number of abnormal cells.
5. The battery anomaly detection method based on a sliding mode observer according to claim 1, characterized in that, The equivalent model adopts a first-order resistor-capacitor equivalent circuit model, which is constructed through the following steps: A first-order resistor-capacitor equivalent circuit is constructed, and a first-order resistor-capacitor equivalent circuit model is established based on the first-order resistor-capacitor equivalent circuit. The first-order resistor-capacitor equivalent circuit model includes a voltage source with an open-circuit voltage, an ohmic internal resistance, a transmission internal resistance, and a polarization capacitor. The voltage source, the ohmic internal resistance, the transmission internal resistance, and the polarization capacitor are connected in parallel to each other and jointly describe the transient response characteristics of the battery.
6. The battery anomaly detection method based on a sliding mode observer according to claim 1, characterized in that, The open-circuit voltage value-battery state of charge mapping curve database is constructed through the following steps: Obtain sample batteries of different models and let all sample batteries stand for a preset time. Determine the experimental charge-discharge rate for each batch of charge-discharge experiments, and determine the experimental charging curve and discharge open-circuit curve for each batch of charge-discharge experiments based on the experimental charge-discharge rate. According to the experimental charging curve of each batch, the sample battery is charged for the corresponding batch of charge and discharge experiments. When the sample battery is charged to the preset state of charge, the sample battery is charged with the preset charging voltage until the sample battery is charged to the preset current state. The charging current during the sample battery charging process was determined based on the experimental charging curve and was a constant current. The preset charging voltage during the charging process was a constant voltage. Based on the experimental discharge curve of each batch, the sample battery is discharged according to the corresponding batch charge and discharge experiment, and the actual open circuit voltage value of the sample battery under the actual battery charge state is determined when the preset charge value is discharged, until the sample battery discharge ends. The discharge current during the discharge process of the sample battery was determined based on the experimental discharge curve and was a constant current. Based on the actual open-circuit voltage value and the actual battery state of charge corresponding to the actual open-circuit voltage value, determine the open-circuit voltage value-battery state of charge mapping curve for each batch of sample batteries in charge-discharge experiments. Collect open-circuit voltage value-battery state of charge mapping curves and construct an open-circuit voltage value-battery state of charge mapping curve database.
7. The battery anomaly detection method based on a sliding mode observer according to claim 6, characterized in that, Before the step of collecting open-circuit voltage value-battery state of charge mapping curves and constructing an open-circuit voltage value-battery state of charge mapping curve database, the following steps are also included: Examine each open-circuit voltage value-battery state of charge mapping curve, remove outliers, and interpolate the voltage data to obtain the processed open-circuit voltage value-battery state of charge mapping curve.
8. A battery anomaly detection device based on a sliding mode observer, characterized in that, The device includes: The curve matching module is used to acquire the real-time operating data of the battery under test, determine the real-time discharge rate of the battery under test based on the real-time operating data, and retrieve the matching open-circuit voltage value-battery state of charge mapping curve database based on the real-time discharge rate. The open-circuit voltage value-battery state of charge mapping curve database is constructed by conducting charge and discharge experiments at different charge and discharge rates using sample batteries of different models. The real-time operating data includes real-time current and rated capacity. The model building module is used to construct an equivalent model based on the circuit dynamic characteristics of the battery, and to construct a nonlinear system model to solve the prediction of the state of charge based on the equivalent model. The state prediction module is used to construct a sliding mode observer based on the nonlinear system model, and to predict the state variables of each cell in the battery under test at each time point during the operating cycle based on the open circuit voltage-battery state of charge mapping curve, operating data, and the constructed sliding mode observer. The sign function in the sliding mode observer is replaced with a sine curve bitangent function, and the predicted values of the state variables include the predicted state of charge, predicted terminal voltage, and predicted internal resistance. The anomaly detection module is used to acquire the measured values of the state variables of each cell at each time point during the operating cycle. Based on the predicted and measured values of the state variables at each time point, abnormal cells are marked, and the anomaly detection result of the battery to be tested is determined based on the number of abnormal cells.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the battery anomaly detection method based on a sliding mode observer as described in any one of claims 1 to 7.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the battery anomaly detection method based on a sliding mode observer as described in any one of claims 1 to 7.