Battery charging and discharging detection method and model based on multi-dimensional features and GMM (Gaussian Mixture Model)
Through the battery charge and discharge detection method based on multi-dimensional features and Gaussian mixed model, the particle swarm algorithm is used to optimize the model parameters, and the problems of low prediction accuracy and poor interpretation in the existing technology are solved, and high-precision battery charge and discharge detection and fast abnormalities are realized Identify.
Patent Information
- Application Number
- CN202411037407.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-31
- Publication Date
- 2024-11-22
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing battery charge and discharge detection methods have low prediction accuracy, are difficult to adapt to data distribution of different complexities, are poor in interpretation, and are difficult to predict in real time.
Using a battery charge and discharge detection method based on multi-dimensional features and Gaussian hybrid model (GMM), the model parameters are optimized through particle swarm algorithm, multi-dimensional new features are constructed, Gaussian distribution parameters are initialized, posterior probability is calculated, and model parameters are updated to maximize the likelihood function. , realize abnormal detection.
It improves the prediction accuracy of battery charge and discharge detection, adapts to data distribution of different complexities, provides clear clustering interpretation, and achieves fast and effective abnormal cell recognition.
Smart Images

Figure CN119003984A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of battery charge and discharge detection models, and in particular to a battery charge and discharge detection method and model based on multidimensional features and GMM. Background Art
[0002] Existing battery charging and discharging detection methods are mainly divided into machine learning methods, combined with physical models and other methods.
[0003] Among them, machine learning methods mainly include support vector machines, random forests, deep learning models, etc. Although their prediction accuracy is improved compared with traditional methods, these methods are shallow machine learning methods that require a large amount of labeled data for training and may not be suitable for situations such as a small amount of data.
[0004] Among them, the method combining physical models includes battery kinetic models. The physical model parameters are complex, parameter estimation and real-time prediction are difficult, and the interpretation is difficult.
[0005] It can be seen that the methods of the prior art all have certain defects. Therefore, there is a need for a battery charging and discharging detection model that has high prediction accuracy, adapts to data distributions of different complexities, has a clear clustering explanation, and can predict in real time.
[0006] Based on this, the present invention designs a battery charging and discharging detection method and model based on multidimensional features and GMM to solve the above problems. Summary of the invention
[0007] In view of the above-mentioned shortcomings of the prior art, the present invention provides a battery charging and discharging detection method and model based on multi-dimensional features and GMM.
[0008] To achieve the above objectives, the present invention is implemented through the following technical solutions:
[0009] A battery charging and discharging detection method based on multidimensional features and GMM includes the following steps:
[0010] 1. Data preprocessing;
[0011] 2. Construct new multi-dimensional features based on battery parameters and charging and discharging processes;
[0012] 3. Initialization of cluster centers, category priors and initialization calculation of various Gaussian distribution parameters;
[0013] 4. Particle swarm algorithm optimization, output k groups of optimal mean μ i and optimal variance Σ i Substitute into the Gaussian mixture model;
[0014] 5. Calculate the posterior probability that each sample data point belongs to each Gaussian distribution based on the current model parameters, and normalize the probability that each sample data point comes from different Gaussian distributions;
[0015] 6. Update the model parameters based on the calculated posterior probability, wherein the model parameters include the mean vector, covariance matrix and mixing weight of each Gaussian model so as to maximize the likelihood function;
[0016] 7. Calculate the likelihood function value and determine whether the change in the likelihood function value is less than the set target eps or whether the maximum number of iterations Max_iter is reached. If the conditions are met, output the optimal parameter θ * , if not satisfied, return to step 5;
[0017] 8. Use the trained model to detect anomalies and output abnormal cells.
[0018] Furthermore, step 2 is specifically as follows:
[0019] 2.1. First, select the battery parameters that are highly correlated with the battery charging and discharging process;
[0020] 2.2. Reconstruct new multi-dimensional features that can intuitively reflect the battery charging and discharging process.
[0021] Furthermore, the battery parameters in step 2.1 are voltage and temperature; and the multidimensional new features in step 2.2 are pressure difference and temperature difference.
[0022] Furthermore, step three is as follows:
[0023] 3.1. Initialize the cluster center k of the Gaussian mixture model;
[0024] 3.2. Initialize the prior probability and parameters of each Gaussian component.
[0025] Furthermore, step 4 is as follows:
[0026] 4.1. Particle Swarm Optimization (PSO) initializes population parameters. Each particle represents a set of GMM parameters (mean, covariance matrix). Initialize the initial position and velocity of each particle.
[0027] 4.2. Calculate the initial fitness value according to the fitness function to obtain the initial individual optimal position pbest and the current global optimal position gbest;
[0028] 4.3. Update the speed and position of each particle;
[0029] 4.4, Particle fitness evaluation and comparison;
[0030] 4.5. Select a smaller fitness value to adjust the individual optimal position and global optimal position of the particle;
[0031] 4.6. According to the fitness value, determine whether the optimization result of the particle swarm algorithm (PSO) reaches the set goal or meets the iterative loop termination condition. If not, return to step 4.2; if the condition is met, output the optimal mean value μ of k groups. i and optimal variance Σ i Substitute it into the Gaussian mixture model and use it as the initial value to proceed to step 5;
[0032] Furthermore, step 4.4 is specifically as follows: according to the fitness function, the fitness value of each particle is calculated, the current individual optimal value is compared with the previous individual optimal value, and the current global optimal value is compared with the previous current global optimal value.
[0033] Furthermore, in step 5:
[0034] For a given parameter θ, calculate for each sample data point x i The posterior probability belonging to each Gaussian component k is:
[0035]
[0036] Where: π k is the prior probability of the kth Gaussian distribution, satisfying N(X i |μ k ,∑k) is the probability density function of the kth Gaussian distribution, indicating that the data point X i At the mean μ k And the covariance matrix is ∑ k The probability density of the multivariate normal distribution of k is the mean vector of the kth Gaussian distribution, ∑ k is the covariance matrix of the k-th Gaussian distribution.
[0037] Furthermore, in step six:
[0038] The formula for updating the mixing weight is:
[0039]
[0040] The formula for updating the mean vector is:
[0041]
[0042] in, is the number of valid samples assigned to the kth component;
[0043] The formula for updating the covariance matrix is:
[0044]
[0045] Furthermore, step eight is specifically as follows:
[0046] For new battery cell data, first calculate its posterior probability on each Gaussian distribution;
[0047] Then, by calculating the probability density of the data point under each Gaussian distribution, if its value is lower than the threshold of each Gaussian distribution, the data point is judged as abnormal and the abnormal cell is output.
[0048] In order to better achieve the purpose of the present invention, the present invention also provides a PSO-EM-GMM model constructed by the above method.
[0049] Compared with the prior art, the present invention has the following beneficial effects:
[0050] (1) The present invention constructs new multi-dimensional features on the original data based on the physical characteristics of the battery, which can more accurately describe the behavior of the battery and provide a higher prediction accuracy for the model, thereby improving the model performance.
[0051] (2) The present invention adopts the Gaussian mixture model (GMM) as the basic model for battery charging and discharging anomaly detection. It can capture multimodal data distribution, is suitable for describing battery behavior under different states, can adapt to data distributions of different complexities, and provides the probability that each sample data point belongs to each Gaussian component, with a clear clustering explanation.
[0052] (3) The present invention uses a particle swarm algorithm (PSO) to further optimize the initial parameters of the expectation maximization (EM) algorithm in the Gaussian mixture model (GMM), allowing the particle swarm algorithm (PSO) to spread points widely globally and give the expectation maximization (EM) algorithm a suitable initial value and all possible values of the latent variables, so that the algorithm can iterate globally and reduce the probability of falling into a local optimum; and it can also effectively reduce the number of iterations of the algorithm and speed up the convergence of the algorithm.
[0053] (4) The method of the present invention can quickly and effectively identify abnormal cells that occur during the battery charging and discharging process. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0055] Figure 1 The present invention is a flow chart of a battery charging and discharging detection method based on multidimensional features and GMM. DETAILED DESCRIPTION
[0056] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0057] Explanation of technical terms:
[0058] Outlier Detection: Also known as outlier detection, it refers to finding data in a data set that does not conform to expectations. These data may be very rare in statistical distribution, or they may appear normal in most cases, but abnormal in some special cases.
[0059] Gaussian mixture model (GMM): refers to combining multiple Gaussian distribution functions together and modeling the sample data set that obeys the Gaussian distribution through clustering. First, the probability density function of the sample data is estimated, and then it is divided into different clusters that obey independent Gaussian distribution functions. Each represents a composite distribution, each data object obeys a combination of its own Gaussian distribution, and each category has its own probability and retains its own characteristics. In simple terms, the Gaussian mixture model uses the probability density function to classify the data and form a mixed model when the respective characteristics are met.
[0060] Expectation Maximization (EM) algorithm: It is an expectation maximization algorithm that obtains maximum likelihood estimated parameters from complete data containing implicit variables through a continuous iterative process. The EM algorithm solves the problem of not being able to obtain better estimated parameters when data is missing. In short, the EM algorithm uses the likelihood function criterion to solve the parameter problem in the Gaussian mixture model from an incomplete missing data set through an iterative method.
[0061] Particle Swarm Optimization (PSO): PSO is a random search algorithm based on group optimization. It first randomly assigns different speeds and positions to each particle in the group, then evaluates the pros and cons of the current position through the fitness function, and finally updates the position and speed, and determines the optimal result through several iterations.
[0062] Example 1
[0063] Please refer to the instruction manual Figure 1 , a battery charging and discharging detection method based on multidimensional features and GMM, comprising the following steps:
[0064] 1. Data preprocessing;
[0065] Specifically, outlier processing and data standardization are performed on the training data;
[0066] 2. Construct new features based on battery parameters and charging and discharging processes;
[0067] The specific steps are:
[0068] 2.1. First, select the battery parameters that are highly correlated with the battery charging and discharging process, such as voltage and temperature;
[0069] 2.2. Reconstruct new features that can intuitively reflect the battery charging and discharging process, such as pressure difference, temperature difference, etc.;
[0070] 3. Initialization of cluster centers, category priors and initialization calculation of various Gaussian distribution parameters;
[0071] The specific steps are:
[0072] 3.1. Initialize the cluster center k of the Gaussian mixture model;
[0073] 3.2. Initialize the prior probability and parameters of each Gaussian component;
[0074] 4. Particle Swarm Optimization (PSO) Optimization, Output k Groups of Optimal Mean μ i and the optimal variance ∑i are substituted into the Gaussian mixture model;
[0075] The specific steps are:
[0076] 4.1. Particle Swarm Optimization (PSO) initializes population parameters. Each particle represents a set of GMM parameters (mean, covariance matrix). Initialize the initial position and velocity of each particle.
[0077] 4.2. Calculate the initial fitness value according to the fitness function to obtain the initial individual optimal position pbest and the current global optimal position gbest;
[0078] 4.3. Update the speed and position of each particle. The formula is as follows:
[0079] v i (t+1)=ω·v i (t)+c1·r1·(p i -x i )+c2·r2·(gx i )
[0080] x i (t+1)=x i (t)+v i (t+1)
[0081] Among them, v i (t) is the velocity of the ith particle at the tth iteration, x i (t) is the position of the ith particle at the tth iteration, p i The historical optimal position of the i-th particle, g is the global optimal position, ω is the inertia weight, c1 and c2 are learning factors, r1 and r2 are random numbers;
[0082] 4.4, Particle fitness evaluation and comparison;
[0083] Specifically, according to the fitness function, the fitness value of each particle is calculated, the current individual optimal position is compared with the previous individual optimal position, and the current global optimal position value is compared with the previous current global optimal position;
[0084] 4.5. Select a smaller fitness value to adjust the individual optimal position and global optimal position of the particle;
[0085] 4.6. According to the fitness value, determine whether the optimization result of the particle swarm algorithm (PSO) reaches the set goal or meets the iterative loop termination condition. If not, return to step 4.2; if the condition is met, output the optimal mean value μ of k groups. i and optimal variance Σ i Substitute it into the Gaussian mixture model and use it as the initial value to proceed to step 5;
[0086] 5. Calculate the posterior probability that each sample data point belongs to each Gaussian distribution based on the current model parameters, and normalize the probability that each sample data point comes from different Gaussian distributions;
[0087] The initial values are the k-group mean and covariance matrix. The data point x i Genus and mean μ k and covariance∑ k The relationship between is described by a Gaussian (normal) distribution. For a given parameter θ, calculate for each sample data point x i The posterior probability of belonging to each Gaussian component (number of clusters) k is:
[0088]
[0089] Where: π k is the prior probability of the kth Gaussian distribution, satisfying N(X i |μ k,∑k) is the probability density function of the kth Gaussian distribution, indicating that the data point X i At the mean μ k And the covariance matrix is ∑ k The probability density of the multivariate normal distribution of k is the mean vector of the kth Gaussian distribution, ∑ k is the covariance matrix of the k-th Gaussian distribution.
[0090] 6. Update the model parameters based on the calculated posterior probability, wherein the model parameters include the mean vector, covariance matrix and mixing weight of each Gaussian model so as to maximize the likelihood function;
[0091] The formula for updating the mixing weight is:
[0092]
[0093] The formula for updating the mean vector is:
[0094]
[0095] in, is the number of valid samples assigned to the kth component.
[0096] The formula for updating the covariance matrix is:
[0097]
[0098] 7. Calculate the likelihood function value and determine whether the change in the likelihood function value is less than the set target eps or whether the maximum number of iterations Max_iter is reached. If the conditions are met, output the optimal parameter θ * , if not satisfied, return to step 5;
[0099] 8. Use the trained model for outlier detection;
[0100] The specific steps are:
[0101] For new battery cell data, first calculate its posterior probability on each Gaussian distribution;
[0102] Then, by calculating the probability density of the data point under each Gaussian distribution, if its value is lower than the threshold (self-set) of each Gaussian distribution, the data point is judged as abnormal and the abnormal battery cell is output.
[0103] Example 2
[0104] This embodiment protects the PSO-EM-GMM model based on multi-dimensional features constructed by the above method.
[0105] Compared with the traditional anomaly detection model, the PSO-EM-GMM model based on multidimensional features in the present invention can fit and cluster the data well, effectively reduce the number of algorithm iterations and accelerate the convergence speed of the algorithm.
[0106] The results of the model comparison experiment are shown in Table 1:
[0107] Table 1 Model comparison experimental results
[0108]
[0109] The present invention has the following technical effects:
[0110] (1) The present invention constructs new multi-dimensional features on the original data based on the physical characteristics of the battery, which can more accurately describe the behavior of the battery and provide a higher prediction accuracy for the model, thereby improving the model performance.
[0111] (2) The present invention adopts the Gaussian mixture model (GMM) as the basic model for battery charging and discharging anomaly detection. It can capture multimodal data distribution, is suitable for describing battery behavior under different states, can adapt to data distributions of different complexities, and provides the probability that each sample data point belongs to each Gaussian component, with a clear clustering explanation.
[0112] (3) The present invention uses a particle swarm algorithm (PSO) to further optimize the initial parameters of the expectation maximization (EM) algorithm in the Gaussian mixture model (GMM), allowing the particle swarm algorithm (PSO) to spread points widely globally and give the expectation maximization (EM) algorithm a suitable initial value and all possible values of the latent variables, so that the algorithm can iterate globally and reduce the probability of falling into a local optimum; and it can also effectively reduce the number of iterations of the algorithm and speed up the convergence of the algorithm.
[0113] (4) The method of the present invention can quickly and effectively identify abnormal cells that occur during the battery charging and discharging process.
[0114] 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 will 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 charging and discharging detection method based on multidimensional features and GMM, characterized in that: The following steps are involved:
1. Data preprocessing; 2. Construct new multi-dimensional features based on battery parameters and charging and discharging processes; 3. Initialization of cluster centers, category priors and initialization calculation of various Gaussian distribution parameters; 4. Particle swarm algorithm optimization, output k groups of optimal mean μ i and optimal variance Σ i Substitute into the Gaussian mixture model; 5. Calculate the posterior probability that each sample data point belongs to each Gaussian distribution based on the current model parameters, and normalize the probability that each sample data point comes from different Gaussian distributions; 6. Update the model parameters based on the calculated posterior probability, wherein the model parameters include the mean vector, covariance matrix and mixing weight of each Gaussian model so as to maximize the likelihood function; 7. Calculate the likelihood function value and determine whether the change in the likelihood function value is less than the set target eps or whether the maximum number of iterations Max_iter is reached. If the conditions are met, output the optimal parameter θ * , if not satisfied, return to step 5; 8. Use the trained model to detect anomalies and output abnormal cells.
2. The battery charge and discharge detection method based on multidimensional features and GMM according to claim 1, characterized in that: Step 2 is as follows: 2.
1. First, select the battery parameters that are highly correlated with the battery charging and discharging process; 2.
2. Reconstruct new multi-dimensional features that can intuitively reflect the battery charging and discharging process.
3. The battery charge and discharge detection method based on multidimensional features and GMM according to claim 2, characterized in that: The battery parameters in step 2.1 are voltage and temperature; the multidimensional new features in step 2.2 are pressure difference and temperature difference.
4. The battery charge and discharge detection method based on multidimensional features and GMM according to claim 3 is characterized in that: Step three is as follows: 3.
1. Initialize the cluster center k of the Gaussian mixture model; 3.
2. Initialize the prior probability and parameters of each Gaussian component.
5. The battery charge and discharge detection method based on multidimensional features and GMM according to claim 4 is characterized in that: Step 4 is as follows: 4.
1. Initialize the population parameters of the particle swarm algorithm and initialize the initial position and velocity of each particle; 4.
2. Calculate the initial fitness value according to the fitness function to obtain the initial individual optimal position pbest and the current global optimal position gbest; 4.
3. Update the speed and position of each particle; 4.4, Particle fitness evaluation and comparison; 4.
5. Select a smaller fitness value to adjust the individual optimal position and global optimal position of the particle; 4.
6. According to the fitness value, determine whether the optimization result of the particle swarm algorithm (PSO) reaches the set goal or meets the iterative loop termination condition. If not, return to step 4.2; if the condition is met, output the optimal mean value μ of k groups. i and optimal variance Σ i Substitute it into the Gaussian mixture model and use it as the initial value to proceed to the fifth step.
6. The battery charge and discharge detection method based on multidimensional features and GMM according to claim 5, characterized in that: Step 4.4 is as follows: According to the fitness function, the fitness value of each particle is calculated, the current individual optimal value is compared with the previous individual optimal value, and the current global optimal value is compared with the previous current global optimal value.
7. The battery charge and discharge detection method based on multidimensional features and GMM according to claim 6, characterized in that: In step five: For a given parameter θ, calculate for each sample data point x i The posterior probability belonging to each Gaussian component k is: Where: π k is the prior probability of the kth Gaussian distribution, satisfying N(X i |μ k ,∑k) is the probability density function of the kth Gaussian distribution, indicating that the data point X i At the mean μ k And the covariance matrix is ∑ k The probability density of the multivariate normal distribution of k is the mean vector of the kth Gaussian distribution, ∑ k is the covariance matrix of the k-th Gaussian distribution.
8. The battery charge and discharge detection method based on multidimensional features and GMM according to claim 7, characterized in that: In step six: The formula for updating the mixing weight is: The formula for updating the mean vector is: in, is the number of valid samples assigned to the kth component; The formula for updating the covariance matrix is:
9. The battery charge and discharge detection method based on multidimensional features and GMM according to claim 8, characterized in that: Step 8 is as follows: For new battery cell data, first calculate its posterior probability on each Gaussian distribution; Then, by calculating the probability density of the data point under each Gaussian distribution, if its value is lower than the threshold of each Gaussian distribution, the data point is judged as abnormal and the abnormal cell is output.
10. A PSO-EM-GMM model constructed by using the battery charge and discharge detection method based on multidimensional features and GMM as claimed in claim 9.
Citation Information
Patent Citations
Energy storage power station battery health state estimation method based on ACO-GMR
CN116400246A
Track circuit fault diagnosis method of improved Gaussian mixture model
CN116821789A
Method for detecting abnormal cells in lithium battery pack based on probability distribution
CN116990697A
Cell open-circuit voltage detection method based on Gaussian mixture model
CN117991106A
Cited By
Bearing data expansion method and system based on Gaussian mixture model and particle swarm optimization
CN120180083A
A bearing data augmentation method and system based on a Gaussian mixture model and a particle swarm optimization
CN120180083B
