Lithium ion battery energy storage system charge state prediction method based on comparative learning
By adopting a comparative learning framework in the energy storage system of lithium ion battery, using data enhancement and multi -scale encoder to extract battery data features, solving the problem of insufficient SOC prediction accuracy and stability in existing technology, and achieve higher prediction accuracy accuracy accuracy Nature and adaptability.
Patent Information
- Application Number
- CN202411907318.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-01-24
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The prior art fails to fully utilize the information in the battery system time series data in the prediction of state of charge (SOC) of lithium-ion battery energy storage systems, resulting in insufficient prediction accuracy and stability.
A new framework based on contrastive learning is adopted, including data enhancement module, multi-scale encoder and multi-layer perceptron, to extract data features from the original data in an unsupervised manner, capture the trend and non-linear relationship of SOC dynamic transformation over time, and The representation vector is mixed with the original data and input to the prediction model to obtain the SOC value.
The accuracy and stability of the lithium -ion battery energy storage system is improved, especially under different temperature conditions, which significantly improves the reliability and adaptability of the prediction method.
Smart Images

Figure CN119357643A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of battery control management of novel energy storage systems, and in particular to a method for predicting the state of charge of a lithium-ion battery energy storage system based on comparative learning. Background Art
[0002] Lithium-ion batteries have the advantages of high energy density, high charge and discharge efficiency, and fast response dynamics, and they dominate the energy storage field at home and abroad. At the same time, the state of charge (SOC) of lithium-ion energy storage systems, as an important decision factor for energy management, plays an important role in optimizing power management strategies, improving energy utilization, preventing overcharge and overdischarge, ensuring safe use, and extending service life. The precise value of SOC is a hidden state and is difficult to obtain directly. As an important branch of machine learning, deep learning provides an effective solution to the above problems. Most of the existing research results use an end-to-end deep learning prediction paradigm to estimate SOC. The core technical route is to directly obtain the SOC value of battery operating parameters (voltage, current, impedance, etc.) through a series of transformations based on deep neural networks. However, these methods do not make full use of the rich information contained in the battery system time series data, resulting in a large room for improvement in the accuracy and stability of the prediction.
[0003] The present invention applies the idea of contrastive learning, proposes and constructs a new contrastive learning framework including a data enhancement module, a multi-scale encoder and a multi-layer perceptron. This method abandons the existing idea of directly applying the original input data features and building a prediction model end-to-end, extracts data features from the original data in an unsupervised manner, captures the trend that affects the dynamic change of the battery system SOC over time and the nonlinear relationship between them; generates a representation vector of the data features through the framework, and mixes the representation vector with the original data in proportion, inputs it into the proposed prediction model, and obtains the SOC value of the energy storage system.
[0004] Compared with the existing end-to-end methods, this method improves the accuracy of SOC estimation. The data enhancement module simulates different scenarios and constructs additional data segments, which increases the diversity of input data and improves the accuracy and stability of SOC estimation at different temperatures. The multi-scale encoder module collects sample data of different time granularities, which can not only learn the characteristics of partial discharge curves, but also summarize the global curve trends, improving the SOC estimation performance. Summary of the invention
[0005] The purpose of the present invention is to propose a method for predicting the state of charge of a lithium-ion battery energy storage system based on contrastive learning, which can improve the prediction accuracy of the state of charge of the lithium-ion battery energy storage system and the stability and reliability of the state of charge prediction method under low temperature conditions.
[0006] The present invention is achieved through the following technical solutions: A method for predicting the state of charge of a lithium-ion battery energy storage system based on contrastive learning, comprising: Step S1, obtaining the operating data of the lithium-ion battery energy storage system, wherein the operating data includes the current, voltage and temperature of the battery; Step S2: Perform data standardization on the running data. Data standardization is to scale the data features to a given range (usually the mean is 0 and the standard deviation is 1); Step S3: input the standardized data into a unique data enhancement module to perform data enhancement and generate comparison samples; Step S4: Perform multi-scale convolution on the contrast samples generated by data enhancement through a multi-scale encoder to obtain multiple convolution heads, and perform average pooling on the multiple convolution heads to obtain a representation vector containing multi-scale time information, denoted as and .
[0007] Step S5: The representation vector obtained in step S4 and Input a multi-layer perceptron network and output a pair of projection representation vectors and , calculate their similarity, and train the comparative learning model through the feedback of similarity.
[0008] Step S6: After the contrastive learning model is trained, the extra multilayer perceptron network is removed, and the lithium battery energy storage system operation data to be predicted is standardized and input into the trained contrastive learning model to obtain the output representation vector.
[0009] Step S7, mixing the representation vector with the lithium battery energy storage system operation data in S1 in different proportions to obtain a mixed sample; Step S8: input the mixed sample into a prediction model composed of two single-layer linear networks, and obtain the charge state of the energy storage system through the model.
[0010] Furthermore, in step S2: The current, voltage and temperature data in the operating data are standardized using the following formula:
[0011] Among them, x is the sample value to be processed, u is the mean value of the training sample, and s is the standard deviation of the training sample. Through this calculation, each feature is independently centered and scaled, and the mean and standard deviation are stored for restoring the prediction results.
[0012] Furthermore, in step S3, the specific content of the unique data enhancement module is as follows: Given a battery data sequence ,in is the number of characteristics (current, voltage, temperature, etc.), is the sequence length. By applying three simple enhancements in sequence: left-to-right flipping, jittering, and occlusion, two enhanced data can be generated and .
[0013] The left-to-right flip enhancement method is that within a time series, the rightmost data value becomes the leftmost data value, and they are swapped in sequence, which is conceptualized as a data rotation around the y-axis (channel axis). This can be represented by a matrix:
[0014] In the formula is the original data, To enhance the data, is the switching matrix, where:
[0015] The jitter enhancement method is to add independent and identically distributed Gaussian noise to each time step. The Gaussian noise obeys , the enhancement process can be expressed as:
[0016] The occlusion enhancement method is to In the example above, randomly select a continuous region , and set all values in the region to 1 for blocking enhancement. Assume that the starting position of the time series is , but:
[0017] Furthermore, in step S4, the multi-scale encoder is specifically: The above multi-scale encoder network consists of several filters with different kernel sizes. First, a convolutional projection layer is applied to each input time series to project it into the latent space. This projection can capture the abstract information between different data features of the time series and identify the internal latent feature relationships that are not easy to see from the original data itself; secondly, a set of parallel convolutional layers are added to the convolutional projection layer. For a length of Enhanced data ,design Convolutional layers . No. The convolution kernel size of the convolution layer is ,in , this design can capture information at different scales. After extracting latent features from the projection layer, each convolutional layer produces a representation vector. The representation vector generated by the layer is denoted as . Through Perform average pooling to obtain the final multi-scale representation vector .
[0018] Furthermore, in step S5: the comparison sample generated by data enhancement is encoded using a multi-scale encoder to generate a representation vector and . and Projected into a smaller space through a multi-layer perceptron network and For each pair of projection vectors and , treat them as positive pairs and calculate their similarity:
[0019] in is the indicator function, if Corresponding to 1, otherwise 0. represents the cosine similarity. The loss can be increased by an additional temperature parameter Further adjustment.
[0020] The multi-layer perceptron network is specifically: The multilayer perceptron network is the most basic neural network structure. Compared with directly calculating the contrast loss on the representation vector y, the multilayer perceptron Mapping to a lower dimensional space and in Defining the contrastive loss in can achieve better results. The structure of this multilayer perceptron network consists of a linear layer with an output size of 4096, followed by batch normalization, rectified linear units (ReLU), and a final linear layer with an output size of 64:
[0021] In the formula, is a multi-scale representation vector, is the batch normalization layer, is the rectified linear unit, is the first fully connected layer, is the second fully connected layer.
[0022] Furthermore, in step S6: After the contrastive learning model is trained, its additional multi-layer perceptron network is removed, and the data enhancement module, multi-scale encoder module, and weights learned during the construction process of the contrastive learning model framework are retained. The operating data of the lithium battery energy storage system to be predicted is input into the trained contrastive learning model to obtain the representation vector of the operating data features.
[0023] Furthermore, in step S7, the ratio of mixing the representation vector with the battery operation data in S1 is between 1 / 5 and 1 / 2.
[0024] The present invention has the following beneficial effects: improvement of prediction accuracy, by standardizing the operation data and using the representation vector learning model based on contrastive learning, effectively capturing the complex relationships and features in the battery operation data, and significantly improving the accuracy of charge state prediction; adapting to different temperature conditions, by considering the temperature data of the battery when building the model, and comprehensively analyzing the influence of temperature on battery performance in the representation vector learning and prediction model, thereby enhancing the stability and adaptability of the prediction method under different temperature conditions; effectiveness of data processing, by eliminating the magnitude differences between the characteristic values of different operation data through standardization processing, ensuring the consistency of the model input data, and improving model training and Prediction effect; optimization of comprehensive performance, mixing the representation vector and the original operating data in a certain proportion, and utilizing the complementary characteristics of the two to optimize the expression ability of the sample features, so that the prediction model can more accurately reflect the actual state of charge of the battery; model simplification and computational efficiency, using a prediction model composed of two single-layer linear networks, simplifying the model structure, reducing the computational complexity, and improving the prediction efficiency, which is suitable for energy storage system application scenarios with high real-time requirements; enhancing system reliability, through high-precision and high-stability state of charge prediction, it can more accurately schedule the charging and discharging operations of the energy storage system, extend battery life, and improve the overall reliability and safety of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] The present invention is further described in detail below in conjunction with the accompanying drawings. It should be understood that the following drawings only illustrate certain embodiments of the present invention and should not be considered as limiting the scope. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative work.
[0026] Figure 1 is a flow chart of the present invention; Figure 2 It is a normalized before and after diagram of the present invention; Figure 3 A diagram showing the reversal process of the current characteristic of the present invention; Figure 4 This is a diagram showing the jitter enhancement effect of the present invention; Figure 5This is a diagram of the shielding enhancement effect of the present invention; Figure 6 It is a diagram showing the prediction results of the two working conditions of US06 and HWFET at zero degrees Celsius according to the present invention. DETAILED DESCRIPTION
[0027] The technical scheme in the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiment of the present invention. Obviously, the described embodiment is only a part of the embodiment of the present invention, not all of the embodiments. Based on the embodiment of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0028] like Figure 1 As shown, the method for predicting the state of charge of a lithium-ion battery energy storage system includes the following steps: Step S1, obtaining the operating data of the lithium-ion battery energy storage system. The operating data includes the current, voltage and temperature of the battery. Specifically, a total of 112,543 pieces of Panasonic NCR18650PF operating data are obtained; Step S2: Standardize the operating data. Specifically, in order to avoid the adverse effect of dimensional differences on model training and speed up the training, the current, voltage and temperature data in the operating data are standardized using the following formula:
[0029] Among them, x is the sample value to be processed, u is the mean value of the training sample, and s is the standard deviation of the training sample. Through this calculation, each feature is independently centered and scaled, and the mean and standard deviation are stored for restoring the prediction results.
[0030] Step S3: Input the standardized data into a unique data enhancement module to perform data enhancement and generate comparison samples. Specifically, given a battery data sequence , where the number of features is 3, the sequence length is 192. By applying three simple enhancements in sequence: left-to-right flipping, jittering, and occlusion, two enhanced data can be generated and .in: The left-to-right flip enhancement method is that within a time series, the rightmost data value becomes the leftmost data value, and they are swapped in sequence, which is conceptualized as a data rotation around the y-axis (channel axis). This can be represented by a matrix:
[0031] In the formula is the original data, To enhance the data, is the switching matrix, where:
[0032] The jitter enhancement method is to add independent and identically distributed Gaussian noise to each time step. The Gaussian noise obeys , the enhancement process can be expressed as:
[0033] The occlusion enhancement method is to In the example above, randomly select a continuous region , and set all values in it to 1 for blocking enhancement. Assume that the starting position of the time series is , but:
[0034] Step S4: Perform multi-scale convolution on the contrast samples generated by data enhancement through a multi-scale encoder to obtain multiple convolution heads, and perform average pooling on the multiple convolution heads to obtain a representation vector containing multi-scale time information, denoted as and Specifically, the multi-scale encoder network consists of several filters with different kernel sizes. First, a convolutional projection layer is applied to each input time series to project it into the latent space. This projection can capture the abstract information between different data features of the time series and identify the internal latent feature relationships that are not easy to see from the original data itself; secondly, a set of parallel convolutional layers are added to the convolutional projection layer. For a length of Enhanced data ,design Convolutional layers . No. The convolution kernel size of the convolution layer is ,in , this design can capture information at different scales. After extracting latent features from the projection layer, each convolutional layer produces a representation vector. The representation vector generated by the layer is denoted as . Through Perform average pooling to obtain the final multi-scale representation vector .
[0035] Step S5: The representation vector generated by the multi-scale encoder and Input the multilayer perceptron and project it into a smaller space to get a pair of projection representation vectors and , we regard them as positive pairs and calculate their similarity. Through the feedback of similarity, we train the contrastive learning model. Specifically, the structure of the multilayer perceptron network includes a linear layer with an output size of 4096, followed by batch normalization, rectified linear unit (ReLU), and finally a linear layer with an output size of 64:
[0036] In the formula, is a multi-scale representation vector, is the batch normalization layer, is the rectified linear unit, is the first fully connected layer, is the second fully connected layer.
[0037] and Projected into a smaller space through a multi-layer perceptron network and For each pair of projection vectors and , we regard them as positive pairs and calculate their similarity:
[0038] in is the indicator function, if Corresponding to 1, otherwise 0. represents the cosine similarity. The loss can be increased by an additional temperature parameter The above multilayer perceptron network is a basic neural network structure. Compared with directly calculating the contrast loss on the representation vector y, the multilayer perceptron can be used to Mapping to a lower dimensional space and in Better results can be achieved by defining the contrastive loss in .
[0039] Step S6: After the contrastive learning model is trained, the extra multi-layer perceptron network is removed, and the operating data of the lithium battery energy storage system to be predicted is input into the trained contrastive learning model to obtain a representation vector; Specifically, in step S6: after the contrastive learning model is trained, the extra multi-layer perceptron network is removed, and the data enhancement module, multi-scale encoder module of the contrastive learning model framework, and the weights learned during the construction process are retained. The operating data of the lithium battery energy storage system to be predicted is input into the trained contrastive learning model to obtain a representation vector of the operating data features.
[0040] Step S7, mixing the representation vector obtained in step S6 with the battery operation data in S1 at a ratio of 1:3 to obtain a mixed sample. Specifically, in step S7, the ratio of the representation vector to the battery operation data in S1 is between 1 / 5 and 1 / 2.
[0041] Step S8: Input the mixed sample into a prediction model composed of two single-layer linear networks to perform downstream prediction tasks and obtain the state of charge of the battery.
[0042] In this embodiment, a method for predicting the state of charge of a lithium-ion battery energy storage system based on contrastive learning is provided. The state of charge of a lithium-ion battery energy storage system is a core parameter for the operation of the system. Predicting the state of charge can not only optimize the efficiency of the battery, but also effectively prevent overcharging and over-discharging, thereby extending the service life of the battery. This method introduces contrastive learning technology, utilizes rich historical data and real-time monitoring information, and extracts the characteristics of the battery under different working conditions, thereby improving the accuracy of the state of charge prediction. In addition, the system can adapt to changes in different environmental conditions to ensure reliable performance under various temperatures and loads. This will provide important support for the intelligent management and application of lithium-ion batteries. Therefore, the following steps are specifically included: Step S1, obtaining operation data of a lithium-ion battery energy storage system; The operating data includes the current, voltage and temperature of the system. Specifically, in this embodiment, the current is the main circuit current of the entire system, the voltage is the open circuit voltage, and the temperature is the shell temperature of the stack. A total of 103,462 pieces of operating data including the above parameters are obtained; Step S2: Standardize the running data. Specifically, the specific steps for standardizing the running data are as follows: First, calculate the mean and standard deviation of each feature to ensure that the data is centered and has unit variance. Then, for each data point, subtract the mean of the feature and divide by the standard deviation to convert the data into a standard normal distribution. The process can be described as the following formula: z = (x - u) / s Among them, x is the sample value to be processed, u is the mean value of the training sample, and s is the standard deviation of the training sample. Through this calculation, each feature is independently centered and scaled, and the mean and standard deviation are stored for restoring the prediction results. This process helps to eliminate the dimensional differences between features and enhance the stability and convergence speed of model training. In addition, the standardized data can effectively improve the performance of subsequent comparative learning and deep learning models, enabling them to better capture the potential patterns and features in the data. The changes before and after standardization are as follows Figure 2 shown.
[0043] Step S3: Input the standardized data into a unique data enhancement module to perform data enhancement and generate comparison samples. Specifically, given a battery data sequence In this embodiment, the feature number is 3, the sequence length is 32. By applying three simple enhancements in sequence: left-to-right flipping, jittering, and occlusion, two enhanced data can be generated and .in: The left-to-right flip enhancement method is that within a time series, the rightmost data value becomes the leftmost data value, and they are swapped in sequence, which is conceptualized as a data rotation around the y-axis (channel axis). This can be represented by a matrix:
[0044] In the formula is the original data, To enhance the data, is the switching matrix, where:
[0045] Specifically, the reversal process of the current characteristics is as follows: Figure 3 As shown in the figure, the light blue is the original data, and the dark blue is the enhanced data. The following marks are the same and will not be repeated. In the time slice, the 1st time step is exchanged with the 32nd time step; the 2nd time step is exchanged with the 31st time step; in this way, the data of all time steps are flipped in sequence.
[0046] The jitter enhancement method is to add independent and identically distributed Gaussian noise to each time step. The Gaussian noise obeys , the enhancement process can be expressed as:
[0047] In this embodiment, the specific jitter enhancement effect is as follows: Figure 4 As shown in the figure, the original signal is compared with the signal after jitter enhancement. By introducing Gaussian noise, the enhanced data simulates the uncertainty in the real environment to a certain extent, so that the model can better adapt to different input changes during training. This method effectively improves the diversity of samples in the contrastive learning process and lays a more solid foundation for subsequent model training.
[0048] The occlusion enhancement method is to In the example above, randomly select a continuous region , and set all values in it to 1 for blocking enhancement. Assume that the starting position of the time series is , but:
[0049] In this embodiment, the specific shielding enhancement effect is as follows: Figure 5 As shown, within the time slice, the area between the 16th time step and the 27th time step is selected, and the data of the time steps in all areas are set to 1.
[0050] Step S4: Perform multi-scale convolution on the contrast samples generated by data enhancement through a multi-scale encoder to obtain multiple convolution heads, and perform average pooling on the multiple convolution heads to obtain a representation vector containing multi-scale time information, denoted as and Specifically, the multi-scale encoder network consists of several filters with different kernel sizes. First, a convolutional projection layer is applied to each input time series to project it into the latent space. This projection can capture the abstract information between different data features of the time series and identify the internal latent feature relationships that are not easy to see from the original data itself; secondly, a set of parallel convolutional layers are added to the convolutional projection layer. For a length of Enhanced data ,design Convolutional layers In this embodiment, m=6, T=32, The convolution kernel size of the convolution layer is ,in , this design can capture information at different scales. After extracting latent features from the projection layer, each convolutional layer produces a representation vector. The representation vector generated by the layer is denoted as . Through Perform average pooling to obtain the final multi-scale representation vector .
[0051] Step S5: The representation vector generated by the multi-scale encoder and Input the multilayer perceptron and project it into a smaller space to get a pair of projection representation vectors and , we regard them as positive pairs and calculate their similarity. Through the feedback of similarity, we train the contrastive learning model. Specifically, in this embodiment, the input size of the multilayer perceptron network is 4096, and the following network is applied to obtain the representation vector with an output size of 64 :
[0052] In the formula, is a multi-scale representation vector, is the batch normalization layer, is the rectified linear unit, is the first fully connected layer, is the second fully connected layer.
[0053] and Projected into a smaller space through a multi-layer perceptron network and For each pair of projection vectors and , we regard them as positive pairs and calculate their similarity:
[0054] in is the indicator function, if Corresponding to 1, otherwise 0. represents the cosine similarity. The loss can be increased by an additional temperature parameter Further adjustment. Specifically, in this embodiment, the similarity loss is 2.97. The multilayer perceptron network is a basic neural network structure. Compared with directly calculating the contrast loss on the representation vector y, the multilayer perceptron is used to convert Mapping to a lower dimensional space and in Better results can be achieved by defining the contrastive loss in .
[0055] Step S6: After the contrastive learning model is trained, the additional multi-layer perceptron network is removed, and the operating data of the lithium battery energy storage system to be predicted is input into the trained contrastive learning model to obtain a representation vector. Specifically, in step S6: after the contrastive learning model is trained, the additional multi-layer perceptron network is removed, and the data enhancement module, multi-scale encoder module of the contrastive learning model framework, and the weights learned during the construction process are retained. The operating data of the lithium battery energy storage system to be predicted is input into the trained contrastive learning model to obtain a representation vector of the operating data features.
[0056] Step S7, mixing the representation vector obtained in step S6 with the battery operation data in S1 at a ratio of 1:3 to obtain a mixed sample. Specifically, in step S7, the ratio of the representation vector to the battery operation data in S1 is between 1 / 5 and 1 / 2. Specifically, in this embodiment, the mixing ratio is 1 / 3, that is, 34,368 representation vectors are mixed with 10,3462 battery operation data.
[0057] Step S8: Input the mixed sample into a prediction model composed of two single-layer linear networks to perform downstream prediction tasks and obtain the state of charge of the battery. Figure 6 The following are the prediction results of the two working conditions of US06 and HWFET at zero degrees Celsius in this embodiment, where the blue ones are the actual values and the red ones are the predicted values.
[0058] The present invention designs and develops a method for predicting the state of charge of a lithium-ion battery energy storage system based on contrastive learning. The contrastive learning idea is applied to propose and construct a new contrastive learning framework including a data enhancement module, a multi-scale encoder and a multi-layer perceptron. This method abandons the existing idea of directly applying the original input data features and building a prediction model end-to-end. It extracts data features from the original data in an unsupervised manner to capture the trends that affect the dynamic changes of the battery system SOC over time and the nonlinear relationship between them; the representation vector of the data features is generated through the framework, and the representation vector is mixed with the original data in proportion, and input into the proposed prediction model to obtain the SOC value of the energy storage system.
[0059] Compared with the existing end-to-end methods, this method improves the accuracy and stability of SOC estimation at different temperatures. The maximum mean square error of the present invention is only 0.77, and the maximum error is only 3.11. It can still maintain a high prediction accuracy in complex environments and effectively reduce the estimation error caused by temperature changes. In addition, the stability of the model makes it more reliable in practical applications and can meet high energy management and safety standards. This result not only verifies the effectiveness of contrastive learning in SOC prediction, but also provides new ideas and methods for future battery management systems.
[0060] The above description is only a preferred embodiment of the present invention, and therefore cannot be used to limit the scope of implementation of the present invention. That is, equivalent changes and modifications made according to the scope of the patent application of the present invention and the contents of the specification should still fall within the scope covered by the patent of the present invention.
Claims
1. A method for predicting the state of charge of a lithium-ion battery energy storage system based on contrastive learning, characterized in that: include: Step S1, obtaining operating data of the lithium battery energy storage system; wherein the operating data includes current, voltage and temperature information of the energy storage system; Step S2, performing data standardization processing on the above operation data; Step S3: input the standardized data into a unique data enhancement module to perform data enhancement and generate comparison samples; Step S4: Perform multi-scale convolution on the contrast samples generated by data enhancement through a multi-scale encoder to obtain multiple convolution heads, and perform average pooling on the multiple convolution heads to obtain a representation vector containing multi-scale time information, denoted as and ; Step S5: The representation vector obtained in step S4 and Input a multi-layer perceptron network and output a pair of projection representation vectors and , calculate their similarity, and train the comparative learning model through the feedback of similarity; Step S6: After the contrastive learning model is trained, the extra multi-layer perceptron network is removed, and the lithium battery energy storage system operation data to be predicted is standardized and input into the trained contrastive learning model to obtain an output representation vector; Step S7, mixing the representation vector with the lithium battery energy storage system operation data in S1 in different proportions to obtain a mixed sample; Step S8: input the mixed sample into a prediction model composed of two single-layer linear networks, and calculate the state of charge of the energy storage system through the model.
2. The method for predicting the state of charge of a lithium-ion battery energy storage system based on contrastive learning according to claim 1, characterized in that: In step S2: The running data is standardized using the following formula: Among them, x is the sample value to be processed, u is the mean value of the training sample, and s is the standard deviation of the training sample. Through this calculation, each feature is independently centered and scaled, and its mean and standard deviation are stored to restore the subsequent energy storage system charge state prediction results.
3. The method for predicting the state of charge of a lithium-ion battery energy storage system based on contrastive learning according to claim 1, characterized in that: In step S3, the specific content of the unique data enhancement module is as follows: Given a time series ,in is the number of data features, is the length of the time series; by applying three simple enhancements in sequence: flipping from left to right, jittering, and occlusion, x Generate two sets of augmented data and ; The left-to-right flip enhancement method is to change the rightmost data value to the leftmost data value in a time series, and then swap them one by one. This is conceptualized as a data rotation around the y-axis, which can be represented by a matrix: In the formula is the original data, To enhance the data, is the switching matrix, where: The jitter enhancement method is to add independent and identically distributed Gaussian noise to each time step. The Gaussian noise obeys , the enhancement process can be expressed as: The occlusion enhancement method is to In the example above, randomly select a continuous region , and set all values in the region to 1 for occlusion enhancement; assuming that the starting position of the time series is , but: 。 4. The method for predicting the state of charge of a lithium-ion battery energy storage system based on contrastive learning according to claim 1, characterized in that: In step S4, the multi-scale encoder is specifically as follows: The multi-scale encoder network consists of several filters with different kernel sizes. First, a convolutional projection layer is applied to each input time series to project it into a latent space. This projection can capture the abstract information between different data features of the time series and identify internal latent feature relationships that are not easily visible from the raw data itself. Second, add a set of parallel convolutional layers to the convolutional projection layer; for a length of Enhanced data ,design Convolutional layers ;No. The convolution kernel size of the convolution layer is ,in , this design can capture information at different scales; after extracting latent features from the projection layer, each convolutional layer produces a representation vector; The representation vector generated by the layer is denoted as ; Through Perform average pooling to obtain the final multi-scale representation vector .
5. The method for predicting the state of charge of a lithium-ion battery energy storage system based on contrastive learning according to claim 1, characterized in that: In step S5: The contrast samples generated by data augmentation are encoded using a multi-scale encoder to produce a representation vector and ; and Projected into a smaller space through a multi-layer perceptron network and ; For each pair of projection vectors and , treat them as positive pairs and calculate their similarity: in is the indicator function, if Corresponds to 1, otherwise 0; represents the cosine similarity; the loss can be expressed by an additional temperature parameter Further adjustment; The multilayer perceptron network is a basic neural network structure; compared with directly calculating the contrast loss on the representation vector y, the multilayer perceptron is used to convert Mapping to a lower dimensional space , and in Better results can be obtained by defining the contrastive loss in ; the structure of this multilayer perceptron network includes a linear layer with an output size of 4096, followed by batch normalization, rectified linear unit (ReLU), and finally a linear layer with an output size of 64: In the formula, is a multi-scale representation vector, is the batch normalization layer, is the rectified linear unit, is the first fully connected layer, is the second fully connected layer.
6. The method for predicting the state of charge of a lithium-ion battery energy storage system based on contrastive learning according to claim 1, characterized in that: In step S6: After the contrastive learning model is trained, its additional multi-layer perceptron network is removed, and the data enhancement module, multi-scale encoder module, and weights learned during the construction process of the contrastive learning model framework are retained; the operating data of the lithium battery energy storage system that needs to be predicted is input into the trained contrastive learning model to obtain the representation vector of the operating data features.
7. The method for predicting the state of charge of a lithium-ion battery energy storage system based on contrastive learning according to claim 1, characterized in that: In step S7, the ratio of mixing the representation vector with the battery operation data in S1 is between 1 / 5 and 1 / 2.
Citation Information
Patent Citations
Multi-scale wind power time sequence prediction method
CN115600501A
Joint estimation method, device and equipment for electric quantity and health degree of battery and medium
CN117388711A
Operating mechanism fault identification method and system, electronic equipment and storage medium
CN119025986A
Purified contrastive learning for lightweight neural network training
US20240185078A1