Intelligent complementary energy detection method for safe utilization of battery
By performing first-order differential processing and adaptive division of battery monitoring data, and combining the frequency and weight values of the differential value to clean the data, the problem of the impact of dirty data in battery residual energy detection is solved, and the accuracy and stability of the detection model are improved. , realizes more accurate battery residual energy detection.
Patent Information
- Application Number
- CN202411053046.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-02
- Publication Date
- 2024-11-19
AI Technical Summary
The prior art is difficult to accurately reflect the actual residual energy of the battery in battery residual energy detection, especially when the power is lower than a certain level, and the multi-parameter coordinated detection model is greatly affected by dirty data, resulting in deviations in the detection result.
By obtaining multiple monitoring data sequences during battery use, first-order differential processing is performed and adaptively divided into sub-sequences, the weight value is obtained according to the frequency of the occurrence of the difference value, and the normal distribution time interval is constructed to clean the data to reduce noise and abnormality The impact of data allows training of more accurate battery residual energy detection models.
It improves the accuracy and stability of the battery residual energy detection model, enhances the detection efficiency, and ensures the reliability and accuracy of the data.
Smart Images

Figure CN118981730A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a method for intelligently detecting residual energy of a battery for safe utilization. Background Art
[0002] With the rapid development of science and technology and the growing global demand for clean energy, battery technology, especially lithium battery technology, has become a key power source in many fields such as electric vehicles, smart phones, laptops, aerospace, etc. Lithium batteries have gradually replaced traditional batteries due to their high energy density, long cycle life and environmental protection characteristics, becoming one of the main power sources in the 21st century. However, with the increase in battery usage, its safety issues have become increasingly prominent, especially in the detection and utilization of battery residual energy, which urgently requires more accurate and intelligent methods.
[0003] For the detection of the remaining battery capacity, the traditional voltage detection method determines the battery capacity by monitoring the voltage of the battery. However, since there is no strict linear relationship between the battery capacity and the voltage, especially when the battery capacity is below a certain level (such as 50%), the accuracy of the voltage detection method is significantly reduced, and it is difficult to accurately reflect the actual remaining energy of the battery. Considering that a single parameter (voltage) cannot fully reflect the internal state changes of the battery, in the prior art, the battery remaining capacity detection is performed through multi-parameter collaboration, that is, by collecting multi-dimensional data of the battery to build a nonlinear mapping relationship model based on machine learning, considering the complex behavior of the battery in different states, and realizing the accurate estimation of SOC, but there is dirty data in the collected data, which will affect the accuracy of the model, resulting in a large deviation in the results of the battery remaining capacity detection using the constructed model.
[0004] Therefore, how to remove dirty data in the multidimensional data of the battery to improve the detection performance of the nonlinear mapping relationship model used to detect the remaining energy of the battery has become an urgent problem to be solved. Summary of the invention
[0005] In view of this, an embodiment of the present invention provides a method for intelligently detecting the remaining energy of a battery for safe utilization, so as to solve the problem of how to remove dirty data in the multidimensional data of the battery so as to improve the detection performance of the nonlinear mapping relationship model used to detect the remaining energy of the battery.
[0006] An embodiment of the present invention provides a method for intelligently detecting residual energy of a battery for safe utilization, the method comprising the following steps:
[0007] Acquire at least two monitoring data sequences during battery use;
[0008] For any monitoring data sequence, first-order difference processing is performed on the monitoring data sequence to obtain a corresponding difference sequence, and according to the change of the difference value in the difference sequence, the difference sequence is adaptively divided into at least two subsequences, and according to the occurrence frequency of each difference value in the difference sequence, a weight value of each difference value in each of the subsequences is obtained;
[0009] According to the weight value of each differential value in each of the subsequences, a normal distribution time interval of each of the subsequences is correspondingly obtained, and the abnormal data in the monitoring data sequence is cleaned according to the normal distribution time interval of each of the subsequences to obtain a monitoring data sequence after data cleaning;
[0010] Obtain a monitoring data sequence after data cleaning corresponding to each monitoring data sequence, use all the monitoring data sequences after data cleaning to train a battery remaining energy detection model to obtain a trained battery remaining energy detection model, and use the trained battery remaining energy detection model to perform real-time detection of the battery remaining energy.
[0011] Preferably, the step of adaptively dividing the difference sequence into at least two subsequences according to a change in a difference value in the difference sequence comprises:
[0012] For any sub-segment length within a preset sub-segment length range, the differential sequence is divided into a plurality of initial sub-sequences using the sub-segment length, and the differential value variance of each initial sub-sequence is obtained according to the differential value in each initial sub-sequence, and the average value of the differential value variance of all initial sub-sequences is calculated, and the average value is negatively mapped using an exponential function with a natural constant as the base, and the corresponding mapping value is used as the preferred degree of the sub-segment length;
[0013] The preference degree of each sub-segment length within the sub-segment length range is obtained, the sub-segment length corresponding to the maximum preference degree is used as the optimal sub-segment length, and the differential sequence is adaptively divided into at least two sub-sequences using the optimal sub-segment length.
[0014] Preferably, the step of obtaining a weight value of each differential value in each of the subsequences according to the occurrence frequency of each differential value in the differential sequence includes:
[0015] The k-th difference values in all subsequences form a new sequence, the number of occurrences of each difference value type in the new sequence is counted, the ratio between the number of occurrences of each difference value type and the total number of occurrences in the new sequence is calculated as the weight value of the corresponding difference value type, and the k-th difference value in each subsequence is assigned the weight value of the corresponding difference value type;
[0016] According to the difference value type corresponding to each difference value in each of the subsequences, a weight value of each difference value in each of the subsequences is obtained.
[0017] Preferably, the step of obtaining the normal distribution time interval of each subsequence according to the weight value of each differential value in each subsequence includes:
[0018] For any subsequence, all differential values are weighted and averaged according to the weight value of each differential value in the subsequence to obtain a weighted mean, and a weighted standard deviation of the subsequence is obtained according to the weighted mean;
[0019] According to the weighted mean and weighted standard deviation of the subsequence, a corresponding normal distribution curve is fitted, a difference value statistical histogram of the subsequence is constructed, a statistical curve of the difference value statistical histogram is obtained, a similarity between the normal distribution curve and the statistical curve is obtained, and the similarity is normalized to obtain a corresponding normalized value;
[0020] A multiple of the weighted standard deviation is obtained according to the normalized value, and a normal distribution time interval of the subsequence is constructed according to the multiple of the weighted standard deviation, the weighted standard deviation and the weighted mean.
[0021] Preferably, the step of performing data cleaning on the abnormal data in the monitoring data sequence according to the normal distribution time interval of each subsequence to obtain the monitoring data sequence after data cleaning includes:
[0022] For any subsequence, a differential value outside the normal distribution time interval in the subsequence is taken as an abnormal differential value, a data subsegment corresponding to the subsequence is obtained in the monitoring data sequence, a data mean of the data subsegment is calculated, data corresponding to each abnormal differential value is obtained in the data subsegment as abnormal data, and the abnormal data in the data subsegment is replaced by the data mean to obtain a target data subsegment;
[0023] The target data sub-segment corresponding to each of the sub-sequences is obtained, and all the target data sub-segments are combined into a monitoring data sequence after data cleaning.
[0024] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:
[0025] The present invention obtains at least two monitoring data sequences during the use of a battery; for any monitoring data sequence, first-order difference processing is performed on the monitoring data sequence to obtain a corresponding difference sequence; according to the change of the difference value in the difference sequence, the difference sequence is adaptively divided into at least two subsequences; according to the frequency of occurrence of each difference value in the difference sequence, a weight value of each difference value in each subsequence is obtained; according to the weight value of each difference value in each subsequence, a normal distribution time interval of each subsequence is correspondingly obtained; according to the normal distribution time interval of each subsequence, data cleaning is performed on abnormal data in the monitoring data sequence to obtain a monitoring data sequence after data cleaning; the monitoring data sequence after data cleaning corresponding to each monitoring data sequence is obtained, and a battery remaining energy detection model is trained using all the monitoring data sequences after data cleaning to obtain a trained battery remaining energy detection model, and the trained battery remaining energy detection model is used to perform real-time detection of the battery remaining energy. Among them, before training the battery remaining energy detection model, the collected multi-dimensional monitoring data sequence is cleaned separately to reduce the impact of noise data or abnormal data on model training and improve the accuracy and stability of the model. In the data cleaning process, considering the local characteristics of the monitoring data sequence, that is, the local data distribution does not necessarily present a normal distribution, the differential sequence of the monitoring data sequence is locally processed through an adaptive window to obtain the normal distribution time interval of each subsequence, so as to specifically clean the abnormal data corresponding to each subsequence, and obtain a monitoring data sequence with more reliable and accurate data, thereby improving the efficiency of battery remaining energy detection using the battery remaining energy detection model. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0027] Figure 1 This is a method flow chart of a method for intelligently detecting residual energy of a battery for safe utilization provided in the first embodiment of the present invention. DETAILED DESCRIPTION
[0028] Embodiments of the present disclosure are described in detail below, and examples of the embodiments are shown in the accompanying drawings. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present disclosure, but should not be understood as limiting the present disclosure.
[0029] It should be noted that the terms "first", "second", etc. in the specification of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure.
[0030] In order to illustrate the technical solution of the present invention, specific embodiments are provided below for illustration.
[0031] See also Figure 1 , is a method flow chart of a method for intelligently detecting residual energy of a battery for safe utilization provided by the first embodiment of the present invention, such as Figure 1 As shown, the method may include:
[0032] Step S101, obtaining at least two monitoring data sequences during battery use.
[0033] The monitoring data collected by the present invention include but are not limited to voltage, current, temperature, and internal resistance, wherein the collection method of each monitoring data is as follows:
[0034] Voltage data, usually use a high-precision voltmeter or data acquisition system to measure the voltage of the battery. These devices should have sufficient resolution and stability to ensure the accuracy of the measurement results; connect the positive and negative poles of the acquisition device to the positive and negative poles of the battery respectively, ensure that the connection is firm and the contact is good, start the acquisition device, read and record the voltage value of the battery. During the reading process, care should be taken to avoid the battery being in a load state to avoid affecting the accuracy of the measurement results.
[0035] Example: Assuming that a multimeter is used for voltage acquisition, first adjust the multimeter to the voltage measurement range, then connect the red and black test leads to the positive and negative electrodes of the battery respectively, wait for the multimeter to stabilize, and then read and record the displayed voltage value. For example, the voltage value of a ternary lithium battery in a static state is 3.7V.
[0036] Current data, select a suitable current sensor according to the rated current of the battery and the measurement accuracy requirements. Common current sensors include Hall sensors, shunts, etc. Connect the current sensor in series in the discharge circuit of the battery to ensure that the current can accurately pass through the sensor and be measured. The output signal of the current sensor is read through the data acquisition system or instrument and converted into the actual current value.
[0037] Example: In electric vehicles, high-precision Hall sensors are often used to measure the discharge current of power batteries. The sensor is installed at the output end of the battery pack and connected in series with the discharge circuit. The output signal of the sensor is read in real time by the data acquisition system, and the actual discharge current value is obtained after conversion. For example, at a certain moment, the discharge current of the power battery is 50A.
[0038] Temperature data, evenly arrange temperature sensors on the surface or inside of the battery to monitor the temperature changes of the battery. Common temperature sensors include thermistors, thermocouples, etc. Connect the temperature sensor to the data acquisition system or instrument to ensure that the signal can be accurately transmitted. Start the acquisition equipment, read and record the temperature value of the battery. During the reading process, care should be taken to avoid the temperature sensor being affected by external heat sources.
[0039] Example: In a battery management system, multiple Pt100 temperature sensors are usually placed inside or on the surface of the battery pack to monitor the temperature of the battery. These sensors are connected to the data acquisition system through wires. When the system is started, the temperature value of each sensor is read and recorded in real time. For example, at a certain moment, the surface temperature of a single battery is 25°C.
[0040] Internal resistance data, select the appropriate fixed resistor and data acquisition system according to the battery capacity and measurement accuracy requirements. Connect the fixed resistor in series with the battery to form a closed loop. During the battery discharge or charging process, measure the voltage change at both ends of the battery through the data acquisition system. Calculate the internal resistance: According to Ohm's law (R = U / I), the internal resistance of the battery is calculated by measuring the voltage change and the known current value. It should be noted that in actual operation, due to the dynamic change characteristics of the battery internal resistance, more complex measurement methods may be required to improve the measurement accuracy.
[0041] Example (simplified explanation): Although it is difficult to directly give a specific numerical example of internal resistance acquisition (because internal resistance measurement usually involves complex calculations and equipment calibration), the basic principle of internal resistance acquisition can be briefly explained. For example, when using the internal resistance method to measure the internal resistance of a lithium battery, a fixed resistor of known resistance can be connected in series with the lithium battery, and the voltage change at both ends of the battery can be observed during the discharge or charging process. By measuring the voltage change and current value, the internal resistance of the battery can be calculated. In practical applications, in order to improve measurement accuracy and reliability, more professional internal resistance test instruments and methods are usually used for measurement.
[0042] In summary, parameters such as voltage, current, temperature and internal resistance are important data in battery remaining energy detection. Therefore, for at least two types of monitoring data, refer to the above-mentioned acquisition method to obtain the corresponding monitoring data sequences during the use of the battery. One type of monitoring data corresponds to one monitoring data sequence, which provides strong support for subsequent SOC estimation.
[0043] Step S102: for any monitoring data sequence, perform first-order difference processing on the monitoring data sequence to obtain a corresponding difference sequence; according to the change of the difference value in the difference sequence, adaptively divide the difference sequence into at least two subsequences; according to the frequency of occurrence of each difference value in the difference sequence, obtain the weight value of each difference value in each subsequence.
[0044] The purpose of the present invention is to train a battery remaining energy detection model through a variety of monitoring data sequences of the battery, so as to detect the battery remaining energy using the trained battery remaining energy detection model. However, when training the battery remaining energy detection model, noise data or abnormal data will affect the accuracy and stability of the model training. Therefore, before training the battery remaining energy detection model, it is necessary to perform denoising and abnormal data removal operations on the collected monitoring data, that is, data cleaning, to ensure the data accuracy and effectiveness during model training.
[0045] The 3σ criterion of normal distribution is usually used to detect abnormal data and perform data cleaning on the abnormal data. However, the 3σ criterion is based on the statistical information of global data. When the distribution of the data does not show a normal distribution, its effect is poor. Therefore, by considering the local characteristics of the data, the original data sequence needs to be segmented so that the distribution of each segment is as consistent as possible with the changing characteristics of the data itself.
[0046] Specifically, for any monitoring data sequence, the monitoring data sequence is firstly subjected to first-order difference processing to obtain the corresponding difference sequence. Each difference value in the difference sequence is obtained by subtracting the previous data from the next data in the monitoring data sequence. Assume that the monitoring data sequence is [a1, a2, a3, a4, … a n ], then the difference sequence corresponds to [a1',a2',a3',a4',…a n-1 ']. During the discharge process of the battery, its various parameters are relatively constant (such as current) and gradually decrease (voltage). At this time, the differential values in the differential sequence have certain similarities, so the differential sequence is divided into multiple data sub-segments by segmentation, and the change trend of each data sub-segment is ensured to be the same or similar as much as possible during segmentation. It is worth noting that when performing data analysis, the amount of data in the data sub-segment should not be too much or too little. If the amount of data in the data sub-segment is too much, it will lead to a large amount of calculation. At the same time, if the amount of data in the data sub-segment is too little, it will reduce the reference. If the amount of data in the data sub-segment is too little, it will lead to the loss of the trend of change. Therefore, according to the change of the differential value in the differential sequence, the differential sequence is adaptively divided into at least two sub-sequences.
[0047] According to the change of the difference value in the difference sequence, the difference sequence is adaptively divided into at least two subsequences, including:
[0048] For any sub-segment length within a preset sub-segment length range, the differential sequence is divided into a plurality of initial sub-sequences using the sub-segment length, and the differential value variance of each initial sub-sequence is obtained according to the differential value in each initial sub-sequence, and the average value of the differential value variance of all initial sub-sequences is calculated, and the average value is negatively mapped using an exponential function with a natural constant as the base, and the corresponding mapping value is used as the preferred degree of the sub-segment length;
[0049] The preference degree of each sub-segment length within the sub-segment length range is obtained, the sub-segment length corresponding to the maximum preference degree is used as the optimal sub-segment length, and the differential sequence is adaptively divided into at least two sub-sequences using the optimal sub-segment length.
[0050] In one embodiment, the empirical length range of the data sub-segment obtained based on big data analysis is [s min ,s max ], where s min Indicates the minimum sub-segment length, s max Represents the maximum sub-segment length. For the difference sequence, firstly, the difference sequence is divided into multiple initial sub-sequences with any sub-segment length Δs within the empirical length range. If the sub-segment length Δs is the optimal sub-segment length, the data fluctuation degree of the initial sub-sequences divided by it is similar. Therefore, the difference value variance of each initial sub-sequence is obtained respectively, and the average value of the difference value variance of all initial sub-sequences is calculated, which is recorded as And according to the average The preferred degree of obtaining the sub-segment length as the optimal sub-segment length is calculated as follows:
[0051]
[0052] Among them, Q Δs Indicates the preference of the sub-segment length to the optimal sub-segment length, exp() represents an exponential function with a natural constant as the base, Represents the average value of the variance of the difference values of all initial subsequences under the subsegment length.
[0053] Similarly, the degree of preference of each sub-segment length within the empirical length range for the optimal sub-segment length is obtained, the sub-segment length corresponding to the maximum preference degree is taken as the optimal sub-segment length, and the optimal sub-segment length is used to adaptively divide the differential sequence into at least two sub-sequences, thereby completing the adaptive local segmentation of the differential sequence.
[0054] Furthermore, after obtaining multiple subsequences, when the difference sequence conforms to the completely periodic distribution, each subsequence is exactly the same, and each difference value position is completely correlated; when it does not conform to the periodicity, the difference values at the same position of each subsequence are also strongly correlated, but there are certain differences in the difference values at the corresponding positions. This difference may be caused by noise or abnormal acquisition of the change in the running state. Therefore, the difference values at the same position are counted and weighted according to the statistical probability. When one of the difference values at the same position deviates significantly from the other difference values, the difference value is likely to be an abnormal difference value. When constructing the normal distribution curve later, a smaller weight is assigned, otherwise a larger weight is assigned. The specific process of assigning a weight value to each difference value in each subsequence is as follows:
[0055] The k-th difference values in all subsequences form a new sequence, the number of occurrences of each difference value type in the new sequence is counted, the ratio between the number of occurrences of each difference value type and the total number of occurrences in the new sequence is calculated as the weight value of the corresponding difference value type, and the k-th difference value in each subsequence is assigned the weight value of the corresponding difference value type;
[0056] According to the difference value type corresponding to each difference value in each of the subsequences, a weight value of each difference value in each of the subsequences is obtained.
[0057] In one embodiment, after the above segmentation process, T subsequences of the difference sequence are obtained, and the number of difference values in each subsequence is s. Then, each subsequence is represented by the following data sequence:
[0058] l1=[Δa 1,1 ,Δa 1,2 ,Δa 1,3 ,…,Δa 1,s ]
[0059] l2=[Δa 2,1 ,Δa 2,2 ,Δa 2,3 ,…,Δa 2,s ]
[0060] l3=[Δa 3,1 ,Δa 3,2 ,Δa 3,3 ,…,Δa 3,s ]
[0061] …
[0062] l T =[Δa T,1 ,Δa T,2 ,Δa T,3 ,…,Δa T,s ]
[0063] Among them, l1 represents the first subsequence, Δa 1,1 Represents the first difference value in the first subsequence, Δa 1,s represents the sth difference value in the first subsequence, l2 represents the second subsequence, Δa 2,1 Represents the first difference value in the second subsequence, Δa 2,s represents the sth difference value in the second subsequence, l3 represents the third subsequence, Δa 3,1 Indicates the first difference value in the third subsequence, Δa 3,s represents the sth difference value in the 3rd subsequence, l T represents the Tth subsequence, Δa T,1 represents the first difference value in the Tth subsequence, Δa T,s Represents the sth difference value in the Tth subsequence.
[0064] The k-th difference values in all subsequences form a new sequence, denoted as [Δa 1,k ,Δa 2,k ,Δa 3,k ,…,Δa T,T ], a statistical histogram is constructed according to the new sequence, wherein the horizontal axis of the statistical histogram is the corresponding differential value, and the vertical axis is the number of corresponding differential values. The more the number of a certain differential value, the more frequently the differential value appears, that is, the smaller the abnormal probability is. On the contrary, the abnormal probability is large. The number of any differential value type in the new sequence is recorded as M, and the weight of the differential value type is: w = M / T. Similarly, the weight of each differential value type in the new sequence is obtained. According to the differential value type to which each differential value in the new sequence belongs, the weight of the differential value type is used as the weight value of each differential value in the new sequence. Thus, the weight value of the kth differential value in each subsequence is obtained. Similarly, the above method is used to calculate the weight values of the differential values at other positions in the subsequence, thereby obtaining the weight value of each differential value in each subsequence.
[0065] Step S103, according to the weight value of each differential value in each subsequence, the normal distribution time interval of each subsequence is correspondingly obtained, and the abnormal data in the monitoring data sequence is cleaned according to the normal distribution time interval of each subsequence to obtain a monitoring data sequence after data cleaning.
[0066] For any subsequence, the distribution of its differential value may not conform to the normal distribution. If there are abnormal values in the subsequence, the abnormal values will have a greater impact on the mean parameter and standard deviation parameter in the normal distribution curve. If the same weight is used to calculate the mean parameter and standard deviation parameter, the normal distribution curve generated by the calculated mean parameter and standard deviation parameter may cause a large difference in its distribution with the curve itself. Therefore, according to the weight value of each differential value in each subsequence, the normal distribution curve obtained is made more consistent with its local real distribution through weighted method, and then the abnormal differential value is detected according to the normal distribution time interval of the normal distribution curve obtained.
[0067] In the embodiment of the present invention, firstly, according to the weight value of each differential value in each subsequence, the normal distribution time interval of each subsequence is obtained in a weighted manner. The specific process is as follows:
[0068] For any subsequence, all differential values are weighted and averaged according to the weight value of each differential value in the subsequence to obtain a weighted mean, and a weighted standard deviation of the subsequence is obtained according to the weighted mean;
[0069] According to the weighted mean and weighted standard deviation of the subsequence, a corresponding normal distribution curve is fitted, a difference value statistical histogram of the subsequence is constructed, a statistical curve of the difference value statistical histogram is obtained, a similarity between the normal distribution curve and the statistical curve is obtained, and the similarity is normalized to obtain a corresponding normalized value;
[0070] A multiple of the weighted standard deviation is obtained according to the normalized value, and a normal distribution time interval of the subsequence is constructed according to the multiple of the weighted standard deviation, the weighted standard deviation and the weighted mean.
[0071] In one embodiment, the parameters of the normal distribution curve are mainly determined by the mean μ and the standard deviation σ. Taking the first subsequence l1 as an example, the weight value of each difference value in the first subsequence l1 is obtained by the above calculation, and its weighted mean is:
[0072]
[0073] Among them, Weightedμ represents the weighted mean of all difference values in the first subsequence l1, s represents the total number of difference values in the first subsequence l1, Δa 1,i represents the i-th difference value in the first subsequence l1, w i Represents the weight value of the i-th difference value in the first subsequence k1.
[0074] After obtaining the weighted mean, calculate the weighted standard deviation, that is:
[0075]
[0076] Among them, Weightedσ represents the weighted standard deviation of all difference values in the first subsequence l1, Weightedμ represents the weighted mean of all difference values in the first subsequence l1, s represents the total number of difference values in the first subsequence l1, Δa 1,i represents the i-th difference value in the first subsequence l1, w i Represents the weight value of the i-th difference value in the first subsequence l1.
[0077] After obtaining the weighted mean and weighted standard deviation of the first subsequence, a corresponding normal distribution curve is generated according to the weighted mean and weighted standard deviation of the first subsequence, and a statistical histogram is established according to the difference value in the first subsequence, and a statistical curve is generated according to the statistical histogram. The DTW algorithm is used to obtain the similarity between the normal distribution curve and the statistical curve, and the similarity is normalized to [0, 1]. The normalized value is r, so that when the similarity is 1, the statistical curve is the normal distribution curve.
[0078] When the statistical curve conforms to the normal distribution, the 3σ criterion is met when performing anomaly detection, that is, the anomaly point is a low-probability event. When the statistical curve does not conform to the normal distribution, it is necessary to reduce the multiple of the standard deviation. The empirical value is 2.5 times. Therefore, according to the normalized value, the multiple of the weighted standard deviation of the first subsequence is obtained. The calculation expression of the multiple is:
[0079] β=2.5+(3-2.5)×r
[0080] Among them, β represents the multiple of the weighted standard deviation of the subsequence, and r represents the normalized value.
[0081] After obtaining the multiple β of the weighted standard deviation of the first subsequence, the normal distribution time interval of the statistical curve of the first subsequence is set to [Weightedμ-β*(Weightedσ),Weightedμ+β*(Weightedσ)]. Similarly, the normal distribution time interval of each subsequence is obtained.
[0082] Furthermore, after the normal distribution time interval of each subsequence, the abnormal data in the monitoring data sequence is cleaned according to the normal distribution time interval of each subsequence to obtain the monitoring data sequence after data cleaning. The specific process is:
[0083] For any subsequence, a differential value outside the normal distribution time interval in the subsequence is taken as an abnormal differential value, a data subsegment corresponding to the subsequence is obtained in the monitoring data sequence, a data mean of the data subsegment is calculated, data corresponding to each abnormal differential value is obtained in the data subsegment as abnormal data, and the abnormal data in the data subsegment is replaced by the data mean to obtain a target data subsegment;
[0084] The target data sub-segment corresponding to each of the sub-sequences is obtained, and all the target data sub-segments are combined into a monitoring data sequence after data cleaning.
[0085] In one embodiment, taking a subsequence as an example, the differential value in the subsequence that is outside the corresponding normal distribution time interval is used as an abnormal differential value. Since each differential value in the subsequence is obtained from the data in the monitoring data sequence, the data subsegment corresponding to the subsequence can be obtained in the monitoring data sequence according to the differential value in the subsequence, and the data corresponding to the abnormal differential value in the data subsegment is used as abnormal data, by calculating the data mean of all data in the data subsegment, using the data mean to replace each abnormal data in the data subsegment, and using the replaced data subsegment as the target data subsegment. Similarly, each subsequence is processed in the same way to obtain all target data subsegments, and all target data subsegments are composed of the monitoring data sequence after data cleaning, and the data cleaning of the monitoring data sequence is completed at this time.
[0086] Step S104, obtaining the monitoring data sequence after data cleaning corresponding to each monitoring data sequence, using all the monitoring data sequences after data cleaning to train the battery remaining energy detection model to obtain the trained battery remaining energy detection model, and using the trained battery remaining energy detection model to perform real-time detection of the battery remaining energy.
[0087] By using the method of step S102 and step S103, the monitoring data sequences after data cleaning corresponding to each monitoring data sequence are respectively obtained. After all the monitoring data sequences are cleaned, all the monitoring data sequences after data cleaning are input into the battery remaining energy detection model for model training to obtain the trained battery remaining energy detection model, wherein the process of model training is as follows:
[0088] (1) Feature extraction
[0089] Features useful for SOC estimation are extracted from the monitoring data sequence after all data are cleaned. These features include the battery charging and discharging history, voltage change rate, current integral value, etc.
[0090] (2) Feature selection
[0091] Among the many extracted features, the feature that contributes most to SOC estimation is selected. This can be achieved through methods such as correlation analysis and principal component analysis.
[0092] (3) Model selection and construction
[0093] Model selection: Select the appropriate intelligent algorithm model according to the specific application scenario and data characteristics. Commonly used models include neural networks (such as BP neural networks, convolutional neural networks, recurrent neural networks, etc.), support vector machines, random forests, gradient boosting trees, etc.
[0094] Model construction: Build an intelligent algorithm model based on the selected algorithm and features. This includes steps such as determining the structure of the model (such as the number of layers and nodes of the neural network, etc.) and initializing model parameters.
[0095] (4) Model training and tuning
[0096] Model training: Use the monitoring data sequence after all data cleaning to train the model. During the training process, the model parameters need to be continuously adjusted to optimize the model performance.
[0097] Model tuning: Tune the model through cross-validation, grid search and other methods to find the optimal combination of model parameters. At the same time, we also need to pay attention to the overfitting and underfitting problems of the model, and improve the generalization ability of the model by adding regularization terms, early stopping and other strategies.
[0098] (5) Model evaluation and verification
[0099] Model evaluation: Use an independent test set to evaluate the trained model to verify its accuracy and robustness. Common evaluation indicators include mean square error (MSE), root mean square error (RMSE), mean absolute error (MAE), etc.
[0100] Model verification: Verify the model in the actual application environment to ensure its stability and reliability in actual operation.
[0101] It should be noted that model training belongs to the prior art and will not be described in detail here. The focus of the present invention is on the data cleaning process before model training.
[0102] After obtaining the trained battery remaining energy detection model, the specific process of performing battery remaining energy detection through the trained battery remaining energy detection model is as follows: inputting the real-time operating data of the battery (such as voltage, current, temperature, etc.) into the trained battery remaining energy detection model; the battery remaining energy detection model calculates the current SOC value based on the input data and the trained parameters, and this SOC value reflects the current remaining energy status of the battery; the calculated SOC value is output and displayed on the user interface for reference by the user or the control system, and at the same time, the SOC value can also be correlated with other parameters (such as remaining cruising range, charging time, etc.) for analysis to provide users with more comprehensive battery status information; performing remaining energy detection according to the changing trend of the SOC value and the preset threshold value, when the SOC value is lower than the preset threshold value, triggering the early warning mechanism to remind the user to charge in time or take other measures to ensure the normal operation of the battery.
[0103] In summary, the embodiment of the present invention obtains at least two monitoring data sequences during the use of the battery; for any monitoring data sequence, the monitoring data sequence is subjected to first-order difference processing to obtain a corresponding differential sequence; according to the change of the differential value in the differential sequence, the differential sequence is adaptively divided into at least two subsequences; according to the frequency of occurrence of each differential value in the differential sequence, the weight value of each differential value in each subsequence is obtained; according to the weight value of each differential value in each subsequence, the normal distribution time interval of each subsequence is correspondingly obtained; according to the normal distribution time interval of each subsequence, the abnormal data in the monitoring data sequence is cleaned to obtain a monitoring data sequence after data cleaning; the monitoring data sequence after data cleaning corresponding to each monitoring data sequence is obtained, the battery remaining energy detection model is trained using all the monitoring data sequences after data cleaning to obtain a trained battery remaining energy detection model, and the trained battery remaining energy detection model is used to perform real-time detection of the battery remaining energy. Among them, before training the battery remaining energy detection model, the collected multi-dimensional monitoring data sequence is cleaned separately to reduce the impact of noise data or abnormal data on model training and improve the accuracy and stability of the model. In the data cleaning process, considering the local characteristics of the monitoring data sequence, that is, the local data distribution does not necessarily present a normal distribution, the differential sequence of the monitoring data sequence is locally processed through an adaptive window to obtain the normal distribution time interval of each subsequence, so as to specifically clean the abnormal data corresponding to each subsequence, and obtain a monitoring data sequence with more reliable and accurate data, thereby improving the efficiency of battery remaining energy detection using the battery remaining energy detection model.
[0104] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention.
Claims
1. A method for intelligently detecting residual energy of a battery for safe utilization, characterized in that: The method comprises: Acquire at least two monitoring data sequences during battery use; For any monitoring data sequence, first-order difference processing is performed on the monitoring data sequence to obtain a corresponding difference sequence, and according to the change of the difference value in the difference sequence, the difference sequence is adaptively divided into at least two subsequences, and according to the occurrence frequency of each difference value in the difference sequence, a weight value of each difference value in each of the subsequences is obtained; According to the weight value of each differential value in each of the subsequences, a normal distribution time interval of each of the subsequences is correspondingly obtained, and the abnormal data in the monitoring data sequence is cleaned according to the normal distribution time interval of each of the subsequences to obtain a monitoring data sequence after data cleaning; Obtain a monitoring data sequence after data cleaning corresponding to each monitoring data sequence, use all the monitoring data sequences after data cleaning to train a battery remaining energy detection model to obtain a trained battery remaining energy detection model, and use the trained battery remaining energy detection model to perform real-time detection of the battery remaining energy.
2. The method for intelligently detecting residual energy of a battery for safe utilization according to claim 1, characterized in that: The step of adaptively dividing the differential sequence into at least two subsequences according to a change in a differential value in the differential sequence comprises: For any sub-segment length within a preset sub-segment length range, the differential sequence is divided into a plurality of initial sub-sequences using the sub-segment length, and the differential value variance of each initial sub-sequence is obtained according to the differential value in each initial sub-sequence, and the average value of the differential value variance of all initial sub-sequences is calculated, and the average value is negatively mapped using an exponential function with a natural constant as the base, and the corresponding mapping value is used as the preferred degree of the sub-segment length; The preference degree of each sub-segment length within the sub-segment length range is obtained, the sub-segment length corresponding to the maximum preference degree is used as the optimal sub-segment length, and the differential sequence is adaptively divided into at least two sub-sequences using the optimal sub-segment length.
3. The method for intelligently detecting residual energy of a battery for safe utilization according to claim 1, characterized in that: The step of obtaining a weight value of each difference value in each of the subsequences according to the occurrence frequency of each difference value in the difference sequence includes: The k-th difference values in all subsequences form a new sequence, the number of occurrences of each difference value type in the new sequence is counted, the ratio between the number of occurrences of each difference value type and the total number of occurrences in the new sequence is calculated as the weight value of the corresponding difference value type, and the k-th difference value in each subsequence is assigned the weight value of the corresponding difference value type; According to the difference value type corresponding to each difference value in each of the subsequences, a weight value of each difference value in each of the subsequences is obtained.
4. The method for intelligently detecting residual energy of a battery for safe utilization according to claim 1, characterized in that: The step of obtaining the normal distribution time interval of each subsequence according to the weight value of each differential value in each subsequence includes: For any subsequence, all differential values are weighted and averaged according to the weight value of each differential value in the subsequence to obtain a weighted mean, and a weighted standard deviation of the subsequence is obtained according to the weighted mean; According to the weighted mean and weighted standard deviation of the subsequence, a corresponding normal distribution curve is fitted, a difference value statistical histogram of the subsequence is constructed, a statistical curve of the difference value statistical histogram is obtained, a similarity between the normal distribution curve and the statistical curve is obtained, and the similarity is normalized to obtain a corresponding normalized value; A multiple of the weighted standard deviation is obtained according to the normalized value, and a normal distribution time interval of the subsequence is constructed according to the multiple of the weighted standard deviation, the weighted standard deviation and the weighted mean.
5. The method for intelligently detecting residual energy of a battery for safe utilization according to claim 1, characterized in that: The step of performing data cleaning on the abnormal data in the monitoring data sequence according to the normal distribution time interval of each subsequence to obtain the monitoring data sequence after data cleaning includes: For any subsequence, a differential value outside the normal distribution time interval in the subsequence is taken as an abnormal differential value, a data subsegment corresponding to the subsequence is obtained in the monitoring data sequence, a data mean of the data subsegment is calculated, data corresponding to each abnormal differential value is obtained in the data subsegment as abnormal data, and the abnormal data in the data subsegment is replaced by the data mean to obtain a target data subsegment; The target data sub-segment corresponding to each of the sub-sequences is obtained, and all the target data sub-segments are combined into a monitoring data sequence after data cleaning.
Citation Information
Cited By
Cassava breeding environment monitoring method and system based on data analysis
CN119513505A
