Battery capacity prediction method based on collaborative learning
Through collaborative learning technology, the two neural networks process battery timing and brand feature sequences respectively, solving the shortcomings of existing battery capacity prediction methods in heterogeneity and noise processing, and improving the accuracy and robustness of battery capacity prediction. Achieve more accurate battery capacity prediction.
Patent Information
- Application Number
- CN202311043432.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-18
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2043-08-18
AI Technical Summary
Existing battery capacity prediction methods perform poorly when dealing with heterogeneity and distribution migration, and are prone to learning noise labels into the model, resulting in insufficient model robustness and generalization capabilities, making it difficult to accurately predict the capacity of batteries in different brands and periods. .
Using a battery capacity prediction method based on collaborative learning, the battery timing feature sequence and brand feature sequence are processed separately through two independent neural networks. Using historical timing and heterogeneous collaborative learning mechanisms, gradually learn from the other party's noise data to improve robustness. and generalization capability, and the final battery capacitance prediction model is formed through parameter fusion.
Improves the accuracy and robustness of battery capacity prediction, reduces the impact of noise, enhances the generalization ability of the model, enables it to better adapt to data changes under different brands and conditions, and provides more accurate and reliable battery capacity Predict results.
Smart Images

Figure CN117031282B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of battery capacity prediction, and in particular relates to a battery capacity prediction method based on collaborative learning. Background Art
[0002] The electric vehicle market is developing rapidly, and lithium batteries have become an important part of the two-wheel vehicle battery replacement industry. However, as the battery is used for a longer time, the battery performance continues to deteriorate, resulting in a decline in battery capacity and power. How to correctly obtain the battery capacity after use and find batteries with insufficient battery capacity for recycling has become an important issue.
[0003] There are many different methods to solve this problem, such as open circuit voltage method, Ah quantification method, model-based method, neural network method, etc. Different methods vary greatly due to battery characteristics, different scenarios, and data availability. The first few methods have very high requirements for data, so the effect in actual use is relatively poor. The currently more popular data-driven neural network method can achieve good results when building a suitable model.
[0004] However, as the environment changes (temperature, number of charging times), there are capacitance errors between batteries of the same brand at different production periods and between batteries of different brands, which often affect the accuracy and generalization ability of the battery performance prediction model. The neural network method performs poorly when dealing with heterogeneity and distribution migration, and the neural network model will sooner or later learn noise labels into the model due to its strong fitting ability, so a new method is needed to improve the robustness and generalization ability of the model. Summary of the invention
[0005] Purpose of the invention: In order to overcome the deficiencies in the prior art, the present invention provides a battery capacity prediction method based on collaborative learning. The battery capacitance prediction technology based on collaborative learning can make full use of data from different brands and periods, improve prediction accuracy, robustness and generalization ability, and achieve more accurate battery capacity prediction.
[0006] Technical solution: To achieve the above purpose, the battery capacity prediction method based on collaborative learning of the present invention has the following specific steps:
[0007] Step S1: Data collection and preprocessing
[0008] Collect the reported time series feature sequence data of batteries of different brands and the charge and discharge feature sequence data under laboratory conditions, and then preprocess the data including missing value filling, outlier processing and feature normalization to ensure data quality;
[0009] Step S2: Data input
[0010] Use the preprocessed battery time series feature sequence as input data to ensure that the data is ready;
[0011] Step S3: Collaborative learning of historical time series
[0012] The battery time series feature sequence is divided according to time and input into two independent neural networks. Each network selects "clean" samples according to the prediction error to form a sample set S 1,t S 2,t , update the network parameters ω1 and ω2 corresponding to the two independent neural networks, so that the two neural networks gradually learn from each other's noisy data, improving robustness and generalization ability;
[0013] Step S4: Model parameter fusion
[0014] Select parameter averaging, weighted averaging or stacking to use the fusion function f to fuse the weight parameters of the two networks. The fused weight parameter ω f Used for prediction of time series battery capacitance;
[0015] Step S5: Heterogeneous collaborative learning
[0016] The battery brand feature sequence is split according to the brand and input into two independent neural networks. The "clean" samples are selected according to the prediction error, corresponding to the weight parameters ω of the two independent neural networks. f Initialize ω separately f1 and ω f2 , which is to update the network parameters ω f1 and ω f2 ,ω1=ω f1 ,ω2=ω f2 ;
[0017] Step S6: Model storage
[0018] The fused weight parameter ω f1 and ω f2 Stored as the final result of the battery capacitance prediction model;
[0019] Step S7: Evaluation and Optimization
[0020] Use test data to evaluate the performance of the model and optimize the model based on prediction accuracy and robustness;
[0021] Step S8: Application and deployment
[0022] The optimized battery capacitance prediction model is applied to actual scenarios to predict the capacitance of batteries of different brands and different periods, ensuring that the model can operate stably in the actual environment and produce accurate prediction results.
[0023] Furthermore, in step S2, the data input includes reported time series characteristic sequence data of batteries in use of different brands and different periods and accurate completed charging and discharging characteristic sequence data under laboratory conditions.
[0024] Further, in step S3, let X t represents the feature set at time step t, y t Represents its true label. Each network processes the battery’s time series feature sequence through feedforward transmission and selectively selects “clean” data samples, i.e., samples with smaller prediction errors, at each time step;
[0025] For network n, n∈{1,2}, select a part of sample set S n,t , where S n,t Contains samples that the network n considers to have a smaller error at time step t, which are used for model update and back propagation:
[0026]
[0027] Where: X t represents the collection of all samples at time step t; error n,t (x i ) represents the network n for sample x at time step t i prediction error.
[0028] Furthermore, in step S3, the historical time series collaborative learning includes two neural networks, and the specific steps are as follows:
[0029] S3.1: Each neural network initializes a parameter ω, namely ω1 and ω2;
[0030] S3.2: At each time step t, according to the input feature sequence X t Extract a mini-batch t ;
[0031] S3.3: In D t Under the collection basis, calculate:
[0032]
[0033] Get S 1,t S 2,t ;
[0034] Where: D t Represents the set of all samples at time step t;
[0035] error n,t (x i )=||y i,A -yi || represents the sample set D t The predicted label y of sample i in i,A and the true label y i differences;
[0036] Indicates that in the sample set D t Select the sample with the smallest prediction error;
[0037] It means selecting the first k samples with the smallest prediction error, where k is a hyperparameter;
[0038] S3.4: The parameters of network 1 are ω1, and the parameters of network 2 are ω2. Update the weight parameters of the two neural networks network ω:
[0039]
[0040]
[0041] Where: 1,t+1 and ω 2,t+1 is the updated parameter, η is the learning efficiency, is the loss function,
[0042] is the gradient of the loss function with respect to parameters ω1 and ω2;
[0043] S3.5: Update hyperparameter k;
[0044] S3.6: Repeat steps S3.2 to S3.5 until the specified number of iterations is reached;
[0045] At each time step t, Network 1 and Network 2 use their own selected "clean" samples to update their own parameters. Therefore, the two models will gradually learn from each other's noisy data and improve their robustness and generalization capabilities.
[0046] Furthermore, in step S4, the specific steps of model parameter fusion are as follows:
[0047] S4.1: Obtain input weight parameters ω1 and ω2;
[0048] S4.2: Obtain the fusion function f according to the data input type and adaptability;
[0049] S4.3: Calculate the parameters ω after model fusion f =f(ω1,ω2);
[0050] S4.4: Output model parameters ω f .
[0051] Further, in step S5, heterogeneous collaborative learning includes two neural networks, and the specific steps are as follows:
[0052] S5.1: Each neural network initializes a parameter ω, namely ω1 and ω2, where: ω1 = ω f1 ,ω2=ω f2 , represents the timing weight parameters of different brands;
[0053] S5.2: At each time step t, according to the input feature sequence X t Extract a mini-batch t ;
[0054] S5.3: In D t Under the collection basis, calculate:
[0055]
[0056] Get S 1,t S 2,t ;
[0057] Where: D t Represents the set of all samples at time step t;
[0058] error n,t (x i )=||y i,A -y i || represents the sample set D t The predicted label y of sample i in i,A and the true label y i differences;
[0059] Indicates that in the sample set D t Select the sample with the smallest prediction error;
[0060] It means selecting the first k samples with the smallest prediction error, where k is a hyperparameter;
[0061] S5.4: The parameter of network 1 is ω f1 , the parameter of network 2 is ω f2 , update the weight parameters of the two neural networks network ω:
[0062]
[0063]
[0064] Where: f1,t+1 and ω f2,t+1 is the updated parameter, η is the learning efficiency, is the loss function,
[0065] They are the loss function with respect to parameter ω f1 ,ω f2 The gradient of
[0066] S5.5: Update hyperparameter k;
[0067] S5.6: Repeat steps S5.2 to S5.5 until the specified number of iterations is reached;
[0068] At each time step t, Network 1 and Network 2 use their own selected "clean" samples to update their own parameters. Therefore, the two models will gradually learn from each other's noisy data and improve their robustness and generalization capabilities.
[0069] In the model storage in step S6, based on ω1=ω f1 ,ω2=ω f2 , the result weight ω in heterogeneous collaborative learning f1 ,ω f2 What is stored is the merging of the heterogeneity and timing results of battery capacitance under different brands at different periods, which is the final result.
[0070] Beneficial effects: The present invention makes full use of the hidden relationship between the time series characteristics of reported data and experimental data under different brands and at different times, and removes the noise in the data through collaborative learning, thus obtaining a better prediction effect than the ordinary deep learning model. At the same time, the method makes full use of the constant current charging and discharging and non-constant current charging and discharging data reported by the battery, greatly improving the availability of data, reducing the difficulty of prediction, and improving the accuracy of battery capacity estimation. BRIEF DESCRIPTION OF THE DRAWINGS
[0071] Attached Figure 1 It is a brief schematic diagram of the method of the present invention;
[0072] Attached Figure 2 Schematic diagram of building a collaborative learning prediction model and predicting the capacitance of batteries of different brands. DETAILED DESCRIPTION
[0073] The present invention will be further described below in conjunction with the accompanying drawings.
[0074] As attached Figure 1 and attached Figure 2 As shown in the figure, the battery capacity prediction method based on collaborative learning has the following specific steps:
[0075] Step S1: Data collection and preprocessing
[0076] The reported time series feature sequence data of batteries of different brands and the charge and discharge feature sequence data under laboratory conditions are collected, and then the data are preprocessed including missing value filling, outlier processing and feature normalization to ensure data quality.
[0077] Step S2: Data input
[0078] The preprocessed battery time series feature sequence is used as input data to ensure that the data is ready.
[0079] In step S2, the data input includes reported time series characteristic sequence data of batteries in use of different brands and different periods and accurate completed charging and discharging characteristic sequence data under laboratory conditions.
[0080] Step S3: Collaborative learning of historical time series
[0081] The battery time series feature sequence is divided according to time and input into two independent neural networks. Each network selects "clean" samples according to the prediction error to form a sample set S 1,t S 2,t , update the network parameters ω1 and ω2 corresponding to the two independent neural networks, so that the two neural networks gradually learn from each other's noisy data and improve robustness and generalization ability.
[0082] In step S3, let X t represents the feature set at time step t, y t Represents its true label. Each network processes the battery’s time series feature sequence through feedforward transmission and selectively selects “clean” data samples, i.e., samples with smaller prediction errors, at each time step;
[0083] For network n, n∈{1,2}, select a part of sample set S n,t , where S n,t Contains samples that the network n considers to have a smaller error at time step t, which are used for model update and back propagation:
[0084]
[0085] Where: X t represents the collection of all samples at time step t; error n,t (x i ) represents the network n for sample x at time step t i prediction error.
[0086] In step S3, historical time series collaborative learning includes two neural networks, and the specific steps are as follows:
[0087] S3.1: Each neural network initializes a parameter ω, namely ω1 and ω2;
[0088] S3.2: At each time step t, according to the input feature sequence X t Extract a mini-batch (subset) D t ;
[0089] S3.3: In D t Under the collection basis, calculate:
[0090]
[0091] Get S 1,t S 2,t ;
[0092] Where: D t Represents the set of all samples at time step t;
[0093] error n,t (x i )=||y i,A -y i || represents the sample set D t The predicted label y of sample i in i,A and the true label y i differences;
[0094] Indicates that in the sample set D t Select the sample with the smallest prediction error;
[0095] It means selecting the first k samples with the smallest prediction error, where k is a hyperparameter;
[0096] S3.4: The parameters of network 1 are ω1, and the parameters of network 2 are ω2. Update the weight parameters of the two neural networks network ω:
[0097]
[0098]
[0099] Where: 1,t+1 and ω 2,t+1 is the updated parameter, η is the learning efficiency, is the loss function,
[0100] is the gradient of the loss function with respect to parameters ω1 and ω2;
[0101] S3.5: Update hyperparameter k;
[0102] S3.6: Repeat steps S3.2 to S3.5 until the specified number of iterations is reached;
[0103] At each time step t, Network 1 and Network 2 use their own selected "clean" samples to update their own parameters. Therefore, the two models will gradually learn from each other's noisy data and improve their robustness and generalization capabilities.
[0104] Step S4: Model parameter fusion
[0105] Select parameter averaging, weighted averaging or stacking to use the fusion function f to fuse the weight parameters of the two networks. The fused weight parameter ω f Used for prediction of time series battery capacitance.
[0106] The fusion function f combines the weight parameters of two neural networks:
[0107] ω f,t =f(ω 1,t ,ω 2,t )
[0108] Where: 1,t and ω 2,t are the weight parameters of network 1 and network 2 at time step t, ω f,t It is the new weight parameter obtained by the fusion function f.
[0109] In step S4, the specific steps of model parameter fusion are as follows:
[0110] S4.1: Obtain input weight parameters ω1 and ω2;
[0111] S4.2: Obtain the fusion function f according to the data input type and adaptability;
[0112] S4.3: Calculate the parameters ω after model fusion f =f(ω1,ω2);
[0113] S4.4: Output model parameters ω f .
[0114] An embodiment of selecting the parameter averaging method is as follows: Parameter averaging is to fuse the models by simply averaging the weight parameters of two or more models. For the fusion of two models, the fused parameter ω f,t It can be expressed as:
[0115] ω f,t =(ω 1,t +ω 2,t ) / 2
[0116] The weighted average method is selected as follows: Weighted average is a method of assigning different weights to different models during the fusion process. The weights are usually determined based on the performance or credibility of the model. The fused parameter ωf,t It can be expressed as:
[0117] ω f,t =aω 1,t +bω 2,t
[0118] Where: a and b are parameters ω 1,t and ω 2,t The weight of .
[0119] The embodiment of selecting the stacking method is: It is an ensemble learning method that trains a secondary model to fuse the prediction results of multiple basic models by taking the prediction results of multiple basic models as input. The prediction result of each basic model is where i = 1, 2. These predictions are used as input to the secondary model.
[0120] The training set of the secondary model consists of the prediction results of the basic model and the actual labels. Assuming the size of the training set is N, the training data of the secondary model can be expressed as:
[0121]
[0122] The secondary model is trained by minimizing a loss function, which is usually a function between the actual label y and the secondary model’s predicted value. The error metric of . The trained secondary model can be expressed as:
[0123]
[0124] Where: f is the function of the secondary model.
[0125] Step S5: Heterogeneous collaborative learning
[0126] The battery brand feature sequence is split according to the brand and input into two independent neural networks. The "clean" samples are selected according to the prediction error, corresponding to the weight parameters ω of the two independent neural networks. f Initialize ω separately f1 and ω f2 , which is to update the network parameters ω f1 and ω f2 ,ω1=ω f1 ,ω2=ω f2 .
[0127] In step S5, heterogeneous collaborative learning includes two neural networks, and the specific steps are as follows:
[0128] S5.1: Each neural network initializes a parameter ω, namely ω1 and ω2, where: ω1 = ω f1 ,ω2=ω f2, represents the timing weight parameters of different brands;
[0129] S5.2: At each time step t, according to the input feature sequence X t Extract a mini-batch t ;
[0130] S5.3: In D t Under the collection basis, calculate:
[0131]
[0132] Get S 1,t S 2,t ;
[0133] Where: D t Represents the set of all samples at time step t;
[0134] error n,t (x i )=||y i,A -y i || represents the sample set D t The predicted label y of sample i in i,A and the true label y i differences;
[0135] Indicates that in the sample set D t Select the sample with the smallest prediction error;
[0136] It means selecting the first k samples with the smallest prediction error, where k is a hyperparameter;
[0137] S5.4: The parameter of network 1 is ω f1 , the parameter of network 2 is ω f2 , update the weight parameters of the two neural networks network ω:
[0138]
[0139]
[0140] Where: f1,t+1 and ω f2,t+1 is the updated parameter, η is the learning efficiency, is the loss function,
[0141] They are the loss function with respect to parameter ω f1 ,ω f2 The gradient of
[0142] S5.5: Update hyperparameter k;
[0143] S5.6: Repeat steps S5.2 to S5.5 until the specified number of iterations is reached;
[0144] At each time step t, Network 1 and Network 2 use their own selected "clean" samples to update their own parameters. Therefore, the two models will gradually learn from each other's noisy data and improve their robustness and generalization capabilities.
[0145] Step S6: Model storage
[0146] The fused weight parameter ω f1 and ω f2 is stored as the final result of the battery capacitance prediction model.
[0147] In the model storage in step S6, based on ω1=ω f1 ,ω2=ω f2 , the result weight ω in heterogeneous collaborative learning f1 ,ω f2 What is stored is the merging of the heterogeneity and timing results of battery capacitance under different brands at different periods, which is the final result.
[0148] Step S7: Evaluation and Optimization
[0149] Use test data to evaluate the performance of the model and optimize the model based on prediction accuracy and robustness;
[0150] Step S8: Application and deployment
[0151] The optimized battery capacitance prediction model is applied to actual scenarios to predict the capacitance of batteries of different brands and different periods, ensuring that the model can operate stably in the actual environment and produce accurate prediction results.
[0152] Compared with the prior art, the advantages of the present invention are:
[0153] 1) Reduce the impact of label noise
[0154] Collaborative learning allows two networks to learn together, with each network focusing on processing noisy data. This can reduce the model's sensitivity to noisy data and improve the model's generalization ability on accurate data.
[0155] 2) Increase the accuracy of model predictions
[0156] The network model built using collaborative learning selectively uses correct non-noise data compared to ordinary deep learning models, which improves the accuracy of battery capacity estimation;
[0157] 3) Enhanced robustness
[0158] By "teaching" each other, the two networks can learn different features and representations, thereby enhancing the robustness of the model and enabling it to better adapt to data changes under different brands and conditions;
[0159] 4) Can generalize to unknown data
[0160] Collaborative learning can help the model learn more general features, enabling it to better generalize to unknown data that is not in the training set, thereby improving the effectiveness of the model in practical applications.
[0161] 5) Stronger adaptability
[0162] In time series data, inaccuracies may change dynamically. Collaborative learning allows the model to adapt to inaccuracies at different time points and situations during training, providing stronger adaptive capabilities.
[0163] In the application of two-wheeled vehicle battery replacement industry, the battery capacitance prediction technology based on collaborative learning method has achieved remarkable implementation results. The following are its specific advantages and application prospects:
[0164] Advantage expansion:
[0165] a) Improve robustness
[0166] In actual operation, battery capacitance prediction technology is often affected by factors such as battery brand and usage environment, resulting in unstable prediction results. The collaborative learning method allows different models to learn from each other and adapt to each other's prediction errors through mutual correction between models, thereby improving the model's robustness to capacitance errors of batteries of different brands. This enables the model to better cope with brand differences and reduce inaccurate predictions caused by changes in battery brands.
[0167] b) Enhanced generalization ability: In practical applications, models often face battery brands and data distributions that have never been seen before, and traditional models may perform poorly due to lack of adaptability. The battery capacitance prediction technology based on collaborative learning enables the model to better extract common features from existing data by learning from each other's mistakes, thereby maintaining high prediction accuracy when dealing with unseen battery brands. This improvement in generalization ability is of great significance in practical environments and can ensure the reliability and availability of the model.
[0168] c) High efficiency performance
[0169] Battery capacitance prediction plays an important role in the battery swapping system of electric vehicles and can help optimize the use and management of batteries. The collaborative learning-based approach not only improves the accuracy of predictions, but also effectively reduces the error rate. This means that the prediction results are more reliable, reducing the possibility of wrong decisions in actual operation and improving overall efficiency. In the fast-paced two-wheeled vehicle battery swapping industry, efficient battery capacitance prediction is of great significance for timely maintenance and scheduling of batteries.
[0170] Application prospects:
[0171] d) Intelligent Scheduling
[0172] Based on accurate battery capacitance prediction, battery swap stations can schedule and replace batteries more intelligently, thereby improving battery utilization and operating efficiency.
[0173] e) Fault warning
[0174] By predicting changes in battery performance, possible battery failures can be detected in advance, which helps to maintain and replace problematic batteries in a timely manner and reduce the risk of accidents.
[0175] f) Optimize management
[0176] By monitoring battery capacitance in real time, the battery usage strategy can be optimized, the battery life can be extended, and maintenance costs can be reduced.
[0177] g) Improved user experience
[0178] Accurate battery capacitance prediction can provide users with more reliable battery performance information and enhance their confidence and satisfaction with electric vehicles.
[0179] In summary, the present invention makes full use of the hidden relationship between the time series characteristics of the reported data and experimental data under different brands and at different times, and removes the noise in the data through collaborative learning, thus obtaining a better prediction effect than the ordinary deep learning model. At the same time, the method makes full use of the constant current charging and discharging and non-constant current charging and discharging data reported by the battery, greatly improving the availability of data, reducing the difficulty of prediction, and improving the accuracy of battery capacity estimation.
[0180] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A battery capacity prediction method based on collaborative learning, characterized by: The specific steps are as follows: Step S1: Data collection and preprocessing Collect the reported time series feature sequence data of batteries of different brands and the charge and discharge feature sequence data under laboratory conditions, and then preprocess the data including missing value filling, outlier processing and feature normalization to ensure data quality; Step S2: Data input Use the preprocessed battery time series feature sequence as input data to ensure that the data is ready; In step S2, the data input includes the reported time series characteristic sequence data of batteries in use of different brands and different periods and the accurate completed charging and discharging characteristic sequence data under laboratory conditions; Step S3: Collaborative learning of historical time series The battery time series feature sequence is divided according to time and input into two independent neural networks; the battery time series feature sequence of brand 1 battery is divided according to time and input into two independent neural networks A and B in the joint learning model of brand 1 battery; the battery time series feature sequence of brand 2 battery is divided according to time and input into two independent neural networks C and D in the joint learning model of brand 2 battery; each network selects "clean" samples according to the prediction error to form a sample set S 1,t and S 2,t , update the network parameters ω1 and ω2 corresponding to the two independent neural networks, so that the two neural networks gradually learn from each other's noisy data, improving robustness and generalization ability; In step S3, let X t represents the set of all samples at time step t, y t Represents its true label. Each network processes the battery's time series feature sequence through feedforward transmission and selectively selects "clean" data samples at each time step, that is, samples with smaller prediction errors; For network n, n∈{1,2}, select a part of sample set S n,t , where S n,t Contains samples that the network n considers to have a smaller error at time step t, which are used for model update and back propagation: Where: X t Represents the set of all samples at time step t; error n,t (x i ) represents the network n for sample x at time step t i The prediction error of In step S3, historical time series collaborative learning includes two neural networks, and the specific steps are as follows: S3.1: Each neural network initializes a parameter ω, namely ω1 and ω2; S3.2: At each time step t, according to the input feature sequence X t Extract a small batch Dt; S3.3: In D t Based on the sample set, calculate: Get S 1,t and S 2,t ; Where: D t Represents the sample set at time step t; error n,t (x i )=||y i,A -y i || represents the sample set D t The predicted label y of sample i in i,A and the true label y i differences; Indicates that in the sample set D t Select the sample with the smallest prediction error; It means selecting the first k samples with the smallest prediction error, where k is a hyperparameter; S3.4: The parameters of network 1 are ω1, and the parameters of network 2 are ω2. Update the weight parameters of the two neural networks network ω: Where: 1,t+1 and ω 2,t+1 is the updated parameter, η is the learning efficiency, is the loss function, ω 1,t and ω 2,t are the weight parameters of network 1 and network 2 at time step t, is the gradient of the loss function with respect to parameters ω1 and ω2; S3.5: Update hyperparameter k; S3.6: Repeat steps S3.2 to S3.5 until the specified number of iterations is reached; At each time step t, Network 1 and Network 2 use their own selected "clean" samples to update their own parameters. Therefore, the two models will gradually learn from each other's noisy data and improve their robustness and generalization ability. Step S4: Model parameter fusion Select parameter averaging, weighted averaging or stacking to use the fusion function f to fuse the weight parameters of the two networks. The fused weight parameter ω f Used for prediction of time series battery capacitance; the fusion function f fuses the weight parameters of neural network A and neural network B in the joint learning model of brand 1 battery; the fusion function f fuses the weight parameters of neural network C and neural network D in the joint learning model of brand 2 battery; The fusion function f combines the weight parameters of two neural networks: oh f,t =f(ω 1,t Oh, oh 2,t ) Where: 1,t and ω 2,t are the weight parameters of network 1 and network 2 at time step t, ω f,t It is the new weight parameter obtained by fusion function f; In step S4, the specific steps of model parameter fusion are as follows: S4.1: Get the input weight parameter ω 1,t With ω 2,t ; S4.2: Obtain the fusion function f according to the data input type and adaptability; S4.3: Calculate the parameters ω after model fusion f,t =f(ω 1,t ,ω 2,t ); S4.4: Output model parameters ω f,t ; Select parameter averaging method: Parameter averaging is to fuse models by simply averaging the weight parameters of two or more models; for the fusion of two models, the fused parameter ω f,t It can be expressed as: oh f,t =(ω 1,t +oh 2,t ) / 2 Select weighted average method: Weighted average is a method of assigning different weights to different models during the fusion process; the weights are usually determined based on model performance or credibility; the fused parameter ω f,t It can be expressed as: Where: a and b are parameters ω 1,t and ω 2,t The weight of Select stacking method: It is an integrated learning method that takes the prediction results of multiple basic models as input and trains a secondary model to integrate these prediction results; the prediction result of each basic model is where j = 1, 2; these predictions are used as input to the secondary model; The training set of the secondary model consists of the prediction results of the basic model and the actual labels; assuming that the size of the training set is N, the training data of the secondary model can be expressed as: The secondary model is trained by minimizing a loss function, which is usually a function between the actual label y and the secondary model’s predicted value. The error metric of ; the trained secondary model can be expressed as: Where: f s is a function of the secondary model; Step S5: Heterogeneous collaborative learning The battery brand feature sequence is divided according to the brand and input into two independent neural networks; the data M1 output by the fusion of neural network A and neural network B in the joint learning model of brand 1 battery is input into the neural network M1 in the joint learning model of brands 1 and 2, and the data M2 output by the fusion of neural network C and neural network D in the joint learning model of brand 2 battery is input into the neural network M2 in the joint learning model of brands 1 and 2. Neural network M1 and neural network M2 are independent of each other; "clean" samples are selected according to the prediction error, corresponding to the weight parameters ω of the two independent neural networks f Initialize ω separately f1 and ω f2 , which is to update the network parameters ω f1 and ω f2 ; In step S5, heterogeneous collaborative learning includes two neural networks, and the specific steps are as follows: S5.1: Each neural network initializes a parameter ω f , that is, ω f1 With ω f2 , represents the timing weight parameters of different brands; S5.2: At each time step t', according to the input sample set X' t’ Extract a small batch D' t’ ; S5.3: In D' t’ Based on the sample set, calculate: S′ n,t′ ={x i′ |x i′ ∈D′ t′ ,i′∈top(k′,min(error n,t′ (x i′ )))} Get S' 1,t’ and S' 2,t’ ; Where: D' t’ Represents the sample set at time step t'; error n,t′ (x i′ )=||y′ i′,A -y′ i′ || represents the sample set D' t’ The predicted label y' of sample i' in i’,A With the true label y' i’ differences; min(error n,t′ (x i′ )) indicates that in the sample set D' t’ Select the sample with the smallest prediction error; top(k′,min(error n,t′ (x i′ ))) means selecting the first k' samples with the smallest prediction error, where k' is a hyperparameter; S5.4: The parameters of network 3 are ω f1 , the parameter of network 4 is ω f2 , update the weight parameters of the two neural networks network ω f : Where: f1,t+1 and ω f2,t+1 is the updated parameter, η′ is the learning efficiency, is the loss function, They are the loss function with respect to parameter ω f1 ,ω f2 The gradient of S5.5: Update hyperparameter k'; S5.6: Repeat steps S5.2 to S5.5 until the specified number of iterations is reached; At each time step t', Network 1 and Network 2 use their own selected "clean" samples to update their own parameters. Therefore, the two models will gradually learn from each other's noisy data and improve their robustness and generalization ability. Step S6: Model storage The fused weight parameter ω f1 and ω f2 The model weight w1 of the M1 neural network output by the joint learning model of brands 1 and 2 is recorded as the predicted capacitance of different batteries of brand 1; the model weight w2 of the M2 neural network output by the joint learning model of brands 1 and 2 is recorded as the predicted capacitance of different batteries of brand 2; In step S6, in the model storage, the result weight ω in the heterogeneous collaborative learning is f1 ,ω f2 The storage is the merging of the heterogeneity and timing results of battery capacitance under different brands at different periods, which is the final result; Step S7: Evaluation and Optimization Use test data to evaluate the performance of the model and optimize the model based on prediction accuracy and robustness; Step S8: Application and deployment The optimized battery capacitance prediction model is applied to actual scenarios to predict the capacitance of batteries of different brands and different periods, ensuring that the model can operate stably in the actual environment and produce accurate prediction results.
Citation Information
Patent Citations
Gas concentration prediction method based on adaptive modularization neural network
CN106503792A
Machine learning model training method and device
CN106548210A
